lilypond-user
[Top][All Lists]
Advanced

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

Re: MIDI output trick


From: Mats Bengtsson
Subject: Re: MIDI output trick
Date: Wed, 29 Aug 2007 10:11:00 +0200
User-agent: Thunderbird 2.0.0.5 (X11/20070716)

What LilyPond version are you using? In recent versions, there's no need to
use \applymusic, rather you can use the function \unfoldRepeats as described
in the section on "Repeats and MIDI".

Also, this function should not have any influence on the MIDI instruments.
I think you original problem was due to something else. Since you didn't
include any complete example, I cannot provide any more specific help,
but don't hesitate to send a new question to the mailing list with more details,
if you want to sort it out. Anyway, there should be no reason to unfold your
repeats by hand as you proposed below.

  /Mats

Charles E. Kinney wrote:
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



_______________________________________________
lilypond-user mailing list
address@hidden
http://lists.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]