frequency pitch to groove~ pitch translation

jayrope's icon

could anyone give me a hint how to translate (eventually midi controlled and tempered) tone pitch to controlling pitch with a groove object?

obviously pitch value 1 is the base tone, 2 is an octave, 3 is a quint above, 4 is the 3nd octave and following harmonic division of frequencies, nevertheless:

how can i establish to control semitones for the pitch of the groove object?

i am aware of the existence of a scaling system, but can't find info within this forum as the search function here is rather limited (if only for the 30 secs limit)

dedicated for the one inclined: thank you very much in advance!

jrp

Luke Hall's icon

I think this might help you. The second number box sets the number of steps between octaves, so in your case you could set "$f2" to "12" inside the [expr]. The toggle switches between forwards and backwards and the first number box does the calculation: 0 for normal speed, 12 for double speed, -12 for half speed and so on.

lh

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

jayrope's icon

thank you very much!

could thi spossibly be aplied to some kind of keyboard object as well?

please excuse my probably very standard inquieries... and feel free to not answer in case i am too demanding.

jrp

Luke Hall's icon

Look at [kslider] you could easily hook this up to the left inlet of the [expr] object in my patch. You will have to open the [kslider] object info panel and change the offset and number of notes displayed to get what you want though. Ask as many questions on this forum as you like but bear in mind that for simple questions like this people are likely to point you to the tutorials and with good reason: they are the best place to start.

lh

jayrope's icon

No problem about the tutorials, i read them a lot these days, thanx for reminding, and thanx very much for your help.

jrp

desiredfish's icon

If I understand this might help you.

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

On Sun, Nov 2, 2008 at 11:27 PM, jayrope wrote:

>
> No problem about the tutorials, i read them a lot these days, thanx for
> reminding, and thanx very much for your help.
>
> jrp
> --
> ---
> fiction-induced heat
>

jayrope's icon

desiredfish, i am afraid your patch shows only one outlet.

don't worry, i got it working already thanx to thereishopforus.

jrp

Tj Shredder's icon
Luke Hall's icon

Ew, but the "transratio" patch uses the nasty looking [expr exp(0.057762265*$f1)] which works just as well but doesn't make much sense. [expr pow(2.,($f1/12))] seems a lot nicer to me.

I have the same problem with the [ftom] help patch explaining the calculation as [expr (69. + (1./0.057762265) * log($f1/440.))]. Obviously not an actual problem as it's the exact same maths going on. However, to me, it looks plain wrong.

Whilst I'm on the subject of evil maths someone please destroy the last inlet of [scale]! ;)

jayrope's icon

i gues sthe difference is just because 0.057762265*$f1 is less 'expensive' computing then $f1/12. obviously under certain circumstances $f1/12 would be more exact...