best way to quantize a sweeping signal into specified pitch values?

shhhh's icon

If I have some signal values sweeping all around and i want it to step to specific values instead of sweeping, what's the best way to go about it? I could use a bunch of >~ objects banging message boxes that are all connected to a sig~, with a onepole~ following to create some portamento and eliminate clicks... but is that really the best way to go about it? That idea seems not super elegant.

Steven Miller's icon

There are a number of possible strategies, depending on the specific result you're looking for (for example, do you want the steps quantized based on pitch value or time?), but as a start you might have a look at [sah~] for creating the steps and [trapezoid~] for de-clicking.

Hope this helps.

shhhh's icon

sah~ isn't quite what I'm looking for -- I want to be able to tune oscillators to different preconceived scales, almost like autotuning them. So if i give an upward sweeping CV, the output we hear is an ascending scale instead of a glissando.

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

Maybe something like this.