Re: ChordNames on Staff
Wow Harm, that is great! I will use this versatile aproach, thank you very much! greetings, Robert Am 08.02.2019 um 00:40 schrieb Thomas Morley: \version "2.19.82" gotoCtx = #(define-music-function (strg)(string?) #{ \change Staff = #strg #(if (string=? strg "staff") ;; Staff needs to be named equal to this #{ \override ChordName.Y-offset = #-1 #} #{ \revert ChordName.Y-offset #}) #}) \score { \new StaffGroup << \new ChordNames = "chrds-up" %% keep it alive! \chordmode { s1*8 } \new Staff = "staff" \with { \accepts ChordNames } << \new ChordNames \with { \override ChordName.Y-offset = #-1 } \chordmode { s1*0 \gotoCtx "chrds-up" c1 \gotoCtx "staff" dis:m ees/g \gotoCtx "chrds-up" f \gotoCtx "staff" gis:m \gotoCtx "chrds-down" e:7 \gotoCtx "chrds-up" f \gotoCtx "chrds-down" f } { s2_"Text" a'2 s1^"Text" e'''4 e'''_"Text" c'2 a'1 s1 s s } >> \new ChordNames = "chrds-down" %% keep it alive! \chordmode { s1*8 } >> } ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Configuration Point & Click
This post was written Sat, 2 Feb 2019 13:18:17 -0600 and has been blocked three times already, so it's rather late arriving. On Fri 01 Feb 2019 at 17:33:34 (-0700), foxfanfare wrote: > foxfanfare wrote > > And again, what is strange is that I have to launch zathura through vim if > > I > > want it to react to the link. If I launch the PDF alone in Zathura and > > click > > on the link, for instance > > textedit:///home/remy/Documents/test/test.ly:5:4:5 > > goes directly to the browser. Maybe zathura isn't configured properly and > > should add xdg-open before the link? > > OK for that part I just understood where the problem was. I used to launch > the PDF directly from my file browser (currently ranger). The PDF shows > correctly but the links redirect to the web browser. But if I just open a > terminal and launch the PDF from there, the PDF opens at his side and then > the link is redirected directly to vim in the previous terminal. > > Still, I can't manage to skip all the warning like "Vim: Warning: Input is > not from a terminal" and E325 which tend to make vim unusable. I don't have > the feeling that the server mode solves this. I also tried with > remote-silent but it is the same. I'm trying to replicate your problem, but can only go so far with my system (Debian 9 stretch, no DE, no DM, just fvwm) which may be quite different from yours. I think we've settled the server part of vim. I type $ gvim¹ --servername GVIM using the name GVIM merely because that's the name used in the error message whenever the server is absent². My preferred viewer is currently xpdf, though I have resurrected zathura because it's useful to have a libpoppler renderer and I like it better than evince. In .xpdfrc I changed urlCommand "sensible-browser '%s'" to urlCommand "lilypond-invoke-editor %s" as per the LilyPond docs. I now open the LilyPond PDF output file in xpdf called from an unrelated xterm. I've set the environment locally here because I normally use emacs. $ EDITOR=gvim xpdf windmills.pdf That PDF file is stuffed full of lines like /A
Re: systems-per-page and ragged-last-bottom
Hi Malte, > IMHO systems-per-page should be ignored on the last page if (and only if) > ragged-last-bottom is set to ##t +1 > systems-per-page also doesn’t work well with large headers or other markups. > One might want less systems on the first page in this case too The way Lilypond treats the title block almost like another system is unfortunate. I really wish we had controls like systems-on-first-page and systems-on-last-page, separate from systems-per-page. I also wish we had better measure-locking and -casting capabilities (e.g., “spread the first 70 measures across exactly 12 systems; put the next 24 measures across no fewer than 6 but no more than 9 systems; Lily’s choice for the next 32 measures”, etc.). That being said (asked?), Lily’s layout algorithms and flexibility are pretty amazing, so I try not to whinge too much or too often… Cheers, Kieren. Kieren MacMillan, composer ‣ website: www.kierenmacmillan.info ‣ email: i...@kierenmacmillan.info ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Reverting TextSpanner properties
Hi Reggie, This is just my personal code for a string quartet I am doing, and my use case may be a little different to normal, as I have to set it all up to be able to do SP->NAT->SP continuous as well as plain SP->NAT, and ST->NAT, and so on, so there are more parts to this than just my initial query MWE. The code was not really proposed as a general purpose solution for this string playing technique. You're more than welcome to it, but perhaps we should work this up into a more robust and well thought out design pattern for inclusion in the LSR? Also needs to be parameterized to accept sul ponticello or sul tasto. Andrew ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Trying to evenly space an Orthodox Chant document
Good Evening. I am using the gregorian.ly because Orthodox liturgical music is typically unmetered. Additionally, in order to make the hyphens and spaces look "better" I have "expanded" the lyric hyphen and lyric space minimum distances. For most of the settings I use, having the same distance for both (typically 2.25, though sometimes a bit more and sometimes a bit less) works fine. However, for this setting, the first line is stretched "too much". I typically do not like having to fiddle a lot with settings. Like with latex, I prefer the program to do most of the work. If I change both values to 1.5 or so, the stretching is gone, but then it looks "too compressed". I cannot seem to get an evenly-spaced document. Any help is greatly appreciated. Michael D \version "2.18.0" \include "english.ly" \include "gregorian.ly" \layout { \context{ \Score \override SpacingSpanner.packed-spacing = ##f } \context{ \Lyrics \override LyricHyphen.minimum-distance = #2.25 \override LyricSpace.minimum-distance = #2.25 } } \header { title = \markup\bold\fontsize #0.75 "Hymns of the Resurrection" subtitle = \markup\bold\fontsize #3.5 {"''Lord, I Call'' - Tone 1"} subsubtitle = \markup\bold\fontsize #4.25 {""} poet = \markup\bold\fontsize #1.5 {"Octoechos : Saturday Evening"} composer = \markup\bold\fontsize #1.5 {"Kievan Chant - B. Ledkovsky"} tagline = "Translation - OCA Traditional English" } global = { \key g \major \override Staff.NoteHead.style = #'altdefault \override Staff.TimeSignature.stencil = ##f %\override Staff.BarLine.stencil = ##f \set Score.defaultBarType = "-" \bar "|." } move = { \bar "" \break } soprano = \relative c'' { \global % Music follows here. a2(b) a4 a a a fs g(fs) e1 \divisioMinima g2 a4 a fs1 \divisioMinima } alto = \relative c' { \global % Music follows here. fs2(g) fs4 fs fs fs d d2 b1 \divisioMinima d2 d4 d d1 \divisioMinima } tenor = \relative c' { \global % Music follows here. d1 c4 c c c a b(a) g1 \divisioMinima b2 c4 c a1 \divisioMinima } bass = \relative c { \global % Music follows here. d2(g) d4 d d d d g(d) e1 \divisioMinima g2 d4 d d1 \divisioMinima } verse = \lyricmode { % Lyrics follow here. Lord, __ I call up -- on Thee, hear __ me. Hear, me, O Lord! } \score { \new ChoirStaff << \new Staff \with { midiInstrument = "string ensemble 1" instrumentName = \markup \center-column { "Soprano" "Alto"} } << \new Voice = "soprano" { \voiceOne \soprano } \new Voice = "alto" { \voiceTwo \alto } >> \new Lyrics \lyricsto "soprano" \verse \new Staff \with { midiInstrument = "string ensemble 1" instrumentName = \markup \center-column { "Tenor" "Bass" } } << \clef bass \new Voice = "tenor" { \voiceOne \tenor } \new Voice = "bass" { \voiceTwo \bass } >> >> \layout { ragged-last=##t #(layout-set-staff-size 22) \context { \Lyrics \override VerticalAxisGroup.staff-affinity = ##f \override VerticalAxisGroup.staff-staff-spacing = #'((basic-distance . 0) (minimum-distance . 2) (padding . 2)) } indent = 1.25\cm \context { \Staff \override VerticalAxisGroup.staff-staff-spacing = #'((basic-distance . 0) (minimum-distance . 2) (padding . 2)) } } \midi { \context { \Score tempoWholesPerMinute = #(ly:make-moment 145/4) } } } -- Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: ChordNames on Staff
Am Do., 7. Feb. 2019 um 21:21 Uhr schrieb Robert Hennig : > > Hi Valentin, > thank you for sharing your lilypond wisdom. > I have learned a lot already :). > (\denies "Voice" had not removed the note heads) > > For my problem to switch from up and down setting the chord names > I will stick to Arons solution in this fashion: > > chordsUp = { \override ChordName.extra-offset = #'(0 . 3) } > chordsDown = { \override ChordName.extra-offset = #'(0 . -1) } > << >\new ChordNames \with { > \override VerticalAxisGroup.nonstaff-relatedstaff-spacing = >#'((basic-distance . 0)(minimum-distance . 0)(padding . -10)) > \chordsUp >} >\chordmode { > c1 | \chordsDown dis1:m | > ees1/g \chordsUp > f1 >} >{ s2-"Text" a' | s1^"Text" | e'''4 e'''4_"Text" c'2 | a'1} > >> > Greetings and thank you a lot, > Robert > > Am 07.02.2019 um 15:42 schrieb Valentin Villenave: > > On 2/7/19, Robert Hennig wrote: > >> The second Solution from Valentin looks like what I would prefer but > >> it prints the chord notes too, which is not was I'm looking for (only > >> Chord Names). > > > > Huh. Have you added > > \denies "Voice" > > like I did? It should prevent any notes (or rests) from being printed. > > > > Alternatively, if you want to mix in musical symbols, you could do > > > > \new Staff \with { > >\consists Chord_name_engraver > >noChordSymbol = "" > > } \new Voice \with { > >\remove Note_heads_engraver > >\remove Ledger_line_engraver > >\remove Stem_engraver > >\remove Dots_engraver > >\remove Accidental_engraver > >\remove Beam_engraver > >\remove Tie_engraver > > } \chordmode { > >c1\f r4 d:m\p\< e:m \notemode {<>_>} f\! > > } > > > > Cheers, > > V. > > > > ___ > > lilypond-user mailing list > > lilypond-user@gnu.org > > https://lists.gnu.org/mailman/listinfo/lilypond-user > > > ___ > lilypond-user mailing list > lilypond-user@gnu.org > https://lists.gnu.org/mailman/listinfo/lilypond-user Here a different approach. _If_ it works (and you really should test it, I did only the provided examples) it looks much cleaner, imho. \version "2.19.82" gotoCtx = #(define-music-function (strg)(string?) #{ \change Staff = #strg #(if (string=? strg "staff") ;; Staff needs to be named equal to this #{ \override ChordName.Y-offset = #-1 #} #{ \revert ChordName.Y-offset #}) #}) \score { \new StaffGroup << \new ChordNames = "chrds-up" %% keep it alive! \chordmode { s1*8 } \new Staff = "staff" \with { \accepts ChordNames } << \new ChordNames \with { \override ChordName.Y-offset = #-1 } \chordmode { s1*0 \gotoCtx "chrds-up" c1 \gotoCtx "staff" dis:m ees/g \gotoCtx "chrds-up" f \gotoCtx "staff" gis:m \gotoCtx "chrds-down" e:7 \gotoCtx "chrds-up" f \gotoCtx "chrds-down" f } { s2_"Text" a'2 s1^"Text" e'''4 e'''_"Text" c'2 a'1 s1 s s } >> \new ChordNames = "chrds-down" %% keep it alive! \chordmode { s1*8 } >> } Cheers, Harm ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Modify sustain pedal marks
On 2/7/2019 4:01 PM, Aaron Hill wrote: On 2019-02-07 12:50 pm, Ben wrote: Is it possible to modify the sustain pedal marking by only using the stylized "P" instead of "Ped"? I noticed this in the Bartok Piano Concerto #3 (condensed score) and was curious if this is something LilyPond can do. Thanks for any feedback! (see attached) \version "2.19.82" { c''4\sustainOn g' c'2\sustainOff c''4\sustainOn g' c'2\sustainOff c''4\sustainOn g' c'2\sustainOff c''4\sustainOn g' c'2\sustainOff } \paper { ragged-right = ##f } \version "2.19.82" \new Staff \with { pedalSustainStrings = #'("P." "*P." "*") } { c''4\sustainOn g' c'2\sustainOff c''4\sustainOn g' c'2\sustainOff c''4\sustainOn g' c'2\sustainOff c''4\sustainOn g' c'2\sustainOff } \paper { ragged-right = ##f } -- Aaron Hill Aaron, This is perfect. Thank you! ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Modify sustain pedal marks
On 2019-02-07 12:50 pm, Ben wrote: Is it possible to modify the sustain pedal marking by only using the stylized "P" instead of "Ped"? I noticed this in the Bartok Piano Concerto #3 (condensed score) and was curious if this is something LilyPond can do. Thanks for any feedback! (see attached) \version "2.19.82" { c''4\sustainOn g' c'2\sustainOff c''4\sustainOn g' c'2\sustainOff c''4\sustainOn g' c'2\sustainOff c''4\sustainOn g' c'2\sustainOff } \paper { ragged-right = ##f } \version "2.19.82" \new Staff \with { pedalSustainStrings = #'("P." "*P." "*") } { c''4\sustainOn g' c'2\sustainOff c''4\sustainOn g' c'2\sustainOff c''4\sustainOn g' c'2\sustainOff c''4\sustainOn g' c'2\sustainOff } \paper { ragged-right = ##f } -- Aaron Hill ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Modify sustain pedal marks
Is it possible to modify the sustain pedal marking by only using the stylized "P" instead of "Ped"? I noticed this in the Bartok Piano Concerto #3 (condensed score) and was curious if this is something LilyPond can do. Thanks for any feedback! (see attached) \version "2.19.82" { c''4\sustainOn g' c'2\sustainOff c''4\sustainOn g' c'2\sustainOff c''4\sustainOn g' c'2\sustainOff c''4\sustainOn g' c'2\sustainOff } \paper { ragged-right = ##f } ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: ChordNames on Staff
Robert Hennig writes: > Hi Valentin, > thank you for sharing your lilypond wisdom. > I have learned a lot already :). > (\denies "Voice" had not removed the note heads) It would basically just state that no Voice contexts can be anchored directly under the given context type. If LilyPond needed to place something in a Voice context, it would then instead create a Voice (or a Staff or whatever it takes to host a Voice) in a context above. -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: ChordNames on Staff
Hi Valentin, thank you for sharing your lilypond wisdom. I have learned a lot already :). (\denies "Voice" had not removed the note heads) For my problem to switch from up and down setting the chord names I will stick to Arons solution in this fashion: chordsUp = { \override ChordName.extra-offset = #'(0 . 3) } chordsDown = { \override ChordName.extra-offset = #'(0 . -1) } << \new ChordNames \with { \override VerticalAxisGroup.nonstaff-relatedstaff-spacing = #'((basic-distance . 0)(minimum-distance . 0)(padding . -10)) \chordsUp } \chordmode { c1 | \chordsDown dis1:m | ees1/g \chordsUp f1 } { s2-"Text" a' | s1^"Text" | e'''4 e'''4_"Text" c'2 | a'1} >> Greetings and thank you a lot, Robert Am 07.02.2019 um 15:42 schrieb Valentin Villenave: On 2/7/19, Robert Hennig wrote: The second Solution from Valentin looks like what I would prefer but it prints the chord notes too, which is not was I'm looking for (only Chord Names). Huh. Have you added \denies "Voice" like I did? It should prevent any notes (or rests) from being printed. Alternatively, if you want to mix in musical symbols, you could do \new Staff \with { \consists Chord_name_engraver noChordSymbol = "" } \new Voice \with { \remove Note_heads_engraver \remove Ledger_line_engraver \remove Stem_engraver \remove Dots_engraver \remove Accidental_engraver \remove Beam_engraver \remove Tie_engraver } \chordmode { c1\f r4 d:m\p\< e:m \notemode {<>_>} f\! } Cheers, V. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: How to fix this divisi please
On 2/7/19, Reggie wrote: > I understand yes but there actually is a section of the piece later where > there is a divisi with time signature changes. Then you should replace \remove Time_Signature_engraver with \once \override TimeSignature.stencil = ##f This will prevent the TimeSignature from being printed at the beginning of your "miniStaffGroup", but changes will be printed later. (If the time signature changes at the beginning of the divisi, then you should remove that line entirely.) Just out of curiosity, what piece are you engraving? It looks nice. Cheers, V. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: How to fix this divisi please
Valentin Villenave-3 wrote > Well, since you’re starting in the middle of the score, it doesn’t > make sense to print a Time Signature like if it was the beginning. > However, this will also remove new Time Signatures, so if you need to > change \time in your divisi section, you’ll need to use something > else. > > Just remove (or comment, by adding "%" at the beginning of the line) > my \remove line, and you’ll see the difference. I understand yes but there actually is a section of the piece later where there is a divisi with time signature changes. Do I really need to remove the time engraver like you said or can I just input \time as I needed? How do your code change if there are time changes during the divisi sections? Many thanks. -- Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Center text above measure, forcing its width (first shot)
Hi, working towards a solution of at least one problem with measure-aligned stuff I wrote a function that centers one or two markups above and/or below a measure and forces the measure to be *at least* as wide as the wider of the two markups. The function does *not* center anything within the measure but allows the content of the measure to be arbitrary music. Before refining the code and the user interface I'd like to have some general feedback and maybe some hints regarding the remaining problems. The approach I took is the following: * Create a temporary polyphonic section using the \new Voice approach * Print the given "regular" music as the first (continued) Voice * Print a hidden MultiMeasureRest in the temporary Voice and attach the markup(s) to that * *First* override before-line-breaking, create stencils from the markups and force MultiMeasureRest.minimum-length accordingly * *Then* insert the MultiMeasureRest with the attached markups As you can see from the attached image this works surprisingly well. The code includes many comments, including descriptions of the remaining problems: * It seems when there's a time signature involved to the left or right of the measure, setting minimum-length doesn't quite do what it does in normal measures. * When the markup is not a single-line markup the setting of staff-padding doesn't seem to have an effect. Apart from fine-tuning the configurability of the layout mechanism I will want to complement the function with another one that centers the measures *content* as well. I hope the techniques I learned yesterday will work smoothly together with the current stuff (replacing the MMR's stencil with a centered markup stencil). Eventually I'll add the functions to the "oll-misc" openLilyLib package, in a new module below https://github.com/openlilylib/oll-misc/tree/master/text. Thanks for any suggestions for improvement Urs % \version "2.19.82" % Paper settings to make the effects visible \paper { ragged-last = ##t indent = 0\cm system-system-spacing.basic-distance = 20 } % Center text above and/or below a measure, % forcing the measure to be wide enough % Arguments: % - duration (optional, default 1/1) % length of the measure % - markup-above % - markup-below % Markup expressions to be printed above/below the measure. % If only one is given it is printed above, % if only a markup is intended below both should be given % where the first is an empty string % - padding (optional, default 1) % amount by which the measure must be wider than the % (wider of two) markup(s) on each side % - music % The music to be printed, % must include exactly one measure (i.e. the length of the duration argument) measureCenteredMarkup = #(define-music-function (duration markup-above markup-below padding music) ((ly:duration? (ly:make-duration 0)) markup? (markup? (markup "")) (number? 1) ly:music?) #{ << { #music } \new Voice { \override MultiMeasureRest.before-line-breaking = % First determine the width of the (wider) markup % and force the MultiMeasureRest's minimum-length #(lambda (grob) (let* ((markup-stencil-above (grob-interpret-markup grob markup-above)) (markup-stencil-below (grob-interpret-markup grob markup-below)) (markup-width (max (interval-length (ly:stencil-extent markup-stencil-above X)) (interval-length (ly:stencil-extent markup-stencil-below X)) ))) (ly:grob-set-property! grob 'minimum-length (+ (* padding 2) markup-width % Hide the MultiMeasureRest and attach the markup(s) to it \hide MultiMeasureRest #(make-music 'MultiMeasureRestMusic 'duration duration ;(ly:make-duration duration) 'articulations (list (make-music 'MultiMeasureTextEvent 'direction 1 'text markup-above) (make-music 'MultiMeasureTextEvent 'direction -1 'text markup-below))) } >> #}) \relative { % Doesn't work with the very first element (probably no Voice to continue) <> \override Staff.MultiMeasureRestText.staff-padding = 3 % The ! is centered above the measure, doesn't affect the width \measureCenteredMarkup "!" c''1 % Center text below measure (first argument is an empty string) % and widen the measure \measureCenteredMarkup "" "Widen the measure" R1 \time 3/4 R2. % With the optional duration argument arbitrary time signatures are supported \measureCenteredMarkup 2. % pass both above and below text "Hey that is a really wide centered markup" "Also works with polyphonic music" { % Arbitrary music can be printed in the measure, % doesn't interfere with the hidden
Re: systems-per-page and ragged-last-bottom
On Feb 7, 2019, at 10:04 AM, Malte Meyn wrote: > Hi list, > > IMHO systems-per-page should be ignored on the last page if (and only if) > ragged-last-bottom is set to ##t. I think that systems-per-page is used for > even spacing and ragged-last-bottom = ##t shows that the user wants an > exception to such an even spacing on the last page. I would very much appreciate this behavior from Lilypond. David ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Reverting TextSpanner properties
On 2019-02-07 9:06 am, Reggie wrote: David Kastrup wrote Andrew Bernard < andrew.bernard@ > writes: Hi David, Really great advice and useful to know. However, I have a long section run of spanners for sul ponticello to natural. I did'nt want to tweak every occurrence for literally a hundred times, or call a function for each spanner each time. So it's kind of 'semi-permanent'. Well, it's a matter of sulPont = -\single \spToNatSpan \startTextSpan stopSulPont = -\endTextSpan And then you use \sulPont and \stopSulPont where you now use \startTextSpan and \stopTextSpan . I find that more straightforward than what you use but of course it is slightly less efficient. But probably not a measurable difference. -- David Kastrup ___ lilypond-user mailing list lilypond-user@ https://lists.gnu.org/mailman/listinfo/lilypond-user Hello David. I added your suggestions but nothing compiles correctly even after I replaced the functions you speak of. How can this be fixed to use your suggestion correctly? :)) It's \stopTextSpan, not \endTextSpan. Note that if you use \sulPont and \stopSulPont, you would no longer need (or want) to use \spToNatSpan explicitly. Also, you would still need to use \startTextSpan and \stopTextSpan to get the basic spanner. \version "2.19.82" spToNatSpan = { \override TextSpanner.font-size = #-4 \override TextSpanner.bound-padding = #1.0 \override TextSpanner.style = #'line \override TextSpanner.bound-details.right.arrow = ##t \override TextSpanner.bound-details.left.text = #"SP" \override TextSpanner.bound-details.right.text = #"NAT" \override TextSpanner.bound-details.right.padding = #0.6 \override TextSpanner.bound-details.right.stencil-align-dir-y = #CENTER \override TextSpanner.bound-details.left.stencil-align-dir-y = #CENTER \override TextSpanner.bound-details.left-broken.text = ##f \override TextSpanner.bound-details.right-broken.text = ##f } sulPont = -\single \spToNatSpan \startTextSpan stopSulPont = -\stopTextSpan treble = { \time 4/4 %% \spToNatSpan %% <== NOT NEEDED c''4\sulPont c'' c'' c''\stopSulPont | c'' c'' c''\sulPont c'' | c'' c'' c'' c'' | \break c'' c''\stopSulPont c'' c''\sulPont | \break c''\stopSulPont c'' c'' c'' | \break % how to revert to basic TextSpanner here? %% \revert TextSpanner.bound-details %% <== NOT NEEDED c''\startTextSpan c''\stopTextSpan c'' c'' | } \score { \new Staff \treble \layout {} } -- Aaron Hill ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Reverting TextSpanner properties
David Kastrup wrote > Andrew Bernard < > andrew.bernard@ > > writes: > >> Hi David, >> >> Really great advice and useful to know. However, I have a long section >> run >> of spanners for sul ponticello to natural. I did'nt want to tweak every >> occurrence for literally a hundred times, or call a function for each >> spanner each time. So it's kind of 'semi-permanent'. > > Well, it's a matter of > > sulPont = -\single \spToNatSpan \startTextSpan > stopSulPont = -\endTextSpan > > And then you use \sulPont and \stopSulPont where you now use > \startTextSpan and \stopTextSpan . I find that more straightforward > than what you use but of course it is slightly less efficient. But > probably not a measurable difference. > > -- > David Kastrup > > ___ > lilypond-user mailing list > lilypond-user@ > https://lists.gnu.org/mailman/listinfo/lilypond-user Hello David. I added your suggestions but nothing compiles correctly even after I replaced the functions you speak of. How can this be fixed to use your suggestion correctly? :)) % \version "2.19.82" spToNatSpan = { \override TextSpanner.font-size = #-4 \override TextSpanner.bound-padding = #1.0 \override TextSpanner.style = #'line \override TextSpanner.bound-details.right.arrow = ##t \override TextSpanner.bound-details.left.text = #"SP" \override TextSpanner.bound-details.right.text = #"NAT" \override TextSpanner.bound-details.right.padding = #0.6 \override TextSpanner.bound-details.right.stencil-align-dir-y = #CENTER \override TextSpanner.bound-details.left.stencil-align-dir-y = #CENTER \override TextSpanner.bound-details.left-broken.text = ##f \override TextSpanner.bound-details.right-broken.text = ##f } sulPont = -\single \spToNatSpan \startTextSpan stopSulPont = -\endTextSpan treble = { \time 4/4 \spToNatSpan c''4\sulPont c'' c'' c''\stopSulPont | c'' c'' c''\sulPont c'' | c'' c'' c'' c'' | \break c'' c''\stopSulPont c'' c''\sulPont | \break c''\stopSulPont c'' c'' c'' | \break % how to revert to basic TextSpanner here? \revert TextSpanner.bound-details c''\sulPont c''\stopSulPont c'' c'' | } \score { \new Staff \treble \layout {} } % -- Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
systems-per-page and ragged-last-bottom
Hi list, IMHO systems-per-page should be ignored on the last page if (and only if) ragged-last-bottom is set to ##t. I think that systems-per-page is used for even spacing and ragged-last-bottom = ##t shows that the user wants an exception to such an even spacing on the last page. Any other opinions? Cheers, Malte \version "2.19.82" \paper { % ragged-last-bottom = ##t: 10 systems à 3 measures %ragged-last-bottom = ##t % ragged-last-bottom = ##f: 6 systems à 2m., 6 systems à 3m. %ragged-last-bottom = ##f % systems-per-page = 3 and ragged-last-bottom = ##t: systems-per-page = 3 ragged-last-bottom = ##t % IMHO this should print only 1 system on the 4th page (10=3*3+1) } << \new Staff \repeat unfold 480 b'16 \new Staff \repeat unfold 480 b'16 \new Staff \repeat unfold 480 b'16 \new Staff \repeat unfold 480 b'16 >> P. S. systems-per-page also doesn’t work well with large headers or other markups. One might want less systems on the first page in this case too. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: How to fix this divisi please
On 2/7/19, Reggie wrote: > Thank you V but this does not compile. What did I do wrong? Oh yes, I made a mistake when pasting into my previous message. Try this: % scoreAViolinIbegin = \relative c'' { \repeat unfold 10 c1 ges1 } scoreAViolinImiddle = \relative c' { \repeat unfold 10 {c2 d} } scoreAViolinIend = \relative c' { \repeat unfold 20 fes1 } scoreAViolinDivI = \relative c'' { \repeat unfold 10 g1:32 } scoreAViolinDivII = \relative c'' { \repeat unfold 10 bes1:32 } scoreAViolinDivIII = \relative c' { \repeat unfold 10 f1:32 } scoreAViolinDivIV = \relative c'' { \repeat unfold 10 as1:32 } scoreAViolinII = \relative c'' { \repeat unfold 50 d1 } scoreAViola = \relative c' { \clef alto \repeat unfold 50 e1 } scoreACello = \relative c { \clef bass \repeat unfold 50 f1 } scoreAContrabass = \relative c { \clef bass \repeat unfold 50 g1 } violinDivGroupName=\markup \center-column {Vl. "(div. a 4)"} %% Big violin Staff and additional divisi. %% (This will be used only in the full score.) scoreAViolinConductor = { \scoreAViolinIbegin << \scoreAViolinImiddle \break \new miniStaffGroup \with { instrumentName = \violinDivGroupName shortInstrumentName = \violinDivGroupName } << \new miniStaff \scoreAViolinDivI \new miniStaff \scoreAViolinDivII \new miniStaff \scoreAViolinDivIII \new miniStaff \with { \override BarLine.allow-span-bar = ##f } \scoreAViolinDivIV >> >> \scoreAViolinIend } \score { \header { title = "Full Score." } \new StaffGroup << \new Staff = "ViolinMain" \with { instrumentName = "Violin I" shortInstrumentName = "Vl. 1" } \scoreAViolinConductor \new Staff \with { instrumentName = "Violin II" shortInstrumentName = "Vl. 2" } \scoreAViolinII \new Staff \with { instrumentName = "Viola" shortInstrumentName = "Vla." } \scoreAViola \new Staff \with { instrumentName = "Cello" shortInstrumentName = "Vlc." } \scoreACello \new Staff \with { instrumentName = "Double Bass" shortInstrumentName = "Cb." } \scoreAContrabass >> %% Here’s the layout for _this_ \score only. %% (it doesn’t apply to individual parts.) \layout { \context { \Staff \name "miniStaff" alignAboveContext = "ViolinMain" fontSize = #-2 \override StaffSymbol.color = #grey \remove Time_signature_engraver } \context { \StaffGroup \name "miniStaffGroup" \accepts "miniStaff" systemStartDelimiter = #'SystemStartSquare } \context { \StaffGroup \accepts "miniStaffGroup" } } } \paper { #(set-paper-size "a4") top-margin = 15\mm left-margin = 25\mm right-margin = 25\mm bottom-margin = 15\mm } \bookpart { \header { title = "Violin Part (main)" } \new Staff { \scoreAViolinIbegin \scoreAViolinImiddle \scoreAViolinIend } } \bookpart { \header { title = "Violin Part (div. 1)" } \new Staff { \scoreAViolinIbegin \scoreAViolinDivI \scoreAViolinIend } } \bookpart { \header { title = "Violin Part (div. 2)" } \new Staff { \scoreAViolinIbegin \scoreAViolinDivII \scoreAViolinIend } } %%% V. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: How to fix this divisi please
On Thu 07 Feb 2019 at 08:16:28 (-0700), Reggie wrote: > Valentin Villenave-3 wrote […] > > %% Here’s the layout for _this_ \score only. > > %% (it doesn’t apply to individual parts.) > > \layout { > > \context { > > \Staff > > \name "miniStaff" > > alignAboveContext = "ViolinMain" > > fontSize = #-2 > > \override StaffSymbol.color = #grey > > \remove Time_signature_engraver > > } > > \layout { > > \context { > > \Staff > > \name "miniStaff" > > alignAboveContext = "ViolinMain" > > fontSize = #-2 > > \override StaffSymbol.color = #grey > > \remove Time_signature_engraver > > } > > \context { > > \StaffGroup > > \name "miniStaffGroup" > > \accepts "miniStaff" > > systemStartDelimiter = #'SystemStartSquare > > } > > \context { > > \StaffGroup > > \accepts "miniStaffGroup" > > } > > } > > } > Thank you V but this does not compile. What did I do wrong? Copy paste into > file and errors. error: syntax error, unexpected \layout > > \layout { If you glance at the file you quoted, you'll notice that the error message for once :) points right at the problem. There are 9 lines that have been accidentally duplicated when pasting in the example for you to study. I've left them quoted above. Cheers, David. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
MIDI: Automatic accent on notes starting bars
Folks, is there a way of automagically adding some volume increase ("accent") in MIDI output to any note that happens to start on the first beat in a bar? It seems a well-defined enough request to me so that it should be perfectly possible to do this in scheme, but I'm afraid this exceeds my very limited LilyPond-scheme abilites... Slight complication (maybe): In my scores, the metre changes all the time, so one really would have to use the actual timing of a note. Lukas ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: aligning variables with upbeats
> > but it would likely not be > easy to implement properly. > That's what I figured… It's okay, I'll try what Mats and Kieren have suggested with the tags, and if that turns out to be more work than it's worth, then I can always just manually pad the variables with rests, I guess. Thanks, Randy On Thu, Feb 7, 2019 at 11:52 PM David Kastrup wrote: > 智樂喬 writes: > > > I'd also like to avoid defining two variables, to keep things a little > > DRYer. > > > > What I imagine might be idea would be a function which works similarly to > > skip-of-length, but takes an argument to subtract a specified length from > > the variable. I imagined something like the following: > > > > #{skip-of-length (- (ly:length-of partA) (ly:make-moment 1/4))) \partB > > > > And then put that in a function to make it more compact and easy to use. > > It won't give you multi-measure rests padded with ordinary rests. It > might be a great addition to multi-measure rests if they self-padded > with ordinary rests for incomplete measures but it would likely not be > easy to implement properly. > > -- > David Kastrup > ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: aligning variables with upbeats
智樂喬 writes: > I'd also like to avoid defining two variables, to keep things a little > DRYer. > > What I imagine might be idea would be a function which works similarly to > skip-of-length, but takes an argument to subtract a specified length from > the variable. I imagined something like the following: > > #{skip-of-length (- (ly:length-of partA) (ly:make-moment 1/4))) \partB > > And then put that in a function to make it more compact and easy to use. It won't give you multi-measure rests padded with ordinary rests. It might be a great addition to multi-measure rests if they self-padded with ordinary rests for incomplete measures but it would likely not be easy to implement properly. -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: aligning variables with upbeats
> > Hope that helps! > Yes, it does. I have no idea what the edition-engraver is, but I'm curious to read more about it when I have time. Thanks! Randy On Thu, Feb 7, 2019 at 11:44 PM Kieren MacMillan < kieren_macmil...@sympatico.ca> wrote: > Hi Randy, > > > I'm looking for a clean, way to align music variables which begin with > partial measures. For example, > > > > \version "2.19.82" > > partA = { c'2 b | R1*3 } > > partB = { \partial 4 g4 | \bar "||" c'1 } > > \score { { \partA \partB } } > > This is one of the few situations where I would whole-heartedly recommend > using Lilypond’s \tag mechanism. (Most things that might seem to be good > candidates for \tags are, in my opinion, better handled via the > edition-engraver.) This is exactly how I keep different versions of songs > from my musicals (e.g., show version, medley version, standalone version, > etc.). > > %%% SNIPPET BEGINS %%% > partA = { > c'2 b | > \tag #'full { R1*3 } > \tag #'short { R1*2 r2 r4 } > } > > partB = { > \partial 4 g4 | \bar "||" c'1 > } > > \score { > { \keepWithTag #'full \partA } > } > > \score { > { \keepWithTag #'short \partA \partB } > } > %%% SNIPPET ENDS %%% > > Hope that helps! > Kieren. > > > Kieren MacMillan, composer > ‣ website: www.kierenmacmillan.info > ‣ email: i...@kierenmacmillan.info > > ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: aligning variables with upbeats
> > As illustrated by the diverse responses you already recevied, the > question is what you want to achieve. > Yes… maybe I should think about that some more. Usually I spend more time looking at ways to "do it right" than actually just writing some music. It's a bad habit! > If this is a way of saving typing when typesetting music with recurring > material, you might be able to use \tag to handle slight variations, > such as shortening a measure that is to be followed by a pickup. > I'll look into that. It may be what I'm looking for. Thanks! Randy On Thu, Feb 7, 2019 at 11:34 PM Mats Bengtsson wrote: > > On 2019-02-07 15:08, 智樂喬 wrote: > > I'm sure I'm not the first person to ask this, but I'm looking for a > > clean, way to align music variables which begin with partial measures. > > For example, > > > > \version "2.19.82" > > partA = { c'2 b | R1*3 } > > partB = { \partial 4 g4 | \bar "||" c'1 } > > \score { { \partA \partB } } > > > > In reality, there would be multiple partBs and some of them would > > start with a pickup and some of them wouldn't. One think I can do is > > explicitly shorten the end of partA so that partB lines up, but it > > involves some mixing of content and structure. Is there a best > > practice for this situation? > > As illustrated by the diverse responses you already recevied, the > question is what you want to achieve. > > I recently typeset a Telemann suite with a number of "movements" to be > played attacca, which in the original print was typeset without any > separation between these movements. I then took the typesetting decision > to keep it that way and used a solution more or less identical to your > example above, with an additional \bar "||" \break between these parts. > Thanks to the improvements introduced in Lilypond 2.19, these mid-piece > \partials work smoothly. However, I could also have chosen other ways to > typeset the music. > > If this is a way of saving typing when typesetting music with recurring > material, you might be able to use \tag to handle slight variations, > such as shortening a measure that is to be followed by a pickup. Or > simply leave out the bar that varies, and insert it manually between the > music that's stored in variables. > > /Mats > > > ___ > lilypond-user mailing list > lilypond-user@gnu.org > https://lists.gnu.org/mailman/listinfo/lilypond-user > ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: aligning variables with upbeats
Hi Randy, > I'm looking for a clean, way to align music variables which begin with > partial measures. For example, > > \version "2.19.82" > partA = { c'2 b | R1*3 } > partB = { \partial 4 g4 | \bar "||" c'1 } > \score { { \partA \partB } } This is one of the few situations where I would whole-heartedly recommend using Lilypond’s \tag mechanism. (Most things that might seem to be good candidates for \tags are, in my opinion, better handled via the edition-engraver.) This is exactly how I keep different versions of songs from my musicals (e.g., show version, medley version, standalone version, etc.). %%% SNIPPET BEGINS %%% partA = { c'2 b | \tag #'full { R1*3 } \tag #'short { R1*2 r2 r4 } } partB = { \partial 4 g4 | \bar "||" c'1 } \score { { \keepWithTag #'full \partA } } \score { { \keepWithTag #'short \partA \partB } } %%% SNIPPET ENDS %%% Hope that helps! Kieren. Kieren MacMillan, composer ‣ website: www.kierenmacmillan.info ‣ email: i...@kierenmacmillan.info ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: aligning variables with upbeats
On 2019-02-07 15:08, 智樂喬 wrote: I'm sure I'm not the first person to ask this, but I'm looking for a clean, way to align music variables which begin with partial measures. For example, \version "2.19.82" partA = { c'2 b | R1*3 } partB = { \partial 4 g4 | \bar "||" c'1 } \score { { \partA \partB } } In reality, there would be multiple partBs and some of them would start with a pickup and some of them wouldn't. One think I can do is explicitly shorten the end of partA so that partB lines up, but it involves some mixing of content and structure. Is there a best practice for this situation? As illustrated by the diverse responses you already recevied, the question is what you want to achieve. I recently typeset a Telemann suite with a number of "movements" to be played attacca, which in the original print was typeset without any separation between these movements. I then took the typesetting decision to keep it that way and used a solution more or less identical to your example above, with an additional \bar "||" \break between these parts. Thanks to the improvements introduced in Lilypond 2.19, these mid-piece \partials work smoothly. However, I could also have chosen other ways to typeset the music. If this is a way of saving typing when typesetting music with recurring material, you might be able to use \tag to handle slight variations, such as shortening a measure that is to be followed by a pickup. Or simply leave out the bar that varies, and insert it manually between the music that's stored in variables. /Mats ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: aligning variables with upbeats
> > *Valentin:* > If you really want to keep your variables separate, you’ll have to use > simultaneous music instead of sequential expressions : > That's what I was afraid of… {\oneVoice s1*15/4 \partB} > I'd like to avoid having to count bars/beats because it's kind of inefficient and makes using variables in this way a lot more clumsy and prone to error. *David:* > I'd rather just have two versions of partA, one before an upbeat and one > not. > I'd also like to avoid defining two variables, to keep things a little DRYer. What I imagine might be idea would be a function which works similarly to skip-of-length, but takes an argument to subtract a specified length from the variable. I imagined something like the following: #{skip-of-length (- (ly:length-of partA) (ly:make-moment 1/4))) \partB And then put that in a function to make it more compact and easy to use. Randy ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: How to fix this divisi please
Valentin Villenave-3 wrote > Here is how I would type your example, using many variables (and no > \tags, like I did earlier). As you can see, everything with notes is > defined first, and _then_ comes every structural information: what > should be printed where, in which group, coming after this and before > that, etc. I think it’s a bit cleaner that way. > > %%% > > scoreAViolinIbegin = \relative c'' { > \repeat unfold 10 c1 > ges1 > } > scoreAViolinImiddle = \relative c' { > \repeat unfold 10 {c2 d} > } > scoreAViolinIend = \relative c' { > \repeat unfold 20 fes1 > } > scoreAViolinDivI = \relative c'' { > \repeat unfold 10 g1:32 > } > scoreAViolinDivII = \relative c'' { > \repeat unfold 10 bes1:32 > } > scoreAViolinDivIII = \relative c' { > \repeat unfold 10 f1:32 > } > scoreAViolinDivIV = \relative c'' { > \repeat unfold 10 as1:32 > } > > scoreAViolinII = \relative c'' { > \repeat unfold 50 d1 > } > > scoreAViola = \relative c' { > \clef alto > \repeat unfold 50 e1 > } > > scoreACello = \relative c { > \clef bass > \repeat unfold 50 f1 > } > > scoreAContrabass = \relative c { > \clef bass > \repeat unfold 50 g1 > } > > violinDivGroupName=\markup \center-column {Vl. "(div. a 4)"} > > %% Big violin Staff and additional divisi. > %% (This will be used only in the full score.) > > scoreAViolinConductor = { > \scoreAViolinIbegin > << > \scoreAViolinImiddle \break > \new miniStaffGroup \with { > instrumentName = \violinDivGroupName > shortInstrumentName = \violinDivGroupName > } << > \new miniStaff \scoreAViolinDivI > \new miniStaff \scoreAViolinDivII > \new miniStaff \scoreAViolinDivIII > \new miniStaff \with { > \override BarLine.allow-span-bar = ##f > } \scoreAViolinDivIV > >> > >> > \scoreAViolinIend > } > > \score { > \header { title = "Full Score." } > \new StaffGroup << > \new Staff = "ViolinMain" \with { > instrumentName = "Violin I" > shortInstrumentName = "Vl. 1" > } \scoreAViolinConductor > \new Staff \with { > instrumentName = "Violin II" > shortInstrumentName = "Vl. 2" > } \scoreAViolinII > \new Staff \with { > instrumentName = "Viola" > shortInstrumentName = "Vla." > } \scoreAViola > \new Staff \with { > instrumentName = "Cello" > shortInstrumentName = "Vlc." > } \scoreACello > \new Staff \with { > instrumentName = "Double Bass" > shortInstrumentName = "Cb." > } \scoreAContrabass > >> > %% Here’s the layout for _this_ \score only. > %% (it doesn’t apply to individual parts.) > \layout { > \context { > \Staff > \name "miniStaff" > alignAboveContext = "ViolinMain" > fontSize = #-2 > \override StaffSymbol.color = #grey > \remove Time_signature_engraver > } > \layout { > \context { > \Staff > \name "miniStaff" > alignAboveContext = "ViolinMain" > fontSize = #-2 > \override StaffSymbol.color = #grey > \remove Time_signature_engraver > } > \context { > \StaffGroup > \name "miniStaffGroup" > \accepts "miniStaff" > systemStartDelimiter = #'SystemStartSquare > } > \context { > \StaffGroup > \accepts "miniStaffGroup" > } > } > } > > \paper { > #(set-paper-size "a4") > top-margin = 15\mm > left-margin = 25\mm > right-margin = 25\mm > bottom-margin = 15\mm > } > > \bookpart { > \header { > title = "Violin Part (main)" > } > \new Staff { > \scoreAViolinIbegin > \scoreAViolinImiddle > \scoreAViolinIend > } > } > > \bookpart { > \header { > title = "Violin Part (div. 1)" > } > \new Staff { > \scoreAViolinIbegin > \scoreAViolinDivI > \scoreAViolinIend > } > } > > \bookpart { > \header { > title = "Violin Part (div. 2)" > } > \new Staff { > \scoreAViolinIbegin > \scoreAViolinDivII > \scoreAViolinIend > } > } > > %%% Thank you V but this does not compile. What did I do wrong? Copy paste into file and errors. error: syntax error, unexpected \layout \layout { -- Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: aligning variables with upbeats
\version "2.19.82" partA = { c'2 b | R1*3 } partB = { \partial 4 g4 | \bar "||" c'1 } \score { { \partA \partB } } Yes, so partA is a full four bars, the last bar being a measure of rest. partB starts after partA, but partB contains a pickup note, which should actually be in the last beat of partA's rest. If you run the code above, you should see that the G in partB gets its own one-beat measure instead of what I explained. On Thu, Feb 7, 2019 at 10:53 PM Gianmaria Lari wrote: > > On Thu, 7 Feb 2019 at 15:24, 智樂喬 wrote: > >> I'm sure I'm not the first person to ask this, but I'm looking for a >> clean, way to align music variables which begin with partial measures. For >> example, >> >> \version "2.19.82" >> partA = { c'2 b | R1*3 } >> partB = { \partial 4 g4 | \bar "||" c'1 } >> \score { { \partA \partB } } >> >> In reality, there would be multiple partBs and some of them would start >> with a pickup and some of them wouldn't. One think I can do is explicitly >> shorten the end of partA so that partB lines up, but it involves some >> mixing of content and structure. Is there a best practice for this >> situation? >> > > I'm sorry, I don't understand what do you want to do. Could you try to > explain again what you need? > Thank you, g. > ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: aligning variables with upbeats
Valentin Villenave writes: > On 2/7/19, 智樂喬 wrote: >> In reality, there would be multiple partBs and some of them would start >> with a pickup and some of them wouldn't. One think I can do is explicitly >> shorten the end of partA so that partB lines up, but it involves some >> mixing of content and structure. Is there a best practice for this >> situation? > > Greetings, > not really (as far as I know). > If you really want to keep your variables separate, you’ll have to use > simultaneous music instead of sequential expressions : > > partA = { c'2 b | R1*3 } > partB = { \partial 4 g4 | \bar "||" c'1 e } > \score { > << > {\oneVoice \partA} > \\ > {\oneVoice s1*15/4 \partB} > >> > } Don't abuse \\ like that. Rather use something like \score { << \new Voice \partA \new Voice { s1*15/4 \part B } >> } But I guess that's weird (full-measure rest _and_ upbeat?). I'd rather just have two versions of partA, one before an upbeat and one not. -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: aligning variables with upbeats
On Thu, 7 Feb 2019 at 15:24, 智樂喬 wrote: > I'm sure I'm not the first person to ask this, but I'm looking for a > clean, way to align music variables which begin with partial measures. For > example, > > \version "2.19.82" > partA = { c'2 b | R1*3 } > partB = { \partial 4 g4 | \bar "||" c'1 } > \score { { \partA \partB } } > > In reality, there would be multiple partBs and some of them would start > with a pickup and some of them wouldn't. One think I can do is explicitly > shorten the end of partA so that partB lines up, but it involves some > mixing of content and structure. Is there a best practice for this > situation? > I'm sorry, I don't understand what do you want to do. Could you try to explain again what you need? Thank you, g. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: aligning variables with upbeats
On 2/7/19, 智樂喬 wrote: > In reality, there would be multiple partBs and some of them would start > with a pickup and some of them wouldn't. One think I can do is explicitly > shorten the end of partA so that partB lines up, but it involves some > mixing of content and structure. Is there a best practice for this > situation? Greetings, not really (as far as I know). If you really want to keep your variables separate, you’ll have to use simultaneous music instead of sequential expressions : partA = { c'2 b | R1*3 } partB = { \partial 4 g4 | \bar "||" c'1 e } \score { << {\oneVoice \partA} \\ {\oneVoice s1*15/4 \partB} >> } Cheers, V. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: ChordNames on Staff
On 2/7/19, Robert Hennig wrote: > The second Solution from Valentin looks like what I would prefer but > it prints the chord notes too, which is not was I'm looking for (only > Chord Names). Huh. Have you added \denies "Voice" like I did? It should prevent any notes (or rests) from being printed. Alternatively, if you want to mix in musical symbols, you could do \new Staff \with { \consists Chord_name_engraver noChordSymbol = "" } \new Voice \with { \remove Note_heads_engraver \remove Ledger_line_engraver \remove Stem_engraver \remove Dots_engraver \remove Accidental_engraver \remove Beam_engraver \remove Tie_engraver } \chordmode { c1\f r4 d:m\p\< e:m \notemode {<>_>} f\! } Cheers, V. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Harmonics with ottava
On 2019-02-07 3:01 am, N. Andrew Walsh wrote: Problem now is, Lily isn't avoiding collisions between the markup objects and grobs on other staves. Neither the markup nor the Staff.ottavation text block are given place, instead overlapping the voice above. How can I fix this? Do you have a MWE for this? The snippet you posted only has a single staff. I tried adding one... \version "2.19.82" << \new Staff { a2_\markup "Text" } \new Staff \relative c, { \clef "bass_8" \textLengthOn \override Staff.NoteColumn.ignore-collision = ##t \override NoteHead.style = #'harmonic-mixed << { \oneVoice eih4^\markup { \right-align "Sul D" }--\harmonic } \\ { \oneVoice \textLengthOn \tiny \override Stem.stencil = ##f \override Flag.stencil = ##f \override ParenthesesItem.font-size = #0 \set Staff.ottavation = #"15ma" \once \override Staff.OttavaBracket.direction = #UP \set Voice.middleCPosition = #(+ -1) < \parenthesize ceh'''>4 s \unset Staff.ottavation \unset Voice.middleCPosition } >> } ...but I could not get any overlap. Granted, "Sul D" and "Text" appear next to each other, but that has to do with text alignment. If you change "Text" to \center-align, for instance, then the lower staff gets moved down to prevent overlap. -- Aaron Hill ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: issue with \transpose and \relative
Ok, thanks for the clarification. That's something to keep in mind, although I've never used tags in my scores before. (Only made one score before, though, so…) I'll keep this in mind if I ever have any strange issues when I'm using it. Randy ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
aligning variables with upbeats
I'm sure I'm not the first person to ask this, but I'm looking for a clean, way to align music variables which begin with partial measures. For example, \version "2.19.82" partA = { c'2 b | R1*3 } partB = { \partial 4 g4 | \bar "||" c'1 } \score { { \partA \partB } } In reality, there would be multiple partBs and some of them would start with a pickup and some of them wouldn't. One think I can do is explicitly shorten the end of partA so that partB lines up, but it involves some mixing of content and structure. Is there a best practice for this situation? Thanks, Randy ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: ChordNames on Staff
Dear Aaron and Valentin, thanks for your efforts and tips. I'm still looking for an solution to switch the ChordsOnStaff on and off, because I need it casually.. The second Solution from Valentin looks like what I would prefer but it prints the chord notes too, which is not was I'm looking for (only Chord Names). The first example lacks the possibility to make musical annotations like \f,\p and so one because I swich to chordmode: \version "2.19.82" \layout { \context { \name ChordsOnStaff \type "Engraver_group" \consists "Chord_name_engraver" \override ChordName.extra-offset = #'(0 . -1) \alias ChordNames } \context { \Staff \accepts "ChordsOnStaff" } } << \new ChordNames \chordmode { c1 s1 s1 c1 } \relative c' { c2 e2 \context ChordsOnStaff \chordmode { c1 \mark "Text" c1 } g2 c2 } >> -- the second example is how I could imagine the switch could be done, but it does not has the right effect, the VerticalAxisGroup setting does not apply, the Chord name is printed twice... \version "2.19.82" \layout { \context { \name ChordsOnStaff \type "Engraver_group" \consists "Chord_name_engraver" %\override VerticalAxisGroup.nonstaff-relatedstaff-spacing = % #'((basic-distance . 0)(minimum-distance . 0)(padding . -10)) \override ChordName.extra-offset = #'(0 . -1) \alias ChordNames } \context { \ChordNames \accepts "ChordsOnStaff" } } << \new ChordNames \chordmode { c1 \context ChordsOnStaff { c1 c1 } c1 } \new Voice \relative c' { c2 e2 s1\p^"Text" s1\f g2 c2 } >> Greetings, Robert ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Reverting TextSpanner properties
Thank you everybody for all this help. It's fantastic, many ideas here, and I have learned so much. All good! Andrew On Thu, 7 Feb 2019 at 20:45, David Kastrup wrote: > Andrew Bernard writes: > > > Hi David, > > > > Really great advice and useful to know. However, I have a long section > run > > of spanners for sul ponticello to natural. I did'nt want to tweak every > > occurrence for literally a hundred times, or call a function for each > > spanner each time. So it's kind of 'semi-permanent'. > > Well, it's a matter of > > sulPont = -\single \spToNatSpan \startTextSpan > stopSulPont = -\endTextSpan > > And then you use \sulPont and \stopSulPont where you now use > \startTextSpan and \stopTextSpan . I find that more straightforward > than what you use but of course it is slightly less efficient. But > probably not a measurable difference. > > -- > David Kastrup > ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Harmonics with ottava
PS- also, I've made use of http://lsr.di.unimi.it/LSR/Item?id=875, which gets the notes in the correct positions. My example now looks like this: --- \version "2.19.82" \relative c, { \clef "bass_8" \textLengthOn \override Staff.NoteColumn.ignore-collision = ##t \override NoteHead.style = #'harmonic-mixed << { \oneVoice eih^\markup { \right-align "Sul D" }--\harmonic } \\ { \oneVoice \textLengthOn \tiny \override Stem.stencil = ##f \override Flag.stencil = ##f \override ParenthesesItem.font-size = #0 \set Staff.ottavation = #"15ma" \once \override Staff.OttavaBracket.direction = #UP \set Voice.middleCPosition = #(+ -1) < \parenthesize ceh'''>4 s \unset Staff.ottavation \unset Voice.middleCPosition } >> } --- Problem now is, Lily isn't avoiding collisions between the markup objects and grobs on other staves. Neither the markup nor the Staff.ottavation text block are given place, instead overlapping the voice above. How can I fix this? Cheers, A ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: issue with \transpose and \relative
智樂喬 writes: > Thanks a lot, David. It works as advertised. I do think I read about this > somewhere in the manuals, but I couldn't find it. > > This uses really involved code to simulate something that does not >> really map well to LilyPond's internals so it may interfere with other >> tricky code. >> > > I'm pretty sure that I'm not at the level of skill to be writing other > tricky code, so no problem :-) Well, using tags would be problematic, for example. They are not particularly tricky but the likes of \keepWithTag are functions walking their input, and such functions would miss the parts make-relative stores for the sake of \relative . -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Harmonics with ottava
Hi Andrew On Thu, Feb 7, 2019 at 11:51 AM Andrew Bernard wrote: > Hello Andrew, > > Why are quartertones technically wrong? > Quartertones are wrong for harmonics (especially "natural" ones), because neither the finger position nor the resultant pitch are equivalent to equal-tempered quartertones. They are, at best, an approximation; and as I write music in just intonation, a misleading one that I avoid. But like I said: this is an example of a Stockhausen piece, and as he didn't care about tuning properly and I don't care about his music, I'm not going to invest the energy into doing it the right way. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Harmonics with ottava
Hello Andrew, Why are quartertones technically wrong? My current string quartet is full of them. String players can do them just fine. Andrew On Thu, 7 Feb 2019 at 21:46, N. Andrew Walsh wrote: > > (And yes, I know quartertones are technically wrong. > ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: issue with \transpose and \relative
Thanks a lot, David. It works as advertised. I do think I read about this somewhere in the manuals, but I couldn't find it. This uses really involved code to simulate something that does not > really map well to LilyPond's internals so it may interfere with other > tricky code. > I'm pretty sure that I'm not at the level of skill to be writing other tricky code, so no problem :-) For the benefit of anyone on the list who might find this useful, here's the simple function I'm using this in. It adds falling gliss lines *à la* sliding falls commonly notated in rock guitar music, and it's probably not a good implementation, but it works as I'd like it to: fall = #(define-music-function (input) (ly:music?) (make-relative (input) input #{ \afterGrace 16/16 << $input <>\glissando >> \transpose c g, { \once \omit Flag \once \override Stem.length = #0 \once \override NoteHead.font-size = #-50 \once \hideNotes $input } #})) Thanks, Randy ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Harmonics with ottava
Hi List, I have the following construction: -- \version "2.19.82" \relative c, { \clef "bass_8" \textLengthOn \override Staff.NoteColumn.ignore-collision = ##t \override NoteHead.style = #'harmonic-mixed << { \oneVoice eih^\markup { \right-align "Sul D" }--\harmonic } \\ { \oneVoice \tiny \override Stem.stencil = ##f \override Flag.stencil = ##f \override ParenthesesItem.font-size = #0 { \ottava #1 < \parenthesize ceh'''>4 s } } >> } What I actually want is for the fingered note to appear in the correct location in the staff (so, just above the middle line), and the ottava to apply only to the sounding harmonic note above it in parentheses. This becomes important in higher-order harmonics, where you otherwise have two notes that are separated by two or three octaves and it starts taking up a lot of vertical space. Is there a way to do this? Cheers, A (And yes, I know quartertones are technically wrong. This is 1) an example from a Stockhausen piece, and he's a dilettante who never was about correct harmonic representation, and 2) if I were to do it properly I'd need to import all my own custom accidentals as glyphs, and that's way too much work for a musical example of a piece from a composer I clearly loathe) ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Reverting TextSpanner properties
Andrew Bernard writes: > Hi David, > > Really great advice and useful to know. However, I have a long section run > of spanners for sul ponticello to natural. I did'nt want to tweak every > occurrence for literally a hundred times, or call a function for each > spanner each time. So it's kind of 'semi-permanent'. Well, it's a matter of sulPont = -\single \spToNatSpan \startTextSpan stopSulPont = -\endTextSpan And then you use \sulPont and \stopSulPont where you now use \startTextSpan and \stopTextSpan . I find that more straightforward than what you use but of course it is slightly less efficient. But probably not a measurable difference. -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Reverting TextSpanner properties
Hi David, Really great advice and useful to know. However, I have a long section run of spanners for sul ponticello to natural. I did'nt want to tweak every occurrence for literally a hundred times, or call a function for each spanner each time. So it's kind of 'semi-permanent'. Andrew ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Reverting TextSpanner properties
Hello Pierre, This is helpful. I deduce from this that you can only use revert on bound-details as a while if you override it as a complete alist to begin with, not as separate overrides for each sub-property as I had. That's an important thing to know. Of course, to revert the other overrides, such as font-size, back to the system default, that would need a separate revert as well for these. I can find all the system defaults in the lilypond source code. I was hoping there may be some sort of \reset command, but this is a figment of my imagination. Andrew ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Reverting TextSpanner properties
Andrew Bernard writes: > I have a text spanner set up nicely to do sul ponticello -> nat. All works > beautifully. But how does one revert the overrides use to achieve this to > go back to a plain text spanner without undoing each and every line? \undo \spToNatSpan ? Personally, I'd rather tweak \startTextSpan rather than set properties permanently but that's likely a matter of taste. > Can't you just revert bound-details? > > Searching the list archives did not reveal anything for me. Perhaps a poor > choice of search keywords. > > I hope this is not one of those cases again where I should not be using > braces in the definition, but it won't compile if I don't. > > > Andrew > > > % > > \version "2.19.82" > > spToNatSpan = { > \override TextSpanner.font-size = #-4 > \override TextSpanner.bound-padding = #1.0 > \override TextSpanner.style = #'line > \override TextSpanner.bound-details.right.arrow = ##t > \override TextSpanner.bound-details.left.text = #"SP" > \override TextSpanner.bound-details.right.text = #"NAT" > \override TextSpanner.bound-details.right.padding = #0.6 > \override TextSpanner.bound-details.right.stencil-align-dir-y = #CENTER > \override TextSpanner.bound-details.left.stencil-align-dir-y = #CENTER > \override TextSpanner.bound-details.left-broken.text = ##f > \override TextSpanner.bound-details.right-broken.text = ##f > } > > treble = { > \time 4/4 > > \spToNatSpan > c''4\startTextSpan c'' c'' c''\stopTextSpan | > c'' c'' c''\startTextSpan c'' | > c'' c'' c'' c'' | > \break > c'' c''\stopTextSpan c'' c''\startTextSpan | > \break > c''\stopTextSpan c'' c'' c'' | > \break > % how to revert to basic TextSpanner here? > \revert TextSpanner.bound-details > c''\startTextSpan c''\stopTextSpan c'' c'' | > } > > \score { > \new Staff \treble > \layout {} > } > > % > ___ > lilypond-user mailing list > lilypond-user@gnu.org > https://lists.gnu.org/mailman/listinfo/lilypond-user > -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Reverting TextSpanner properties
Hi Andrew, How about: %% \version "2.19.82" spToNatSpanOld = { \override TextSpanner.font-size = #-4 \override TextSpanner.bound-padding = #1.0 \override TextSpanner.style = #'line \override TextSpanner.bound-details = #`((right (Y . 0) (arrow . #t) (text . ,#{ \markup "NAT"#}) (padding . 0.6) (stencil-align-dir-y . CENTER)) (left (Y . 0) (text . ,#{ \markup "SP" #}) (stencil-align-dir-y . CENTER)) (right-broken (text . #f)) (left-broken (text . #f))) } treble = { \time 4/4 \spToNatSpanOld c''4\startTextSpan c'' c'' c''\stopTextSpan | c'' c'' c''\startTextSpan c'' | c'' c'' c'' c'' | \break c'' c''\stopTextSpan c'' c''\startTextSpan | \break c''\stopTextSpan c'' c'' c'' | \break % how to revert to basic TextSpanner here? \revert TextSpanner.bound-details c''\startTextSpan c''\stopTextSpan c'' c'' | } \score { \new Staff \treble \layout {} } %% Cheers, Pierre Le jeu. 7 févr. 2019 à 08:58, Andrew Bernard a écrit : > I have a text spanner set up nicely to do sul ponticello -> nat. All works > beautifully. But how does one revert the overrides use to achieve this to > go back to a plain text spanner without undoing each and every line? Can't > you just revert bound-details? > > Searching the list archives did not reveal anything for me. Perhaps a poor > choice of search keywords. > > I hope this is not one of those cases again where I should not be using > braces in the definition, but it won't compile if I don't. > > > Andrew > > > % > > \version "2.19.82" > > spToNatSpan = { > \override TextSpanner.font-size = #-4 > \override TextSpanner.bound-padding = #1.0 > \override TextSpanner.style = #'line > \override TextSpanner.bound-details.right.arrow = ##t > \override TextSpanner.bound-details.left.text = #"SP" > \override TextSpanner.bound-details.right.text = #"NAT" > \override TextSpanner.bound-details.right.padding = #0.6 > \override TextSpanner.bound-details.right.stencil-align-dir-y = #CENTER > \override TextSpanner.bound-details.left.stencil-align-dir-y = #CENTER > \override TextSpanner.bound-details.left-broken.text = ##f > \override TextSpanner.bound-details.right-broken.text = ##f > } > > treble = { > \time 4/4 > > \spToNatSpan > c''4\startTextSpan c'' c'' c''\stopTextSpan | > c'' c'' c''\startTextSpan c'' | > c'' c'' c'' c'' | > \break > c'' c''\stopTextSpan c'' c''\startTextSpan | > \break > c''\stopTextSpan c'' c'' c'' | > \break > % how to revert to basic TextSpanner here? > \revert TextSpanner.bound-details > c''\startTextSpan c''\stopTextSpan c'' c'' | > } > > \score { > \new Staff \treble > \layout {} > } > > % > > > > > ___ > lilypond-user mailing list > lilypond-user@gnu.org > https://lists.gnu.org/mailman/listinfo/lilypond-user > ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user