dspr
dspr

Reputation: 2423

How to automatize audio unit bypass?

To automatize my audio units, I send events to the render thread where they are delayed to their exact timing in samples using AudioUnitScheduleParameters.

Now I would like to automatize the bypass of any audio unit of type effect the same way. Unfortunately, this is not done through a parameter but rather using a property (kAudioUnitProperty_BypassEffect) and it doesn't seem to exist a way to schedule a property change, I only see how to execute it immediately using AudioUnitSetProperty.

Because effect bypass is automatable on most of modern sequencers, I wonder if a missed something ? Is there another way to achieve the same goal ?

Upvotes: 0

Views: 156

Answers (1)

dspr
dspr

Reputation: 2423

Automatizing an FX bypass doesn't really need the same level of precision than other kind of automations. So, finally, I used AudioUnitSetProperty at the beginning of the slice. Doing this way, the discrepancy with the actual timing is of ± 40ms in the worse case. It's not negligible, but I also feel natural not to bypass an effect during a sound but a little bit before instead. Doing like that, a delay of a few ms is not really an issue.

Upvotes: 0

Related Questions