Re: Question regarding ChordNames
Hi Jean, Are you adding this to the LSR? I don't know if it would make sense to add it to the documentation as well, personally I don't engrave scores that would use this. Best regards, Xavier On Wed, 13 Mar 2024 at 09: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 >
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
Re: Question regarding ChordNames
Well, that approach won't handle G to C#. I still get Db with no alternative. J On 3/12/24 19:02, John Helly wrote: M. Prompted by your idea, I could do the equivalent with a short bash script to edit selected chords to be the appropriate enharmonic form anticipating the transpose. Mahalo. On 3/12/24 18:48, John Helly wrote: Mahalo, that's an interesting approach. Maybe something in that vein would do it. I'll experiment. However, I have a whole song that has a lot of chromatic chord changes and I suspect it'll be a 'fix one, break one' situation. I'd like to find a general solution or some way to make a specialized chord library for a song. If there's no LP solution then I'll have to figure out plan B. J. On 3/12/24 18:22, Michael Werner wrote: Hi John, On Tue, Mar 12, 2024 at 11:51 PM 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? It's maybe a bit hackish, but what about first transposing from B flat to A sharp. *then* transposing C sharp to A? Something like: \version "2.25.13" bflat = \chordmode { bes1 } { \transpose cis' a { \new ChordNames { \bflat \transpose bes ais { \bflat } } } } -- Michael -- John Helly / San Diego Supercomputer Center / Scripps Institution of Oceanography https://www.sdsc.edu/~hellyj / 808 205 9882 / 760 8408660 -- John Helly / San Diego Supercomputer Center / Scripps Institution of Oceanography https://www.sdsc.edu/~hellyj / 808 205 9882 / 760 8408660 -- John Helly / San Diego Supercomputer Center / Scripps Institution of Oceanography https://www.sdsc.edu/~hellyj / 808 205 9882 / 760 8408660
Re: Question regarding ChordNames
M. Prompted by your idea, I could do the equivalent with a short bash script to edit selected chords to be the appropriate enharmonic form anticipating the transpose. Mahalo. On 3/12/24 18:48, John Helly wrote: Mahalo, that's an interesting approach. Maybe something in that vein would do it. I'll experiment. However, I have a whole song that has a lot of chromatic chord changes and I suspect it'll be a 'fix one, break one' situation. I'd like to find a general solution or some way to make a specialized chord library for a song. If there's no LP solution then I'll have to figure out plan B. J. On 3/12/24 18:22, Michael Werner wrote: Hi John, On Tue, Mar 12, 2024 at 11:51 PM 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? It's maybe a bit hackish, but what about first transposing from B flat to A sharp. *then* transposing C sharp to A? Something like: \version "2.25.13" bflat = \chordmode { bes1 } { \transpose cis' a { \new ChordNames { \bflat \transpose bes ais { \bflat } } } } -- Michael -- John Helly / San Diego Supercomputer Center / Scripps Institution of Oceanography https://www.sdsc.edu/~hellyj / 808 205 9882 / 760 8408660 -- 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, that's an interesting approach. Maybe something in that vein would do it. I'll experiment. However, I have a whole song that has a lot of chromatic chord changes and I suspect it'll be a 'fix one, break one' situation. I'd like to find a general solution or some way to make a specialized chord library for a song. If there's no LP solution then I'll have to figure out plan B. J. On 3/12/24 18:22, Michael Werner wrote: Hi John, On Tue, Mar 12, 2024 at 11:51 PM 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? It's maybe a bit hackish, but what about first transposing from B flat to A sharp. *then* transposing C sharp to A? Something like: \version "2.25.13" bflat = \chordmode { bes1 } { \transpose cis' a { \new ChordNames { \bflat \transpose bes ais { \bflat } } } } -- Michael -- John Helly / San Diego Supercomputer Center / Scripps Institution of Oceanography https://www.sdsc.edu/~hellyj / 808 205 9882 / 760 8408660
Re: Question regarding ChordNames
Hi John, On Tue, Mar 12, 2024 at 11:51 PM 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? > It's maybe a bit hackish, but what about first transposing from B flat to A sharp. *then* transposing C sharp to A? Something like: \version "2.25.13" bflat = \chordmode { bes1 } { \transpose cis' a { \new ChordNames { \bflat \transpose bes ais { \bflat } } } } -- Michael
Re: Question regarding ChordNames
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 -- 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 for the response. I agree that your example works. I only recently discovered \english and don't routinely use it, although perhaps I should. Something else I'm doing must be overriding the enharmonic interpretation. I'll see if I can factor it out. 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 -- John Helly / San Diego Supercomputer Center / Scripps Institution of Oceanography https://www.sdsc.edu/~hellyj / 808 205 9882 / 760 8408660
Re: Question regarding ChordNames
Hi John, > I've got a guitar leadsheet that displays the guitar chord G# as Ab. That’s definitely weird… On my machine, this displays G# as G# and Ab as Ab: \version "2.25.11" \language "english" gsharp = \chordmode { gs1 } aflat = \chordmode { af1 } << \new ChordNames { \gsharp } \gsharp >> << \new ChordNames { \aflat } \aflat >> Maybe post a MWE, so people can more easily diagnose the issue. Cheers, Kieren. __ My work day may look different than your work day. Please do not feel obligated to read or respond to this email outside of your normal working hours.