Re: Transport start/stop for Effect Units needed
Re: Transport start/stop for Effect Units needed
- Subject: Re: Transport start/stop for Effect Units needed
- From: Howard Moon <email@hidden>
- Date: Thu, 15 May 2003 11:38:47 -0700
Hi Chris,
in our AutoTune plug-in, we have a "graphical" mode where the user can
track the pitch of audio data, make graphical corrections to it, then
apply those corrections by playing the audio again. To accomplish
this, we take one of two approaches. If there is time information
available, including the transport start/stop info, then we can
start/stop tracking or correcting using that info. If such info is not
available (such as when a Vst host returns NULL from getTimeInfo), then
we wait until "non-zero" data values are detected to start tracking or
correcting, and all such tracking is then based at time zero (since we
don't know the real start time).
What goes wrong when using the FXpansion wrapper is that we get a
valid pointer back from getTimeInfo, but the flag for the state of the
transport is not available, due to the fact that this info is only
given to Output effects. So our plug-in *thinks* it's getting all the
time info it needs, but it never gets the info about the transport
starting. We can detect that we are being wrapped like this, and in
effect ignore the time info, but it would be much nicer if we could
rely on that info being there, since it provides us with accurate
time-of-day placement of the data, and also prevents us from having
code for special cases like the FXpansion wrapper in our plug-in's
processing routines.
-Howard
On Thursday, May 15, 2003, at 11:03 AM, Chris Rogers wrote:
Paul,
What type of action are you wanting to do in an AudioUnit effect
which relies on knowing exactly when the transport starts?
We already have AudioUnitReset() which hosts should be calling
in most conditions before the transport is started.
AudioUnitReset() is designed to allow the AudioUnit to reset
its internal state, clearing filter memory, delay buffers, etc.
I'm just curious to know what specific types of operations you
need to do in the AudioUnit at this time and if it's somehow
separate from our concept of "reset"
Chris Rogers
Core Audio
Apple Computer
Chris Reed <email@hidden> wrote:
Couldn't you use the current host time and beat location callback to
determine if playback is progressing? If the current location
doesn't
change, or the host returns an error for that call, then you can
assume
the transport is stopped.
That is ok (as Howard says - if you can rely on the reported location)
but watching to see if the current location is changing isn't always
good enough. If the transport is stopped at the start of bar 1, then
starts playing *from there*, the start location for each frame will be
something like:
1.000 transport is stopped
1.000
1.000
1.000
transport starts
1.000
1.003 <- you detect the location is now changing
1.006
So you missed the opportunity to do something exactly on the first
beat
of the bar! This is really a problem when the user wants to select an
exact range and render the plug-in output to a file.
Paul.
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.