Re: Question regarding ChordNames
Mahalo, Jean. That works perfectly. Exactly what I was hoping for. All the chordnames are correctly resolved to the proper enharmonic. J. On 3/12/24 22:55, Jean Abou Samra wrote: Mahalo, X. I am using the naturalizeMusic function and will look into extending that. Maybe that has some nuggets to mine. |\naturalizeMusic| is not going to work well on |\chordmode| music (it will destroy the interval in chords, leading to wrong chord names), but you can use code like this instead: |\version "2.24.2" enharmonization = { c cis d ees e f fis g gis a bes b } converter = #(make-semitone->pitch (music-pitches enharmonization)) \layout { \set ChordNames.chordRootNamer = #(lambda (pitch lowercase) (note-name->markup (converter (ly:pitch-semitones pitch)) lowercase)) } bflat = \chordmode { cis dis e fis gis a bis cis bes } \transpose cis' a { \new ChordNames { \bflat } } | Best, Jean -- John Helly / San Diego Supercomputer Center / Scripps Institution of Oceanography https://www.sdsc.edu/~hellyj / 808 205 9882 / 760 8408660
Re: Question regarding ChordNames
John Helly writes: > Aloha. > > Here's an MWE to exhibit the issue. > > I have a flat note (bes) that I want to transpose down 4 half-tones to > F#. However, when the transpose is applied, the result is Gb. I > understand that a flat note was the initial value so maybe LP is > preserving that specification? In LilyPond there is no such thing as "transpose down 4 half-tones". You transpose from one key to another, not by a distance. > Nonetheless, short of re-writing the whole piece in A rather than C#, > is there a way to specify the enharmonic representation for an F# > rather than Gb, for example? > > bflat = \chordmode { bes1 } > << > \transpose cis' a { > \new ChordNames { \bflat } > } >>> \transpose cis' a will remove 4 sharps, take -4 steps on the circle of fifths. If you'd rather add 8 steps on the circle of fifths (the difference implying that the circle isn't actually a closed circle), you need to write something like \transpose des' a instead. -- David Kastrup
Re: Question regarding ChordNames
Wow. Mahalo. I don't understand this yet but I very much appreciate your response. J. On 3/12/24 22:55, Jean Abou Samra wrote: Mahalo, X. I am using the naturalizeMusic function and will look into extending that. Maybe that has some nuggets to mine. |\naturalizeMusic| is not going to work well on |\chordmode| music (it will destroy the interval in chords, leading to wrong chord names), but you can use code like this instead: |\version "2.24.2" enharmonization = { c cis d ees e f fis g gis a bes b } converter = #(make-semitone->pitch (music-pitches enharmonization)) \layout { \set ChordNames.chordRootNamer = #(lambda (pitch lowercase) (note-name->markup (converter (ly:pitch-semitones pitch)) lowercase)) } bflat = \chordmode { cis dis e fis gis a bis cis bes } \transpose cis' a { \new ChordNames { \bflat } } | Best, Jean -- John Helly / San Diego Supercomputer Center / Scripps Institution of Oceanography https://www.sdsc.edu/~hellyj / 808 205 9882 / 760 8408660
Re: Question regarding ChordNames
> Mahalo, X. I am using the naturalizeMusic function and will look into > extending that. Maybe that has some nuggets to mine. `\naturalizeMusic` is not going to work well on `\chordmode` music (it will destroy the interval in chords, leading to wrong chord names), but you can use code like this instead: ``` \version "2.24.2" enharmonization = { c cis d ees e f fis g gis a bes b } converter = #(make-semitone->pitch (music-pitches enharmonization)) \layout { \set ChordNames.chordRootNamer = #(lambda (pitch lowercase) (note-name->markup (converter (ly:pitch-semitones pitch)) lowercase)) } bflat = \chordmode { cis dis e fis gis a bis cis bes } \transpose cis' a { \new ChordNames { \bflat } } ``` Best, Jean signature.asc Description: This is a digitally signed message part
Re: Question regarding ChordNames
On 13/03/2024 03:50, John Helly wrote: Aloha. Here's an MWE to exhibit the issue. I have a flat note (bes) that I want to transpose down 4 half-tones to F#. However, when the transpose is applied, the result is Gb. I understand that a flat note was the initial value so maybe LP is preserving that specification? Nonetheless, short of re-writing the whole piece in A rather than C#, is there a way to specify the enharmonic representation for an F# rather than Gb, for example? bflat = \chordmode { bes1 } << \transpose cis' a { \new ChordNames { \bflat } } >> Mahalo. J. On 3/12/24 02:44, Kieren MacMillan wrote: \version "2.25.11" \language "english" gsharp = \chordmode { gs1 } aflat = \chordmode { af1 } << \new ChordNames { \gsharp } \gsharp << \new ChordNames { \aflat } \aflat AS another reply has noted NR 1.1.2 is useful. It also says: "\transpose distinguishes between enharmonic pitches: both \transpose c cis or \transpose c des will transpose up a semitone. The first version will print sharps and the notes will remain on the same scale step, the second version will print flats on the scale step above." -- https://saturday-october-seven.com/
Re: Question regarding ChordNames
Mahalo, X. I am using the naturalizeMusic function and will look into extending that. Maybe that has some nuggets to mine. J. On 3/12/24 21:43, Xavier Scheuer wrote: On Wed, 13 Mar 2024 at 04:51, John Helly wrote: > > Aloha. > > Here's an MWE to exhibit the issue. > > I have a flat note (bes) that I want to transpose down 4 half-tones to F#. However, when the transpose is applied, the result is Gb. I understand that a flat note was the initial value so maybe LP is preserving that specification? > > Nonetheless, short of re-writing the whole piece in A rather than C#, is there a way to specify the enharmonic representation for an F# rather than Gb, for example? Hello, Instead of putting \transpose cis' a you could put the enharmonic \transpose des' a Then you would have a F# instead of a Gb, but that would change the other pitches as well in the new (equivalent) tonality. There is also the naturalizeMusic function documented in NR 1.1.2 Transpose pitches with minimum accidentals ("Smart" transpose) that could help. Kind regards, Xavier -- John Helly, University of California, San Diego / San Diego Supercomputer Center / Scripps Institution of Oceanography / 760 840 8660 mobile /http://www.sdsc.edu/~hellyj ORCID ID: orcid.org/-0002-3779-0603
Re: Question regarding ChordNames
On Wed, 13 Mar 2024 at 04:51, John Helly wrote: > > Aloha. > > Here's an MWE to exhibit the issue. > > I have a flat note (bes) that I want to transpose down 4 half-tones to F#. However, when the transpose is applied, the result is Gb. I understand that a flat note was the initial value so maybe LP is preserving that specification? > > Nonetheless, short of re-writing the whole piece in A rather than C#, is there a way to specify the enharmonic representation for an F# rather than Gb, for example? Hello, Instead of putting \transpose cis' a you could put the enharmonic \transpose des' a Then you would have a F# instead of a Gb, but that would change the other pitches as well in the new (equivalent) tonality. There is also the naturalizeMusic function documented in NR 1.1.2 Transpose pitches with minimum accidentals ("Smart" transpose) that could help. Kind regards, Xavier