[jmsl] writing work to a midi file
jmsl at music.columbia.edu
jmsl at music.columbia.edu
Wed Jul 16 00:51:39 EDT 2008
Thanks, Nick.
I'll check out both your solutions (this and the Player substitute
code) in the morning.
cheers,
J.
On 15-Jul-08, at 9:37 PM, jmsl at music.columbia.edu wrote:
> Hello J
>
> Have look at jmsltestsuite.MidiLoggerNonRealTimeTest which plays
> MusicShapes at hyperspeed and writes them to a MIDI file. This will
> probably do what you need. All scheduling will be preserved because
> the MusicShapes are really playing, although they are doing so
> silently and as fast possible. But their timestamps are updating
> properly and this is what is being written to the MIDIFile for timing.
>
> If you want to use MIDI instruments and record in real time then of
> course you can just use Midi logging.
>
> Thanks
> Nick
>
>
> jmsl at music.columbia.edu wrote:
>> I'm going to be asking some pretty general questions for a bit,
>> while I work on the basic design of my app.
>>
>> This time I'm curious about midi file IO. I don't see any methods
>> which allow MusicShapes to be entered directly into midi files, so
>> I'm assuming we'd do something like this:
>>
>> 1) iterate over elements in a given MusicShape
>> 2) get midi-compatible dimensions and create new MIDIFileEvents or
>> MIDIFileMetaEvents for them
>> 3) add the MIDI events created in 2) to a new MIDIFileTrack
>> 4) add the track from 3) to a MIDIFileImage
>> 5) write the image from 4) to a midi file
>>
>> Sound about right? The only thing I'm not sure about is figuring
>> out the proper time for the events when creating midi tracks, since
>> the MusicShape holds events in seconds, while the midi tracks will
>> hold them in ticks...
>>
>> J.
>> _______________________________________________
>> jmsl mailing list
>> jmsl at music.columbia.edu
>> http://music.columbia.edu/mailman/listinfo/jmsl
> _______________________________________________
> jmsl mailing list
> jmsl at music.columbia.edu
> http://music.columbia.edu/mailman/listinfo/jmsl
More information about the jmsl
mailing list