Re: [linux-audio-dev] XAP: Some thoughts on control ramping

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] XAP: Some thoughts on control ramping
From: David Olofson (david@olofson.net)
Date: Tue Jan 21 2003 - 18:09:59 EET


On Tuesday 21 January 2003 10.18, Steve Harris wrote:
> On Tue, Jan 21, 2003 at 05:09:34 +0100, David Olofson wrote:
> > For example, setting the initial level of an envelope and then
> > setting up the delay or attack phase won't work, unless you wait
> > for one frame before sending the RAMP event for the delay or
> > attack phase. Similarly, an attack duration of 0 would result in
> > the decay starting at the current value, instead of the attack
> > peak level.
>
> Yes, you're right. Damn.
>
> OTOH If we define that RAMP events arring in the same timestamp for
> the same control override each other then it becomes the hosts job
> to normalise them (not a hard task).

It's not hard, but I didn't like the way it looked in Audiality's EG,
and I don't like the logical glitch that is a broken duration 0.

With only RAMP events and RAMP(value, 0) as a special case on the
receiver end, the EG code is nice and simple, and the receiver end
if() is trivial.

I could just test for 0 duration in the EG, but the only really
straightforward solution would be to delay for an extra frame, which
would effectively make a 0 duration stage take one frame too many ==>
timing error build-up. Then I would need to shorten the next section
by 1 - but what happens if the next section is 0 or 1 frames...?

I don't feel like I need that when I'm adding multiplication with
ramped input - and this is still pretty basic event processing! :-)

> Envelope sections with 0 duration are often not provided anyway.

They definitely generate nasty clicks, but setting the initial level
of an envelope higher than 0 generally doesn't, unless the waveform
starts with a click. Anyway, this isn't as much of an issue as the
special-casing needed in senders, I think.

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


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Tue Jan 21 2003 - 18:14:58 EET