lilypond-user
[Top][All Lists]
Advanced

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

Re: All Ye People Clap your hands (was Re: lilypond-user Digest, Vol 66,


From: Mats Bengtsson
Subject: Re: All Ye People Clap your hands (was Re: lilypond-user Digest, Vol 66, Issue 13)
Date: Tue, 06 May 2008 15:57:36 +0200
User-agent: Thunderbird 2.0.0.5 (X11/20070716)

Francisco, your answer is partially relevant here.

Yes, there's a limitation of 16 channels in MIDI. In LilyPond, each Staff and Lyrics context will result in a new MIDI channel and since channel 0 is reserved for common information and channel 10 is reserved for percussion, there are only 14 left for Staff plus Lyrics contexts. Note that LilyPond automatically will use channel 10 only for percussion, so there's no risk
for strange drum sounds unless you really want them.

In this particular .ly file, several unnecessary Lyrics contexts were introduced but never used,
which made the problem even worse. The \score block can be simplified into:
\score {
   <<
       \context ChoirStaff <<
       \staffSoprano
       \new Lyrics  \lyricsto "melodySop" \verseone
       \new Lyrics  \lyricsto "melodySop" \versetwo
       \new Lyrics  \lyricsto "melodySop" \versethree

       \staffAlto
       \new Lyrics  \lyricsto "melodyAlt" \verseone
       \new Lyrics  \lyricsto "melodyAlt" \versetwo
       \new Lyrics  \lyricsto "melodyAlt" \versethree

       \staffTenor
       \new Lyrics  \lyricsto "melodyTen" \verseone
       \new Lyrics  \lyricsto "melodyTen" \versetwo
       \new Lyrics  \lyricsto "melodyTen" \versethree
\staffBass
       \new Lyrics  \lyricsto "melodyBas" \verseone
       \new Lyrics  \lyricsto "melodyBas" \versetwo
       \new Lyrics  \lyricsto "melodyBas" \versethree
               >>
       \staffPiano
   >>
\midi {
   }

   \layout  {
}
}


Still, this results in more than 14 used MIDI channels, since the same lyrics is repeated below each stave. One simple workaround is to make separate \score{...} blocks for the MIDI and the printed output:
\score{
 ...
\layout{}
}

\score {
   <<
       \context ChoirStaff <<
       \staffSoprano
       \new Lyrics  \lyricsto "melodySop" \verseone
       \new Lyrics  \lyricsto "melodySop" \versetwo
       \new Lyrics  \lyricsto "melodySop" \versethree

       \staffAlto
       \staffTenor
       \staffBass
               >>
       \staffPiano
   >>
\midi {
   }
}

   /Mats

Francisco Vila wrote:
2008/5/6 Francisco Vila <address@hidden>:
 MIDI files can not have more than 16 channels, that's why your output
 gets remapped channels modulo 16 (i.e. starting again from the first
 channel). You have too much voices, maybe you could make a specia midi
 block that contains only the essential voices for hearing, so their
 number do not exceed the maximum allowed.

Moreover, these warnings are probably harmless if your MIDI sounds
well, as more than one voice could perfectly sound on a shared channel
among other one, in modern MIDI players (provided that you want the
same sound type on both of them)

If you hear some strange drum sounds, this is because your media
player has a dedicated channel for this, usually #10 or #16.

In this case I don't know what to do from the LilyPond side, except to
use fewer than 10 channels/voices.






reply via email to

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