Im making a simple step sequencer and using midi faders to control the value of each step.
At the moment im taking the 0 - 127 value of each fader, converting that to a frequency with mtof to control an osc.
Quite simple, but i was hoping i could implement some way of filtering out the numbers i dont need to fit the output to a specific key.
So far, my idea is to divide the 128 into 8 distinct ranges that correspond to one note of a musical scale.
For example, if the fader reads anything from 0-15, then i would like to output 24 to a float. If the fader reads 16 - 31, i would like to output 26 to the float and so on.
Ive tried using logical objects to achieve this, which had some success but the patch became quite complex and unreliable in ways that i couldnt troubleshoot. There are a number of gaps in my knowledge, so i am sure im not approching this as efficiently as I could be.
Im quite new to puredata and programming in general and i hope im explaining myself properly, so please forgive me if im missing something obvious, but a few pointers, or any ideas on how to proceed at all would be great.