Karya, built on 2018-05-31T02:46:59 (patch 0a1a35479c514820d77330ae8a978975ba22a47a)

Safe HaskellNone



Fire up the play-cache vst.



encode_time :: RealTime.RealTime -> [Midi.ChannelMessage] Source #

Emit MIDI messages that tell play_cache to get ready to start playing at the given time.

This is encoded as Midi.Aftertouch where the key is the index*7 and the value is the 7 bits at that index. At a 44100 sampling rate, this can address 2^(7*4) 44100 60 = 101 minutes, which is long enough for anything I'm likely to write. TODO since this can't represent negative times, and the DAW likely doesn't like them either, I'll have to normalize the output.

encode_play_config :: FilePath -> BlockId -> Set Score.Instrument -> [Midi.ChannelMessage] Source #

Send the block to play, along with muted instruments, if any. Each is separated by a 0.

decode_time :: [Midi.ChannelMessage] -> Int Source #

Just to test encode_time. play_cache does this internally.