[sdiy] MIDI volume to volts formula

rburnett at richieburnett.co.uk rburnett at richieburnett.co.uk
Thu Jun 7 11:29:14 CEST 2018

This same discussion came up a few years ago.  One of the things that 
seemed apparent to me is that (for some keyboards at least) the MIDI 
"velocity" byte that is transmitted is not a *velocity* measurement at 
all.  It is actually the result of a digital counter counting backwards 
from 127 towards zero, measuring the *TIME* taken for the key to move 
from the top set of switch contacts to the bottom set of switch 
contacts.  So there is clearly a reciprocal relationship between 
velocity and time at work at the keyboard end that generates the MIDI 
messages.  And then there is also a log weighted perception of volume 
for audio signals of different amplitude (as well as Fletcher Munson, 
A-weighting, etc.) going on at the synthesis end too.  So it doesn't 
surprise me at all that there are some pretty funky curves required to 
map the real parameter of "transit time" to "signal amplitude", in a way 
that perceptually feels like the correct mapping of "velocity" to 


On 2018-06-07 09:39, chris wrote:
> I don't even think the actual transfer function is really important.
> So you could use exp, inverted log, square (normalized to 0..1), gamma
> (as in graphics), or even a quarter circle (ok, may degenerate due to
> infinite derivative) - as long as 0 maps to 0 and 127 maps to 127
> (wouldn't be necessary, but seems to be common).
> Add some spicy coefficients or combinations of the above to create a
> couple of variations, so the user can select from a handful of options.
> I think it's just about somehow bending the linear transfer
> funnction towards harder or softer without introducing any steps.
> Maybe even the big companies don't put much emphasis on this, I 
> remember
> the DX7 keyboard only generating velocity values up to 100. DX patches
> really come to life when played from a piano action master keyboard...
> Chris
> On Thu, 7 Jun 2018 17:43:01 +1000 Adam Inglis <21pointy at tpg.com.au>
> wrote:
>> > On 7 Jun 2018, at 5:02 PM, rsdio at audiobanshee.com wrote:
>> >
>> >
>> > On Jun 6, 2018, at 6:07 PM, Adam Inglis <21pointy at tpg.com.au> wrote:
>> >> On 7 Jun 2018, at 4:48 AM, Ben Bradley <ben.pi.bradley at gmail.com> wrote:
>> >>> On the other hand, I think a piano is a roughly linear function of
>> >>> input velocity (or force) and "signal" output. This may require
>> >>> "original research."
>> >>
>> >> There must be a stack of research out there, possibly some of it in-house/proprietary by the big instrument makers, regarding this.
>> >> I would’ve thought you be better served by a sinusoidal function, rather than log or linear, but of course it is going to depend mostly on the qualities of the particular tone or patch you are controlling at any one time (even more than personal playing style).
>> >
>> > Why sinusoidal? Are you suggesting the volume should eventually decrease and then go negative as velocity increases?
>> >
>> Aaah, sorry, that should be sigmoidal, not sinusoidal!! Duh.
>> As in this
>> https://en.wikipedia.org/wiki/Sigmoid_function
>> These sorts of shapes are very useful when tailoring velocity to 
>> “playability†on a per patch basis.
>> _______________________________________________
>> Synth-diy mailing list
>> Synth-diy at synth-diy.org
>> http://synth-diy.org/mailman/listinfo/synth-diy
> _______________________________________________
> Synth-diy mailing list
> Synth-diy at synth-diy.org
> http://synth-diy.org/mailman/listinfo/synth-diy

More information about the Synth-diy mailing list