I am trying to build a note generator that outputs midi to an external application, and I want to sequence the midi notes, similar to the
The expression:
(at (+ 1000 (now) (overtone.midi/midi-note receiver (note :A2) 80 100 3)))
plays a midi note to the external receiver immediately - I would expect it to play 1 second from now.
Additionally, the basic example of
(at (+ 1000 (now)) (println "hello world"))
also prints "hello world" immedately, instead of 1 second from now.
passing in the second argument to (at) does not appear to do anything at all, for "hello world" or midi-note
(at (+ 1000 (now)) #(println "hello world"))
However the following work just fine and do what I expect:
(def kick-d (freesound 41155))
(at (+ 1000 (now)) (kick-d))
(definst harpsichord [freq 440]
(string (* 2/1 freq) 1))
(at (+ 1000 (now)) (harpsichord 330))
What am I missing here? Does the event system only work with built-in instruments?
Are there docs that explain why?
How can I produce a midi note at a specific time? Is there a different function or way to sequence midi that I am not aware of? Playing around with the functions in overtone.music.time didn't yield any results.