Hello all, (first tiny steps in LilyPond-Scheme ...)
I want to have the piano pedal change \sustainOff\sustainOn in one command. This doesn't work: PED = \sustainOff\sustainOn The following only works properly with "pedalSustainStyle = #'text", brackets are not connected (found in http://lists.gnu.org/archive/html/lilypond-user/2010-10/msg00535.html): PED = #(begin (make-span-event 'SustainEvent STOP) (make-span-event 'SustainEvent START)) (See also the attached sample file) Here a solution I figured out (reading "Extending") that works also with brackets, but this time the command has to be placed _before_ the note, breaking LilyPonds input rules: PED = #(make-music 'EventChord 'elements (list (make-span-event 'SustainEvent STOP) (make-span-event 'SustainEvent START))) To figure out how to write a properly working function for this is currently beyond my skills. Has anyone a hint, how and where to start, or even a solution? Thanks in advance. Dieter
\version "2.14.1"
CH = #(begin
(make-span-event 'SustainEvent STOP)
(make-span-event 'SustainEvent START))
PED = #(make-music
'EventChord
'elements
(list
(make-span-event
'SustainEvent STOP)
(make-span-event
'SustainEvent START)))
\relative c' {
\time 3/8
%% default commands
\set Staff.pedalSustainStyle = #'text
c8 \sustainOn^"'text' and default cmds" e g |
f\sustainOff\sustainOn a c |
e,\sustainOff\sustainOn g b |
d,\sustainOff\sustainOn f a\sustainOff | \bar "||"
\set Staff.pedalSustainStyle = #'mixed
c,8\sustainOn^"'mixed' and default cmds" e g |
f\sustainOff\sustainOn a c |
e,\sustainOff\sustainOn g b |
d,\sustainOff\sustainOn f a\sustainOff | \bar "||"
\set Staff.pedalSustainStyle = #'bracket
c,8\sustainOn^"'bracket' and default cmds" e g |
f\sustainOff\sustainOn a c |
e,\sustainOff\sustainOn g b |
d,\sustainOff\sustainOn f a\sustainOff | \bar "||" \break
%% \CH-macro
\set Staff.pedalSustainStyle = #'text
c,8\sustainOn^"'text' and \CH" e g |
f\CH a c |
e,\CH g b |
d,\CH f a\sustainOff | \bar "||"
\set Staff.pedalSustainStyle = #'mixed
c,8\sustainOn^"'mixed' and \CH" e g |
f\CH a c |
e,\CH g b |
d,\CH f a\sustainOff | \bar "||"
\set Staff.pedalSustainStyle = #'bracket
c,8\sustainOn^"'bracket' and \CH" e g |
f\CH a c |
e,\CH g b |
d,\CH f a\sustainOff | \bar "||" \break
%% \PED-macro
\set Staff.pedalSustainStyle = #'text
c,8\sustainOn^"'text' and \PED" e g |
\PED f a c |
\PED e, g b |
\PED d, f a\sustainOff | \bar "||"
\set Staff.pedalSustainStyle = #'mixed
c,8^"'mixed' and \PED"\sustainOn e g |
\PED f a c |
\PED e, g b |
\PED d, f a\sustainOff | \bar "||"
\set Staff.pedalSustainStyle = #'bracket
c,8^"'bracket' and \PED"\sustainOn e g |
\PED f a c |
\PED e, g b |
\PED d, f a\sustainOff | \bar "||"
}
\layout {
indent = 0\cm
\context {
\Score
\remove "Bar_number_engraver"
}
}
\paper {
bar-numbers = ##f
ragged-right = ##f
top-system-spacing #'minimum-distance = 12
system-system-spacing #'minimum-distance = #24
}
ped-test.pdf
Description: Adobe PDF document
_______________________________________________ lilypond-user mailing list [email protected] https://lists.gnu.org/mailman/listinfo/lilypond-user
