Re: Multichannel AU bus names
Re: Multichannel AU bus names
- Subject: Re: Multichannel AU bus names
- From: Brian Willoughby <email@hidden>
- Date: Thu, 14 Feb 2008 10:03:46 -0800
On Feb 14, 2008, at 02:55, Martin Saleteg wrote:
I am searching in docs and sources for a place to change the
output names for the busses of multichannel plugins. In Logic 8,
if I have a long plugin name like "My Very Long Plugin", the main
stereo output shows up as "My Very" and due to limited space, the
following output buses will show the same, not very informative.
On the other hand, UltraBeat shows the extra outputs as "UB 3/4",
I would like to implement the same behavior "MVLP 3/4" for my
plugin. What do I need to do?
Martin,
I don't think I've set the bus names in any of my AUs, but it should
work the same as setting any other string. In the function which
sets the bus name, you'll have an in+out parameter for the name.
Check the length of this to determine what to set for the name you
return. In my case below, I'm setting clump names for parameters,
and I expect the available space to be a minimum of the full length
string, otherwise I return the "short" clump name. In your case, you
might continue to use "My Very Long Plugin" as the name until the
length available is less than 12 characters, meaning you might end up
with "My Very Long" in the worst case, but then return "MVLP" for
anything less than 12 characters available. In other words, you can
have very unique criteria for deciding between names returned. You
could also have more than two or three options. It depends upon how
fancy you're willing to make your code which decides. Unlike Pro
Tools RTAS, which I believe has precisely three length options,
AudioUnit API allows for any number. Just remember, you're given the
length in characters of the space available, so you must decide what
string to return based upon that.
Sorry I don't have an example specifically for setting bus names, but
if you're correctly setting them now, I don't think you'll have a
problem fitting the clump name code below into your AU.
case kAudioUnitProperty_ParameterClumpName:
{
AudioUnitParameterIDName &name = *(AudioUnitParameterIDName *)outData;
name.outName = NULL;
if (name.inID && name.inID < sizeof(kParamClumpNames)/sizeof
(kParamClumpNames[0]))
{
if (kAudioUnitParameterName_Full == name.inDesiredLength
|| CFStringGetLength(kParamClumpNames[name.inID]) <=
name.inDesiredLength)
name.outName = kParamClumpNames[name.inID];
else
name.outName = kParamShortClumpNames[name.inID];
name.outName = CFStringCreateCopy(NULL, name.outName);
}
return noErr;
}
Brian Willoughby
Sound Consulting
_______________________________________________
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