Re: plugin looses sync with transport
Re: plugin looses sync with transport
- Subject: Re: plugin looses sync with transport
- From: William Stewart <email@hidden>
- Date: Wed, 13 Oct 2010 10:53:55 -0700
On Oct 13, 2010, at 1:14 AM, Artemiy Pavlov wrote:
> William, I am just setting a flag within Reset(), the actual call to get the current transport location is indeed made within the Process().
ok
>
> Can you give me advise on how to detect when a plugin is being put into work after the host sets it into "hibernation" between distant regions on the same track?
The expectation is that on waking you up again, the host will call AudioUnitReset on you, and it will do this BEFORE (and in a thread safe manner) it calls AudioUnitRender. You can see this in AULab - mute a track with your AU in it, your AU will no longer be called for audio. Unmute the track, AULab will reset your AU first, then you will be in the render chain. AULab also has a transport window (which can sync to MIDI beat clock), so you can also see how the transport callback would work in this regard.
>
> If I sync to transport with every Process() cycle, this works with GB and Logic, but breaks sync in certain scenarios in Live. If I sync to transport only after Reset() is called, Live works well but in GB and Logic the sync is lost between the regions like I described.
Hmm.. that doesn't seem right. Is Logic/GB not calling AudioUnitReset on you in those cases?
Bill
>
> Thanks and all the best,
>
> Artemiy.
>
> On 13 Oct 2010, at 04:01, William Stewart wrote:
>
>> You can only call the host callbacks from within the context of the AudioUnitRender call.
>>
>> If you are calling this from within AudioUnitReset, you should be getting an error back from the host telling you you "can't do this in this context"
>>
>>
>> On Oct 10, 2010, at 11:31 AM, Artemiy Pavlov wrote:
>>
>>> Hi all!
>>>
>>> I have a gate sequencer plugin which is synchronized to the transport.
>>>
>>> As an example, I place it on an instrument track which has two regions, about 30 seconds apart:
>>> http://www.artemiypavlov.com/tmp/regions.png
>>>
>>> If I sync to the current transport location with each Process() call, all is well. The sequencer is in sync with the transport in both regions.
>>>
>>> However, if I only sync with the transport when Reset() is called, the sequencer is in sync only on the first region, and is out of sync in the second region.
>>>
>>> Debugging shows that the plugin is hibernated between the regions, which is expected, but before the second region it is being woken up without calling Reset().
>>>
>>> The question is, should I revert to synchronizing on each Process() cycle? If not, how do I detect when my plugin is being woken up like I described? Nothing in CallHostTransportState changes either, so I can't trace this moment.
>>>
>>>
>>> Thanks and best wishes,
>>>
>>> Artemiy.
>>>
>>>
>>> _______________________________________________
>>> 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
_______________________________________________
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