On Sep 23, 2008, at 2:04 PM, Pjotr kiwapta wrote:
I am quit new to AudioUnit programming. So I have followed the AudioUnit programmer guide (TremoloUnit ). Now I wanted to create an audio instrument instead of an effect. So I created an instrument based on the AudioUnit instrument template. Where AUEffectBase has implemented a SetParameter function, the AUMonotimbralInstrumentBase hasn't.
AUEffectBase just made this shortcut method to parameters in the global scope. Normally, one would inherit the full SetParameter call from AUBase to set parameters in other scopes as well.
So I looked into the code of AUEffectBase. It appears that SetParameter calls Globals()->SetParameter. So I did the same in my audio instrument. But it doesn't work. (at least the view isn't updated).
The instrument template gives an example on how to call this in the constructor method.
Are your parameters in the global scope?
Did you create the necessary elements as indicated in the constructor example?
I don't understand what I am doing wrong. I have defined the parameters. When I open the unit in AULab, the sliders for the parameters appear and work fine.
You mean in the generic view? Can you post your GetParameterInfo function?
But calling the factory presets doesn't work because Globals()->SetParameter doesn't seem to do anything.
Are you sure the parameterID's and values are correct?
Why does it work in the AUEffectBase and not in the AUMonotimbralInstrumentBase? Please help, because it is rather frustrating.
Thanks in advance.