lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: chordmode using variable


From: Thomas Morley
Subject: Re: chordmode using variable
Date: Wed, 20 Apr 2016 11:12:19 +0200

2016-04-20 10:34 GMT+02:00 Gianmaria Lari <address@hidden>:
> To generate the dominant seventh chord of c we use
>
> \chordmode {c:7}
>
>
> Does exist any way to make the same thing but starting from a variable
> containing a note?
>
> Something like this:
>
> mynote = {c}
> \chordmode { \mynote:7 }


Well, I could imagine a function taking two arguments:
(1) reading out the structure of the chord in \chordmode {c:7}
(2) a note to build this structure with this note as tonic, taking the
duration from it and setting it in the result.

Apart from the duration, something at the lines of:

\version "2.19.40"
%% doesn't work earlier

chrd = \chordmode { c:7 }

mynote = { cis }

mynote.7 = \transpose c #(car (event-chord-pitches mynote)) \chrd

\chordmode { \mynote.7 }



So why? I don't see any advantage.


Cheers,
  Harm



reply via email to

[Prev in Thread] Current Thread [Next in Thread]