Page 1 of 1
Midi Dynamics in FS
Posted: Sun Dec 09, 2018 11:11 am
by kortezzzz
Midi dynamic offers great control and flexibility. However, I've never saw it implemented on any FS synth (maybe I'm wrong...). Is there any way to make that feature in FS based green Midi? Or maybe with Ruby? Has anyone did it already?
Re: Midi Dynamics in FS
Posted: Mon Dec 10, 2018 8:14 pm
by nix
Hiya-
do you mean 'velocity'?
Re: Midi Dynamics in FS
Posted: Mon Dec 10, 2018 9:35 pm
by tulamide
If by MIDI dynamics you mean the old compress/expand/limit MIDI notes, that's because it is a task that should be covered by your DAW. I don't see why, for example, a synth should alter midi notes.
If you plan to do a MIDI plugin dealing with such aspects, you have to do it on your own. I don't think anyone has ever done it before. But it isn't really complicated.
For compressing/expanding, take the average of the incoming midi notes (sync it to the audio buffer), then compare with the defined threshold and apply as a precentage.
For limiting just set all notes to the defined velocity threshold that are over it.
Re: Midi Dynamics in FS
Posted: Mon Dec 10, 2018 11:30 pm
by kortezzzz
Hi nix,
Yes, I mean velocity manipulating
Hi tulamide.
Thanks for the comment. I understand how the Midi velocity limiting works and already used limiting in one of my synths. But I don't understand how compressing\expending works. Midi dynamics button usually uses a curved icon that bends out up and down. How this icon's shape is translated to velocity changes? It causes the velocity a rise and then a fall?
Re: Midi Dynamics in FS
Posted: Tue Dec 11, 2018 12:29 am
by tulamide
kortezzzz wrote:It causes the velocity a rise and then a fall?
No. Compressing means, you want to keep the general dynamics but not as extreme as it is now. You need at least two midi values to compress something, but obviously it gets more accurate the more values you have.
Say you have 2 notes at 120 and 60. The average (aka mean) is 90. Say the threshold is at 81. It means the average is 10% above the threshold. You now correct the values by subtracting 10% of their current value. 120 becomes 108 and 60 becomes 54.
You can also use the threshold as an indicator to which values will be kept untouched. In that case the resulting values would be 108 and 60. That changes the dynamics, however.
You can also apply a gain afterwards. If you do it so that the highest values are reached again, the results would be 120, 66 resp. 120, 72.
At that point latest you might see why it is called compression

Re: Midi Dynamics in FS
Posted: Tue Dec 11, 2018 3:57 pm
by kortezzzz
That's excellent explanation, tulamide, as usual. Thanks
Now I'll have to take look how to implement it in practice ( matching GUI controls and etc.).