lilypond-user
[Top][All Lists]
Advanced

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

Re: MIDI channels


From: Graeme St.Clair
Subject: Re: MIDI channels
Date: Tue, 20 Mar 2012 18:19:31 -0400

From a position of nearly complete ignorance - what if you wrote Staff{r}
iso Staff{}?

GFStC.

-----Original Message----- From: Martin Tarenskeen
Sent: Tuesday, March 20, 2012 5:24 PM
To: lilypond-user mailinglist
Subject: Re: MIDI channels



On Tue, 20 Mar 2012, Frank Steinmetzger wrote:

On Tue, Mar 20, 2012 at 09:11:20PM +0100, Martin Tarenskeen wrote:

Hi,
[...]
For this purpose I need to write a pianotune that uses MIDI channel 3 for
the Left Hand part, and MIDI channel 4 for the Right Hand part. A bit
strange, I agree, but this is what the PianoBooster docs tell me to do.

Can Lilypond be tweaked to produce this? It needs to produce a readable
PDF as well as such a MIDI file.

Well since Lilypond enumerates the MIDI channels as they are needed, you could simply produce a MIDI score that has one empty staff, thus pushing the other
staves one channel down. (The first channel is used by lilypond itself).

That's one of the things I tried, but doesn't work.

I have discovered Lilypond only creates a new MIDI channel if a Staff contains
music.

For example I created a file miditest.ly:

\version "2.13.34"
\score {
  <<
    \new Staff {}
    \new Staff {}
    \new Staff { c' }
    \new Staff { c' }
  >>
  \midi {}
}

Then I called mftext (from abcMIDI toolkit) on the resulting miditest.mid file:

# mftext miditest.mid

And this shows:

Header format=1 ntrks=3 division=384
Track start
Time=0  Meta Text, type=0x03 (Sequence/Track Name)  leng=13
     Text = <control track>
Time=0  Meta Text, type=0x01 (Text Event)  leng=9
     Text = <creator: >
Time=0  Meta Text, type=0x01 (Text Event)  leng=30
     Text = <GNU LilyPond 2.15.34          >
Time=0 Time signature=4/4 MIDI-clocks/click=18 32nd-notes/24-MIDI-clocks=8
Time=0  Tempo, microseconds-per-MIDI-quarter-note=1000000
Time=0  Meta event, end of track
Track end
Track start
Time=0  Note on, chan=1 pitch=60 vol=90
Time=384  Note on, chan=1 pitch=60 vol=0
Time=384  Meta event, end of track
Track end
Track start
Time=0  Note on, chan=2 pitch=60 vol=90
Time=384  Note on, chan=2 pitch=60 vol=0
Time=384  Meta event, end of track
Track end

--

MT


_______________________________________________
lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user




reply via email to

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