Re: GetParameterList in ableton Live problem
Re: GetParameterList in ableton Live problem
- Subject: Re: GetParameterList in ableton Live problem
- From: "Dave Hoskins" <email@hidden>
- Date: Thu, 27 Jul 2006 19:07:56 +0100
Got it! Very obscure so I'll post it, because I still don't get it.
If I added 'kAudioUnitParameterFlag_DisplayLogarithmic' (copy and paste
additions - yeah I know) to my parameter flags I got a continuous flood of
NaN's to my AU::SetParameter function!
Is this because I don't have a 'GetParameterValueStrings' function? How
could it go so wrong.
Dave H
----- Original Message -----
From: "Dave Hoskins" <email@hidden>
To: <email@hidden>
Sent: Thursday, July 27, 2006 4:12 PM
Subject: Re: GetParameterList in ableton Live problem
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
--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.0.394 / Virus Database: 268.10.3/395 - Release Date: 21/07/2006
_______________________________________________
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