RE: slurs
David, Wow, so simple. Thank you for the remedy. Mark -Original Message- From: David Kastrup Sent: Saturday, September 16, 2023 2:44 PM To: Mark Stephen Mrotek Cc: lilypond-user@gnu.org Subject: Re: slurs "Mark Stephen Mrotek" writes: > Hello All: > > > > \version "2.22.2" > > \relative c'' { > > \slurDown 4 > > (bes16) (a c bes d c ees d) > > } Good example why it is a bad idea to use non-standard input formatting for aesthetic reasons: you lose a proper idea about what you are actually doing. Both ( and ) are post-events following a note and can have a direction prescribed using _ and ^ (ok, it is only heeded for the opening brace). So you can just write: \version "2.22.2" \relative c'' { 4_( bes16)( a c bes d c ees d) } -- David Kastrup
Re: Scheme used badly: syntax problem
Graham King writes: > Many thanks David! > > (In the course of trying to convert the \note syntax, I discovered the > existence of \note-by-number which solved 90% of my problem. Sorry for > the confusing reference to \note.) Well, \note-by-number #1 #0 #UP is essentially the same as \note {2} #UP If you are not calculating note values, \note tends to have the simpler syntax. -- David Kastrup
Re: Scheme used badly: syntax problem
Many thanks David! (In the course of trying to convert the \note syntax, I discovered the existence of \note-by-number which solved 90% of my problem. Sorry for the confusing reference to \note.) On Sun, 2023-09-17 at 00:38 +0200, David Kastrup wrote: > Graham King writes: > > > I'm trying to convert a naive Scheme function which has been broken > > by > > the new syntax for \note. Some arithmetic gives me the index (in > > this > > MNWE, 96) to a list of pairs, foo, from which I want to extract > > some > > markup. > > > > The 300-LOC problem seems to boil down to this: > > > > %~~~ > > \version "2.25.7" > > > > #(define foo '((96 . #{ \markup { \note-by-number #1 #0 #UP }#}))) > > > > { c'1^\markup {#(cdr (assoc 96 foo))} } > > %~~~ > > > > Please could a kind Scheme expert point out the stupid and obvious > > mistake that has eluded me for several evenings? > > Uh, there isn't even \note in there? > > The problem in the above is a quoting problem: you mustn't quote > #{...#}, and you can avoid quoting it using quasiquote and unquote: > > \version "2.25.7" > > #(define foo `((96 . ,#{ \markup { \note-by-number #1 #0 #UP }#}))) > > { c'1^\markup {#(cdr (assoc 96 foo))} } >
Re: Scheme used badly: syntax problem
Graham King writes: > I'm trying to convert a naive Scheme function which has been broken by > the new syntax for \note. Some arithmetic gives me the index (in this > MNWE, 96) to a list of pairs, foo, from which I want to extract some > markup. > > The 300-LOC problem seems to boil down to this: > > %~~~ > \version "2.25.7" > > #(define foo '((96 . #{ \markup { \note-by-number #1 #0 #UP }#}))) > > { c'1^\markup {#(cdr (assoc 96 foo))} } > %~~~ > > Please could a kind Scheme expert point out the stupid and obvious > mistake that has eluded me for several evenings? Uh, there isn't even \note in there? The problem in the above is a quoting problem: you mustn't quote #{...#}, and you can avoid quoting it using quasiquote and unquote: \version "2.25.7" #(define foo `((96 . ,#{ \markup { \note-by-number #1 #0 #UP }#}))) { c'1^\markup {#(cdr (assoc 96 foo))} } -- David Kastrup
Scheme used badly: syntax problem
I'm trying to convert a naive Scheme function which has been broken by the new syntax for \note. Some arithmetic gives me the index (in this MNWE, 96) to a list of pairs, foo, from which I want to extract some markup. The 300-LOC problem seems to boil down to this: %~~~ \version "2.25.7" #(define foo '((96 . #{ \markup { \note-by-number #1 #0 #UP }#}))) { c'1^\markup {#(cdr (assoc 96 foo))} } %~~~ Please could a kind Scheme expert point out the stupid and obvious mistake that has eluded me for several evenings? Thanks in anticipation! -- Graham
Re: Array variables and loops (for lyrics)
> Is is possible to conditionally execute the #@ expression based on > whether the 'textArray' variable is bound? \version "2.24.2" textArray = << { \lyricmode { \set stanza = "1" fo -- o bar } } { \lyricmode { \set stanza = "2" fo -- o bar } } >> \score { << \new Voice = "soprano" { c'1 1 1 } #@(if (defined? 'textArray) (map (lambda (mus) #{ \new Lyrics { \lyricsto "soprano" { #mus } } #}) (ly:music-property textArray 'elements)) '()) >> } signature.asc Description: This is a digitally signed message part
Re: slurs
"Mark Stephen Mrotek" writes: > Hello All: > > > > \version "2.22.2" > > \relative c'' { > > \slurDown 4 > > (bes16) (a c bes d c ees d) > > } Good example why it is a bad idea to use non-standard input formatting for aesthetic reasons: you lose a proper idea about what you are actually doing. Both ( and ) are post-events following a note and can have a direction prescribed using _ and ^ (ok, it is only heeded for the opening brace). So you can just write: \version "2.22.2" \relative c'' { 4_( bes16)( a c bes d c ees d) } -- David Kastrup
slurs
Hello All: \version "2.22.2" \relative c'' { \slurDown 4 (bes16) (a c bes d c ees d) } Produces this What must be done to produce this? Thank you for your assistance. Mark
Re: Space between staves in a staff group
> On 16 Sep 2023, at 21:50, Phil Hanna wrote: > > > I have a short passage (6 measures) of a trumpet duo. I am using a staff > group for the two trumpet staves. How do I increase the vertical distance > between the two staves? > > Phil Hanna Phil, have looked at https://lilypond.org/doc/v2.24/Documentation/notation/flexible-vertical-spacing-within-systems#spacing-of-grouped-staves? I think you're looking for custom staff-staff-spacing.padding kind regards, Hans
Re: Space between staves in a staff group
You can do so by modifying the staff-staff-distance property either globally or for the staff in question. \new StaffGroup \with { \override StaffGrouper.staff-staff-spacing.padding = #0 %adjust to you needs \override StaffGrouper.staff-staff-spacing.basic-distance = #1 %adjust to you needs } << \new Staff { c'1 } \new Staff { c'1 } >> More info here: http://lilypond.org/doc/v2.24/Documentation/notation/flexible-vertical-spacing-within-systems#spacing-of-grouped-staves lør, 16 09 2023 kl. 15:26 -0400, skrev Phil Hanna: > I have a short passage (6 measures) of a trumpet duo. I am using a > staff group for the two trumpet staves. How do I increase the > vertical distance between the two staves? > > Phil Hanna
Space between staves in a staff group
I have a short passage (6 measures) of a trumpet duo. I am using a staff group for the two trumpet staves. How do I increase the vertical distance between the two staves? Phil Hanna
LilyPond 2.25.8
We are happy to announce the release of LilyPond 2.25.8. This is termed a development release, but these are usually reliable for testing new features and recent bug fixes. However, if you require stability, we recommend using version 2.24.2, the current stable release. Please refer to the Installing section in the Learning Manual for instructions how to set up the provided binaries: https://lilypond.org/doc/v2.25/Documentation/learning/installing signature.asc Description: This is a digitally signed message part
Re: Merging dynamics with music
On Sat, 16 Sep 2023, Knute Snortum wrote: > Try moving the Dynamic performer to the Staff level. Cutting and pasting this code produces two pages of error messages because it's full of "non-breaking space" characters which LilyPond can't process, but I was able to get the desired results by re-typing it. Thanks for your help. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before tribes. https://ansuz.sooke.bc.ca/
Re: Merging dynamics with music
msk...@ansuz.sooke.bc.ca writes: > Thank you. That works for the given example. However, with more > complicated music that already contains multiple voices (as is typical of > the piano music where a between-staff Dynamics context would be used in > the first place), it doesn't work. For example: > > MyMusic = { << { c'1 c'1 } \\ { e'1 e'1 } >> } > MyDynamics = { s1\ppp s1\fff } > > \score { > \new Voice << \MyMusic \MyDynamics >> > \layout { } > \midi { } > } > > With that code all the notes end up at default velocity. > > You mention that Dynamic_performer "lives at Voice level" by default. Is > this a default I can override, and would that help? Yes, and yes. \midi { \context { \Voice \remove Dynamic_performer } \context { \Staff \consists Dynamic_performer } } -- David Kastrup
Re: Merging dynamics with music
On Sat, Sep 16, 2023 at 6:01 AM wrote: > On Sat, 16 Sep 2023, David Kastrup wrote: > > > Try > > > > \new Staff << \MyMusic \MyDynamics >> > > > > since otherwise the variables will end up in separate Staff contexts. > > With the following code, the notes in the MIDI file still are both at > default velocity. Explicitly instantiating the Staff does make a > difference in the visual output. > > MyMusic = { c'1 c'1 } > MyDynamics = { s1\ppp s1\fff } > > \score { > \new Staff << \MyMusic \MyDynamics >> > \layout { } > \midi { } > } > Try moving the Dynamic performer to the Staff level. \version "2.24.2" MyMusic = { c'1 c'1 } MyDynamics = { s1\ppp s1\fff } \score { \new Staff << \MyMusic \MyDynamics >> \layout { } \midi { \context { \Staff \consists "Dynamic_performer" } \context { \Voice \remove "Dynamic_performer" } } } -- Knute Snortum
Re: Merging dynamics with music
msk...@ansuz.sooke.bc.ca writes: > On Sat, 16 Sep 2023, David Kastrup wrote: > >> Try >> >> \new Staff << \MyMusic \MyDynamics >> >> >> since otherwise the variables will end up in separate Staff contexts. > > With the following code, the notes in the MIDI file still are both at > default velocity. Explicitly instantiating the Staff does make a > difference in the visual output. > > MyMusic = { c'1 c'1 } > MyDynamics = { s1\ppp s1\fff } > > \score { > \new Staff << \MyMusic \MyDynamics >> > \layout { } > \midi { } > } My mistake: Dynamic_performer by default lives at Voice level, so you'd need \new Voice here in order to issue the dynamics on a level visible to MIDI. -- David Kastrup
Re: Merging dynamics with music
On Sat, 16 Sep 2023, David Kastrup wrote: > > With the following code, the notes in the MIDI file still are both at > > default velocity. Explicitly instantiating the Staff does make a > > difference in the visual output. > > > > MyMusic = { c'1 c'1 } > > MyDynamics = { s1\ppp s1\fff } > > > > \score { > > \new Staff << \MyMusic \MyDynamics >> > > \layout { } > > \midi { } > > } > > My mistake: Dynamic_performer by default lives at Voice level, so you'd > need \new Voice here in order to issue the dynamics on a level visible > to MIDI. Thank you. That works for the given example. However, with more complicated music that already contains multiple voices (as is typical of the piano music where a between-staff Dynamics context would be used in the first place), it doesn't work. For example: MyMusic = { << { c'1 c'1 } \\ { e'1 e'1 } >> } MyDynamics = { s1\ppp s1\fff } \score { \new Voice << \MyMusic \MyDynamics >> \layout { } \midi { } } With that code all the notes end up at default velocity. You mention that Dynamic_performer "lives at Voice level" by default. Is this a default I can override, and would that help? -- Matthew Skala msk...@ansuz.sooke.bc.ca People before tribes. https://ansuz.sooke.bc.ca/
Re: Merging dynamics with music
On Sat, 16 Sep 2023, David Kastrup wrote: > Try > > \new Staff << \MyMusic \MyDynamics >> > > since otherwise the variables will end up in separate Staff contexts. With the following code, the notes in the MIDI file still are both at default velocity. Explicitly instantiating the Staff does make a difference in the visual output. MyMusic = { c'1 c'1 } MyDynamics = { s1\ppp s1\fff } \score { \new Staff << \MyMusic \MyDynamics >> \layout { } \midi { } } -- Matthew Skala msk...@ansuz.sooke.bc.ca People before tribes. https://ansuz.sooke.bc.ca/
Re: Merging dynamics with music
msk...@ansuz.sooke.bc.ca writes: > I'm trying to use a Dynamics context to put dynamics between the staves of > a PianoStaff. As such, I've got my notes and my dynamics in two separate > variables. For MIDI output, I'd like to merge the contents of the music > variable and the dynamics variable and generate MIDI from the result. > But I can't find a way to merge the two variables and have the dynamics > really affect the MIDI velocity of the notes. > > Here's some code I've tried; I've also tried many much more complicated > variations. Note that although the Dynamics context is part of the > motivation for this question, the question is about merging music > variables and the problem shows up even without the existence of a > Dynamics context. > > MyMusic = { c'1 c'1 } > MyDynamics = { s1\ppp s1\fff } > > \score { > << \MyMusic \MyDynamics >> > \layout { } > \midi { } > } > > After compiling that, I get a MIDI file in which the notes are just at the > default velocity without any dynamics being applied. Try \new Staff << \MyMusic \MyDynamics >> since otherwise the variables will end up in separate Staff contexts. -- David Kastrup