Re: Paremeter changes by the user
Re: Paremeter changes by the user
- Subject: Re: Paremeter changes by the user
- From: Aristotel Digenis <email@hidden>
- Date: Thu, 17 Jun 2004 18:13:37 +0100
Hello Bill and thank you for your reply.
That is starting to make things clearer but I still have a few questions
I would like to understand. Since the UI calls the SetParameter function
automatically. So this would mean that I need to override/redefine the
SetParameter function so that there is a switch command to check which
parameter has been updated and update the coresponding variable.
In the header file I wrote the following(I got this from AUEffectBase.h):
/virtual void SetParameter(UInt32 paramID, Float32 value)
{
Globals()->SetParameter(paramID, value);
}/
This compiles fine. I then changed it to:
/virtual void SetParameter(UInt32 paramID, Float32 value);/
and wrote the following in the implementation file:
/void SetParameter(UInt32 paramID, Float32 value)
{
Globals()->SetParameter(paramID, value);
}/
Now it won't compile because it doesn't understand "Globals".
"BProc.cpp: In function `void SetParameter(long unsigned int, float)':
BProc.cpp:275: error: `Globals' undeclared (first use this function)
BProc.cpp:275: error: (Each undeclared identifier is reported only once
for each function it appears in.)
...failed CompileCplusplus
/Developer/Examples/CoreAudio/AudioUnits/BProc/build/BProc.build/BProc.build/Objects-normal/ppc/BProc.o
..."
Also, what is Globals? And how is this function defined when it just
recursivly calls itself over?
I tried to comment out the line with the Global statment and it still
won't compile but this time for the following reasons:
"ld: Undefined symbols:
BProc::SetParameter(unsigned long, float)
...failed DynamicLibrary.LinkUsingFileList
/Developer/Examples/CoreAudio/AudioUnits/BProc/build/BProc.component/Contents/MacOS/BProc
..."
I have been trying to figure this out myself so that I avoid asking some
stupid/obvious question on the mailing list and waste people's time on
somehting I should have figured out. Unfortunately I have read the
documentation, tried to get this working and more importatnly understand
how it works but have had no luck ( and reached a point of extreme
frustration). So I am making some major and obvious mistake, sorryyyy.
Does anybody see the answer to my confusion? I so hope I am making a
small misunderstanding. Thanks in advance!
PS:I must say, the documentation for VST's is easier and so is their
mailing list search feature. Here when searching the mailing list it
gives the results in a very hard to read format, and worst of all in
non-chronological order. So you read one post, and then spend 10 minutes
looking for the reply or previous post, and by that time you have
forgotten the first thing you read.
William Stewart wrote:
>
>
>
On 16/06/2004, at 9:31 AM, Aristotel Digenis wrote:
>
>
Hello,
>
>
I have recently started to learn programming for AudioUnits. I
>
have been using the SampleEffectUnit example that comes with the
>
SDK to make a few changes and experiment with things. I have now
>
come to an absolute state of confusion.
>
>
I have a parameter on the default GUI with a range between 0.0 and
>
1.0 with the default value at 0.0. I would like to make a simple
>
gain effect for the sake of learning about parameter control. I
>
have declared a "gainValue" float and i want when the slider is
>
moved, that value to be passed to the "gainvalue" float. gainValue
>
will be used in the processing section of the code to apply it to
>
the samples as amplitude (sample = sample * gainValue).
>
>
Does the getParameter() function automatically get called when the
>
user moves a slider in the default GUI just like it happens in
>
VSTs? Having read the documentation of the SDK it seems I need to
>
use Listeners. And this is where it gets confusing. There is a
>
list of listener related functions int eh documentation, then
>
there posts in this mailing lists which suggest the API is
>
changing to a new method of dealing with events. then there is the
>
AUPropertiesPostPanther.h file which seems to play a role in this
>
change, yet I cannot compile my code if that header is included (
>
i get tons of errors).
>
>
Could somebody explain how the AudioUnit knows when a slider has
>
moved?Is it event listener? or parameter listener?
>
>
>
The UI calls your Audio Unit's SetParameter call, to set the new value
>
of a parameter. Your AU doesn't need to know anything about listeners
>
- that is for host-UI communication (at least in this case)
>
>
All that your AU does in its Render call is to get the current value
>
of the parameter and apply it - thus, you'd get the value of the gain
>
parameter.
>
>
You'd need to make sure that the AU is publishing the parameter
>
correctly - so I'd suggest the first thing to do is to run the
>
AUValidation Tool on the AU that you've made - you can see there that
>
the parameter is published, etc... (The AUV can be downloaded from
>
http://developer.apple.com/audio)
>
>
Bill
>
>
Thank you in advance
>
>
--
>
Aristotel Digenis
>
email@hidden
>
http://www.digenis.ws
>
_______________________________________________
>
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.
>
>
>
--
>
mailto:email@hidden
>
tel: +1 408 974 4056
>
>
__________________________________________________________________________
>
>
Culture Ship Names:
>
Ravished By The Sheer Implausibility Of That Last Statement [GSV]
>
I said, I've Got A Big Stick [OU]
>
Inappropiate Response [OU]
>
Far Over The Borders Of Insanity And Still Accelerating [Eccentric]
>
__________________________________________________________________________
>
>
>
--
Aristotel Digenis
email@hidden
http://www.digenis.ws
_______________________________________________
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.