lilypond-user
[Top][All Lists]
Advanced

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

Re: instrumentation


From: Mats Bengtsson
Subject: Re: instrumentation
Date: Thu, 16 Jan 2003 16:00:39 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021003

By default, each Staff corresponds to a single MIDI
instrument. However, Lilypond is an extremely flexible program.
The solution to your problem is to simply redefine the way that
the Staff and Voice contexts are mapped to MIDI tracks, see
the following example.

\score{\notes\relative c'
  \context Staff <
  {\property Voice.midiInstrument="flute" c d e f g a b c} \\
  {\property Voice.midiInstrument="tuba" c,2 g' c1}>
\midi{\tempo 4=80
\translator {
        \type "Performer_group_performer"
        \name Staff
        \accepts Voice


}
\translator {
        \type "Staff_performer"
        \name Voice
        \consists "Key_performer"
        \consists "Tempo_performer"
        \consists "Time_signature_performer"
        \consists "Dynamic_performer"
        \consists "Span_dynamic_performer"
        \consists "Piano_pedal_performer"
        \accepts "Thread"
}
}
\paper{}
}

If you want different Threads to be able to handle different
instruments, you shouldn't redefine the translator for Voice
but instead use (untested):

\translator {
        \type "Staff_performer"
        \name Thread
        \consists "Note_performer"
        \consists "Tie_performer"
}

Dave who sent a negative answer before should know this trick,
see http://mail.gnu.org/archive/html/lilypond-user/2002-06/msg00147.html

   /Mats


Ferenc Wagner wrote:
               Hello,

Is it possible to assign different MIDI instruments to the
threads in one voice?  The problem is an accordic piece
(mostly a series of < . . . > constructs).  If not, what
about different voices?  I can easily translate the piece to
< . \\ . \\ . > form, of course, which looks bad, but for
generating MIDI it would be OK.  I'd like to avoid putting
the voices on separate staves (too much work).  I know about
Staff.midiInstrument, but Voice.midiInstrument didn't work
for me...

                                     Thanks: Feri.


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


--
=============================================
        Mats Bengtsson
        Signal Processing
        Signals, Sensors and Systems
        Royal Institute of Technology
        SE-100 44  STOCKHOLM
        Sweden
        Phone: (+46) 8 790 8463                         
        Fax:   (+46) 8 790 7260
        Email: address@hidden
        WWW: http://www.s3.kth.se/~mabe
=============================================





reply via email to

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