Hi.
I am having a hard time using bendin to pitchbend my oscillators.
When I am playing my Linnstrument with Logic instruments sliding from one note to the other works perfectly, but when I am implementing this into my patch in PD I can get sliding from one octave to another to work, but all the notes inbetween are not lined up correctly. Any tips?
-
How to map pitch bend from Linnstrument
-
@kristofferlislegaard attach your patch so we can see what's going on. Pitch bend by default uses two 7 bit controllers. One is coarse tune, one is fine tune. Kinda like integers and decimals. I doubt any external midi controller will send pitch bend messages any other way. If you're using the [ctlin] object, you will recieve two bytes that you'll have to scale properly. However the [bendin] object combines the two bytes and gives you a 14bit integer (0 to 16383), which you can scale to your liking without worrying about the math invlolved in combining the two original bytes. But once again, show us the patch, a screenshot at least, then everybody will endeavour to improve it
-
Thank you so much! Here is a screenshot of the pitchbend part of the patch:
It has been a little "code as you go" so there might be a few extra objects here and there, but the essens of the problem is really clear. Octaves works perfectly but all the other spots does not match up with the grid on the Linnstrument.
{bendin] goes into the [inlet] and the [outlet] goes to a [t b f] that goes into here:
[pd combine] is just 2x [inlet] into one [outlet]
-
@kristofferlislegaard I don't know what the [scale] object does. It's not found in my pd vanilla distribution. But you have to consider that pitchbends are not linear functions. If you want to bend an octave to each side of your fundamental frequency, the simplest way to it is using this equation: Fpb = F0 * 2^pb, where pb is the bendin signal scaled to go from -1 to 1, Fpb is the bent frequency and F0 is the fundamental frequency. You can implement it like this:
-
@kristofferlislegaard This might be useful........bendy.pd
-
Ah perfect! Thank you so much!
Scale is from the maxlib-library and scales the signal linearly(my problem right there), which is really great for some other stuff -
Now it works perfectly!
Thank you @whale-av !