MelaM
Mela
Mar 16

Velocity Range Module

A user requested a Velocity Range module which would clamp the velocity of the incoming notes to a range. Like the Pitch Range module. e.g. If you have a range set to [40, 80], anything below 40 will become 40, anything above 80 will become 80, and the rest will go through unaltered. This is currently possible by using 4 instances of the Velocity module, utilising the built-in [1, 127] clamping and the Offset parameter, but it's a bit clunky. There are 2 possible approaches that come to mind. First, is to add the 2 news dials to the velocity module that would provide the clamping functionality. The second approach is to create a new module just for clamping. This can be made even more useful by providing 2 modes: Filtering and Clamping. Analogous to the Note Range module. Or go with the first approach but add the mode parameter to the Velocity module also. I guess that's the third approach. As always, happy to hear others' thoughts on this.
CompletedCompleted

Sep 18, 2023

Released as part of Mela 4.5

Aug 26, 2023

In the end, after experimenting, it turned out to be unclear what the benefits were of the MIDI Range module, so I'll save it for later use when I have clear use cases. For now, I simply added min/max parameters to the velocity module. Check out Mela 4.5 beta.

Jun 9, 2023

Also worth noting, although it's not the same as clamping, velocity can be scaled and curved using the MIDI Source module with Trigger set to Velocity and Target set to a Velocity module's offset parameter. With a strategic balance of initial offset, curve shape, and target intensity, the result can be almost the same as clamping, using only 2 modules instead of 4. That said, I agree that a dedicated module optimized for this use case (or a couple more knobs on the existing Velocity module) would be much easier to use and understand.

Jun 9, 2023

Nikolozi: If you do create a dedicated clamping module, please let it receive input from any mod source, and give it a target tab like other modules, so we can use for more than just velocity. I could see it being useful for pretty much any other modulation input/output.

Jun 12, 2023

Jon Diercks: I think your suggestion got me thinking. Maybe it would make sense to generalise the module. Call it, say MIDI Range, and if can be somewhat similar to Note Range, but will support Inputs similar to MIDI Source. We could consider adding some graphical representation. Another thing to consider is whether it's worth adding a linear mapping? Say [40, 80] range could be mapped to [50, 70]. This will add a lot of complexity but could be worth it as it might become much more useful. It probably doesn't need the Targets tab, because you can just insert MIDI Source after this module.

Jun 12, 2023

Nikolozi: I definitely like modules that are as generalized as they can be, for maximum flexibility. And yes linear mapping would absolutely be useful.

Mar 16, 2023

Awesome! Thanks a lot! I will try this right now!