function to control pitch of groove

themagicwoodshed's icon

Hi all. I am trying to get a function envelope to control the pitch of a groove~. I have achieved this by converting the line~ message into a num float box then this goes into a sig~ that's connected to the groove~. This works but instead of getting a smooth raise or decline in pitch, it changes in steps. I really want the transitions to be smooth. The length of the function is connected to a num float box which derives its number from an adsr's length in milliseconds. Please help iv'e tryed everything I can think of.

MIB's icon

post the patch you are working on...

Nikolas K's icon

you could connect the [line~] directly to the [groove~]. no need to convert it from audio rate to control rate and then (using [sig~]) convert it to audio rate again! and, if you used the [snapshot~] to sample the [line~] the sampling rate of the [snapshot~] must be quick or else you will get values that are not that close resulting to "stepped" pitch changes. that also applies to the [number~] it has a refresh rate set to 200ms i think. this should be something that you could use!

Max Patch
Copy patch and select New From Clipboard in Max.

Nikolas

themagicwoodshed's icon

Thanks nikolas this is great.

themagicwoodshed's icon

Hi nikolas this patch works great, However I have noticed that whenyou click clear the groove is left at the last pitch that the envelope played and any new envelope uses the last pitch as if it is set at 1. I have tryed sending a 1 attached to a sig~ to the groove every time you click clear but this doesnt work any ideas?
thanks Lee

Nikolas K's icon

hi magicwoodshed!
Yes..i didn't thought that! :)
that should do the trick ;)
its the same patch but with a little correction...

Max Patch
Copy patch and select New From Clipboard in Max.

themagicwoodshed's icon

Thanks Nikolas that works great. Lee