Forums > MaxMSP

sequencer data fetching method comparison

February 7, 2009 | 10:06 pm


February 8, 2009 | 12:04 am

I think what folk are referring to when they talk about the superior
timing accuracy of using [phasor~] is the stability of the DSP chain
over the Scheduler of the messages that travel on the thin black lines
(rather than the yellow stripy ones)

in your example, sequence recall happens as a fetch message which
causes a float message…
missing data, or late arrival of data, can happen if/when your
computer gets distracted from its scheduling of Max messages – such
as, for example, on my old winXP box (a few years back) a system like
this within a moderately large project would stumble whenever you
opened a sub-patcher window

if you recall values within the realm of MSP, in theory, as i
understand it, the only thing that should trip up the timing is
changing the DSP network – such as creating a new [*~] object for
example

have you look at this recently?:
HD:/Applications/Max5/examples/sequencing-looping/audio-rate-sequencing-looping/

(p.s. I’m quite tired, so if i have missed the point then i am sorry)

2009/2/7 phil

:
>
> Hi all,
>
> After over 1.5 years of maxing and trying different methods of reading data from a step sequencer here is what I think is the best way to avoid missing data slip ups when; 1. sequencer has higher N of step (255). 2. Is read @ faster speeds. Of course I would not say that this is the most CPU friendly at all but w. all the tests I’ve done, it is this method. outputs the [multislider] steps accurately.
>
> I’ve read, seen, and have used over and over the [phasor~] method for reading a sequencer< - over the [metro] [counter] combo. And I understand, it wins in accuracy when you want a fast slow down of speed change. With [metro] large timing leaps (from slow to fast), the timing intervals have to finished before next bang interval in sent. <- unless you interrupt it w. a (stop) or send it a [1] mess. every time the [number] is changed. But then, of course, you get undesired bang every time you change the N for [metro] <- (which is obviously not wanted when triggering a sounds.)
>
> Here are the 3 objects have been using for fetching sequencer data:
> 1. [line] < - the problems is : 255 read @ fast speed = a lot of missing steps. And 2., every time you change the reading speed the line restarts to read from the beginning.
>
> 2. [phasor~] < - the problem is: Although it would be logical that this would be the best object, the problem lies w. the [number~] @ 1ms interval. <- it outputs uneven fast signal bangs. So from my test results the [multi] steps are read unevenly. A lot more bangs are sent than desired. End result. Slip ups of step output.
>
> 3. [metro] [counter] combo: < - the problem is: more CPU hungry and a bit more hassle to get thing going right. The main problem I've always had w. this approach was the lack of leverage for speed change.
> i.e.; to read (255) steps @ med speed (1000 ms.) for 1 seq reading. The [metro]-[counter] is working hard @ 3.92 intervals. ***And what I mean by "a bit more hassle to set up right" is that the N (for metro speed) has to be [divided] by N steps to keep sequence reading timing even has you change the N of steps. (say from 255 to 32 steps) see patch for clarity.
>
> Of course, the more you increase the N steps the faster the metro must bang.
>
> Also, another thing I’ve read, seen, and have tested, is [phasor~]/[< =~ 0.1]/edge~. instead of [metro] to get triggers (bangs). Over and over I’ve read "[phasor~],triggering w. sample rate precision". Well yes and no . @ higher speeds, you get audible bundles of triggers. In other words. they output in groups w. gaps. But then again, Metro’s speed fluctuates are higher speeds and from what I understand, is more CPU hungry.
>
> ———–
> Now, another method "step like" sequencing or complex waves, would be to use [BPF]. The way I’ve always read the points is to bang/bpf/line~. Now would it be better to read the points w. one the three methods mentioned mention above and get the (interpolated Y for input X) out the left most outlet.
> I guess the answer depends on what I’m using the [bpf] for. If for signal manipulation, I’m better off w. the bang/line~ method. But if it’s for midi data tweaking, I guess I’m better off w. the metro/counter/Interpol.Yfor X method. < - To avoid having more triggers than needed.
>
> Finally, I am interested in knowing what all your magnificent thoughts are on this. And if you have (and there probably will be) better methods for do this .
>
> Here is my comparison patch. (you can easily hear the "missing data slips" when only 1 or a few steps are out of majority and the sequencer reading is done at a higher speed.
>
> Endless thanks to you all.
>
> phil
>
> #P window setfont "Sans Serif" 9.;
> #P window linecount 1;
> #P comment 757 584 41 196617 Phasor;
> #P comment 845 584 84 196617 OR metro;
> #P comment 385 147 62 196617 speed in ms.;
> #P toggle 729 617 58 0;
> #P newex 793 651 35 196617 gate~;
> #P hidden newex 1106 295 60 196617 loadmess 1;
> #P window setfont "Sans Serif" 14.;
> #P comment 125 60 300 196622 2 methods for fetching the steps section;
> #P window setfont "Sans Serif" 9.;
> #P window linecount 2;
> #P comment 113 83 100 196617 What seems to be prefered by others;
> #P window linecount 1;
> #P hidden newex 40 57 78 196617 loadmess 1000;
> #P hidden newex 496 65 75 196617 loadmess 255.;
> #P window linecount 2;
> #P comment 349 407 88 196617 ms. result confirmation;
> #P window linecount 1;
> #P comment 155 405 88 196617 ms. shaky result;
> #P newex 327 124 29 196617 t b f;
> #P newex 332 166 40 196617 / 100.;
> #P flonum 332 185 70 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P newex 626 514 41 196617 *~ 0.1;
> #P newex 628 492 40 196617 cycle~;
> #P button 539 355 15 0;
> #P button 474 315 15 0;
> #P flonum 499 355 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #N counter 0 255;
> #X flags 0 0;
> #P newobj 475 333 74 196617 counter 0 255;
> #P message 559 132 43 196617 size $1;
> #P message 770 165 86 196617 setminmax 0. $1;
> #P newex 559 162 71 196617 prepend fetch;
> #P user multiSlider 476 218 249 92 0. 255. 255 2665 15 0 0 2 0 0 0;
> #M frgb 0 0 0;
> #M brgb 255 255 255;
> #M rgb2 127 127 127;
> #M rgb3 0 0 0;
> #M rgb4 37 52 91;
> #M rgb5 74 105 182;
> #M rgb6 112 158 18;
> #M rgb7 149 211 110;
> #M rgb8 187 9 201;
> #M rgb9 224 62 37;
> #M rgb10 7 114 128;
> #P message 560 147 33 196617 clear;
> #P user multiSlider 1045 477 213 83 0. 464. 1 3449 15 0 0 2 0 0 0;
> #M frgb 0 0 0;
> #M brgb 255 255 255;
> #M rgb2 127 127 127;
> #M rgb3 0 0 0;
> #M rgb4 37 52 91;
> #M rgb5 74 105 182;
> #M rgb6 112 158 18;
> #M rgb7 149 211 110;
> #M rgb8 187 9 201;
> #M rgb9 224 62 37;
> #M rgb10 7 114 128;
> #P user multiSlider 820 476 213 83 0. 464. 1 3449 15 0 0 2 0 0 0;
> #M frgb 0 0 0;
> #M brgb 255 255 255;
> #M rgb2 127 127 127;
> #M rgb3 0 0 0;
> #M rgb4 37 52 91;
> #M rgb5 74 105 182;
> #M rgb6 112 158 18;
> #M rgb7 149 211 110;
> #M rgb8 187 9 201;
> #M rgb9 224 62 37;
> #M rgb10 7 114 128;
> #P toggle 792 555 15 0;
> #P user gswitch 798 575 41 32 1 0;
> #P flonum 1095 348 63 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P toggle 1047 347 15 0;
> #P newex 1068 380 55 196617 metro 10.;
> #P newex 1053 431 43 196617 timer;
> #B color 5;
> #P number 1053 457 42 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P button 1064 406 15 0;
> #P flonum 841 613 63 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P newex 795 611 37 196617 click~;
> #P flonum 953 265 63 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P newex 822 302 49 196617 !/ 1000.;
> #P newex 821 361 45 196617 < =~ 0.1;
> #P newex 822 381 36 196617 edge~;
> #P newex 816 428 43 196617 timer;
> #B color 5;
> #P number 819 448 42 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P button 828 402 15 0;
> #P newex 797 631 41 196617 *~ 0.1;
> #P flonum 821 322 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P newex 822 341 46 196617 phasor~;
> #P flonum 684 492 63 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P window setfont "Sans Serif" 12.;
> #P flonum 115 119 63 12 0 0 0 3 0 0 0 255 173 173 222 222 222 0 0 0;
> #P window setfont "Sans Serif" 9.;
> #P newex 115 137 49 196617 !/ 1000.;
> #P window setfont "Sans Serif" 12.;
> #P number 328 146 50 12 0 0 0 3 0 0 0 255 173 173 222 222 222 0 0 0;
> #P window setfont "Sans Serif" 9.;
> #P newex 115 279 45 196617 < =~ 0.1;
> #P newex 115 310 36 196617 edge~;
> #P newex 110 376 43 196617 timer;
> #B color 5;
> #P number 110 402 42 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P button 121 332 15 0;
> #P newex 302 377 43 196617 timer;
> #B color 5;
> #P number 302 403 42 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P button 313 333 15 0;
> #P toggle 213 281 15 0;
> #P toggle 291 181 15 0;
> #P flonum 288 246 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #N counter 0 54;
> #X flags 0 0;
> #P newobj 288 224 68 196617 counter 0 54;
> #P newex 289 202 55 196617 metro 10.;
> #P user gswitch 216 305 41 32 1 0;
> #P user number~ 136 246 175 261 9 3 3 2 0. 0. 0 0. 20 0. 0 0 0 221 221 221 222 222 222 0 0 0;
> #P newex 136 220 35 196617 *~ 1.;
> #P user ezdac~ 518 660 562 693 0;
> #P flonum 115 158 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P newex 115 184 46 196617 phasor~;
> #P flonum 732 165 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P message 733 182 86 196617 setminmax 0. $1;
> #P comment 734 151 19 196617 Y;
> #P user multiSlider 725 219 19 91 0. 255. 1 2681 47 0 0 2 0 0 0;
> #M frgb 0 0 0;
> #M brgb 255 255 255;
> #M rgb2 127 127 127;
> #M rgb3 0 0 0;
> #M rgb4 37 52 91;
> #M rgb5 74 105 182;
> #M rgb6 112 158 18;
> #M rgb7 149 211 110;
> #M rgb8 187 9 201;
> #M rgb9 224 62 37;
> #M rgb10 7 114 128;
> #P flonum 687 331 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P flonum 477 129 48 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P message 475 165 86 196617 setminmax 0. $1;
> #P user multiSlider 476 181 249 37 0. 255. 1 2680 47 0 0 2 0 0 0;
> #M frgb 0 0 0;
> #M brgb 255 255 255;
> #M rgb2 127 127 127;
> #M rgb3 0 0 0;
> #M rgb4 37 52 91;
> #M rgb5 74 105 182;
> #M rgb6 112 158 18;
> #M rgb7 149 211 110;
> #M rgb8 187 9 201;
> #M rgb9 224 62 37;
> #M rgb10 7 114 128;
> #P message 733 199 76 196617 setrange 0. $1;
> #P message 475 146 70 196617 setdomain $1;
> #P comment 480 113 19 196617 X;
> #P window linecount 2;
> #P comment 569 103 395 196617 the problem w. using counter w. a seq is that as you augment the number of step reading speed changed to. it slows down.;
> #P window linecount 1;
> #P comment 183 121 27 196617 ms.;
> #P comment 323 102 100 196617 What I prefer;
> #P window linecount 3;
> #P comment 495 371 100 196617 confirming the metro counter precision method;
> #P window linecount 4;
> #P comment 484 446 323 196617 Helps you hear "missing data slips" when sequence read faster/225steps/only one or small N of step are out of majority. Switch form phasor~ to metro-counter method to compare (hearing is better than seeing!);
> #P window setfont "Sans Serif" 14.;
> #P window linecount 1;
> #P comment 920 243 229 196622 trigger changing section;
> #P connect 31 0 33 0;
> #P connect 33 0 32 0;
> #P hidden connect 79 0 38 0;
> #P connect 38 0 37 0;
> #P connect 37 0 18 0;
> #P connect 18 0 17 0;
> #P connect 17 0 35 0;
> #P connect 35 0 34 0;
> #P connect 34 0 31 0;
> #P connect 17 0 20 0;
> #P connect 20 0 21 0;
> #P connect 31 0 33 1;
> #P connect 11 0 20 1;
> #P connect 27 0 22 0;
> #P connect 21 1 22 1;
> #P connect 25 0 22 2;
> #P connect 23 0 24 0;
> #P connect 24 0 25 0;
> #P connect 26 0 23 0;
> #P hidden connect 82 0 26 0;
> #P connect 28 0 30 0;
> #P connect 30 0 29 0;
> #P connect 24 3 28 0;
> #P connect 11 0 75 0;
> #P hidden connect 79 0 36 0;
> #P connect 75 0 36 0;
> #P connect 36 0 74 0;
> #P connect 74 0 73 0;
> #P connect 73 0 23 1;
> #P connect 28 0 30 1;
> #P connect 11 0 24 4;
> #P fasten 75 1 74 1 351 140 384 140 384 166;
> #P connect 12 0 69 0;
> #P connect 11 0 7 0;
> #P connect 11 0 10 0;
> #P connect 69 0 67 0;
> #P hidden connect 22 0 9 0;
> #P connect 10 0 9 0;
> #P connect 62 0 63 0;
> #P connect 66 0 63 0;
> #P connect 65 0 63 0;
> #P connect 64 0 63 0;
> #P hidden connect 78 0 11 0;
> #P connect 67 0 68 0;
> #P connect 83 0 19 0;
> #P connect 72 0 19 0;
> #P hidden connect 11 0 67 4;
> #P connect 67 3 70 0;
> #P connect 83 0 19 1;
> #P connect 72 0 19 1;
> #P connect 11 0 66 0;
> #P connect 9 0 64 0;
> #P connect 71 0 72 0;
> #P connect 12 0 71 0;
> #P connect 39 0 72 1;
> #P connect 63 1 12 0;
> #P hidden connect 12 0 13 0;
> #P connect 8 0 13 0;
> #P connect 15 0 13 0;
> #P hidden connect 78 0 16 0;
> #P connect 16 0 15 0;
> #P connect 16 0 8 0;
> #P connect 16 0 65 0;
> #P connect 84 0 83 0;
> #P connect 58 0 50 0;
> #P connect 50 0 42 0;
> #P connect 59 0 58 0;
> #P connect 43 0 58 1;
> #P connect 43 0 45 0;
> #P connect 42 0 83 1;
> #P connect 45 0 44 0;
> #P connect 44 0 60 0;
> #P connect 48 0 41 0;
> #P connect 40 0 47 0;
> #P connect 49 0 48 0;
> #P connect 41 0 40 0;
> #P connect 47 0 46 0;
> #P connect 46 0 43 0;
> #P connect 52 0 58 2;
> #P connect 51 0 42 1;
> #P connect 43 0 45 1;
> #P connect 13 0 49 0;
> #P connect 53 0 61 0;
> #P connect 52 0 54 0;
> #P connect 54 0 53 0;
> #P connect 55 0 52 0;
> #P connect 56 0 55 0;
> #P connect 52 0 54 1;
> #P hidden connect 82 0 57 0;
> #P connect 49 0 57 0;
> #P connect 57 0 55 1;
> #P window clipboard copycount 88;
>
>


February 8, 2009 | 4:34 pm

thanks for your reply samuel.

The point of my post is for practicality. Yes, I did know Max depends on scheduler and MSP the DSP chain….

But after all that said and done, what are the audible results? What is the behavior like in certain situations? Was is more practical in the overall scheme.

Yes my post is very basic, but is it at the root that one changes the direction of everything on top ;-)

For me Max is all about how you trigger events and how are these events developed. As for the performance realm, your job is to patch in a way that you have the choice of what level you stand in as a pilot. < -By level, I'm comparing it to computer language levels. I guess the highest level in performance would simply be fading in and out sound clips. <- like djs. The lowest level....well I guess for it would very similar to the way you play a traditional instrument. In general, everything is done manually as much as possible.

So again, do you guys have any other methods that are more practical/CPU friendly/etc…

Thanks again

phil


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