is it possible to change midi channels in the middle of a song ?.

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

is it possible to change midi channels in the middle of a song ?.

Eby Mani
Is it possible to specify midi channel numbers for a given voice or switch channels in the middle of a song in lilypond ?.

E.g. Pipe Organ software like Hauptwerk and Aeolus require Pedals, Manuals I, Manuals II, Manuals III on separate channels. Thus can switch midi channels for "solo" bit or switch soft passages to "swell" manual, etc...

It will be easy to render audio for Pipe Organ music typeset using lilypond than editing each midi file with an external editor and process using Hauptwerk/Aeolus.

Thanks,
eby

Reply | Threaded
Open this post in threaded view
|

Re: is it possible to change midi channels in the middle of a song ?.

Rick Kimpel-2
Ebi Mani wrote:
>Is it possible to specify midi channel numbers for a given voice
>or switch channels in the middle of a song in lilypond ?.

I know that you can change MIDI instruments in the middle of
a song, and set the MIDI instrument on a per voice basis. That
might give you the flexibility you need.

% snippet modified from
% http://lilypond.org/doc/v2.18/Documentation/notation/creating-midi-files

\score {
  \new Staff <<
    \new Voice \relative c''' {
      \set midiInstrument = #"flute"
      \voiceOne
      \key g \major
      \time 2/2
      r2 g-"Ch." ~
      g fis ~
      fis4 g8 fis e2 ~
      e4
      \set midiInstrument = #"violin"
      d8-"Sw." cis d2
    }
    \new Voice \relative c'' {
      \set midiInstrument = #"clarinet"
      \voiceTwo
      b1-"Gt."
      a2. b8 a
      g2.
      \set midiInstrument = #"violin"      
      fis8-"Sw." e
      fis2 r
    }
  >>
  \layout { }
  \midi {
    \context {
      \Staff
      \remove "Staff_performer"
    }
    \context {
      \Voice
      \consists "Staff_performer"
    }
    \tempo 2 = 72
  }
}

%% End snippet

Good luck!
Rick Kimpel



Reply | Threaded
Open this post in threaded view
|

Re: is it possible to change midi channels in the middle of a song ?.

Valentin Villenave-3
In reply to this post by Eby Mani
On 5/13/20, Eby Mani <[hidden email]> wrote:
> Is it possible to specify midi channel numbers for a given voice or switch
> channels in the middle of a song in lilypond ?.

That should be possible by just using
\set Staff.midiInstrument = #"something else"

You may need to adjust midiChannelMapping as well:
http://lilypond.org/doc/v2.21/Documentation/notation/midi-channel-mapping

Cheers,
-- V.