Karya, built on 2020-11-26T21:03:17 (patch 23b5be2d53a9e8e7d6136cda5aae2849abe5cded)
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 ScoreT.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.