How to limit/scale a value to a specific octave


#1

How can I limit a k-rate note value (blue) to a specific octave ? I have two voices on a synth, but I would like that one on the two stays on a given octave (like 3). For example, B5 would be scaled down do B3 and A2 scaled up to A3.

Thank you very much.


#2

hi there, i think this is not easily doable within the patcher, so i made you a custom object, i'll attach the patch where it is embedded, so you can see how it is used and copy it from there...

rangerestricter.axp (1.8 KB)

it looks like this:


#3

It works great. Thanks a lot !


#4

You can do that with the jv/math/constrain objects I made.


#5

ah nice, did not know that. so they have inbuilt modulo as well?


#6

No. They hard clip everything out of range.


#7

that is why i did the object, he asked for a solution that "mirrors" every note into that range. as of now it is very naive since the lowest note is always a c, but that could easily be changed...


#8

Indeed, limiting the range won't work in my case. But @lokki's custom object works like a charm !