## Time expansion of phasor~ without rate~???

Jan 31 2007 | 10:33 pm
I need to expand the time scale of the output from a phasor~. Need it to be done in the signal domain WITHOUT rate~. Shrinking the timescale is easily accomplished by multiplication and pong however I can't seem to think of how to do the time expansion???? Any help would be greatly appreciated.

• Jan 31 2007 | 11:17 pm
On 31-Jan-2007, at 23:33, Tyler Nitsch wrote:
> however I can't seem to think of how to do the time expansion?
Why not simply adapt the frequency parameter to match the desired
time expansion? Or maybe I'm missing something.
-------------- http://www.bek.no/~pcastine/Litter/ -------------
Peter Castine +--> Litter Power & Litter Bundle for Jitter
Universal Binaries on the way
iCE: Sequencing, Recording &
Interface Building for |home | chez nous|
Max/MSP Extremely cool |bei uns | i nostri|
• Feb 01 2007 | 1:48 am
The idea is to have one master clock(phasor~) However the application involves inverting the direction of the saw wave created by phasor(ie. 0.->1. becomes 1.->0.) . The problem I run into with rate~ is when I do this operation on the master phasor~ the phase of the output of rate~ takes awhile to get back in phase with the original phasor.
• Feb 01 2007 | 3:21 am
Even when you send rate~ the "sync lock" message? I at least had a "Eureka!" experience when I noticed the different sync messages rate~ understands...maybe this is not your issue. You can also do the inversion by sending negative values to rate~.
Quote: Tyler Nitsch wrote on Wed, 31 January 2007 17:48
----------------------------------------------------
> The idea is to have one master clock(phasor~) However the application involves inverting the direction of the saw wave created by phasor(ie. 0.->1. becomes 1.->0.) . The problem I run into with rate~ is when I do this operation on the master phasor~ the phase of the output of rate~ takes awhile to get back in phase with the original phasor.
----------------------------------------------------
• Feb 01 2007 | 5:59 am
Also, for simple integer multiples of the fundamental frequency, I find
that this:
*~ n
|
%~ 1.
where N is an integer is scads more efficient. Also, I find that the
much neglected sah~ is a godsend for these kinds of patches...
Here's a demo featuring envelope-following reversing (clap to reverse
the playback) and other goodies.
Peter McCulloch
• Feb 01 2007 | 6:37 am
Sheesh you guys are ninjas. Ok so the negative thing for rate~ and the modulus thingy defineatly made my patch more efficient, thanks!! Still the same problem though. I've pondered using sample and hold for time expanding a phasor~ but have yet to come up with a method that wouldn't require feedback.
• Feb 01 2007 | 8:42 am
• Feb 01 2007 | 9:24 am
Peter, this second patch won't open for me (first one worked fine)...even though it looks like it's all there? I'm not complaining - seeing how I'm not paying, just letting you know.
Lewis
Quote: peter.mcculloch@gmail.com wrote on Thu, 01 February 2007 00:42
----------------------------------------------------
> >
> > Sheesh you guys are ninjas.
> Yeah, well ninja-ing doesn't really pay the bills at present. (Image
> of ninja pawning a throwing star..."\$3?...but it's a deadly shuriken!
> Aw...." (if there's anyone in the NYC area who's looking for Max
> lessons, there's space at my dojo)
>
> I really don't understand why rate~ won't work for you. Can you
> explain why?
>
> The right inlet of rate can be updated at the signal rate, and with
> the appropriate operation mode, it should work just fine for this kind
>
> For edumacational purposes, here's one potential 3/4 solution. +=~ is
> the key; it provides the increment that a feedback loop gives you. The
> patch is happiest with integer multiples of the beat, though you can do
> other things too...
>
> Peter McCulloch
>
> #P window setfont "Sans Serif" 12.;
> #P flonum 453 56 87 12 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P window linecount 1;
> #P newex 453 120 51 196620 sig~ 4.;
> #P message 172 618 24 196620 40;
> #P button 173 577 25 0;
> #P newex 173 519 50 196620 > #P newex 173 549 46 196620 edge~;
> #P newex 172 705 77 196620 noteout 10;
> #P newex 172 665 125 196620 makenote 127 100;
> #P message 234 619 24 196620 49;
> #P button 235 578 25 0;
> #P newex 235 520 50 196620 > #P newex 235 550 46 196620 edge~;
> #P window setfont "Sans Serif" 9.;
> #P message 702 537 27 196617 stop;
> #P message 630 537 65 196617 startwindow;
> #P newex 630 571 29 196617 dac~;
> #P comment 633 521 75 196617 � turn on audio;
> #P user panel 620 517 123 43;
> #X brgb 255 255 255;
> #X frgb 100 202 30;
> #X border 2;
> #X rounded 0;
> #X done;
> #P window setfont "Sans Serif" 12.;
> #P newex 337 464 43 196620 %~ 1.;
> #P flonum 337 21 58 12 0.05 0 1 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P newex 540 290 63 196620 sah~ 0.1;
> #P newex 398 153 50 196620 > #P newex 398 209 65 196620 +~;
> #P newex 453 180 53 196620 *~;
> #P newex 453 152 42 196620 >~ 0.;
> #P newex 398 258 44 196620 !/~ 1.;
> #P newex 398 345 63 196620 sah~ 0.1;
> #P newex 594 241 42 196620 > #P newex 594 209 48 196620 delta~;
> #P newex 472 380 49 196620 *~ 0.5;
> #P newex 472 325 78 196620 %~ 2.;
> #P user scope~ 337 645 467 775 256 3 128 -1. 1. 0 0. 0 0.01 102 255 51
> 135 135 135 0;
> #P user scope~ 337 511 467 641 256 3 128 -1. 1. 0 0. 0 0.01 102 255 51
> 135 135 135 0;
> #P newex 337 419 27 196620 +~;
> #P newex 337 373 71 196620 *~ 0.5;
> #P newex 337 49 71 196620 phasor~ 6;
> #P newex 472 293 34 196620 +=~;
> #P connect 32 0 33 0;
> #P connect 33 0 28 0;
> #P connect 27 0 28 0;
> #P connect 28 0 29 0;
> #P connect 1 0 31 0;
> #P connect 31 0 30 0;
> #P connect 30 0 32 0;
> #P connect 28 1 29 1;
> #P connect 26 0 27 0;
> #P connect 18 0 25 0;
> #P connect 25 0 24 0;
> #P connect 24 0 26 0;
> #P connect 17 0 1 0;
> #P connect 1 0 2 0;
> #P connect 2 0 3 0;
> #P connect 3 0 18 0;
> #P connect 18 0 4 0;
> #P fasten 1 0 5 0 342 86 312 86 312 644 342 644;
> #P fasten 7 0 3 1 477 407 359 407;
> #P fasten 34 0 15 0 458 146 403 146;
> #P connect 15 0 14 0;
> #P connect 14 0 11 0;
> #P lcolor 9;
> #P connect 11 0 10 0;
> #P connect 10 0 2 1;
> #P fasten 9 0 10 1 599 271 456 271;
> #P connect 35 0 34 0;
> #P connect 34 0 12 0;
> #P connect 12 0 13 0;
> #P connect 13 0 14 1;
> #P fasten 9 0 0 0 599 271 477 271;
> #P connect 0 0 6 0;
> #P connect 6 0 7 0;
> #P fasten 34 0 13 1 458 146 501 146;
> #P connect 10 0 7 1;
> #P fasten 14 0 16 0 403 247 545 247;
> #P lcolor 9;
> #P connect 16 0 6 1;
> #P connect 9 0 16 1;
> #P fasten 1 0 8 0 342 85 599 85;
> #P connect 8 0 9 0;
> #P fasten 23 0 21 0 707 566 635 566;
> #P connect 22 0 21 0;
> #P window clipboard copycount 36;
>
>
>
>
----------------------------------------------------
• Feb 01 2007 | 5:26 pm
Thanks for reposting Peter. After fiddling with all three patches I noticed that the second and third have a little bullet thing in the comment "turn on audio" which shows up as a question mark for me on the forum. I think this is the bullet (little dot) that appears in all of the .help files. If I remove that in textedit, then recopy the patch to the clip board, then both will open using new from clipboard. With it left in: neither will open using new from clip board, the 2nd one when saved to disk only opens in Max as a text document and the 3rd one when saved to disk opens as a patch but with a "degree" symbol followed by the letter Z where the bullet should be. I'm using Firefox 1.5.0.9 using Western (ISO-8859-15) character encoding. Just some info for any other web readers interested in what your patches contain....and perhaps for future patch posting? This must have come up before though?
Lewis
• Feb 01 2007 | 5:50 pm
I'm on OSX.3.9. You're right that the startwindow bit is from a help
file but that sounds like a weird bug. (or the sort of thing that you'd
figure would have already come up) Maybe there's some text encoding
issue with the web forum?
What happens when you use Safari?
Peter McCulloch
On Feb 1, 2007, at 12:26 PM, Lewis Keller wrote:
>
> Thanks for reposting Peter. After fiddling with all three patches I
> noticed that the second and third have a little bullet thing in the
> comment "turn on audio" which shows up as a question mark for me on
> the forum. I think this is the bullet (little dot) that appears in
> all of the .help files. If I remove that in textedit, then recopy the
> patch to the clip board, then both will open using new from clipboard.
> With it left in: neither will open using new from clip board, the 2nd
> one when saved to disk only opens in Max as a text document and the
> 3rd one when saved to disk opens as a patch but with a "degree" symbol
> followed by the letter Z where the bullet should be. I'm using
> Firefox 1.5.0.9 using Western (ISO-8859-15) character encoding. Just
> some info for any other web readers interested in what your patches
> contain....and perhaps for future patch posting? This must have come
> up before though?
>
> Lewis
> --
> Max/MSP 4.5.7
> OSX v.10.3.9
> 1.5Ghz G4 Powerbook w/512MB
>
> http://glewlio.com
>
• Feb 01 2007 | 6:12 pm
Yup, both patches open fine using new from clip board when copied from Safari. The bullet even shows up on the forum. I guess it's a Firefox text encoding problem....good to know.
Lewis
Quote: peter.mcculloch@gmail.com wrote on Thu, 01 February 2007 09:50
----------------------------------------------------
(or the sort of thing that you'd
> figure would have already come up) Maybe there's some text encoding
> issue with the web forum?
>
> What happens when you use Safari?
>
> Peter McCulloch
----------------------------------------------------