PIano: Partial Pedalling
Dear All, I've tinkered about some more with partial pedalling and gradual sustain pedal release, and here's some code (some of it copied/adapted from the internet) that seems to work, even though in some respects it shouldn't: \version "2.20.0" \relative c'' { \set Staff.pedalSustainStyle = #'bracket % 1. standard sustain pedal behaviour c1\sustainOn c \sustainOff \sustainOn c\sustainOff c % 2. gradual pedal release indicated by dashed line \once \override Staff.PianoPedalBracket.edge-height = #' (1 . 0) c1\sustainOn \once \override Staff.PianoPedalBracket.bracket-flare = #'(0 . 14.5) \once \override Staff.PianoPedalBracket.edge-height = #' (0 . 1) \once \override Staff.PianoPedalBracket.style = #'dashed-line c \sustainOff \sustainOn c c4\sustainOn \sustainOff c c c % 3. 1/2 pedal instruction \set Staff.pedalSustainStyle = #'mixed \once \override Staff.PianoPedalBracket.edge-height = #' (0 . 1) \override Staff.PianoPedalBracket.bracket-flare = #'(8 . 0) \once \override Staff.SustainPedal #'stencil = #(lambda (grob) (grob-interpret-markup grob (markup "½"))) c1\sustainOn c c \sustainOff } In the second snippet, the slanted pedal release line ONLY works if \sustainOff in the final line is preceded by \sustainOn; otherwise the line remains horizontal. It doesn't make complete sense to me, since there's already a \sustainOn in the preceding line. So this is probably isn't how it's supposed to be done, but for now it offers a simple way of notating gradual sustain pedal release. Jan
Re: Piano: partial pedalling
Many thanks for this, Aaron; it's very useful and I could never have coded this myself. I've meanwhile done some more searching and the 'pedal-decorations' notation snippets in OpenLilyLib also go quite a long way towards doing what I'm looking for. Jan Van: Aaron Hill Verzonden: maandag 10 mei 2021 21:57 Aan: Dijkhuizen, J.F. van CC: lilypond-user@gnu.org Onderwerp: Re: Piano: partial pedalling On 2021-05-10 11:38 am, Dijkhuizen, J.F. van wrote: > Dear All, > > I was wondering if anybody knows if it's possible to notate partial > sustain pedalling in LilyPond (essentially 1/4. half-pedal, 3/4 > pedal), and if so how. > > There seems to be nothing about it in the manual, and I've not been > able to find anything online that I am able to use. Ideally, I'd like > to be able to notate pedal level changes by means of a line, as is > possible in Dorico, for example: > > However, just being able to specify '1/2' at the beginning of a pedal > line, and, for example, 'release pedal slowly' at tthe end of a pedal > line, would be great too. > > Any help with this would be really appreciated! There are a few ad hoc solutions if you search the archives. You can see if my hack [1] to the PianoPedalBracket stencil a few years ago would be of any use. [1]: https://lists.gnu.org/archive/html/lilypond-user/2019-01/msg00522.html -- Aaron Hill
Piano: partial pedalling
Dear All, I was wondering if anybody knows if it's possible to notate partial sustain pedalling in LilyPond (essentially 1/4. half-pedal, 3/4 pedal), and if so how. There seems to be nothing about it in the manual, and I've not been able to find anything online that I am able to use. Ideally, I'd like to be able to notate pedal level changes by means of a line, as is possible in Dorico, for example: [cid:5fc29545-b07a-4416-b824-05b22139aba9] However, just being able to specify '1/2' at the beginning of a pedal line, and, for example, 'release pedal slowly' at tthe end of a pedal line, would be great too. Any help with this would be really appreciated! Thanks, Jan
RE: Three-note tremolo in 4/4
Hi Lukas, Thanks so much for this further refinement! You're right that it isn't really a hack (though that term was not at all meant as a criticsm!) and more of a workaround to make LilyPond do something that's entirely legitimate from a musical point of view. Ideally, the tremolo function in LilyPond would be revised along roughly the following lines: \repeat tremolo { (duration), (beam value), (musical arguments) } So for example: \repeat tremolo { (1), (32), (g c, d) } would yield a three-note tremolo with three beams and a duration of one whole note / semibreve / 4/4. This would pre-empt any clash between tremolo duration and time signature. Best wishes, Jan From: Lukas-Fabian Moser On Behalf Of Lukas-Fabian Moser Sent: dinsdag 16 maart 2021 21:33 To: Dijkhuizen, J.F. van ; Carl Sorensen ; lilypond-user@gnu.org Subject: Re: Three-note tremolo in 4/4 Hi Jan, But it only works if there's no clash with the time signature. So you can have three arguments in a 3/4 or 3/2 or 6/8 but not in a 4/4. Conversely, you can have four tremolo pitches in a 4/4 but not 3 -- at least not without the kind of hack devised by Lukas in the first response to my email. And then again, to do so without generating warnings from LP, I suppose you would indeed have to modify tremolo properties on a more fundamental level. That's currently beyond my LP knowledge, however. I think we needn't worry too much about that warning: It states that some calculation of stem lengths (which make sense for the "c32 g f" expression if taken without the \repeat tremolo) yields an unlikely value. I don't understand the internals at the moment, and I agree that it would be nice to have a solution that does not trigger warnings, but I wouldn't mind just suppressing the warning. Thanks to Aaron Hill, there's even a nice way to suppress the right amount (3) of expected instances of that warning (taken from https://lists.gnu.org/archive/html/lilypond-user/2019-09/msg00326.html). So, what about: \version "2.22.0" #(define ly:expect-warning-times (lambda args (for-each (lambda _ (apply ly:expect-warning (cdr args))) (iota (car args) \new Staff \relative { a'4 b c d \omit Dots \once\override Beam.positions = #'(2 . 1) #(ly:expect-warning-times 3 "weird stem size, check for narrow beams") \repeat tremolo 16 { { c32*2/3 g f } } \undo\omit Dots a4 b c d } I'm not even convinced that I would call this solution a "hack" (of course it's no use arguing about that term): - It is the correct music (try exchanging "tremolo" by "unfold"!). - The dots that I had to suppress manually actually make sense: 16 groups of notes consisting of three 32's each do amount to 3*16/32 = 3/2 of a whole measure, after all. So, what we generate is a 1.*2/3, and I don't mind having to tell LilyPond explicitly to engrave this by just omitting the dot. - But I concede that LilyPond's default positioning of the beams isn't good enough. That might qualify as a bug, and the fact that manually supplying the placement triggers a warning doesn't help things - and of course having to suppress a warning is a bit hack-ish... :-) I think what I want to say is that none of this involves, for example, deviating from the actual semantics of entered music ("hijacking staccato dots and turning them into flower-symbols"), or explicitly abusing side-effects of commands, etc. Instead, we write the actual music we want to hear and force-set only those layout parameters that LilyPond isn't at the moment ready to supply automagically. Lukas
Re: Three-note tremolo in 4/4
Thanks, Carl! The rule about \repeat tremolo expecting 2 musical arguments is no longer up-to-date; I think 2.13 or 2.14 introduced the possibility of having more than two arguments. But it only works if there's no clash with the time signature. So you can have three arguments in a 3/4 or 3/2 or 6/8 but not in a 4/4. Conversely, you can have four tremolo pitches in a 4/4 but not 3 -- at least not without the kind of hack devised by Lukas in the first response to my email. And then again, to do so without generating warnings from LP, I suppose you would indeed have to modify tremolo properties on a more fundamental level. That's currently beyond my LP knowledge, however. Jan Van: Carl Sorensen Verzonden: dinsdag 16 maart 2021 19:21 Aan: Dijkhuizen, J.F. van; lilypond-user@gnu.org Onderwerp: Re: Three-note tremolo in 4/4 From: lilypond-user on behalf of "Dijkhuizen, J.F. van" Date: Tuesday, March 16, 2021 at 10:26 AM To: "lilypond-user@gnu.org" Subject: Three-note tremolo in 4/4 Hello everyone, I'm trying to fit a three-note tremolo into a 4/4 measure. I've sort of been able to do this as follows: \version "2.22.0" \relative c'' { \repeat tremolo 8 {\tuplet 3/4 { g32 d c }} } (Of course you could hide the tuplet numbers here.) or: \version "2.22.0" \relative c'' \new Staff = "Example" { \time 4/4 \set Staff.timeSignatureFraction = 3/4 \scaleDurations 4/3 { \repeat tremolo 8 { g32 d c } } While both look more or less OK, the notes appear as dotted half notes, rather than as whole notes. They should be whole notes, since the tremolo lasts the entire measure but I can't figure out how to do this. Does anybody know of a way to create a 3-note tremolo in 4/4 time in which all three notes appear as whole notes? It appears that this cannot be done with \repeat tremolo. I’m a little bit surprised that your code worked. Note the following from the Notation Reference: The \repeat tremolo syntax expects exactly two notes within the braces This could probably be hacked (anything can be in LilyPond). It looks like you would need to modify the properties of tremolo-repeated-music. http://lilypond.org/doc/v2.22/Documentation/internals/tremolorepeatedmusic LilyPond Internals Reference: 1.1.96 TremoloRepeatedMusic<http://lilypond.org/doc/v2.22/Documentation/internals/tremolorepeatedmusic> lilypond.org LilyPond Internals Reference: 1.1.96 TremoloRepeatedMusic I have no experience working with this type of music, so I can’t give you any pointers beyond this. Carl
Re: Three-note tremolo in 4/4
Hi Lukas, Thanks so much for this! It does indeed work (though it does indeed also generate a LilyPond warning about "weird stem size"). I'm fairly new to LP and my experiment with timeSignatureFraction et cetera was essentially an attempt to juggle around with the 3-against-4 problem that I was running up against. Jan Van: Lukas-Fabian Moser namens Lukas-Fabian Moser Verzonden: dinsdag 16 maart 2021 18:45 Aan: Dijkhuizen, J.F. van; lilypond-user@gnu.org Onderwerp: Re: Three-note tremolo in 4/4 Hi Jan, I'm unsure what you want to accomplish with the manual setting of timeSignatureFraction etc. But if I understand you correctly, I think \version "2.22.0" \new Staff \relative { a'4 b c d \omit Dots \once\override Beam.positions = #'(2 . 1) \repeat tremolo 16 { \scaleDurations 2/3 { c32 g f } } \undo\omit Dots a4 b c d } should come close to your MuseScore mockup (and I think its semantic is correct). The manual positioning of Beam positions seems to be necessary, but it makes LilyPond complain with a warning - which could be silenced if push comes to shove. Lukas
Three-note tremolo in 4/4
Hello everyone, I'm trying to fit a three-note tremolo into a 4/4 measure. I've sort of been able to do this as follows: \version "2.22.0" \relative c'' { \repeat tremolo 8 {\tuplet 3/4 { g32 d c }} } (Of course you could hide the tuplet numbers here.) or: \version "2.22.0" \relative c'' \new Staff = "Example" { \time 4/4 \set Staff.timeSignatureFraction = 3/4 \scaleDurations 4/3 { \repeat tremolo 8 { g32 d c } } While both look more or less OK, the notes appear as dotted half notes, rather than as whole notes. They should be whole notes, since the tremolo lasts the entire measure but I can't figure out how to do this. Does anybody know of a way to create a 3-note tremolo in 4/4 time in which all three notes appear as whole notes? A bit like the MuseScore mock-up below: [cid:7e922d93-4f40-4bfe-83cf-b751840cdc45] Thanks for your help! Jan van Dijkhuizen