Re: AU parameter names and units
Re: AU parameter names and units
- Subject: Re: AU parameter names and units
- From: William Stewart <email@hidden>
- Date: Thu, 15 Feb 2007 12:58:35 -0800
On 15/02/2007, at 3:23 AM, Frank Schoep wrote:
Hello,
I've got two questions regarding Audio Unit development again, I'm
expanding the capabilities of my "diatonic" pitch shifter and I've
bumped into two problems.
First I have the precision of my pitch parameters: using the unit
"semi-tones" AU Lab displays values like "-0.51" or "0.11" but it
chops off any extra digits after that. If I use "cents" AU Lab
shows "-51" and "11" but chops off any decimal digits so you do not
get any extra precision it seems.
Its just a display artefact.
Is there a way to flag the parameter (different unit?) or hint AU
Lab to show more digits?
Try setting the HighResolution flag - I think that will add an extra
digit to the display
Second, I have parameters named "unison", "minor second", "fourth"
and so on to set the pitch per note. It would be very useful to be
able to add the absolute note (C, C#, F) to the parameter name, but
those depend on the value of the root note. The current parameter
layout is like this:
scale root: [ C ], [ C# ], [ D ] ... [ B ]
unison: -1200 ... +1200 Cents
minor second: -1200 ... +1200 Cents
...
major seventh: -1200 ... +1200 Cents
Is there a way to change (multiple) parameter names on the fly?
You mark the parameter that can change other parameters as a meta
parameter. You should also list the dependencies (there's a property
for describing which parameters are dependent on a meta parameter).
/*!
@struct AUDependentParameter
@abstract Used to represent a dependent parameter that can change
as a result of its parent meta-parameter
changing
*/
typedef struct AUDependentParameter {
AudioUnitScope mScope;
AudioUnitParameterID mParameterID;
} AUDependentParameter;
@constant kAudioUnitProperty_DependentParameters
Scope: any
Value Type: array of AUDependentParameter
Access: read
This property is used for parameters with the
kAudioUnitParameterFlag_IsGlobalMeta
or kAudioUnitParameterFlag_IsElementMeta flags set. Hosts
applications (and the
AudioUnitParameterListener mechanism) can interrogate this
property to determine which parameters
are dependent on a
meta-parameter.
For parameters marked with
kAudioUnitParameterFlag_IsGlobalMeta, any non-global
dependent parameters are assumed to be dependent in every
element of their scope.
For parameters marked with
kAudioUnitParameterFlag_IsElementMeta, then its dependent
parameters must all be the same scope, and are assumed to apply
only within a single element,
not to other instances of the same parameter in other elements.
That's it - the listener mechanism should take care of the rest.
I've looked into Technical Note TN2104 and the AU Programming
Guide, but both talk about parameter values and not parameter names.
http://developer.apple.com/technotes/tn2002/tn2104.html
http://developer.apple.com/documentation/MusicAudio/Conceptual/
AudioUnitProgrammingGuide/TheAudioUnitView/chapter_5_section_7.html
Thanks in advance for your help.
With kind regards,
Frank Schoep
[The attachment Diatonic Shifter.png has been manually removed]
_______________________________________________
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