[sdiy] MIDI volume to volts formula

rsdio at audiobanshee.com rsdio at audiobanshee.com
Wed Jun 6 08:24:21 CEST 2018


This is not a dopey question. It’s the kind of thing I used to call Ensoniq Technical Support about, including real Hertz values for filter settings and other such questions.

Unfortunately, there is no answer. The official MIDI Specification says “Interpretation of the Velocity byte is left up to the receiving instrument.” That is nowhere near precise voltages. There’s also no standard voltage output for any synthesizer voice, since they’re allowed to be balanced, unbalanced, modular, headphones, or any other range of voltages.

All we can say for certain is that larger Velocity numbers must be louder, but only if velocity is applied to volume.

Velocity 64 (0x40) is defined as mezzo-forte. MIDI also states, “Preferably, application of velocity to volume should be an exponential function.”

0 Velocity is off, and 1 through 127 would be ppp, pp, p, mp, f, ff, fff.

You can grab a copy of the MIDI Detailed Specification yourself. I think it’s freely available online these days.


Personally, I always try to consider the techniques available at the time. You have to keep in mind that bother the sender and the receiver could interpret velocity any way that they wanted. Usually, especially in the eighties, manufacturers wanted to find the easiest way to calculate these values.

When reading a physical keyboard, velocity corresponds to speed, and speed is a function of time. The distance is fixed in a piano keyboard’s movement, so time is the only measurement possible. Since velocity is distance over time, they would basically be measuring 1/t. The various 8-bit processors in use when MIDI was invented had crystal oscillators and the ability to measure counter values between events. Since the granularity is determined by the oscillator period, the highest velocity values would represent fairly coarse changes : 1/1, 1/2, 1/3, 1/4, 1/5, 1/6, 1/7, 1/8, … and then the lowest velocity values would represent fairly fine changes : 1/991, 1/992, 1/993, 1/994, 1/995, 1/996, 1/997, 1/998 … Thus, velocity on the sending side would be a 1/N curve where N corresponds to time. Almost none of the processors in the eighties had fast division, so most likely the time counter values were mapped to Velocity numbers rather than calculated directly. How these mapped output Velocities are mapped to parameter responses is almost completely disconnected from any constraint.

Brian


On Jun 4, 2018, at 4:43 PM, John Speth <john.speth at andrews-cooper.com> wrote:
> I have been having a difficult time finding a workable formula for converting the MIDI velocity value (the third byte in a note on/off message) to a Vpp value.  Does anybody know the mathematical formula for this conversion?  Something like Vpp = func(velocity).  Let’s assume Vpp(max, when velocity is 127) is 1.0V.
>  
> The reason I need to know is I have device that I can control frequency in terms of Hz and velocity in terms of Vpp.  I’m not sure if I need a function based on log10() or antilog10().
>  
> Thanks and sorry for the dopey question.
>  
> JJS





More information about the Synth-diy mailing list