Beat Repeat

Apr 19, 2007 at 8:09pm

Beat Repeat

I’m trying to make a variable speed beat repeat that works in sync with the master phasor.

I’ve tried to multiply the incoming phasor signal with a *~ 8 with a fader going in the other inlet. So when I increase the fader it speeds up and slows down the incoming signal via multiplication, and so keeping it in sync. It seems to work ok this far.

Then I wanted to use a sel 0 to bang a 0 to the sample-sync phasor everytime the beat repeat outputs a 0, thus resetting the sample back to the start and repeating the beat.

But it doesnt work. It should but it doesnt. Why?

#31486
Apr 20, 2007 at 7:45am

This might be clear if you posted a patch showing what you have so far. I can’t quite visualise it from your dsscription.

However, in the meantime, maybe you should check out the rate~ object, as it seems like what you’re describing might be exactly what it does without the need to monitor and feedback to reset any loops…

Regards,

Alex

#102492
Apr 20, 2007 at 6:45pm

Cheers for that!

Yeah a rate~ was exactly what I needed because it allowed me to multiply the incoming master sync phasor~ with another ramp wave.

Perfecto!

Well almost. I still have this one other problem. See the idea is that when the new ramp wave produced by the rate~ hits 0, I’m trying to use a sel 0 to then output a bang. However it seems that everytime I try to get numbers from any kind of phasor/wave/cycle it spits numbers out so fast that it often skips 0 completely.

Is there another way to get a more stable flow of numbers from a phasor/wave/cycle?

For the record I’m currently just using a ~ integer box, from which I output number data from its bottom left output.

But it’s too wild?

What can I do?

#102493
Apr 20, 2007 at 7:43pm

Can you explain why you want to get this bang (what it’ll be used for). I don’t understand from your earlier post what you mean. If you’re using a phasor~ (rather than a line~) to drive it it should loop anyway if the speed of the phasor~ is right. There may be a better way (signal world to max and/or vice versa is always bad for timing). If you really need a bang maybe try change~…..

BTW – the flow of numbers from rate~ / phasor~ is stable. It just doesn’t necessarily hit 0 or 1 because of the timing resolution of a single sample, so looking for 1 (and maybe 0 I’m not sure) is unreliable for triggering purposes. Something like chage~ is much better. A numberbox will only give you the first sample from each signal vector anyway, so you’ll also miss a lot of numbers through using it’s output.

Regards,

Alex

#102494
Apr 20, 2007 at 7:50pm

you could try with >~ and edge~ for the bang on new ramp, and snapshot~ for
your flow of number.

#P window setfont “Sans Serif” 9.;
#P number 219 252 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P newex 219 218 64 9109513 snapshot~ 10;
#P newex 219 184 30 9109513 *~ 16;
#P button 175 252 15 0;
#P newex 175 184 39 9109513 >~ 0.98;
#P newex 175 218 36 9109513 edge~;
#P toggle 293 110 15 0;
#P newex 293 132 28 9109513 dac~;
#P newex 175 150 57 9109513 phasor~ 0.5;
#P connect 0 0 4 0;
#P connect 0 0 6 0;
#P connect 4 0 3 0;
#P connect 7 0 8 0;
#P connect 6 0 7 0;
#P connect 3 0 5 0;
#P connect 2 0 1 0;
#P window clipboard copycount 9;

cheers

#102495
May 3, 2007 at 5:49pm

Hello,

Well I’ve had a try but still no massive sucess. I works but it just doesnt sound right and I imagine theres probably some far more descrete method of implementation.

But here it is.

Just to recap, I’m using a phasor to control the tempo of a sample but mapping it’s duration over the phasors 0-1 cycle. I am using a second phasor to set a master tempo in much the same way. Thats all fine.

The problem is I want to repeat the start of the sample by sending the sample loop phasor a load of 1′s, but in time with the master tempo phasor, by using division of the master tempo. This should make it repeat at 2x, 4x, 6x, 8x ect.. the master. So that when this beat repeat effect is used it doesnt effect the overall rhythm.

I have attached the patch and also included the old technique I was using by simply multipling a metro.

Is there a good clean sounding way to effectively implement this?

Cheers

#102496
May 3, 2007 at 9:34pm

>Well almost. I still have this one other problem. See the
>idea is that when the new ramp wave produced by the rate~ hits
>0, I’m trying to use a sel 0 to then output a bang. However
>it seems that everytime I try to get numbers from any kind of
>phasor/wave/cycle it spits numbers out so fast that it often
>skips 0 completely.

that would be the [zerox~] object.

-110

#102497
May 3, 2007 at 11:04pm

Quote: Roman Thilenius wrote on Thu, 03 May 2007 15:34
—————————————————-
>
> that would be the [zerox~] object.

Don’t think that would work here – the phasor outputs 0 to 1. Hence there’s no zero crossing…

Leigh

#102498
May 4, 2007 at 9:11pm

Quote: Leigh Marble wrote on Thu, 03 May 2007 17:04
—————————————————-
> Quote: Roman Thilenius wrote on Thu, 03 May 2007 15:34
> —————————————————-
> >
> > that would be the [zerox~] object.
>
> Don’t think that would work here – the phasor outputs 0 to 1. Hence there’s no zero crossing…
>
> Leigh
—————————————————-

well he will have to substract 0.000001, but with
zerox~ he has a fixed delay of 1 sample to his bang,
with snapshot he is completly lost. ;)

#102499
May 6, 2007 at 12:51pm

> The problem is I want to repeat the start of the sample by
> sending the sample loop phasor a load of 1′s, but in time with
> the master tempo phasor, by using division of the master tempo.
> This should make it repeat at 2x, 4x, 6x, 8x ect.. the master.
> So that when this beat repeat effect is used it doesnt effect
> the overall rhythm.
>
> I have attached the patch and also included the old technique I
> was using by simply multipling a metro.

I couldn’t read your patch, but you might want to check out my samm~ object which sends out multiple, synced metronome clicks at whatever collection of tempi you want. You can set your master tempo and have the beat subdivided by 2 4 6 8 (11 31 7.15 whatever), vary the tempo and everything will stay synced. You get a separate beat stream for each subdivision which makes it very easy to build drum machines.

http://www.sarc.qub.ac.uk/~elyon/LyonSoftware/MaxMSP/

Cheers,

Eric

#102500
May 6, 2007 at 3:11pm

Have you looked at the hard sync examples in the install folder (under
synthesis)?

On 19/04/07, Breaka wrote:
>
>
> I’m trying to make a variable speed beat repeat that works in sync with
> the master phasor.
>
> I’ve tried to multiply the incoming phasor signal with a *~ 8 with a fader
> going in the other inlet. So when I increase the fader it speeds up and
> slows down the incoming signal via multiplication, and so keeping it in
> sync. It seems to work ok this far.
>
> Then I wanted to use a sel 0 to bang a 0 to the sample-sync phasor
> everytime the beat repeat outputs a 0, thus resetting the sample back to the
> start and repeating the beat.
>
> But it doesnt work. It should but it doesnt. Why?
>


http://www.centuryofnoise.com
http://www.perevillez.com

#102501
May 6, 2007 at 8:42pm

This might be of interest…. Its a beat repeater of a different sort…. It uses stutter and some math to produce beat-accurate stutters when triggered.

#102502
May 6, 2007 at 10:02pm

Seth,

the stutter_mod abstraction is missing!

David

On 6 May 2007, at 21:42, seth wrote:

> This might be of interest…. Its a beat repeater of a different
> sort…. It uses stutter and some math to produce beat-accurate
> stutters when triggered.
>
>
>
>
>

#102503
May 6, 2007 at 10:37pm

ooops. heres that abstraction…..

#102504
May 6, 2007 at 11:08pm

#102505
May 6, 2007 at 11:35pm

my appologies….. first time posting a patch really.

hope this sums it up…..

#102506
May 7, 2007 at 7:16pm

I can’t open any of these files.

I’m using the latest version of Max from the site, Mac OS X, Intel Mac.

#102507
May 7, 2007 at 7:39pm

anyone else having this problem opening the patches i’ve posted? I am also using the latest version of MAX for Intel Macs.

here is the text of the patch, and the two abstractions.

Again, sorry about my poor patch-posting techniques. Im trying to get the hang of it.

-seth

——–
patch:
——–

#P window setfont “Sans Serif” 9.;
#P window linecount 2;
#P comment 576 157 249 196617 if you want to change the range of interval settings , just edit the ‘stutter sample-size calculator’ patch;
#P window linecount 1;
#P hidden message 187 42 20 196617 90;
#P comment 176 412 100 196617 start/stop;
#P comment 568 123 43 196617 interval;
#P user multiSlider 499 121 66 16 0. 11. 1 2664 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 498 99 15 0;
#P toggle 154 412 15 0;
#P message 144 390 28 196617 open;
#N sfplay~ 1 120960 0 ;
#P hidden newobj 144 455 44 196617 sfplay~;
#P hidden newex 362 811 77 196617 dac~;
#P message 28 99 67 196617 startwindow;
#P hidden button 42 151 15 0;
#N vpatcher 10 59 883 567;
#P window setfont “Sans Serif” 9.;
#P number 677 59 54 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#N coll ;
#P newobj 426 316 53 196617 coll;
#P button 72 199 15 0;
#P newex 81 220 43 196617 delay 4;
#P message 270 388 37 196617 11 $1;
#P message 308 388 37 196617 10 $1;
#P message 352 389 31 196617 9 $1;
#P message 387 388 31 196617 8 $1;
#P message 421 385 31 196617 7 $1;
#P message 452 384 31 196617 6 $1;
#P message 487 384 31 196617 5 $1;
#P message 522 384 31 196617 4 $1;
#P message 560 383 31 196617 3 $1;
#P message 598 382 31 196617 2 $1;
#P message 635 381 31 196617 1 $1;
#P newex 424 156 27 196617 / 2;
#P newex 389 156 27 196617 / 4;
#P newex 357 156 27 196617 / 6;
#P newex 325 155 27 196617 / 8;
#P newex 288 154 31 196617 / 12;
#P newex 252 153 31 196617 / 16;
#P newex 215 152 31 196617 / 24;
#P newex 181 151 31 196617 / 32;
#P newex 146 150 31 196617 / 48;
#P newex 111 148 31 196617 / 64;
#P inlet 438 422 15 0;
#P inlet 651 46 15 0;
#P outlet 426 338 15 0;
#P connect 3 0 25 0;
#P connect 25 0 24 0;
#P connect 27 0 3 0;
#P connect 27 0 4 0;
#P connect 27 0 5 0;
#P connect 27 0 6 0;
#P connect 27 0 7 0;
#P connect 24 0 23 0;
#P connect 3 0 23 0;
#P connect 27 0 8 0;
#P connect 24 0 22 0;
#P connect 4 0 22 0;
#P connect 27 0 9 0;
#P connect 24 0 21 0;
#P connect 5 0 21 0;
#P connect 27 0 10 0;
#P connect 24 0 20 0;
#P connect 6 0 20 0;
#P connect 27 0 11 0;
#P connect 24 0 19 0;
#P connect 7 0 19 0;
#P connect 27 0 12 0;
#P connect 13 0 26 0;
#P connect 14 0 26 0;
#P connect 15 0 26 0;
#P connect 16 0 26 0;
#P connect 17 0 26 0;
#P connect 18 0 26 0;
#P connect 19 0 26 0;
#P connect 20 0 26 0;
#P connect 21 0 26 0;
#P connect 22 0 26 0;
#P connect 23 0 26 0;
#P connect 2 0 26 0;
#P connect 26 0 0 0;
#P connect 24 0 18 0;
#P connect 8 0 18 0;
#P connect 24 0 17 0;
#P connect 9 0 17 0;
#P connect 24 0 16 0;
#P connect 10 0 16 0;
#P connect 24 0 15 0;
#P connect 11 0 15 0;
#P connect 24 0 14 0;
#P connect 12 0 14 0;
#P connect 24 0 13 0;
#P connect 27 0 13 0;
#P connect 1 0 27 0;
#P pop;
#P hidden newobj 42 341 155 196617 p stutter sample-size calculator;
#P hidden message 173 127 14 196617 1;
#P hidden newex 110 86 49 196617 delay 50;
#P hidden newex 64 44 48 196617 loadbang;
#P hidden number 224 176 64 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P hidden newex 431 135 46 196617 select 0;
#P hidden message 527 500 14 196617 2;
#P hidden message 498 501 14 196617 1;
#P hidden newex 362 709 62 196617 selector~ 2;
#P hidden toggle 160 194 15 0;
#P hidden newex 242 503 229 196617 stutter_mod;
#P hidden button 442 178 15 0;
#P hidden number 42 411 58 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P hidden newex 213 115 41 196617 * 44.1;
#P hidden newex 262 77 52 196617 !/ 60000;
#P flonum 306 26 40 9 1. 350. 35 3 0 0 0 255 255 255 255 255 255 0 0 0;
#P hidden button 328 93 15 0;
#P hidden newex 328 65 77 196617 tempo;
#P hidden newex 362 756 49 196617 *~ 0.5;
#P comment 359 28 284 196617 tempo: so stutter can calculate accurate ‘stutters’.;
#P comment 516 101 100 196617 beat repeat on/off;
#P comment 176 390 100 196617 open file to play;
#P hidden connect 16 1 10 0;
#P hidden fasten 16 1 15 0 472 329 532 329;
#P hidden fasten 19 0 22 0 115 137 47 137;
#P hidden fasten 19 0 20 0 115 115 178 115;
#P hidden fasten 19 0 29 0 115 157 409 157 409 120 504 120;
#P hidden fasten 18 0 23 0 69 80 33 80;
#P hidden fasten 18 0 19 0 69 73 115 73;
#P hidden connect 18 0 32 0;
#P hidden fasten 18 0 14 0 69 252 503 252;
#P hidden connect 16 0 10 0;
#P hidden fasten 16 0 14 0 436 328 503 328;
#P hidden fasten 17 0 11 6 229 251 463 251;
#P hidden connect 28 0 16 0;
#P hidden connect 3 0 24 0;
#P hidden connect 3 0 24 1;
#P hidden connect 11 0 13 2;
#P hidden connect 25 0 11 0;
#P hidden connect 25 0 13 1;
#P hidden fasten 5 0 11 4 333 251 391 251;
#P hidden fasten 23 0 24 0 33 794 367 794;
#P hidden connect 13 0 3 0;
#P hidden connect 15 0 13 0;
#P hidden connect 14 0 13 0;
#P hidden connect 7 0 8 0;
#P hidden fasten 7 0 11 3 267 251 355 251;
#P hidden connect 6 0 7 0;
#P hidden connect 6 0 4 1;
#P hidden connect 4 0 5 0;
#P hidden fasten 9 0 11 2 47 487 319 487;
#P hidden connect 32 0 6 0;
#P hidden fasten 12 0 11 1 165 251 283 251;
#P hidden fasten 8 0 21 1 218 285 192 285;
#P hidden fasten 8 0 17 0 218 158 229 158;
#P hidden fasten 20 0 12 0 178 168 165 168;
#P hidden connect 10 0 12 0;
#P hidden connect 26 0 25 0;
#P hidden connect 27 0 25 0;
#P hidden connect 21 0 9 0;
#P hidden connect 22 0 21 0;
#P hidden fasten 29 0 21 0 504 263 47 263;
#P window clipboard copycount 34;

——-
stutter_mod abstraction:
——-

#N comlet buffer max size;
#P inlet 729 134 15 0;
#P button 634 177 15 0;
#N comlet ms/tick;
#P inlet 493 120 15 0;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 523 223 72 196617 bang_syncher;
#N comlet tempo b angs;
#P inlet 538 122 15 0;
#P button 159 245 15 0;
#P hidden message 43 92 26 196617 100;
#P hidden message 20 93 14 196617 1;
#P hidden newex 20 69 45 196617 loadbang;
#P newex 242 281 35 196617 gate~;
#P button 358 190 15 0;
#P newex 285 237 44 196617 phasor~;
#P newex 323 212 135 196617 expr ((44100.0 / $i1)*$f2);
#P flonum 358 166 76 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 262 166 75 9 1 0 1 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 178 314 165 196617 stutter~ 44100 11025 1 44100 1;
#B color 5;
#P comment 251 149 102 196617 Grain Size (samples);
#P comment 357 149 78 196617 Playback Speed;
#P outlet 210 383 15 0;
#N comlet gate open/closed;
#P inlet 203 77 15 0;
#N comlet resample bang;
#P inlet 610 126 15 0;
#N comlet grain size;
#P inlet 291 88 15 0;
#N comlet stutter signal;
#P inlet 155 58 15 0;
#P connect 2 0 21 0;
#P connect 21 0 19 2;
#P connect 18 0 19 1;
#P connect 20 0 19 0;
#P fasten 9 0 10 1 363 184 453 184;
#P fasten 9 0 12 0 363 185 363 185;
#P hidden connect 15 0 9 0;
#P connect 11 0 13 1;
#P connect 11 0 7 2;
#P fasten 12 0 10 0 363 208 328 208;
#P fasten 8 0 7 0 267 292 183 292;
#P fasten 8 0 10 0 267 208 328 208;
#P connect 10 0 11 0;
#P hidden connect 16 0 8 0;
#P connect 1 0 8 0;
#P connect 13 0 7 1;
#P connect 3 0 13 0;
#P connect 7 0 4 0;
#P connect 0 0 7 0;
#P connect 17 0 7 0;
#P connect 22 0 7 0;
#P connect 19 0 17 0;
#P hidden connect 14 0 16 0;
#P hidden connect 14 0 15 0;
#P window clipboard copycount 23;

———–
bang_syncher abstraction:
————

#P button 124 155 15 0;
#P button 27 48 15 0;
#P window setfont “Sans Serif” 9.;
#P number 19 216 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#N comlet beat/ms div 16;
#P inlet 15 159 15 0;
#N comlet synched stutter switch;
#P outlet 114 333 15 0;
#N comlet stutter switch;
#P inlet 117 33 15 0;
#N comlet in from metro;
#P inlet 51 32 15 0;
#P button 112 231 15 0;
#P number 156 231 51 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P newex 135 199 27 196617 -;
#P number 53 99 61 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 53 65 82 196617 timer;
#P newex 112 290 54 196617 delay;
#P connect 4 0 0 1;
#P connect 3 0 5 0;
#P connect 3 0 4 0;
#P connect 2 0 12 0;
#P fasten 2 0 3 1 58 127 157 127;
#P connect 9 0 10 0;
#P fasten 9 0 3 0 20 193 140 193;
#P connect 12 0 3 0;
#P connect 7 0 1 1;
#P connect 0 0 8 0;
#P connect 5 0 0 0;
#P connect 1 0 2 0;
#P connect 6 0 1 0;
#P connect 6 0 11 0;
#P window clipboard copycount 13;

#102508
May 7, 2007 at 8:19pm

hi seth,

it’s working ok here – MacBook Pro. I saved the various attachments
you sent earlier to a folder in Max’s search path, and then loaded
“beat repeat”. No probs.

David

On 7 May 2007, at 20:39, seth wrote:

>
> anyone else having this problem opening the patches i’ve posted? I
> am also using the latest version of MAX for Intel Macs.
>
> here is the text of the patch, and the two abstractions.
>
> Again, sorry about my poor patch-posting techniques. Im trying to
> get the hang of it.
>
> -seth

#102509
May 8, 2007 at 12:10am

Thanks for all the reply’s. Some really interesting stuff.

One question though. See all this…

“…….
#P window setfont “Sans Serif” 9.;
#P window linecount 2;
#P comment 576 157 249 196617 if you want to change the range of interval settings , just edit the ‘stutter sample-size calculator’ patch;
………”

Do I put that straight into max somehow? Or is that just a guide on how to construct somthing?

But major thanks for all contributions so far, they’ve all been really good.

#102510
May 8, 2007 at 12:20am

Quote: Breaka wrote on Mon, 07 May 2007 18:10
—————————————————-
> Thanks for all the reply’s. Some really interesting stuff.
>
> One question though. See all this…
>
> “…….
> #P window setfont “Sans Serif” 9.;
> #P window linecount 2;
> #P comment 576 157 249 196617 if you want to change the range of interval settings , just edit the ‘stutter sample-size calculator’ patch;
> ………”
>
> Do I put that straight into max somehow? Or is that just a guide on how to construct somthing?
>
> But major thanks for all contributions so far, they’ve all been really good.
—————————————————-

i assume you’re talking about that sentence there…. thats just the contents of a textbox in the actual patch. so the answer to your question, is yes…. paste all of that into a patcher window as it was in my original post and it should work fine.

incase your new to max: first copy and paste each abstraction that i posted into separate blank patcher windows and save them with the names i used (“stutter_mod”, and “bang_syncher”). make sure to save them into your patches directory (or another directory in your Max search path). then copy and paste the main patch into a new blank patcher. everything should then work….

#102511
May 8, 2007 at 5:56am

seth schrieb:
> my appologies….. first time posting a patch really.
>
> hope this sums it up…..

Could you repost all of it, but zipped, as mentioned often, patches
which are not zipped I can’t read for an unknown reason. Then I would be
able to compare them and maybe find out what the difference is…
A single patch you don’t need to attach, just copy/paste into the text
body of your mail…

Stefan


Stefan Tiedje————x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
– _|_)—-|—–()————–
———-()——–www.ccmix.com

#102512
May 8, 2007 at 11:45am

Here they are… all 3 files in a zip.

-seth

#102513

You must be logged in to reply to this topic.