Re: GetParameterList in ableton Live problem
Re: GetParameterList in ableton Live problem
- Subject: Re: GetParameterList in ableton Live problem
- From: William Stewart <email@hidden>
- Date: Thu, 27 Jul 2006 16:01:14 -0700
Why are you calling AUEventListenerNotify? There's absolutely no need
for your AU to be calling this code - especially in SetParameter?
On 27/07/2006, at 8:12 AM, Dave Hoskins wrote:
I've tried posting my AUval output but it bounces back as it goes
over the 12K posting limit! So just the parameter list then gives:-
Parameter ID:0
Name: Wet gain
Parameter Type: Generic
Values: Minimum = 0.000000, Default = 0.000000, Maximum = 1.000000
Flags: Display Logarithmic, High Resolution, Readable, Writable
-parameter PASS
Parameter ID:1
Name: Dry gain
Parameter Type: Generic
Values: Minimum = 0.000000, Default = 0.000000, Maximum = 1.000000
Flags: Display Logarithmic, High Resolution, Readable, Writable
-parameter PASS
Parameter ID:2
Name: Wall absorb
Parameter Type: Generic
Values: Minimum = 0.000000, Default = 0.000000, Maximum = 1.000000
Flags: Display Logarithmic, High Resolution, Readable, Writable
-parameter PASS
.........................................e.t.c.
Passes for all.
My GUI is crapped out because my AUParameter Listener is getting
NaN's for its 'inValue' which it's passing on.
I set my parameters like this:-
ComponentResult EffectBaseAU::SetParameter(AudioUnitParameterID
iID, AudioUnitScope iScope, AudioUnitElement iElem, Float32 rValue,
UInt32 iSchedule)
{
if (iScope==kAudioUnitScope_Global && iElem==0)
{
pDSP->setParameter(iID, rValue); // Set the wrapped DSP vars.
// set up an AudioUnitParameter structure with all of the
necessary values
static AudioUnitParameter dirtyParam;
memset(&dirtyParam, 0, sizeof(dirtyParam)); // zero out
the struct
dirtyParam.mAudioUnit = GetComponentInstance();
dirtyParam.mParameterID = iID;
dirtyParam.mScope = kAudioUnitScope_Global;
dirtyParam.mElement = (AudioUnitElement)0;
AUParameterListenerNotify(NULL, NULL, &dirtyParam);
return noErr;
}
return AUBase::SetParameter(iID, iScope, iElem, rValue, iSchedule);
}
I'm only getting these NaN's from Live, everything else seems quite
happy including AudioUnitHosting.
But other AU's work with automated params in Live, do I need to set
anything else along with the GetParameterList?
Cheers,
Dave Hoskins
www.quikquak.com
======================================================================
=================
----- Original Message ----- From: Dave Hoskins
To: CoreAudio API
Sent: Tuesday, July 25, 2006 10:16 PM
Subject: GetParameterList in ableton Live problem
Hi, I've implemented a GetParamterList which looks like it enables
the parameter control drop down menus in Live - all my variables
are displayed correctly. I've debugged it and it appears to return
the size (47) first then duly allocate the block for the list is
the AU dispatch code.
The problem is that it completely messes up my GUI, with weird
lines everywhere and NaN variables displayed. Has anybody had this
problem that can help? This is the single bit of code that seems to
cause havoc..
ComponentResult EffectBaseAU::GetParameterList(AudioUnitScope
iScope, AudioUnitParameterID* asIDList, UInt32& riNum)
{
// Returns the parameter list.
if (iScope==kAudioUnitScope_Global)
{
if (asIDList)
{
for (UInt32 i=0; i < TAGnumParams; i++) asIDList[i]=i;
}
riNum = TAGnumParams;
return noErr;
}
return AUBase::GetParameterList(iScope, asIDList, riNum);
}
cheers,
Dave Hoskins
www.quikquak.com
_______________________________________________
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