Re: Scheduling ramp parameters
Re: Scheduling ramp parameters
- Subject: Re: Scheduling ramp parameters
- From: William Stewart <email@hidden>
- Date: Thu, 13 Jul 2006 12:39:48 -0700
On 13/07/2006, at 6:52 AM, Bjorn Roche wrote:
On Wed, 12 Jul 2006, William Stewart wrote:
On 11/07/2006, at 1:36 PM, Bjorn Roche wrote:
Hey all,
I have an AU host app that works fine with non-ramp-able
parameters. However, I recently tried my first plug-in that
actually supports ramp-able parameters, Audio Ease's Altiverb 5
(anybody know any more?). When I try scheduling parameters with
that, it either ignores the transition or produces a loud noise.
In Ableton Live it works fine. I have two suspicions about why
this might be:
1. Instead of lumping all my scheduling together and making one
call to AudioUnitScheduleParameters(),
Yes, this is expected
I am making a number of calls with only one
AudioUnitParameterEvent per call, like this:
AudioUnitScheduleParameters( audioUnit, &ape, 1 );
this is ok too.
Thanks, William.
Will the audio units themselves see any difference between these
types of calls, or does the AU API convert both
for 1 to n
AudioUnitScheduleParameters( audioUnit, &ape, 1 );
and
AudioUnitScheduleParameters( audioUnit, &apes, n );
to the same thing as far as the Audio Unit is concerned?
The AU itself manages parsing the list. We provide an implementation
in our AUBase implementation
In other words, is there any way for the Audio Unit to know if you
made one call with all the data or many calls with just a piece of
the data?
Yes
I ask because this is the only thing I can see that I may be doing
differently from other software
Well, the main difference so far is that you aren't scheduling in the
render notification - that is potentially a big difference.
and if there's one thing I've learned about Audio Units it that if
you do things differently, some popular audio unit out there will
break.
2. I am scheduling the parameters right before my own render
call, rather than in the pre-render notification. It has been
suggested on this list that the best place to schedule parameters
is in the prerender notification, but I don't see how it could be
an issue as long as I do it right before the render and from
within the same thread.
If the AU does something to clear this state between your call to
AudioUnitRender and its call to your pre-render, then this doesn't
work of course. You should also bare in mind that the AU's only
thread context for doing work is the call the host makes to
AudioUnitRender. The suggested guideline is to schedule these
activities in the pre-render notification for this reasons.
I put the scheduling code in the pre-render notification. My code
isn't any messier, which is nice, but I still have a problem with
that one AU.
Have you checked that the parameter itself is a rampable parameter?
Does that AU pass the auval test? (It explicitly tests multiple
scheduling and ramping)
Apple's stereo mixer has ramp-able parameters:
PUBLISHED PARAMETER INFO:
# # # 2 Input Scope Parameters:
Parameter ID:0
Name: gain
Parameter Type: Mixer Fader Curve 1
Values: Minimum = 0.000000, Default = 1.000000, Maximum = 1.000000
Flags: Can Ramp, Readable, Writable
-parameter PASS
Parameter ID:1
Name: pan
Parameter Type: Pan
Values: Minimum = 0.000000, Default = 0.500000, Maximum = 1.000000
Flags: Can Ramp, Readable, Writable
-parameter PASS
# # # 1 Output Scope Parameters:
Parameter ID:0
Name: gain
Parameter Type: Mixer Fader Curve 1
Values: Minimum = 0.000000, Default = 1.000000, Maximum = 1.000000
Flags: Can Ramp, Readable, Writable
-parameter PASS
You could host this AU (just masquerade this as a stereo-stereo
effect) - you'll just have to make sure you ramp the volume say on
the input scope (not global which is the normal scope for effects)
Bill
--
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