Il giorno sab 16 lug 2016 alle 16:31, pkarl <jpk...@gmail.com> ha scritto:
It would be so nifty if the following snippet produced equivalent output in the midi file to what is produced in the pdf:

\version "2.19.38"

musicA = \relative {
    \set Staff.instrumentName = "A"
    \repeat volta 2 {
        c''4 d e f
    }
    f d e c
    \bar "|."
}

musicB = \relative {
    \set Staff.instrumentName = "B"
    c''4 d e f
    f d e c
}
\score { <<
    \new Staff \musicA
    \new Staff \musicB
  >>
  \layout {}
}

\score {
    \unfoldRepeats
    <<
    \new Staff \musicA
    \new Staff \musicB
  >>
  \layout {}
  \midi { }
}

This would greatly simplify the production of pieces with many parallel staves.

Should this work? Is it documented that it doesn't work? Why does it work in the pdf output? Is this a bug of \unfoldRepeats? There are several warnings about the use of \unfoldRepeats in the Notation Manual, but none of them seem to apply to my snippet.

So in the output of the second score's B instrument there are only two bars instead of three, because you did not use \repeat volta in musicB. What you want is avoiding writing explicitly \repeat volta in each parallel staff? I remember that I've been warned against this use in this list. And I agree that it's better being explicit about \repeat(s) in the input code.

I think that this warning may apply to your snippet (replace voice with staff)?

"""
When using multiple voices, each of the voices must contain completely unfolded repeats for correct MIDI output.
"""

http://lilypond.org/doc/v2.19/Documentation/notation/using-repeats-with-midi.html

Should it be rephrased to "When using polyphony, each of the voice/staff..."?


_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to