grain window (cycle~ phase); duplicate with 180deg offset?

Jul 7, 2010 at 2:19pm

grain window (cycle~ phase); duplicate with 180deg offset?

I’m driving a [play~] object with a [phasor~]; this signal is also going to [cycle~] phase input (via *0.5, +0.75), to give me a nice grain ampl envelope. Now i’d like to duplicate this window, 180deg out of phase with the first – despite staring at the patch for hours, the obviously simple solution eludes me:

– Pasted Max Patch, click to expand. –

thanks
Brendan

#51266
Jul 7, 2010 at 2:36pm

Here’s how I do it for multiple synch-ed overlaps. It ends up with the same result as using Eric Lyon’s [phasor.shift~] external but it’s nice to know how it works.

– Pasted Max Patch, click to expand. –
#183830
Jul 7, 2010 at 2:58pm

Thanks Tim; I had an idea that [delay~] might be involved, but knew it would add additional control elements (delaytime = period/2)

#183831
Jul 7, 2010 at 3:32pm

Tim
once more I must seek assistance; I implemented your advice into a simple grain/looper engine, and, if you look at the patch below; the delayed/shifted envelope is causing clicks. Do I need a separate sah-phasor-play setup?
Thanks in advance

– Pasted Max Patch, click to expand. –
#183832
Jul 7, 2010 at 3:59pm

Here’s another way:

– Pasted Max Patch, click to expand. –
#183833
Jul 7, 2010 at 3:59pm

delay~ or tapout~ is one solution, using math (e.g +~ 0.5, %~ 1.0) is another.

#183834
Jul 7, 2010 at 4:04pm

And here’s one with 4 windows, just to show how easily it can be expanded.

– Pasted Max Patch, click to expand. –
#183835
Jul 7, 2010 at 5:28pm

Here’s a demo patch, showing clearly how one window avoids clicks, and the 180deg-shifted window causes clicks. I’m guessing that i may need to separate phasor~ engines for each window.
Thanks in advance
Brendan

– Pasted Max Patch, click to expand. –
#183836
Jul 7, 2010 at 5:39pm

Firstly I think Psyko Logical’s method is better than mine, I try and stay away from delays for time-critical stuff, even though there is not reason why it would go out of sync.

In your patch if you want 2 overlapping grains, you need to have 2 instances of [play~ liveBuf], each driven by its own signal and with its own grain window (that is synched with the corresponding playback signal). Like you say, you need separate phasor~ engines for each grain.

I’ve just rebuilt your patch a bit differently to remove all clicking:

– Pasted Max Patch, click to expand. –
#183837
Jul 7, 2010 at 5:56pm

here is yet another one. maybe slightly easier on cpu than pong~.

– Pasted Max Patch, click to expand. –
#183838
Jul 7, 2010 at 7:04pm

Heh, I never thought of manually subtracting to do a modulo. That’s pretty cool.

#183839
Jul 7, 2010 at 7:38pm

These solutions are all equally elegant and concise; however, the question remains, in my last posted patch above, do I need a duplicate sah-phasor-play combination, as the shifted window is allowing/causing clicks, unlike the unshifted window which is not causing clicks. The solutions have highlighted an underlying flaw in my otherwise elegant granulator.

#183840
Jul 7, 2010 at 8:36pm

Doh!
I missed Tim’s interjection (above Volker’s); so please ignore the post above – thanks everyone, esp Tim

Brendan

#183841

You must be logged in to reply to this topic.