Re: Does anybody implement 'reset' in their Instrument Audio Units?
Re: Does anybody implement 'reset' in their Instrument Audio Units?
- Subject: Re: Does anybody implement 'reset' in their Instrument Audio Units?
- From: William Stewart <email@hidden>
- Date: Thu, 25 Feb 2010 19:23:55 -0800
On Feb 25, 2010, at 12:50 AM, Os wrote:
> Hi,
>
> it seems relevant to mention that I generally do implement
> AudioUnitReset() in my plug-ins, but in some I've had to implement a
> prefs setting to allow the user to turn it off, because the
> implementation in some hosts is bugged.
>
> Specifically in Ableton Live, the host calls AudioUnitReset when the
> transport is stopped, meaning that if you have some nice long delay
> tails fading out at the end of your set and you hit stop, the audio
> cuts off. My preference is Logic's implementation, where reset is
> called on transport start, not stop.
That is a bug in Ableton
>
>> I'd be happy for you to name them publicly... This behaviour is really out of spec and should be fixed. (If you want to send me a list privately, I'll happily follow up with them).
>
> Bill, if you'd like to follow up with Ableton, that would be great :)
will do
>
>
> cheers,
> os.
>
>
> On 25 February 2010 02:47, William Stewart <email@hidden> wrote:
>> Hi Todd :)
>>
>> I'd be happy for you to name them publicly... This behaviour is really out of spec and should be fixed. (If you want to send me a list privately, I'll happily follow up with them).
>>
>> On Feb 24, 2010, at 2:32 PM, Eagle Offshore wrote:
>>
>>> Because my experimentation suggests the answer is NO.
>>>
>>> I've been mucking about with trying to reduce CPU load by removing idle instruments from the AUGraph.
>>>
>>> 'm finding that when the instrument is added back to the graph, if there was any audio still decaying when it was removed, it resumes decaying when added back to the graph IN SPITE OF me calling AudioUnitReset(unit,kAudioUnitScope_Global,0). IOW, AudioUnitReset seems to do nothing on a smattering of instruments I've tried. OTOH, what does seem to get the thing to properly abandon current processing is to call setClassInfo with its state (even if the state is unchanged). This causes most AudioUnits to actually reset - however this is an expensive operation on some AudioUnits for some reason and I end up with pauses while it gets its life together - which means my optimization code for not setting state back if it hasn't changed is working against me SOMETIMES.
>>>
>>> Long story short - when I remove an instrument from the graph - I send it MIDI all notes off, bender/mod control zero (why reset doesn't do this as well I have no idea), then remove callbacks from it, and call AudioUnitReset on it.
>>
>> Calling AudioUnitReset on it is all you should need to do.
>>
>>>
>>> Prior to reinserting it back into the graph, I reinstall callbacks on it and call setClassInfo on it to restore its state/patch selection. If I optimize this call to avoid the setClassInfo for instruments that don't need it, then whatever audio was decaying when I removed it from the graph now resumes playing.
>>
>> This is a bug.
>>
>>>
>>> Is there some kind of trick to AudioUnitReset I haven't figured out or do most instruments just not implement it? These are some really well known instruments BTW.
>>
>> Nope, just poor implementation
>>
>> Bill
>>
>>>
>>> -Todd Blanchard
>>> _______________________________________________
>>> Do not post admin requests to the list. They will be ignored.
>>> Coreaudio-api mailing list (email@hidden)
>>> Help/Unsubscribe/Update your Subscription:
>>>
>>> This email sent to email@hidden
>>
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Coreaudio-api mailing list (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>>
>
>
>
> --
> email@hidden
> http://twitter.com/expertsleepers
> http://www.darkroomtheband.net/
> http://www.expert-sleepers.co.uk/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden