[linux-audio-dev] XAP: Control events

David Olofson david at olofson.net
Wed Dec 18 17:08:01 UTC 2002


On Wednesday 18 December 2002 19.31, Tim Hockin wrote:
> > Yeah. (If we have splines, that is. Otherwise, just RAMP to the
> > default value, and then stop ramping with a SET  before
> > disconnecting.)
>
> Why do you need to stop ramping?  Set the value to 0, and ramp for
> 1 block or 1/2 block or whatever

That only works if you're about to kill the plugin as well. 
Otherwise, it will basically ignore that the port was disconnected, 
and keep ramping forever.

The alternative would be to require that disconnect() resets the 
control automatically, but that falls in the same domain as loading 
control default values, which IMO is something that the host should 
do. (Explained earlier.)


> > Right. That's why you basically don't let ramps run across block
> > boundaries.
> >
> > That said, it's perfectly legal to aim for longer distances,
> > since
>
> given that we know nothing about the future, I say no.  We've set a
> rule that "things happen now and in this block only".  Let's stick
> to it.

Sounds logical, but one could say that the ramping events break the 
rule anyway, since the ramping isn't stopped automatically at the aim 
point. The aim point is just a different way of expressing slope, and 
it's used only to keep rounding errors from building up. What a ramp 
event *really* says is this:

	"Start ramping from the current value so that
	 <target> is hit in <length> sample frames."

It doesn't say that the aim point is where the ramp stops. It's more 
similar to just changing the ramp value directly.

Either way, it's just a performance hack, and I'm not sure it's of 
much use. I've already said myself that you shouldn't do long ramps, 
because they may not be as linear as you think, due to plugin 
optimizations.

So, yes better stick to the rule.


//David Olofson - Programmer, Composer, Open Source Advocate

.- The Return of Audiality! --------------------------------.
| Free/Open Source Audio Engine for use in Games or Studio. |
| RT and off-line synth. Scripting. Sample accurate timing. |
`---------------------------> http://olofson.net/audiality -'
   --- http://olofson.net --- http://www.reologica.se ---



More information about the Linux-audio-dev mailing list