PDA

View Full Version : Audio Unit Validation Failed: needs 'Meta Param Flag'


cerberus
09-23-2010, 03:44 AM
i'm encountering the very same error that is discussed at these three links :

http://www.kvraudio.com/forum/viewtopic.php?t=225445&view=next
http://lists.apple.com/archives/coreaudio-api/2008/Feb/msg00147.html
http://www.rawmaterialsoftware.com/viewtopic.php?f=8&t=4548

----

is there a way to fix this error in iplug?

DukeRoodee
09-28-2010, 09:20 AM
Hi Cerberus,

i did it like this:
- I enhances IPlug by a list of alternative Parameters, which can be connected to a GUI control, but are not part of the normal, automated VST/AU Parameter list. Just a new list, the host will not see this parametes, ok ? Its some effort to make all Controls work also with alternative parameters.

-Then, thereīs a new
virtual void OnParamChange(IParam* param) { IMutexLock lock(this); }
method in the IPlugBase, which will be called when such an alternative parameter value is modified by its connected GUI control.
This is also useful when you simply want to respond to button clicks.
(Such things are usually not VST/AU parameters)

Until here, all VST/AU parameters are completely independent from each other (this is what you want to have, right?).

If you want to set vst/au parameter values dependent of other parameter values, just define an alternative parameter, connect it to a GUI control and then set the "depending" vst/au parameters within the derived virtual void OnParamChange(IParam* param) method.
The AU validation will only find the au parameters which are independent from each other and will not throw the warnings.

I can give you my sources of IPlug if this solution is of interest for you..just drop me a line.

-




i'm encountering the very same error that is discussed at these three links :

http://www.kvraudio.com/forum/viewtopic.php?t=225445&view=next
http://lists.apple.com/archives/coreaudio-api/2008/Feb/msg00147.html
http://www.rawmaterialsoftware.com/viewtopic.php?f=8&t=4548

----

is there a way to fix this error in iplug?

cerberus
09-29-2010, 07:31 AM
hi duke; i'm not sure about "alternative parameters".. i tried something like that already:
to hide some parameters from the host, see here: http://forum.cockos.com/showthread.php?t=50081&highlight=hide
... but it did not work at all for me (nor others, it seems).

Until here, all VST/AU parameters are completely independent from each other (this is what you want to have, right?). by design, some parameters do change the state or
value of other parameters. my plug-in is apparently stable, and the controls function correctly
in every host, even logic (once i add a single line of code to short-circuit the au-val test).

the issue here for me seems to be -only- with au validation.
i don't think it is reasonable for anyone to need to make major architectural changes to their design simply to accomodate the au validation test. it would be nice to pass, but do i need to? perhaps it's ok to cheat this test? perhaps nothing is wrong with my code?

{ IMutexLock lock(this); }

i need to google " what is "mutex"?

otherwise i won't understand this part of your reply...

thanks for your attention!

DukeRoodee
09-29-2010, 08:48 AM
Hi :-)

>>i tried something like that already:
to hide some parameters from the host, see here: http://forum.cockos.com/showthread.p...highlight=hide ... but it did not work at all for me (nor others, it seems).<<

Didnīt work for me either...

>>i don't think it is reasonable for anyone to need to make major architectural changes <<
No of course not. If you plugin works, why should you ?
Itīs just that this is the only way I could think of to get around that validation error, in IPlug.
And besides, i think that its just Apple who likes to see the parameters independent from each other. Personally, i like the idea, but on the other side.... your code works, donīt touch it ! ;-)

I did this thing mostly because i have some buttons on the gui which i dont want to connect to a IParam that is known to the host. I donīt want it to be automatable... Instead i want just to respond to a button click with, lets say, a FileDialog or so. Thats why i implemented this.
(But you COULD use this to get around the validation error ;-)

>>i need to google " what is "mutex"? <<
forget about that, itīs just a copy of the original OnParamChange() implementation... you would override it anyway with a code like

if( param = myWhatsoEverParameter) {
...do something
}

best,
Rudi

cerberus
09-29-2010, 01:59 PM
thanks rudi;

i'm still very interested in seeing if i can hide parameters from the slider view and the
host's automation, if it worked for you and you can show me how...thanks again for
your help and advice.

Tale
09-30-2010, 01:21 AM
If you don't want the host so see certain parameters, then simply don't report them as VST parameters. Of course this does mean that they won't have a paramIdx value, so you need to do some extra work to "link" them to your GUI controls. Also, you will need to (un)serialize the values of these "hidden parameters" yourself.

cerberus
09-30-2010, 03:17 AM
(un)serialize... is a gap in my knowledge. could you suggest what to study to learn about it?

schwa
09-30-2010, 05:53 AM
Does your plugin have parameters (knobs) that when the user moves them, other parameters (knobs) also move? It sounds like AU validation tests for this and if it happens, requires than those parameters be marked in a special way, so the host knows that moving one knob can affect other knobs.

That's all just guesswork, I can't find any documentation for it. If this is the right explanation, a simple fix might be just be to add

| kAudioUnitParameterFlag_IsElementMeta

to the kAudioUnitProperty_ParameterInfo handler in IPlugAU.cpp (line 422 in my copy). That would mark all parameters as "special", which isn't quite right, but should at least get it to pass validation.

A more thorough fix would be to add IParam::SetMeta(bool) and bool IParam::IsMeta(), so the plugin can mark specific parameters as meta-parameters (meaning knobs that move other knobs), and in the same place in IPlugAU.cpp, do

if (pParam->IsMeta()) pInfo->flags |= kAudioUnitParameterFlag_IsElementMeta;

cerberus
09-30-2010, 11:35 AM
Does your plugin have parameters (knobs) that when the user moves them, other parameters (knobs) also move? yes. mostly hiding/showing and graying out.. and a few value changes to display bitmap frames.

----

thank you schwa! the first (simple) fix did immediately work.

i will try the more thorough fix soon.


---- my question re: observer class would be: i'd like the plug-in to be aware when
a value is entered using the keyboard. (not just that a key was pressed).