Control over midi output

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

Control over midi output

Mr Tim
Hi all,  I'm trying to use Lilypond to create midi files to be played by an organ and I'm having difficulty getting it formatted the way it needs to be.

1) The midi file needs to be type 0 (everything in one track--the first one). This is very common for driving instruments since it's simpler and cost less to develop.

2) I'm looking to control which channels are used instead of having Lilypond assign them.  The note events will be in the first 4 channels, but I will not always create sequential channels.  I may just want all the note events in channel 2, or maybe just 1 and 4.

These first 2 items will get me pretty far but I will still need to do one a couple more things:

3) I need to send program (instrument/patch) change events on channel 11 which controls the organ stops.  No notes will be on 11, just the program changes.

4) I need to be able to embed a Sysex command at the beginning and end of the file which tells the organ to clear all stops.

I've tried using the midi channel mapping. It ended up still type 1 file, setting all the note events to channel 0, and using the channel prefix (incorrectly) at the beginning of the track to set the channel which would not help even if it worked correctly.  By incorrectly, I mean it's sending the meta event 0xFF 0x21 0x01 followed by the channel number.  It should be 0xFF 0x20 0x01... according to the MIDI spec.  anyway, it would not work as I said since I need type 0 which sinks that ship at the dock. Not to mention the organ may not even accept that meta event since it doesn't record that way.

Any ideas?


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Control over midi output

David Kastrup
Mr Tim <[hidden email]> writes:

> Hi all,  I'm trying to use Lilypond to create midi files to be played by an
> organ and I'm having difficulty getting it formatted the way it needs to be.
>
> 1) The midi file needs to be type 0 (everything in one track--the first
> one). This is very common for driving instruments since it's simpler and
> cost less to develop.
>
> 2) I'm looking to control which channels are used instead of having
> Lilypond assign them.  The note events will be in the first 4 channels, but
> I will not always create sequential channels.  I may just want all the note
> events in channel 2, or maybe just 1 and 4.
>
> These first 2 items will get me pretty far but I will still need to do one
> a couple more things:
>
> 3) I need to send program (instrument/patch) change events on channel 11
> which controls the organ stops.  No notes will be on 11, just the program
> changes.
>
> 4) I need to be able to embed a Sysex command at the beginning and end of
> the file which tells the organ to clear all stops.

LilyPond is not suitable for that kind of fine control over Midi
generation.  Try post-processing the Midi with a program intended for
that kind of manipulation.

--
David Kastrup

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Control over midi output

Tyler Mitchell
In reply to this post by Mr Tim
On Tue, Dec 04, 2018 at 09:33:44AM -0500, Mr Tim wrote:
> Hi all,  I'm trying to use Lilypond to create midi files to be played by an
> organ and I'm having difficulty getting it formatted the way it needs to be.

I've had a fair bit of success recently with midicsv and csvmidi:

        https://www.fourmilab.ch/webtools/midicsv/

It can produce MIDI format 0 files, though you'll have to do some
transmogrification of the CSV to merge it all onto one track.

You can reassign which channel is used for note events, and should
be able to introduce program change events and system exclusive
events also.

Cheers,
Tyler

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user