trouble with custom sequencer
Mar 16, 2009 at 8:52pm
trouble with custom sequencer
I need help from the hive mind. For those of you familiar with Reaktor’s Limelite 2, I’m trying to make something like the remix function in Max to use in conjunction with my hardware sequencer. What this means is that I want to always have the previous bar of MIDI notes in a buffer, and to be able to play back that bar in a non-linear order in sync with the hardware. It needs to be polyphonic. The hardware sequencer has a resolution of 48 ppq.
So…I’ve got the rtin 248 messages feeding a counter that is counting to 96, feeding a timer, to get the tempo. This seems to produce a more stable tempo than doing it by smaller intervals. This tempo is fed into a transport object.
That tempo is triggering a metro object counting 10 ticks, to match the resolution of the hardware sequencer. I’m counting 192 of these with a counter and using them as an address to pair with the incoming notes (via midiparser) and storing them in a coll.
Here are my problems:
I’m packing multiple notes into a list via a thresh object on the output of the parser, so that multiple notes at the same time index get correctly stored as “simultaneous”. The contents of the thresh are fed into the second input of a pack; the first input is the output of my 1/192nd counter. I need to make sure that the contents of the pack are cleared after a note, though, so that event-free time intervals are written as blank (rather than a repeat of the events of the previous interval). I was trying to do this by having any output from the pack object also feed a series of zeroes message into the second input of the pack, but this is not working as I think it should.
That is, my understanding of the timing involved is this:
The output from the counter feeds the left input of the pack object. This triggers the output from the pack. This triggered output message should then feed out to each item connected to the pack output in a right-to-left order.
This does not seem to be what’s happening. If I attach a print object to the pack output, the message that reaches the print object seems to depend on its placement. If it’s to the left of the “0 0 0 0 0 0″ message, the message the print object receives is “index 0 0 0 0 0 0″, and if it’s to the right of the message object, it receives the correct events (say, 42 64 127 36 127). But the “0 0 0 0 0 0″ message is fed to the second input of the pack object; it should not be triggering any output. And even if it did trigger output, then both messages should be reaching the print object, but they are not. Only the “cleared” message is printing.
So, am I correct in thinking that is a glitch? That should not be happening, right?
Second, how do I get this working properly? Even when the coll object is in the right place, (so that the messages have the right contents), it still seems to drop a note every bar or two. I tried delaying the output of the “0 0 0 0 0 0″ message a millisecond, but that didn’t work.
Third, there’s gotta be a better way.
(I’m not including my patch because I’m at work).
Mar 17, 2009 at 1:30am
Here’s the file.
Mar 17, 2009 at 2:58am
I’m not 100% sure what you’re asking for but here is a patch that might help you. It stores values in the [coll] at the time index they appear and blocks all single value input (as if you were trying to recall data). If you want it to only remember the previous bar then you’ll need to trigger the “clear” message otherwise it will keep on storing on top of the existing contents. I hope it helps, if its not what you were looking for then apologies.
– Pasted Max Patch, click to expand. –
Copy all of the following text.Then, in Max, select New From Clipboard.
Mar 17, 2009 at 4:18am
That might solve the conflict I was experiencing, thank you. (Every time I post here I’m vaguely embarrassed by the ease of the solution, but I know it’s just that I need another set of eyes on the problem because I’m stuck looking at things one way.)
You must be logged in to reply to this topic.