Re: Logic Live mode/PDC
Re: Logic Live mode/PDC
- Subject: Re: Logic Live mode/PDC
- From: William Stewart <email@hidden>
- Date: Thu, 8 Jun 2006 15:03:03 -0700
On 08/06/2006, at 9:47 AM, Tom Davies wrote:
Hi all
This is more a question about Logic as a host than it is Core
Audio, but I
would imagine quite a few people on this list will have had similar
problems
to me, and so I hope someone might be able to give me some hints.
I've seen
some discussion in the Archives about this issue but couldn't find
an answer.
I am writing plugins that have a latency which a fucntion of the
MaxFramesPerSlice value. In Logic's "live" mode, the process calls
are made
with the hardware I/O setting, rather than the Process Buffer Range
value. if
it is lower.
No MaxFramesPerSlice call is made by Logic to tell us that this
change is
going to happen, so as far as our plugins are concerned, they are
still
running with blocksize of (eg 1024). This obviously defeatst the
purpose of
live mode, and I would like our plugins to adapt to the new, lower
blocksize.
The host should set max frames in an intelliigible way - for
instance, AULab will do this to have this value for each AU coincide
with the I/O size. For eg, if the client sets the I/O Size to 64
sample framess, AULab will set all of the max frames to 64 - and it
will of course never call you for more than 64 samples at a time.
Logic's rendering is more complex as it is dealing with both
rendering from pre-recorded tracks as well as real-time. But it
should (or could) adjust max frames to reflect which situation an AU
is running in and then you could reliably use this figure to make the
decision you need (including the latency you incur)
First question: is there a 'proper' way for a plugin to know it is
being
called in Live mode?
By default it is called in "Live mode" - if a host is taking you to
an offline context (Logic's track freezing), then it sets the offline
property.
The workaround I have implemented is that our plugins check the
number of
samples in each process call against the 'official' blocksize, and
if this
differs, they re-gear themselves to the new incoming value. I have
found this
to be a valid approach, as I am yet to observe Logic make any
process calls
with a number of samples other than that specified in Process
Buffer Range,
unless it is in Live mode. Obviously, if Logic started calling our
plugin
with varying numbers of samples, then this approach would not work
at all!
Its possibly a fragile assumption. There's not restriction placed on
a host that it calls you in regular slices - and indeed if you are up
stream of an AU like a varispeed or the time pitch (something you
could be in AULab for instance), then you will see irregular (both in
time distances and frames/slice) calls. We expect AUs to deal with
this - and in the past most AUs that have more complex situations
(for eg, hardware accelerated) have an internal buffering scheme to
deal with this as you describe.
In general I don't think it is a good idea to be changing your
latency on the fly like this = ideally this should be set as a value
when your AU is initialised, and shouldn't change as a result of the
host calling you in a different manner. How is a host meant to react
to an AU that suddenly changes its latency just because it calls you
for a different number of samples?
Bill
Second question: Can I make this assumption? I know that the AU
spec allows
hosts to make process calls with any number of samples up to this
value, but
in practise, Logic seems to always call with a consistent number,
just as
Live!, and Cubase do (and FL Studio)/Sonar do not!)
If this is a valid thing to do, I still have a further problem.
After the
plugins have re-geared themselves to the new lower blocksize, their
latency
have obviously decreased. However, Logic does not seem to make any
latency
inspections after putting a channel into Live mode, and so the PDC
is messed
up - it still thinks the plugin has the latnecy it did when it was
being
called with the larger blocksize.
Third question: Can I force Logic to have another look at the new
latency
value?
I have other issues with Logic, but I think that is enough for now!
Thanks in advance
Tom Davies
Software Engineer
Solid State Logic
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
This footnote confirms that this email message has been swept
for the presence of computer viruses and is believed to be clean.
**********************************************************************
_______________________________________________
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
--
mailto:email@hidden
tel: +1 408 974 4056
________________________________________________________________________
__
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
________________________________________________________________________
__
_______________________________________________
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