lilypond-user
[Top][All Lists]
Advanced

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

Re: midiInstrument changes play one note too late.


From: Michael Ellis
Subject: Re: midiInstrument changes play one note too late.
Date: Wed, 14 Mar 2012 13:01:04 -0400

On Wed, Mar 14, 2012 at 11:38 AM, Hans Aikema <address@hidden> wrote:
> On 14-3-2012 14:30, Michael Ellis wrote:
>>
>> On Tue, Mar 13, 2012 at 5:26 PM, Michael Ellis
>> <address@hidden>  wrote:
>>>
>>> Is this a known problem?  I don't see any prior reports online and
>>> I've been seeing it since at least 2.12 but assumed it was because I
>>> was doing some fairly complicated things.  I took time to reduce it to
>>> a minimal example today. It's still present in 2.15.33 as shown by the
>>> example below.  FWIW, I'm running OS X 10.6.7 and playing the midi
>>> with QuickTime.  I'm attaching the midi file.
>>>
>>> Is there a workaround?
>>>
>>> Thanks,
>>> Mike
>>
>> Wow. It's rare not to get a response from this list.  Did I phrase the
>> question incredibly poorly?
>>
>> _______________________________________________
>> lilypond-user mailing list
>> address@hidden
>> https://lists.gnu.org/mailman/listinfo/lilypond-user
>> .
>>
> Michael,
>
> Don't worry, IMHO your phrasing was perfectly clear. Sometimes it just takes
> more than a day for someone to notice a post, vaguely remembering reading
> something about it a while ago and than googling up the answer ;)
>
> But here it is: Yes it's an issue with lilypond, it is already known and
> there is a documented work-around in the issue.
>
> See http://code.google.com/p/lilypond/issues/detail?id=1661 for the details.
>
> regards,
> Hans
>


Thanks, Hans.  I did find that report while searching but I wasn't
sure whether it was the same problem as the report dealt with mapping
dynamic changes to parallel skip sequences.  My report deals with
instrument changes in single voice melodies.

I'm not sure how I would go about implementing the suggested
workaround for my application.  I run into the problem primarily when
transcribing individual choral parts for my section.  It's nice in the
midi output if cues from other parts are sounded by a different
instrument.  Since I don't have time to transcribe the entire score,
it's not practical to use the built-in LilyPond cue methods, so I
wrote my own that temporarily changes the instrument, shrinks the
font, and changes the font color,  thus:

cueNotes=
#(define-music-function (p l music) (ly:music?)
  "for printing cue notes in teeny font in color"
  #{
      \set midiInstrument = #(cueInstrument 'get)

      \override Accidental #'color = #(x11-color 'maroon)
      \override Beam #'color = #(x11-color 'maroon)
      \override NoteHead #'color = #(x11-color 'maroon)
      \override Rest #'color = #(x11-color 'maroon)
      \override Slur #'color = #(x11-color 'maroon)
      \override Stem #'color = #(x11-color 'maroon)
      \override Tie #'color = #(x11-color 'maroon)

      \teeny
      $music
      \normalsize

      \revert  Accidental #'color
      \revert  Beam #'color
      \revert  NoteHead #'color
      \revert  Rest #'color
      \revert  Slur #'color
      \revert  Stem #'color
      \revert  Tie #'color

      \set midiInstrument = #(mainInstrument 'get)

      % Note: cueInstrument and mainInstrument are scheme objects with
a "get" method
      % that returns a string, e.g "acoustic grand"
  #})

and apply it like this:

...
do4 sol mi do |
\cueNotes { do^"Sop. 8va" re mi fa } |
sol mi do2 |
...

How would I go about applying the workaround from the bug report to this?

In any case, this seems to me like a fairly serious defect. I hope
it's on the list for 2.16.



reply via email to

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