Convert Coll list into midi file that seq will play

anotherfilip's icon

Hi,
This one is driving me mental!

I have an original saved midi file that plays fine through the seq object. The idea is to randomise the notes but keep the same rhythm and timing as the original file. Using detonate and coll I have managed to randomise the note/velocity data and glue it back onto the time parameter output.

Now I have a coll with a long list like this.

(eg 4 = note on 4ms from start of seq; 92 43 = note/velocity; 10 = duration)
1, 4 92 43 10;
2, 241 99 56 72;
3, 466 60 38 225;
etc...

So my question is can I make a midi file from this data that seq will understand?

I have tried feeding it back into detonate but I want the original midi file to play alongside the randomised midi file with the ability to switch between the two in real-time...

Thanks....

P

broc's icon

Why don't you create the randomized version as a new midi file (coll > detonate > file)?
Then you could play it alongside the original one using seq.

anotherfilip's icon

Hi Broc,

Sorry didn't explain exactly what I wanted...

When I load in the original midi file I wanted the randomised version to be created immediately ready for playback.

Am I right in thinking that with detonate I would need to record the new sequence back before I could use it?

broc's icon
Max Patch
Copy patch and select New From Clipboard in Max.

You could also play the coll data directly, like this

Chris Muir's icon

I agree with just playing back using the coll. I have an example, called CollSeq that does this sort of thing, which can be found here: http://xfade.com/max/examples/

anotherfilip's icon

Broc thanks for your patch, it did work but I've ended up using the excellent CollSeq from Chris.... Problem solved works perfectly... much appreciated..

P

Roman Thilenius's icon

seq is a really dumb object. forget it - and use detonate.

with detonate you would eventually no longer want to randomize or resort
the events in the stored data - but rather PLAY the data randomised or
resorted right from the stored data in the object in realtime.

this is much easier AND allows for more flexibilty.

for reading consecutive data from detonate including the delta time just connect
the time output to the "next" message (this is kind of missing the helpfile imo)

-110

Dan Laüt's icon

Where seq may be dumb, detonate is a bit too clever. Takes a fair amount of clever coding to have it just play from beginning to end. Why does it not have a 'play' function, for Jove's sake? In that respect it is of the same ilk as filein, which lacks a 'dump', so that you have to do something like this:

Max Patch
Copy patch and select New From Clipboard in Max.

broc's icon

For filein you can make a simple 'dump' using something like [uzi 1000 0] and stop with a [break] message if the last element has been read (or some condition of the data is met).