Karya, built on Mon Jul 24 11:39:07 PDT 2017 (patch 33511aca01257b76b88de7c7a2763b7a965c084e)

Safe HaskellNone

Perform.Im.Play

Description

Fire up the play-cache vst.

Synopsis

Documentation

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.

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

Just to test encode_time. play_cache does this internally.