Re: AU N to M channels guideline (and Validation tool)
Re: AU N to M channels guideline (and Validation tool)
- Subject: Re: AU N to M channels guideline (and Validation tool)
- From: Bill Stewart <email@hidden>
- Date: Fri, 3 Oct 2003 12:30:15 -0700
I also checked and they aren't calling the SupportedNumChannels
property as Marc describes.
We also defined a specification for Panner units with MOTU to address
exactly the scenario described below.
Here's the details (also in the SDK for Panther):
Panner AudioUnit Specification
-------------------------------------------------------------
AudioUnit Component Description:
Component type is 'aupn' (kAudioUnitType_Panner)
Component subtype may be chosen by the implementor
Component manufacturer has its usual meaning
Input and Output Busses:
* One input and one output bus
* n_output_channels = Channel valence of output bus may be any
number >= 1, depending on the
number of speakers the panner is rendering to.
* n_input_channels = Channel valence of the input bus will
typically be input bus may be mono, stereo, or n_output_channels.
though there is no restriction here, and in general
n_input_channels <= n_output_channels
Panner Mode:
There are three modes of operation, "passthru", "fader", and
"panner".
"passthru" mode requires n_input_channels == n_output_channels
where a parameter controlling gain for each of the corresponding
channels is provided (linear gain).
In this mode, each channel of the input passes directly to the
correspoding channel of the
output scaled by the gain parameter for that channel.
In "fader" mode, each of the input channels has corresponding gain
parameters for each of the
output channels, thus there is a matrix mixing operation here.
In "panner" mode, the input (typically mono or stereo) is
distributed
to the output channels according to its specific spatialization
algorithm.
It's in "panner" mode where the developer may apply his own magic
to position the input
in the soundfield.
Properties:
In addition to the generic properties supported by all AudioUnits
(handled in AUBase), an additional
property (kAudioUnitProperty_PannerMode ) is provided to configure
the operational mode
("passthrough", "fader", or "panner"). The value for the property
will be a UInt32 defined as one
of the three constants:
enum {
kPannerMode_PassThru = 0,
kPannerMode_Fader = 1,
kPannerMode_Panner = 2
};
It should be noted that panner mode is "passthru" if and only if
n_input_channels == n_output_channels
This property will be handled in the base class AUPanner.
kAudioUnitProperty_AudioChannelLayout must also be supported for
the output bus
(since the input bus is either mono or stereo its layout is
implicit)
Default configuration:
By default, unless the AudioUnit has been configured otherwise.
The channel valence for the input is mono and
channel valence for the output is stereo. The default operation
mode is "panner" mode. And parameters have the
default values as shown in the tables.
Parameters:
The parameters available in "passthru" mode are as follows:
name units range default value
meaning
========================================================================
==============================
gain 1 linear gain 0 -> 1 1
channel one passthrough gain
.
.
.
.
gain n linear gain 0 -> 1 1
channel n passthrough gain
The parameters available in "fader" mode are as follows:
name units range default value
meaning
========================================================================
==============================
gain 1->1 linear gain 0 -> 1 1
in channel 1 to out channel 1 gain
.
.
.
.
gain 1->n linear gain 0 -> 1 1
in channel 1 to out channel n gain
(if the input is stereo then these additional parameters are
also presented)
gain 2->1 linear gain 0 -> 1 1
in channel 2 to out channel 1 gain
.
.
.
.
gain 2->n linear gain 0 -> 1 1
in channel 2 to out channel n gain
The parameters available in "panner" mode are as follows:
name units range default value
meaning
========================================================================
===============================
x generic -1 -> +1 0
rectangular coordinate left/right
y generic -1 -> +1 0
rectangular coordinate back/front
z generic -1 -> +1 0
rectangular coordinate down/up
azimuth degrees -180 -> +180 0
spherical coordinate
elevation degrees -90 -> +90 0
spherical coordinate
distance meters 0.0 -> 10000 1
spherical coordinate
coord scale meters 0 -> 10000 1
scale value for x,y,z parameters
gain linear gain 0 -> 1 1
master in/out gain
It's important to note that in panner mode two methods for
specifying coordinates are provided, one in rectangular
coordinates (x, y, z parameters) and the other in spherical
coordinates (azimuth, elevation, and
distance parameters). These two sets of parameters alias to each
other in the sense that any change
in the first set will be reflected as a change in the second set
and vice versa. The AudioUnit
is responsible for performing the appropriate coordinate
tranformations between the two systems
and the AUPanner base class will provide standard methods for doing
this. The "coord scale" parameter
allows the client to specify what the min/max values of -1 -> +1
for the x,y,z coordinates correspond to
in units of meters, in order to allow a conversion to/from
spherical coordinates.
Base class support:
A base class AUPanner (inheriting from AUBase) will provide the
common implementation for
panner AudioUnits. It will handle the parameter management
(depending on operating mode), and any coordinate
transformations. Additionally, it will provide the implementation
for both "passthru" and "fader" modes,
and handling of kAudioUnitProperty_AudioChannelLayout.
The only custom code necessary would normally only be to subclass a
rendering method to be called when in "panner" mode.
Bill
On Friday, October 3, 2003, at 10:37 AM, James Coker wrote:
>
I'm pretty certain that MOTU's mixing engine only allows certain
>
configurations
>
of plugins for mixer channel inserts, such as 1-2, 2-2, 4-4, 5-5, etc.
>
Plugins that
>
do large channel expansions (1-5, 2-10, etc) are considered to be
>
'Panning'
>
plugins, and I don't know if they support AU plugins for that use.
>
>
Jim
_______________________________________________
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.