Generating Random Freq at specified rate?

Dominic Ward's icon

Hi,

Any way of producing a random frequency between a set range at a specified rate?

I have tried rand~ but changes continuously?

Im basically looking to produce the affect of drunk in MSP domain.

Im missing something,

DW

jvkr's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Built with a few standard objects:

brendan mccloskey's icon
Max Patch
Copy patch and select New From Clipboard in Max.

as you say, there's a Max way and an MSP way; here's both:

Dominic Ward's icon

It was sah~ that i needed!

Thanks guys,

DW

brendan mccloskey's icon

I've also just discovered the joys of [sah~], see this thread too:

Brendan

Dominic Ward's icon

I'm also trying to randomize the phasor ramp (0, 1) once it has complete a cycle...any thoughts?

I'm working on a granular synthesis patch in MSP domain for timing purposes,

Thanks,

DW.

brendan mccloskey's icon
Max Patch
Copy patch and select New From Clipboard in Max.

No doubt, the Max gods out there will provide something more elegant than this, which randomizes [phasor~] freq at the top of each ramp.

brendan mccloskey's icon

in the 2nd example, change [phasor~] freq to 1. to initialize the process - ooops

Dominic Ward's icon

Thanks Brendan, but won't incorporating max domain affect timing?....i tried scaling noise and then using the number~ object right outlet to drive phasor~ which worked, but again this switches domains.

Cheers.

brendan mccloskey's icon

I suppose it depends how tight you want the timing to be, if it's a ms value larger than your Signal Vector Size then it's irrelevant isn't it? This is a grey area for me (as you guessed probably); why not send the [number~] value direct to the phasor~ input?

Dominic Ward's icon

Yeah, but multiple grain generators scheduled in max become problematic, i want sample accurate timing. Number~ box has a delay as well i think. I'll look into other ways and post something if your interested.

Thanks four your time.

brendan mccloskey's icon

I'm going to have several attempts at this one, as time-domain granulation is something of an obsession of mine, like so many others i guess, but also cos it's a challenge. Why not start a new thread, there are many talented and experienced Maxers here who would suggest a solution in no time.....keep me posted
Brendan