Drum trigger controlled melody using the LOM
My first approach to this was by measuring the distance between note-off and note-on messages but now that I realized that I can queue the clip for note-duration directly, I'm trying to take that approach instead.
Besides some tweaks, I feel like I'm super close. I know that I need to fix the output note-length but right now, I'm stuck trying to figure out how to correctly use the 'gate' object or maybe there's a better way in general.
The attached patch gets the current playing clip and on each trigger, it generates a stack of notes in the clip that come before the trigger and tries to pop off the most recent note, using its pitch and duration. The problem is that the gate is not letting the value through that's being evaluated by the condition that triggers the bang.
A related follow up question is, what's the difference between an obj:dictionary
and a dictionary
? It seem that [t l]
will output an obj:dictionary
and dict
outputs a dictionary
but the gate object does not accept dict. Is it the difference between an object and a message, since I see gate's right inlet is a "Gated Message"?
Regardless, thanks for all the help so far. It's been a lot of fun.