On Sun, 4 Nov 2012, alex wrote:
Would anyone have a example to hand of how to send MIDI messages over Jack using Haskell?
I have not a working example but I would like to add one to the 'jack' package. The general idea is to chop your MIDI stream into blocks of a duration that the JACK server provides, and then send the blocks when their time comes. You may communicate with your JACK client from the main thread via Concurrent.Chan. E.g. you may send the MIDI stream block by block via a Chan. You may also use an IORef to maintain a state in the JACK client. Then you could initialize the client with a pointer to the stream and let the client chop the stream.
Here is a simple software synthesizer that converts MIDI input to audio output, if that helps:
http://code.haskell.org/jack/examples/Synthesizer.hs _______________________________________________ haskell-art mailing list [email protected] http://lists.lurk.org/mailman/listinfo/haskell-art
