[gmpi] Re: 3.15 MIDI

  • From: Chris Grigg <gmpi-public@xxxxxxxxxxxxxx>
  • To: gmpi@xxxxxxxxxxxxx
  • Date: Wed, 16 Jun 2004 19:59:22 -0700

Jeff said:

Ron said:
 I'm not convinced this is achievable.  For example, let's consider the
 conversion of MIDI volume controller to GMPI.  MIDI volume doesn't have a
 standard mapping from 0-127 to gain values.  So how does this value get
 converted within GMPI?  How the does the converted value survive the round
 trip through a processor that does:
 MIDI -> GMPI - > [Event Processing] -> GMPI ->  MIDI.

All 7 bit controllers get converted like so....


float gmpi_value = (float) midi_cc / 127.0;

.. and converted back like so...

int midi_cc = (int) (gmpi_value * 127.0 + 0.5);

( as usual, i've probley made some terrible coding error, like forgot a
semicolon, or rounded down instead of up, but I hope you get the gist)

Don't assume the conversion to GMPI is some over-complicated thing,  we're
not going to convert everything to Angstroms or anything. It's just a
converion to floating point.

The intention isn't to reinvent the whole thing, only to give controllers
more resolution by converting to floating point.

I think what Ron meant is, out of 0-127 MIDI CC values, where's the nominal 0 dB point? What midiVolNumber-to-dB-curve is used? MIDI per se doesn't specify either thing, whereas we said GMPI parameters would use natural/perceptual units, so for volume presumably that would be expressed as dB. There is no MIDI-spec-governed conversion between the input and the output, so each plug can decide to do a significantly different thing, so in fact the host doesn't have enough information to make the conversion, contradicting your claim that the conversion is always trivial. You can see the problem.


-- Chris G.

----------------------------------------------------------------------
Generalized Music Plugin Interface (GMPI) public discussion list
Participation in this list is contingent upon your abiding by the
following rules:  Please stay on topic.  You are responsible for your own
words.  Please respect your fellow subscribers.  Please do not
redistribute anyone else's words without their permission.

Archive: //www.freelists.org/archives/gmpi
Email gmpi-request@xxxxxxxxxxxxx w/ subject "unsubscribe" to unsubscribe

Other related posts: