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: Brian Willoughby <email@hidden>
- Date: Thu, 25 Feb 2010 14:48:34 -0800
On Feb 24, 2010, at 23:42, Ian Kemmish wrote:
On 24 Feb 2010, at 14:32:, Eagle Offshore <email@hidden>
wrote:
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.
Unless you find some which ignore that too, I'd go with all sound
off rather than all notes off. The MIDI spec suggests that the
latter merely causes all notes to start decaying, whereas the former
tells the synth to shut up as soon as practicable (typically one or
two bufferfuls with my synth, because of scheduling and garbage
collecting issues).
You say "rather than" but I would strongly recommend "in addition to."
My reason is that All Notes Off has been in the MIDI spec since day
one, while All Sound Off must have been added decades later. Thus, if
you are sending MIDI to an older device (or even a newer device
designed against the original spec) then you won't get any results at
all with All Sound Off.
I recommend that you purchase a copy of the MIDI detailed
specification from the MMA before making recommendations to fellow
programmers. The messages under discussion are quite complex, and you
really need to read the official recommendations because many
engineers get it wrong.
As for AudioUnitReset(), I don't even recall seeing it in the
vintage 2004 documentation upon which my synth is based :-) Quickly
reviewing my code, there certainly doesn't seem to be any attempt to
implement it, unless the AU base classes do something.
You always have to read the documentation for AUBase because your
class inherits from it. I'd say that AUBase has had some code and at
least minimal Reset documentation since the beginning.
Brian Willoughby
Sound Consulting
_______________________________________________
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