10.04.2013 Views

in Snippets - LilyPond

in Snippets - LilyPond

in Snippets - LilyPond

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Contexts and engravers 365<br />

}<br />

\context {<br />

\Voice<br />

\consists #Text_align_engraver<br />

\override TextScript #'X-offset =<br />

#ly:self-alignment-<strong>in</strong>terface::aligned-on-x-parent<br />

\override TextScript #'self-alignment-X = #CENTER<br />

}<br />

\new Staff ><br />

<br />

<br />

<br />

<br />

<br />

<br />

^<br />

<br />

Chang<strong>in</strong>g MIDI output to one channel per voice<br />

When outputt<strong>in</strong>g MIDI, the default behavior is for each staff to represent one MIDI channel,<br />

with all the voices on a staff amalgamated. This m<strong>in</strong>imizes the risk of runn<strong>in</strong>g out of MIDI<br />

channels, s<strong>in</strong>ce there are only 16 available per MIDI port, and most devices support only one<br />

port.<br />

However, by mov<strong>in</strong>g the Staff_performer to the Voice context, each voice on a staff can<br />

have its own MIDI channel, as is demonstrated by the follow<strong>in</strong>g example: despite be<strong>in</strong>g on the<br />

same staff, two MIDI channels are created, each with a different midiInstrument.<br />

\score {<br />

\new Staff

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!