This is my patch for a midi drum kit. How can I implement velocity sensitivity on/off? I have used [/ 127] objects to turn velocity into a number between 0 and 1 (sincerely, what would I do without you, David). What if I want to toggle velocity sensitivity off? How can I do that? Thank you!
Velocity toggle or something?
@flight453 you should learn to use abstractions, basically patches inside patches, by that i do not mean subpatches, i mean other saved .pd files that you call by writing out the path to that .pd file inside an object, and then you will have 1 instance of that patch inside this patch, and you can simply copy that object to have another instance. also, why are you using multiple [dac~] objects, i don't know for sure, but i think that does not work as i belive you intend it to work. try to count the number of stuff you will output to [dac~] and add all of those together until you get one signal to all of them, and divide by the amount that you counted and then output that to [dac~]. also try consider using [poly], i have been trying to do somthing similar before, so somebody told me to use [poly] (probably david), but i didn't understand it, and intended to revisit midi stuff later, and ye, it's for midi, use it on notein, but idk how, you can add arguments to [poly], but idk how it works. you can for instance use [set pad3( (or whatver array you like) on the instances of the patches inside your patch to make those patches output different types of sounds.
My usual formula for velocity sensitivity is:
- normalize velocity to 0 .. 1
- have a "velocity sensitivity" parameter that is also 0 .. 1
Then the final velocity should be calculated as
(velocity - 1) * sensitivity + 1.
If sensitivity = 1, then the output velocity is the same as the input (full sensitivity).
If sensitivity = 0, then the output velocity is always 1 (completely insensitive to input velocity).
And you can choose anywhere in between (sensitivity = 0.2 means output velocity ranges 0.8 to 1, e.g.).
when you call a patch (or any normal file) in pd through directory traversing in objects, there are some rules (idk if i know all, because i have just stumbled upon them randomly):
a: to call a patch in the same directory (folder) as your main patch, just type out the name, excluding the ".pd" at the end, so velocity-senitivity.pd becomes velocity-senitivity.
b: to call a patch inside a directory which is inside the same directory as your main patch, just type the directory name for the directory inside the shared directory, then a "/" and then the filename, again, excluding ".pd", so velocity-senitivity.pd inside the directory "abstractions" which shares the directory with your main patch, becomes abstractions/velocity-senitivity. you can go as many directories in as you like, so abstractions/midi&more/velocity-senitivity
c: if it is outside your directory type one "." for as many directories you have to go outside and then "./" (yes, that is a "." followed by a "/") and then your patch name, again, excluding ".pd".
d: you can type what rule "c" says and not entering the patch name, and then type what rule "b" says. here's an example of this in action .../abstractions/midi&more/velocity-senitivity, so the ".../" means that you shold go back 2 directories, and "abstractions/midi&more/" means that you should go inside the folder "abstractions", and then "midi&more", and "velocity-senitivity" is the the patch that you want to use.
e: just typing out the full directory, again excluding the ".pd"