lilypond-user
[Top][All Lists]
Advanced

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

MIDI output trick


From: Charles E. Kinney
Subject: MIDI output trick
Date: Tue, 28 Aug 2007 22:58:58 -0400

Lilyponders,

While trying to get the music from all staves in a piece to combine
for MIDI output, I found a tip in the archives to create a staff group
to combine the music parts, then a score section for print output,
then a separate score section for the MIDI, more or less as follows:

  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  %% Create staff grouping for music:
  fullScore = \new StaffGroup <<
    \melody      % flute
    \righthand   % electric grand
    \lefthand    % drawbar organ
    \bass        % electric bass (finger)
  >>
 
 %% Stock print output section . . .
  \score { . . . }

  %% And now output MIDI with unwrapped repeats:
  \score{
    \applymusic #unfold-repeats \fullScore
    \midi{\tempo 4 = 100 }
  }
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Which works just great!  However, the only part that has the desired
MIDI instrument setting is the last part (bass).  The first parts are
all the default piano.  Bummer.

After a bit of fumbling around, I hit on this change . . .

  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  %% Create staff grouping for music:
  fullScore = \new StaffGroup <<
    \new Staff << \melody \melody >>        % flute
    \new Staff << \righthand \righthand >>  % electric grand
    \new Staff << \lefthand \lefthand >>    % drawbar organ
    \new Staff << \bass \bass >>            % electric bass (finger)
  >>
  etc . . .
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

. . . which worked beautifully!  Every part is created, combined and
plays back with the desired instruments.

I've only started using Lilypond about 10 days ago, and I don't
read or write music that well (I'm a play-by-ear bass & guitarist).
I have a number of songs I want to transcribe properly (as well as
demo), and Lily is making the process remarkably painless.  So in the
spirit of FOSS, I thought I should give back to the community.

Thanks all!
  Chuck Kinney





reply via email to

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