[prev in list] [next in list] [prev in thread] [next in thread]
List: lilypond-user-fr
Subject: Re: Fonction scheme pour mordant explicite
From: Christophe Pochon <music () christophe-pochon ! com>
Date: 2016-07-13 14:57:15
Message-ID: CACUy82LMVQEV4k+920MvQws5LkhYKY8MtiBs-exsg-ta-VG0MA () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Ou peut-être que le plus simple serait de créer deux fonctions : \mord pour
les mordant d'un ton et \mordH pour les mordant d'un demi-ton, par exemple
ainsi :
\version "2.18.2"
\language "english"
mord = #(define-music-function (parser location myNote)
(ly:music?)
(define myGnote
(make-music 'NoteEvent
'duration (ly:make-duration 5 0)
'pitch (ly:music-property myNote 'pitch)
)
)
(define myOtherGnote
(make-music 'NoteEvent
'duration (ly:make-duration 5 0)
'pitch (ly:pitch-transpose
(ly:music-property myNote 'pitch)
(ly:make-pitch 0 1 0))
)
)
#{
\acciaccatura {
#myGnote
#myOtherGnote
}
#myNote
#}
)
mordH = #(define-music-function (parser location myNote)
(ly:music?)
(define myGnote
(make-music 'NoteEvent
'duration (ly:make-duration 5 0)
'pitch (ly:music-property myNote 'pitch)
)
)
(define myOtherGnote
(make-music 'NoteEvent
'duration (ly:make-duration 5 0)
'pitch (ly:pitch-transpose
(ly:music-property myNote 'pitch)
(ly:make-pitch 0 1 FLAT))
)
)
#{
\acciaccatura {
#myGnote
#myOtherGnote
}
#myNote
#}
)
{
\key c \minor
\mord c'4 \mordH d' ef'
}
Christophe Pochon
http://www.christophe-pochon.com
Le 13 juillet 2016 Ã 12:46, Christophe Pochon <music@christophe-pochon.com>
a écrit :
> Ok.
>
> Une piste peut-être, en regardant comment est écrite la fonction
> modalTranspose ?
>
>
> Christophe Pochon
> http://www.christophe-pochon.com
>
> Le 13 juillet 2016 Ã 11:40, Simon Froger <simon.froger211@gmail.com> a
> écrit :
>
>> Oui, c'est bien ça... Ou alors faire en sorte qu'aucune altération
>> n'apparaisse sur les petites notes ou après...
>>
>> Le 13/07/2016 04:35, Christophe Pochon a écrit :
>>
>>> Bonjour !
>>>
>>> Je ne comprends pas très bien. Tu voudrais que ta fonction s'adapte
>>> automatiquement à la tonalité et devine ainsi quand la deuxième note doit
>>> être un ton ou un demi-ton en-dessus de la première ?
>>>
>>>
>>> Christophe
>>>
>>> Christophe Pochon
>>> http://www.christophe-pochon.com
>>>
>>> Le 13 juillet 2016 Ã 00:18, Simon Froger <simon.froger211@gmail.com
>>> <mailto:simon.froger211@gmail.com>> a écrit :
>>>
>>> Bonjour.
>>>
>>> Je suis en train de bricoler une fonction scheme pour automatiser
>>> l'écriture d'un mordant explicite : le principe consiste Ã
>>> extraire le pitch de la note sur laquelle s'applique la fonction,
>>> de créer une petite note avec ce même pitch, suivie d'une autre
>>> petite note 1 ton plus haut.
>>>
>>> Problème : ça marche quand les deux notes sont séparées d'un ton,
>>> mais lorsqu'elles sont séparées d'un demi-ton, ça met des
>>> altérations non désirées... Il faudrait donc transposer non pas
>>> d'un ton, mais d'un degré dans l'échelle du morceau. Comment faire ?
>>>
>>> Mon exemple :
>>>
>>> \version "2.18.2"
>>> \language "english"
>>>
>>> mord = #(define-music-function (parser location myNote)
>>> (ly:music?)
>>> (define myGnote
>>> (make-music 'NoteEvent
>>> 'duration (ly:make-duration 5 0)
>>> 'pitch (ly:music-property myNote 'pitch)
>>> )
>>> )
>>> (define myOtherGnote
>>> (make-music 'NoteEvent
>>> 'duration (ly:make-duration 5 0)
>>> 'pitch (ly:pitch-transpose
>>> (ly:music-property myNote 'pitch)
>>> (ly:make-pitch 0 1 0))
>>> )
>>> )
>>> #{
>>> \acciaccatura {
>>> #myGnote
>>> #myOtherGnote
>>> }
>>> #myNote
>>> #}
>>> )
>>>
>>>
>>> {
>>> \key c \minor
>>> \mord c'4 \mord d' ef'
>>> }
>>>
>>> _______________________________________________
>>> liste de diffusion lilypond-user-fr
>>> lilypond-user-fr@gnu.org <mailto:lilypond-user-fr@gnu.org>
>>> https://lists.gnu.org/mailman/listinfo/lilypond-user-fr
>>>
>>>
>>>
>>
>
[Attachment #5 (text/html)]
<div dir="ltr">Ou peut-être que le plus simple serait de créer deux fonctions : \
\mord pour les mordant d'un ton et \mordH pour les mordant d'un demi-ton, par \
exemple ainsi :<div><br></div><div> <p style="margin:0px"><span \
style="font-size:13px">\version "2.18.2"</span><br \
style="font-size:13px"><span style="font-size:13px">\language \
"english"</span><br style="font-size:13px"><br style="font-size:13px"><span \
style="font-size:13px">mord = #(define-music-function (parser location \
myNote)</span><br style="font-size:13px"><span style="font-size:13px"> \
(ly:music?)</span><br style="font-size:13px"><span style="font-size:13px"> \
(define myGnote</span><br style="font-size:13px"><span style="font-size:13px"> \
(make-music 'NoteEvent</span><br style="font-size:13px"><span \
style="font-size:13px"> 'duration (ly:make-duration \
5 0)</span><br style="font-size:13px"><span style="font-size:13px"> \
'pitch (ly:music-property myNote 'pitch)</span><br \
style="font-size:13px"><span style="font-size:13px"> \
)</span><br style="font-size:13px"><span style="font-size:13px"> \
)</span><br style="font-size:13px"><span style="font-size:13px"> \
(define myOtherGnote</span><br style="font-size:13px"><span style="font-size:13px"> \
(make-music 'NoteEvent</span><br style="font-size:13px"><span \
style="font-size:13px"> 'duration (ly:make-duration \
5 0)</span><br style="font-size:13px"><span style="font-size:13px"> \
'pitch (ly:pitch-transpose</span><br style="font-size:13px"><span \
style="font-size:13px"> (ly:music-property \
myNote 'pitch) (ly:make-pitch 0 1 0))</span><br style="font-size:13px"><span \
style="font-size:13px"> )</span><br \
style="font-size:13px"><span style="font-size:13px"> )</span><br \
style="font-size:13px"><span style="font-size:13px"> #{</span><br \
style="font-size:13px"><span style="font-size:13px"> \
\acciaccatura {</span><br style="font-size:13px"><span style="font-size:13px"> \
#myGnote</span><br style="font-size:13px"><span style="font-size:13px"> \
#myOtherGnote</span><br style="font-size:13px"><span style="font-size:13px"> \
}</span><br style="font-size:13px"><span style="font-size:13px"> \
#myNote</span><br style="font-size:13px"><span style="font-size:13px"> \
#}</span><br style="font-size:13px"><span style="font-size:13px"> \
)</span></p><p style="margin:0px"><br></p><p style="margin:0px"><span \
style="font-size:13px">mordH = #(define-music-function (parser location \
myNote)</span><br style="font-size:13px"><span style="font-size:13px"> \
(ly:music?)</span><br style="font-size:13px"><span style="font-size:13px"> \
(define myGnote</span><br style="font-size:13px"><span style="font-size:13px"> \
(make-music 'NoteEvent</span><br style="font-size:13px"><span \
style="font-size:13px"> 'duration (ly:make-duration \
5 0)</span><br style="font-size:13px"><span style="font-size:13px"> \
'pitch (ly:music-property myNote 'pitch)</span><br \
style="font-size:13px"><span style="font-size:13px"> \
)</span><br style="font-size:13px"><span style="font-size:13px"> \
)</span><br style="font-size:13px"><span style="font-size:13px"> \
(define myOtherGnote</span><br style="font-size:13px"><span style="font-size:13px"> \
(make-music 'NoteEvent</span><br style="font-size:13px"><span \
style="font-size:13px"> 'duration (ly:make-duration \
5 0)</span><br style="font-size:13px"><span style="font-size:13px"> \
'pitch (ly:pitch-transpose</span><br style="font-size:13px"><span \
style="font-size:13px"> (ly:music-property \
myNote 'pitch) (ly:make-pitch 0 1 FLAT))</span><br style="font-size:13px"><span \
style="font-size:13px"> )</span><br \
style="font-size:13px"><span style="font-size:13px"> )</span><br \
style="font-size:13px"><span style="font-size:13px"> #{</span><br \
style="font-size:13px"><span style="font-size:13px"> \
\acciaccatura {</span><br style="font-size:13px"><span style="font-size:13px"> \
#myGnote</span><br style="font-size:13px"><span style="font-size:13px"> \
#myOtherGnote</span><br style="font-size:13px"><span style="font-size:13px"> \
}</span><br style="font-size:13px"><span style="font-size:13px"> \
#myNote</span><br style="font-size:13px"><span style="font-size:13px"> \
#}</span><br style="font-size:13px"><span style="font-size:13px"> \
)</span><br style="font-size:13px"><br style="font-size:13px"><br \
style="font-size:13px"><span style="font-size:13px">{</span><br \
style="font-size:13px"><span style="font-size:13px"> \key c \minor</span><br \
style="font-size:13px"><span style="font-size:13px"> \mord c'4 \mordH d' \
ef'</span><br style="font-size:13px"><span style="font-size:13px">}</span><br \
style="font-size:13px"></p><p style="margin:0px"></p><div><div \
class="gmail_extra"><br clear="all"><div><div \
data-smartmail="gmail_signature">Christophe Pochon<br><a \
href="http://www.christophe-pochon.com" \
target="_blank">http://www.christophe-pochon.com</a><br></div></div> <br><div \
class="gmail_quote">Le 13 juillet 2016 Ã 12:46, Christophe Pochon <span \
dir="ltr"><<a href="mailto:music@christophe-pochon.com" \
target="_blank">music@christophe-pochon.com</a>></span> a écrit :<br><blockquote \
class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div \
dir="ltr">Ok.<div><br></div><div>Une piste peut-être, en regardant comment est \
écrite la fonction modalTranspose ?</div><span><font \
color="#888888"><div><br></div></font></span></div><div \
class="gmail_extra"><span><font color="#888888"><br clear="all"><div><div \
data-smartmail="gmail_signature">Christophe Pochon<br><a \
href="http://www.christophe-pochon.com" \
target="_blank">http://www.christophe-pochon.com</a><br></div></div></font></span><div><div>
<br><div class="gmail_quote">Le 13 juillet 2016 Ã 11:40, Simon Froger <span \
dir="ltr"><<a href="mailto:simon.froger211@gmail.com" \
target="_blank">simon.froger211@gmail.com</a>></span> a écrit :<br><blockquote \
class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Oui, \
c'est bien ça... Ou alors faire en sorte qu'aucune altération \
n'apparaisse sur les petites notes ou après...<span><br> <br>
Le 13/07/2016 04:35, Christophe Pochon a écrit :<br>
</span><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span>
Bonjour !<br>
<br>
Je ne comprends pas très bien. Tu voudrais que ta fonction s'adapte \
automatiquement à la tonalité et devine ainsi quand la deuxième note doit être un \
ton ou un demi-ton en-dessus de la première ?<br> <br>
<br>
Christophe<br>
<br>
Christophe Pochon<br>
<a href="http://www.christophe-pochon.com" rel="noreferrer" \
target="_blank">http://www.christophe-pochon.com</a><br> <br></span><div><div>
Le 13 juillet 2016 Ã 00:18, Simon Froger <<a \
href="mailto:simon.froger211@gmail.com" target="_blank">simon.froger211@gmail.com</a> \
<mailto:<a href="mailto:simon.froger211@gmail.com" \
target="_blank">simon.froger211@gmail.com</a>>> a écrit :<br> <br>
Bonjour.<br>
<br>
Je suis en train de bricoler une fonction scheme pour automatiser<br>
l'écriture d'un mordant explicite : le principe consiste à <br>
extraire le pitch de la note sur laquelle s'applique la fonction,<br>
de créer une petite note avec ce même pitch, suivie d'une autre<br>
petite note 1 ton plus haut.<br>
<br>
Problème : ça marche quand les deux notes sont séparées d'un ton,<br>
mais lorsqu'elles sont séparées d'un demi-ton, ça met des<br>
altérations non désirées... Il faudrait donc transposer non pas<br>
d'un ton, mais d'un degré dans l'échelle du morceau. Comment \
faire ?<br> <br>
Mon exemple :<br>
<br>
\version "2.18.2"<br>
\language "english"<br>
<br>
mord = #(define-music-function (parser location myNote)<br>
(ly:music?)<br>
(define myGnote<br>
(make-music 'NoteEvent<br>
'duration (ly:make-duration 5 0)<br>
'pitch (ly:music-property myNote \
'pitch)<br> )<br>
)<br>
(define myOtherGnote<br>
(make-music 'NoteEvent<br>
'duration (ly:make-duration 5 0)<br>
'pitch (ly:pitch-transpose<br>
(ly:music-property myNote \
'pitch)<br> (ly:make-pitch 0 1 0))<br>
)<br>
)<br>
#{<br>
\acciaccatura {<br>
#myGnote<br>
#myOtherGnote<br>
}<br>
#myNote<br>
#}<br>
)<br>
<br>
<br>
{<br>
\key c \minor<br>
\mord c'4 \mord d' ef'<br>
}<br>
<br>
_______________________________________________<br>
liste de diffusion lilypond-user-fr<br></div></div>
<a href="mailto:lilypond-user-fr@gnu.org" \
target="_blank">lilypond-user-fr@gnu.org</a> <mailto:<a \
href="mailto:lilypond-user-fr@gnu.org" \
target="_blank">lilypond-user-fr@gnu.org</a>><br> <a \
href="https://lists.gnu.org/mailman/listinfo/lilypond-user-fr" rel="noreferrer" \
target="_blank">https://lists.gnu.org/mailman/listinfo/lilypond-user-fr</a><br> <br>
<br>
</blockquote>
<br>
</blockquote></div><br></div></div></div>
</blockquote></div><br></div></div></div></div>
_______________________________________________
liste de diffusion lilypond-user-fr
lilypond-user-fr@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user-fr
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic