The attached .ly is an attempt to recreate the score shown in the
attached PNG file, but the position of the pedal marks is different, and
I can’t figure out how to achieve this.  (My MIDI interface is also not
so great that I can tell whether the pedal is depressed in the correct
place.)

It’s entirely possible I’m completely missing the mark about how to use
the sustain pedals in Lilypond, but this is my best effort given my
reading of the manual.  Any pointers or corrections would be
appreciated; explanations even more so.

(The discussion “Piano pedal mark collision (\sustainOn, \sustainOff)”
from January of this year,
<http://thread.gmane.org/gmane.comp.gnu.lilypond.general/109576>, is
likely related, but part of me not understanding Lilypond’s
sustain-pedal notation is that I don’t understand what Mr Pawelczyk is
doing in that thread.)

—Joel C. Salomon
\version "2.19.44"

\language "english"

upper = \relative c'' {
	\clef treble
	\key d \minor
	\time 2/4

	\grace s8
	c'16	a	g	f	<e c'>	<d bf'>	<c a'>	<bf g'>	|
	<a f'>	<c e>	<bf d>	<a c>	<d bf'>	<c a'>	<a fs'>	<fs d'>	|
}

lower = \relative c {
	\clef bass
	\key d \minor
	\time 2/4

	\acciaccatura f,8 a'4->		\acciaccatura g,8 bf'4->	|
	\acciaccatura a,8 c'4->
	<<
		{ \voiceOne		a8		c		}
		\new Voice { \voiceTwo	d,4				}
	>> \oneVoice							|
}

dynamics = {
	s2*16
}

pedal = {
	\grace s8 s4 \sustainOn	\grace 8 \sustainOff s4 \sustainOn
	\grace s8 \sustainOff s4 \sustainOn s4 \sustainOff
}

\score {
	\new PianoStaff <<
		\new Staff = "upper" \upper
		\new Dynamics = "dynamics" \dynamics
		\new Staff = "lower" \lower
		\new Dynamics = "pedal" \pedal
	>>
	\layout {
		\context {
			\PianoStaff
			\accepts Dynamics
		}
	}
}
\score {
	\new PianoStaff <<
		\new Staff = "upper" <<
			\upper
			\dynamics
		>>
		\new Staff = "lower" <<
			\lower
			\dynamics
		>>
		\new Dynamics = "pedal" \pedal
	>>
	\midi {
		\context {
			\type "Performer_group"
			\name Dynamics
			\consists "Piano_pedal_performer"
		}
		\context {
			\PianoStaff
			\accepts Dynamics
		}
	}
}
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to