Forums > MaxMSP

Poly-rhythmic steptime sequencer

December 6, 2006 | 5:34 pm

Need a starting point as I am getting nowhere with this! So near yet so far;-)
I need to produce a patch that has four looped midi files all of different lengths. For example MIDI file 1 has 3 beats file two has 5 file 3 has 7 and file four has 9 beats, they need only to have one note-on each that I can create a bang from, but they must be using the same base for tempo. All except the first file have note-on timing offsets i.e they start after the beginning of beat one.
the looping of the beats (not the notes) would look like this.

123123123123123123123123123123123123123123123etc
12345123451234512345123451234512345123451234512345etc
12345671234567123456712345671234567123456712345671234567etc
123456789123456789123456789123456789123456789123456789123456789etc

or in poly-rhythmic time signature

3/4
—-
5/4
—-
7/4
—-
9/4

I have been trying to do this with four "seq" objects but the problem seems to be that it is difficult to create midi file type 0 with the exact lengths needed.

I suppose that what I am really asking is just for a starting point for a simple 4 track step-time sequencer where each track can loop with different lengths. I need to give a specific BPM too (this is really important).

I know this is not technically a support question but this is driving me mad. I have built a beautiful video engine in jitter that needs to be triggered in this way. I am reverse engineering some algorithmic music to be played back as video of clips of real people playing instruments. It will be crazy I promise!

I will post this on the forum once more so as to not be a total support leech. I don’t like to hassle support but am a desperate composer/video artist and this one I am really exited about.
If you got this far thanks for reading! :-)
Carl


December 7, 2006 | 11:17 pm

Hi,

If your files aren’t very complex (only three or five beats), maybe just using a list of note pitch / velocity / duration would do it, using a metro (or better, an audiorate tempo control). I’m not sure how many notes you actually have in each loop. Detonate might also be a good choice…?

You could always get an audio recording of each loop (on a system with some good MIDI instruments). Then you’d use buffer~ and groove~ for looped playback. This might be easier actually, and they’d always sound the same (i.e., good) on every system. Plus you can then get crazy with filters and effects….. but that’s another story….

Actually, I guess if you have to set the bpm, using audio wouldn’t be the ticket (unless you sample each note and use MIDI to trigger them).

–CJ


December 8, 2006 | 10:28 am

Here is my sub patch finished. It is really simple but could be used abused and adapted for innumerable purposes. I am using it to help reverse engineer some of my algorithmic compositions. The events copy the way the bars roll over each other poly-rhythmicly, the bangs triggering actual video of musical performances. Its quite bizarre to write four bars of music and then get thousands back, and its you playing it.

Challenge. Can anybody tell me after how many bars this included patch will start to repeat the event pattern? ;-)

There must be so many ways of making the same type of patch, what do you think?

Carl

max v2;
#N vpatcher 409 44 1208 836;
#P window setfont "Sans Serif" 9.;
#P number 399 64 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 342 64 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 286 63 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P button 66 58 71 14;
#N comlet bpm;
#P inlet 224 88 15 0;
#N comlet START STOP;
#P inlet 272 87 15 0;
#N comlet RESET COUNTERS;
#P inlet 173 134 15 0;
#P window linecount 1;
#P message 399 134 20 196617 16;
#P message 342 134 14 196617 1;
#P message 294 134 20 196617 80;
#P message 592 190 20 196617 51;
#P message 563 191 20 196617 43;
#P message 536 191 20 196617 35;
#P message 509 191 20 196617 27;
#P newex 445 92 48 196617 loadbang;
#N comlet BANGMOV-4;
#P outlet 419 453 15 0;
#N comlet BANGMOV-3;
#P outlet 329 450 15 0;
#N comlet BANGMOV-2;
#P outlet 238 452 15 0;
#N comlet BANGMOV-1;
#P outlet 145 451 15 0;
#P button 173 154 15 0;
#P message 173 181 14 196617 0;
#P number 294 161 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 419 316 46 196617 select 3;
#P newex 329 316 46 196617 select 2;
#P newex 238 316 46 196617 select 1;
#P number 399 161 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 342 161 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P button 419 355 71 12;
#P button 329 355 71 9;
#P button 238 354 71 13;
#P button 145 354 71 6;
#P number 475 242 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 385 242 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 294 242 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 201 242 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#N counter;
#X flags 0 0;
#P newobj 419 267 66 196617 counter;
#N counter;
#X flags 0 0;
#P newobj 329 267 66 196617 counter;
#N counter;
#X flags 0 0;
#P newobj 238 267 66 196617 counter;
#P toggle 272 161 15 0;
#P newex 145 316 46 196617 select 0;
#N counter;
#X flags 0 0;
#P newobj 145 267 66 196617 counter;
#P newex 272 187 53 196617 tempo 80;
#P comment 244 488 100 196617 TRIGGER OUTLETS;
#P comment 94 155 67 196617 RESET COUNT;
#P comment 68 33 65 196617 START STOP;
#P comment 290 33 26 196617 BPM;
#P comment 334 33 51 196617 MULTIPLY;
#P comment 397 33 41 196617 LENGTH;
#P window linecount 2;
#P comment 535 241 118 196617
#P window linecount 1;
#P comment 477 317 100 196617 OFFSETS;
#P comment 16 382 118 196617 JUST SO YOU CAN SEE >;
#P window linecount 4;
#P comment 451 602 277 196617 This is a simple poly-rhythmic event trigger. Use odd numbers in the loop lengths with offsets all different and below 5 to keep events sequential and even loop lengths to allow events to occur simultaneously;
#P fasten 10 0 11 0 277 214 150 214;
#P connect 11 0 12 0;
#P connect 12 0 21 0;
#P connect 21 0 33 0;
#P connect 45 0 32 0;
#P connect 32 0 31 0;
#P connect 31 0 11 2;
#P fasten 38 0 17 0 514 219 206 219;
#P connect 17 0 11 4;
#P fasten 10 0 14 0 277 214 243 214;
#P connect 14 0 27 0;
#P connect 27 0 22 0;
#P connect 22 0 34 0;
#P fasten 31 0 14 2 178 231 271 231;
#P fasten 48 0 13 0 71 128 277 128;
#P connect 46 0 13 0;
#P connect 13 0 10 0;
#P connect 49 0 10 1;
#P fasten 30 0 10 1 299 181 291 181;
#P fasten 47 0 10 1 229 149 291 149;
#P fasten 37 0 42 0 450 118 299 118;
#P connect 42 0 30 0;
#P fasten 39 0 18 0 541 219 299 219;
#P connect 18 0 14 4;
#P fasten 25 0 10 2 347 181 305 181;
#P fasten 26 0 10 3 404 181 319 181;
#P fasten 10 0 15 0 277 214 334 214;
#P connect 15 0 28 0;
#P connect 28 0 23 0;
#P connect 23 0 35 0;
#P fasten 37 0 43 0 450 118 347 118;
#P fasten 50 0 25 0 347 115 347 115;
#P connect 43 0 25 0;
#P fasten 31 0 15 2 178 231 362 231;
#P fasten 40 0 19 0 568 219 390 219;
#P connect 19 0 15 4;
#P fasten 37 0 44 0 450 118 404 118;
#P fasten 51 0 26 0 404 115 404 115;
#P connect 44 0 26 0;
#P fasten 10 0 16 0 277 214 424 214;
#P connect 16 0 29 0;
#P connect 29 0 24 0;
#P connect 24 0 36 0;
#P fasten 31 0 16 2 178 231 452 231;
#P fasten 41 0 20 0 597 219 480 219;
#P connect 20 0 16 4;
#P fasten 37 0 38 0 450 181 514 181;
#P fasten 37 0 39 0 450 181 541 181;
#P fasten 37 0 40 0 450 181 568 181;
#P fasten 37 0 41 0 450 122 597 122;
#P pop;
Carl Rohumaa 2006


Viewing 3 posts - 1 through 3 (of 3 total)