| Version 1.2 |
Requires MATLAB
6.0 (R12) or later |
|
|
 |
Graphical
User Interface for convenient allocation of (multiple)
channels to speaker locations according to the
standardised ordering in the WAVE_FORMAT_EXTENSIBLE
specification. Converts the selected speaker list
into the ChannelMask variable (in decimal, binary,
and hexadecimal formats), and returns the result
into the Workspace under the user-specified variable
name. |
|
|
| File
format: |
m-file |
|
Editable
source code:
|
yes
|
| Utilises
non-editable functions: |
no |
|
Platform:
|
PC/Windows
|
| Required
MATLAB Toolboxes: |
none
(except core MATLAB) |
| Demo
version limitations: |
p-code
only; demo banner displayed |
|
|
|
|
spkrlist2chnmsk;
|
|
spkrlist2chnmsk(ChnMskReturnName);
|
|
|
|
| Input: |
| ChnMskReturnName |
[Optional] string containing name of variable under
which the value of the ChannelMask variable is returned
to the Workspace as a structure containing fields
for decimal, binary, and hexadecimal representations.
If
not specified, the default variable name "ChannelMask"
is assumed.
|
|
| |
|
|
|
See
the M-Pack 1 overview
for a discussion of the WAV_FORMAT_EXTENSIBLE format.
The
ChannelMask property is a method for deterministically
linking channel numbers (in a multichannel WAV file
or device) to speaker locations thereby providing
consistency in defining the order in which the channels
are laid out in the audio file. Several external standards
have been compiled by Microsoft into the following
default channel ordering list:
|
Speaker Location |
Hexadecimal
value |
Binary
bit number |
Decimal
value |
| Front
Left -- FL |
'1' |
1 |
1 |
| Front
Right -- FR |
'2' |
2 |
2 |
| Front
Center -- FC |
'4' |
3 |
4 |
| Low
Frequency -- LF |
'8' |
4 |
8 |
| Back
Left -- BL |
'10' |
5 |
16 |
| Back
Right -- BR |
'20'
|
6 |
32 |
| Front
Left of Center -- FLC |
'40' |
7 |
64 |
| Front
Right of Center -- FRC |
'80' |
8 |
128 |
| Back
Center -- BC |
'100' |
9 |
256 |
| Side
Left -- SL |
'200' |
10 |
512 |
| Side
Right -- SR |
'400'
|
11 |
1024 |
| Top
Center -- TC |
'800' |
12 |
2048 |
| Top
Front Left -- TFL |
'1000' |
13 |
4096 |
| Top
Front Center -- TFC |
'2000'
|
14 |
8192 |
| Top
Front Right -- TFR |
'4000'
|
15 |
16384 |
| Top
Back Left -- TBL |
'8000' |
16 |
32768 |
|
Top Back Center -- TBC |
'10000' |
17 |
65536 |
| Top
Back Right -- TBR |
'20000' |
18 |
131072 |
|
Reserved location |
'80000000' |
31 |
2147483648 |
| All
layouts supported |
'FFFFFFFF'
|
32 |
4294967296
|
The
ChannelMask field in the WAV file indicates which
channels are present in the multichannel stream. The
least significant bit corresponds with the Front Left
speaker, the next least significant bit corresponds
to the Front Right Speaker, and so on, continuing
in the order defined in the table above. The channels
specified in the ChannelMask must be present in the
prescribed order (from least significant bit up).
In other words, if only Front Left and Front Center
are specified, then Front Left should come first in
the interleaved stream.
Ref[1]:
"Enhanced
Audio Formats For Multi-Channel Configurations And
High Bit Resolution" Windows Multimedia Group Microsoft
Corporation, 1999.
|
|
|
|
|
|
|
|
|
The
following examples show the speaker list and corresponding
ChannelMask
values for a range of popular multichannel layouts:
| "3.1
Surround Sound Format" |
|
Channel
order:
|
Front
Left, Front Right, Front Center, Low Frequency |
|
ChannelMask
(binary):
|
'1111'
|
|
(hexadecimal):
|
'F' |
|
(decimal):
|
15 |
| |
|
| "5.1
Surround Sound Format": |
|
Channel
order:
|
Front
Left, Front Right, Front Center, Low Frequency, Side
Left, Side Right |
|
ChannelMask
(binary):
|
'11000001111'
|
|
(hexadecimal):
|
'60F' |
|
(decimal):
|
1551 |
| |
|
| "6.1
Surround Sound Format": |
|
Channel
order:
|
Front
Left, Front Right, Front Center, Low Frequency, Side
Left, Side Right, Back Center |
|
ChannelMask
(binary):
|
'11100001111'
|
|
(hexadecimal):
|
'70F' |
|
(decimal):
|
1807 |
| |
|
| "7.1
Surround Sound Format": |
|
Channel
order:
|
Front
Left, Front Right, Front Center, Low Frequency, Side
Left, Side Right, Back Left, Back Right |
|
ChannelMask
(binary):
|
'11000111111'
|
|
(hexadecimal):
|
''63F' |
|
(decimal):
|
1599 |
| |
|
| Simple
stereo pair: |
|
Channel
order:
|
Front Left, Front Right |
|
ChannelMask
(binary):
|
'11' |
|
(hexadecimal):
|
'3' |
|
(decimal):
|
3 |
| |
|
| Simple
quadraphonic (four-corner): |
|
Channel
order:
|
Front Left, Front Right, Back Left, Back Right |
|
ChannelMask
(binary):
|
'110011' |
|
(hexadecimal):
|
'33' |
|
(decimal):
|
51 |
| |
|
| Un-ordered
multichannel layout: |
|
Channel
order:
|
Arbitrary speaker arrangement. No prescribed channel
mapping. |
|
ChannelMask
(binary):
|
'0' |
|
(hexadecimal):
|
'0' |
|
(decimal):
|
0 (specially reserved for this un-ordered case) |
| |
|
|