[gmpi] Re: Reqs 3.8 Events - ramped events

  • From: Chris Grigg <gmpi-public@xxxxxxxxxxxxxx>
  • To: gmpi@xxxxxxxxxxxxx
  • Date: Sat, 24 Jan 2004 14:26:53 -0800

Thanks for commenting, Steve.

On Fri, Jan 23, 2004 at 02:07:04 -0800, Chris Grigg wrote:
 I think a basic semantic error is being made here by glossing over
 that distinction.  Basically all existing control surfaces that I
 know of and their existing comm protocols (like MIDI) encode slider
 positions, velocities, etc. as integers.  I didn't invent that, it's
 just the way it is.  Of course at some point the integers need to be
 scaled & offset (and maybe warped via some curve to an appropriate
 shape) to be converted into the low-level audio DSP parameters that
 the control integers drive, but under all current pro plug-in systems
 this conversion happens at the plug-in stage -- so hosts essentially
 route incoming MIDI streams from external devices directly to
 plug-ins, they don't route exclusively parameter value streams.
 Whereas you guys seem to be proposing that we turn all this on its
 head, so that what the host routes is only the DSP-level values and
 not control-surface-level values.

Just because we dont want to represetn these things as integers doesnt mean that there is any loss of information, you can store the CC values as a real and round it out to an int if/when it leaves the graph and becomes serial MIDI again.

But is this really viable across the board? An in-graph note index of 40.5 converting to a MIDI wire note of 40 or 41? An in-graph sustain pedal value of 0.5 converting to a MIDI wire CC value of 0 or 1? This is a source of error.



> It seems to me that this has some real problems for practical studios
and music production. For example:

- Do you propose to toss all existing control surfaces into a lake?

The conversion is lossless, so no.

Only at the data field level. My point is also about the message/destination semantics. There's inherent destination addressing in a protocol like MIDI, but with one level of indirection. There is great value in allowing a plug-in to map, on its own, without host intervention, a given incoming message to a given internal parameter/function/etc. of its choice.



 > - If not, where exactly in the architecture or graph do you propose
 > the control-values-to-parameter-values conversions be done? By the
 GMPI host when it accepts the control input from the peripheral,
 before sending into the plug graph?  By a driver for the peripheral
 before it goes to the GMPI host?

Yes, or by a plugin. It doesnt really matter, the importnat things is that it gets converted to a unified GMPI control value representation, and not 7/14bit int coded in 8bit serial.

A) You seem to be making an assumption that unification is more important than legacy device support. Am I interpreting you correctly?


B) MIDI has a couple basic aspects that are essentially independent, and we don't necessarily have to take all of them in the way we handle (or don't handle) MIDI. There is a message format model, which is where the 7-bit stuff comes in, however this is orthogonal to the sender/receiver model (which enables message end-to-end routing) and the addressing model (cables, channels, notes/programs/controllers/sysEx). The sender/receiver model and the addressing model are IMHO valuable and should in some way be given room to exist within GMPI. Whereas I agree that the 7-bit packaging is an irritation and could/should be transformed in some way at the GMPI graph bounds without information loss... although as I say, there are a lot of plug-in MIDI synths today, and users love them, and I do think GMPI needs to make things easy for those plug authors if it's going to succeed.

C) If GMPI forces conversion of integer control surface values into real values to occur at the GMPI graph bounds (by the host), then it eliminates the possibility of allowing more than one plug destination to respond to the integer messages in different ways. Compared with existing plug formats, this is a loss of functionality.


 > - In actual practice, how is the int/real conversion configured for
 > scale & offfset etc. by the user?

MIDI cant encode scale and offset, so it doesnt have to be.

Not sure you understood my question. If I understand correctly, all y'all propose GMPI graphs contain & route only 'natural value' parameters, i.e. frequency in hz, maybe filter Q as a coefficient, level in dB, etc. Whereas MIDI speaks in terms of integer control values with in many cases no predefined mapping from control value to represented real value. So my question is: what is your proposal for where and how such conversions on incoming events from MIDI controllers (incl. control surfaces) are performed?



> You can see where this path leads. This is a lot like the earlier
 proposal that note pitch be described only in Hz and never by scale
 index (note number), which would turn ordinarily dead-simple stuff
 like scalewise transpose or automatic scalewise harmonization, or
 ordinary note synthesis, into impractically complex
 analyze/resynthesize operations.  I can see that the motivation for
 these ideas is pure, but the ideas themselves strike me as both 1)
 impractical and 2) barriers to GMPI acceptance, insofar as they would
 a) tremendously complicate the porting of all the very popular
 existing MIDI synth plug-ins to GMPI, and b) obsolete the end-user's
 investment in MIDI controller gear.

I dont understand the problem, the basic idea is that MIDI is coded up into some sort of preparsed format for transmission around inside of the GMPI graph and if/when it has to leave it can be turned back into 'real' MIDI. There is no compatibility problem.

See above, I think there are a few more issues there than you are accounting for. There are a lot of devils and losses of flexibility in 'preparsed'.



The portential problems with hadling 'raw' MIDI are:

1) people have to write midi parsers. thats anoying and easy to get wrong.

Can you comment on the existing large number of MIDI plug-in synths? Also MIDI event parsing isn't .that. hard. Getting efficient DSP code working and sounding right is, for most people, a lot harder.



2) its not sufficiently expressive.

There are many many problems with MIDI. Can you be more specific? Also, note that MIDI receivers have a great deal of latitude in mapping any possible control source to any existing parameter in the plug-in.



I dont want to have to deal with two
   different kinds of note on packets (for example), so I need one that is
   both MIDI compatible, and adeqately expressive for academic music.

From they way you frame this point, can I take it that if there were a solution that allowed those who are interested in MIDI-controlled plug-ins to do what they want to do, and it was implemented in such as way that it didn't get in the way of the kind of plugs that you want to write, then you wouldn't object?



obviously if I use high resolution data values inside of the GMPI graph,
when it get exported to serial MIDI that extra res will be lost, but at
least I had the oportunity to use it in the first place.

But if the external device unexpectedly responds with a different behavior than plugs in the graph do, then the extra res can also be seen as (and many users would experience GMPI as) a generator of wrongness.



I also want the control packet for to be OSC compatible (at least at a
basic level), and I'm definatly not handling 3 packet formats.

Maybe you and I both suffer from the "When the tool you know best is a hammer, all problems tend to look like nails' problem... your hammer is OSC, mine is MIDI. I have to say, I wonder whether there is broad support for OSC in GMPI.


One possible way to go -- yes yes, I expect everyone to shout 'no' -- is to have a level of protocol indirection in the event message struct, ala:

struct {
msgTimeStamps theTime, // some struct
msgProtocol theProtocol, // enum: native GMPI msg / MIDI msg / OSC msg
msgData* theData // ptr to protocol-specific data packet (better than union)


} gmpiEvtMsg;

This way plugs could advertise which protocol(s) they send & respond to, can ignore protocols they're not interested in, and hosts can refuse to make inappropriate connections. Existing MIDI-based plugs could be migrated to GMPI more easily, protocol conversion plugs could be written, etc.


> Again, if control inputs are typed and named, why does GMPI need to
 dictate what model all GMPI plugs will use?  Let some plugs use
 "Pitch-Hz" real inputs and other plugs use "Pitch-MIDINoteNumber" int
 inputs.

Some of us actually want working systems this decade. I think these kinds of ideas are firmly in the "too much rope" category of software design. Why not just pick one, simple to handle, fully expressive format and use that?

Because it's completely new and nothing that currently exists will be able to work within it in a reasonable timeframe? I think it's not enough to get a working system, we need a working system with a reasonably efficient entry path for existing plugs in other formats. (This is a requirement we already agreed on, isn't it?)



> Unless I'm mistaken, that's for the group to decide later, when we
 get to setting requirements for how MIDI will/won't be handled... no?
 Though I have to say, some of the anti-MIDI sentiment here -- not
 naming names -- does strike me as kind of
 religious/ideological/ivory-tower/anti-user.

I dont know if youre referring to me or not, but I'm definatly not anti-MIDI, it does a great job and I use it extensivly, but being based on low-bitrate serial comms it has its limitations.

Couldn't agree more, wish we had a time machine to go back and fix MIDI in the cradle. But it's a reality and we have to deal with it. One consolation: when you look closely at MIDI in GMPI, at least there are some things we get a chance to improve.



> Possible solution: Maybe we could add a rule that all real-valued
 control input pins could also optionally provide some sort of
 built-in aux input pin that accepts integer-stepped control inputs
 (like MIDI controllers etc.), which comes with a converter function
 for automatically scaling & smoothing & converting & feeding the real
 pin?  So you plug a real source into a control input and it goes in
 directly, but if you plug (example only) a MIDI controller source
 into that same control input, the plug is able to easily handle its
 own CC-to-real-param conversion?  Then we get both worlds side by
 side.

I think there are two seperate issues here


A) lumps of (parsed) MIDI floating around the graph (notes, maybe CC's
   etc).

B) MIDI CC's bound to plugin control ports.

Not 100% sure I agree with your analysis, what do you mean by 'parsed'? If sysEx communication between external devices and plugs is going to be supported (needed for some control surfaces), then you'd need actual MIDI byte sequences to be able to move around inside GMPI graphs.



A needs good, lossless representation of the MIDI data, it doesnt need any
particular scaling hints or whatever, as MIDI doesnt have them.

This is only true if plugs are free to receive notes as indexes and not frequencies. Are you saying you're OK with notes as indexes?



B is such a
common case that it can (and probably should) be handled by hosts binding
midi controllers to native GMPI control ports explicitly, possibly GMPI
may need some way for plugins to indicate to hosts that they want some of
thier controls bound to some CC's. I'm not sure about that, in LADSPA its
the hosts job to maintain bindings.

If you let a plug have a MIDI In control port then all the individual controller routing for that plug is handled automatically within the plug, with no host load and no host GUI needs to be written by the host author nor played with by the user. Lots and lots of popular plugs already work this way.


Maybe we can find a way for you to get what you want without also putting walls up for the authors of such existing plugs.

-- 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: