lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dynamics in MIDI ,Re:


From: Graham Percival
Subject: Re: Dynamics in MIDI ,Re:
Date: Sat, 19 Mar 2005 15:21:24 -0800

Does this solution work on 2.5.16 ?  I tried it, but I can't hear any
dynamics. I'm only playing the midi file with quicktime, so maybe that's
the problem.

Here's the complete updated template; could somebody not on OSX
or with a real MIDI program test it?


\version "2.4.0"
upper = \relative c'' {
  \clef treble
  \key c \major
  \time 4/4

  a b c d
}

lower = \relative c {
  \clef bass
  \key c \major
  \time 4/4

  a2 c
}

dynamics = {
  s2\fff\> s4
  s\!\pp
}

pedal = {
  s2\sustainDown s2\sustainUp
}

\score {
  \context PianoStaff <<
    \context Staff=upper \upper
    \context Dynamics=dynamics \dynamics
    \context Staff=lower <<
      \clef bass
      \lower
    >>
    \context Dynamics=pedal \pedal
  >>
  \layout {
    \context {
      \type "Engraver_group_engraver"
      \name Dynamics
      \alias Voice % So that \cresc works, for example.
      \consists "Output_property_engraver"

      minimumVerticalExtent = #'(-1 . 1)
      pedalSustainStrings = #'("Ped." "*Ped." "*")
      pedalUnaCordaStrings = #'("una corda" "" "tre corde")

      \consists "Piano_pedal_engraver"
      \consists "Script_engraver"
      \consists "Dynamic_engraver"
      \consists "Text_engraver"

      \override TextScript #'font-size = #2
      \override TextScript #'font-shape = #'italic
      \override DynamicText #'extra-offset = #'(0 . 2.5)
      \override Hairpin #'extra-offset = #'(0 . 2.5)

      \consists "Skip_event_swallow_translator"

      \consists "Axis_group_engraver"
    }
    \context {
      \PianoStaff
      \accepts Dynamics
      \override VerticalAlignment #'forced-distance = #7
    }
  }
}
\score {
  \context PianoStaff <<
    \context Staff=upper << \upper \dynamics >>
    \context Staff=lower << \lower \dynamics >>
    \context Dynamics=pedal \pedal
  >>
  \midi {
    \context {
      \type "Performer_group_performer"
      \name Dynamics
      \consists "Piano_pedal_performer"
    }
    \context {
      \PianoStaff
      \accepts Dynamics
    }
  }
}




On 3-Mar-05, at 8:39 AM, Mats Bengtsson wrote:

(Please write something in the Subject line of your emails)

It seems that the person who originally did the template thought
that he had managed to affect also the MIDI dynamics, but at least
in the current versions it doesn't seem to work. I tried to play
a bit with the template, but didn't manage. I'm afraid that it's
hard to do fully automatically the way the MIDI support is implemented
in LilyPond today.

However, what you can do is to have separate \score{...} sections
for the printed output and MIDI output. Just remove the lines with
\midi{
  ...
}
from the current \score{...} and add the following lines at the
end of the file:

\score {
  \context PianoStaff <<
    \context Staff=upper << \upper \dynamics >>
    \context Staff=lower << \lower \dynamics >>
    \context Dynamics=pedal \pedal
  >>
  \midi {
    \context {
      \type "Performer_group_performer"
      \name Dynamics
      \consists "Piano_pedal_performer"
    }
    \context {
      \PianoStaff
      \accepts Dynamics
    }
  }
}

As you can see, I have inserted the \dynamics identifier into the
staves for the left and right hand staves, so the same dynamics
applies to both.

   /Mats



Erik Jensen wrote:
I am creating some music using the piano centered dynamics template from the manual, with lilypond 2.4.2. It works great for the printed music, but the MIDI output is unaffected by the dynamics. How can I modify the template so that the dynamics will also be used in the midi output? ---------------------------------------------------------------------- --
_______________________________________________
lilypond-user mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/lilypond-user


_______________________________________________
lilypond-user mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/lilypond-user






reply via email to

[Prev in Thread] Current Thread [Next in Thread]