[gmpi] Re: Reqs 3.9. Time - opening arguments.1

  • From: "Michael Stauffer" <michael@xxxxxxxxxxxxxxxxxx>
  • To: <gmpi@xxxxxxxxxxxxx>
  • Date: Mon, 16 Feb 2004 20:03:31 -0500

Jeff wrote:
>> This makes me wonder about the audio-frame method for sending
>events to
>> plugs. Why are events not sent via a separate method with smaller time
>> resolution?
>> ... Cuz otherwise, plugs could receive all midi and
>> other control events at finer resolution in a separate
>callback thread,
>If I understand you, you're suggesting MIDI gets sent to a
>plugin "as soon
>as possible" to avoid the latency of pre-queing events.
>This has been suggested several times.  I naively used this
>approach once.
>Sounded terrible.  I'll try to explain...
>Say you are running 10 plugins, 10ms frame size.
>Each plugin in turn processes 10ms worth of events and audio.
>Each plugin
>has only 1ms to do so (on average).  Each plugin is 'asleep'
>for 9 ms out of
>  If you attempt to send MIDI in 'real time', the events get delivered
>'clumped' into 1ms lumps, 10ms apart.  It's like quantizing all
>events to
>the frame size (which is never a 'musical' interval).  Any MIDI
>like pitch bend become audibly 'stepped'.  All note timing becomes badly
>The correct solution is to delay all real-time events by the
>frame latency
>before injecting them into the graph.  Your soundcard imposes the same
>latency on incoming audio, so you're not 'losing out', in fact
>this ensures
>that recorded MIDI and audio stay perfectly in sync.
>Appologies if I misunderstood your proposal.

Thanks Jeff, I see what you mean. So the host is controlling the
threading of the plugin, limiting its processing time?

If the midi events are timestamped, in the example you give, the 'real
time clumping' could perform similarly well to the "pre-queue 1-frame
latency" method? But then the processing delays are the same anyway, and
the "pre-queue" would be cleaner, it seems. Also, I'm thinking more and
more that the average equipment's frame latencies are going to small
enough by the time that GMPI is implemented (a couple years?) that this
is less of a worry.


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: