musicality.schedule

clear

(clear instr)
clears all data in all beats. passes through a single argument for convenience

deinit

(deinit)
Closes client and server

dur->max-note-val

a map of duration keyword to Max note value. It would be nice to use ratios but I want this to work in cljs.
:1|2 I find more readable than :1:2

init

(init ip)(init)
Creates/opens client and server and registers listeners

send-beat

(send-beat instr beat type data)
Sends a 'beat' of data to the sequencer. 
instr is a string corresponding to osc address of instrument
beat is 1-based.  
type can be :note :cc :fn.

type -> data
:note -> [note vel dur]
:cc -> [cc target-val dur]
:context -> [note note note ...] or "clear" (TODO: this will get richer)
:fn -> fn-name

send-beat-count

(send-beat-count instr pulse-count)
Sends the number of pulses in a loop

send-beats

(send-beats instr beats)
Sends a hash-map of beats.
Each beat is a map that can contain :note :cc :fn :context data.
So s might look like {1 {:note [60 64 :1|4, 65 64 :1|4]}, 4 {:fn :some-fn #()}}

send-fn

(send-fn instr beat fn-keyword fn)
Sends a fn to be executed at beat