Mixer Device

Sound and Music


 

A mixer device controls mixing of sounds from miscellaneous sound sources. Mixer device is component of a sound card and can vary in different sound cards.

 

bm961 mixer device

 

The mixer device element is a text variable. By reading it a multiline list of mixer device names in the system is returned. By setting one of device names into the element the selection of device which will be controlled is performed. Without performing a device selection a first found mixer device will be used.

 

bm962 destination line

 

The mixer device can control several output (destination) lines. The most frequent case is one speaker output line (reproduction) and one A/D sampler output line (recording). The destination line element allows to select controlled output line of the selected mixer device. By setting one of line names into the element the selection of the destination line will be performed. Without performing a destination line selection a first found output line (usually it will be a speaker output) will be used.

 

bm963 source line (none=only destination line)

 

Every output line can be mixed from several input (source) lines. Input lines can be controlled separately (volume level of single input lines) and in most cases an output line (global volume) can be controlled, too. The source line element returns a multiline list of source line names for the selected output line. By setting one signal name into the element the selection of the source line will be performed which will be controlled. By setting an empty text the output signal will be selected as controlled signal (it is default setting after a destination line selection).

 

bm964 type of line

 

The type of line element is a numeric variable returning a type code of the selected source line (or destination if an empty name of the source line is entered). By setting a type code into the element the line corresponding to the entered value will be searched (and set as active). Searching is performed for all lines of the mixer device, independently on destination line selected. Here are adduced typical values:

 

Output (destination) lines:

0         undefined

1         digital

2         line

3         monitor

4         speakers

5         headphones

6         telephone

7         audio (Wave In)

8         voice input

 

Input (source) lines:

$1000         undefined

$1001         digital (SPDIF-In)

$1002         line

$1003         microphone

$1004         music (MIDI)

$1005         CD

$1006         telephone (TAD-In)

$1007         PC speaker

$1008         audio (Wave Out)

$1009         AUX

$100A         analog input

 

bm965 control item

 

Every input or output line can have one or more control items. The control item element returns a multiline list of control item names for selected input or output line. By setting a control item name into the element the control item can be selected which will be manipulated.

 

bm966 type of control item

 

The type of control item element is a numeric variable returning a type code of the selected control item. By setting a control item type code the appropriate control item will be found (and set as active). Searching is performed among selected line items only. Item type code is composed from the following values:

 

Item class (mask $F0000000):

$00000000         custom class

$10000000         meter

$20000000         switch

$30000000         number

$40000000         slider

$50000000         fader

$60000000         time

$70000000         list

 

Item subclass (mask $0F000000):

$00000000         switch - boolean

$01000000         switch - button

$00000000         time - microseconds

$01000000         time - milliseconds

$00000000         list - single

$01000000         list - multiple

 

Value unit (mask $00FF0000):

$00000000         custom

$00010000         boolean

$00020000         signed

$00030000         unsigned

$00040000         decibels (in 10ths)

$00050000         percent (in 10ths)

 

Typical values of control item type:

$10010000         boolean meter

$10020000         signed meter

$10020001         peak meter

$10030000         unsigned meter

$20010001         "On/Off" switch

$20010002         "Mute" switch

$20010003         "Mono" switch

$20010004         "Loudness" switch

$20010005         "Stereo Enhanced" switch

$21010004         button

$30020000         signed number

$30030000         unsigned number

$30040000         decibel number

$30050000         percent number

$40020000         "Balance" slider

$40020001         "Pan" slider

$40020002         "QSound Pan" slider

$50030001         "Volume" fader

$50030002         "Bass" fader

$50030003         "Treble" fader

$50030004         "Equalizer" fader

$60030000         time in microseconds

$61030000         time in milliseconds

$70010000         single select list

$70010001         multiplexer (list)

$71010000         multiple select list

$71010001         mixer (list)

 

bm967 controlled channel (-1=all)

 

Some of control items allow to control more channels of the line (2 channels for sterero). Number of controlled channel for the selected control item can be selected by setting the controlled channel element (value 0, 1, ...). By setting -1 value all channels of the line will be controlled. By reading the element value the number of channels which can be controlled by the element can be found out.

 

bm968 selection of item value

 

The selection of item value element enables to select item's controlled value for list and multiple items (equalizers). By reading it a multiline text list of value names for the active control item is returned. By setting one of the name into the element the item value can be selected which will be controlled. Items with one value need not selection of a controlled value (buttons, faders).

 

bm969 value of control item (0 to 1)

 

The value of control item numeric element enables to find out and to set the control item value. The value is in range of 0 to 1. For signed items a middle value corresponds to the 0.5 number. For switches the switch-on state corresponds to the 1 value and switch-off to the 0 value. For lists individual values of the list are handled as a switch. For a single select list to switch on a new selected item only is sufficient, the other items will be turned off automatically.

 

Note: In programs and games the mixer can be used simplified. In most cases it is sufficient to select control item by setting the type of line element to the line code and the type of control item element to the item code and then control the value of control item element (the mixer selection is done automatically). For example:

Volume:        line= 4 ,                item= $50030001

Bass:                line= 4 ,                item= $50030002

Treble:                line= 4 ,                item= $50030003

Music:                line= $1004 ,        item= $50030001

Sounds:        line= $1008 ,        item= $50030001

CD:                line= $1005 ,        item= $50030001