improvements to documentation

This commit is contained in:
Tom Williams
2022-12-21 15:07:14 +00:00
parent 785a857ca8
commit 9f00f9159a
4 changed files with 93 additions and 48 deletions

View File

@@ -59,7 +59,7 @@ Get the weight value in the mixer. The second argument should
correspond to the values shown by the --display-unit command. Values
can range from -127db to +128db with the special value -inf for mute.
--set-mixer-souces mixer_id, dst_channel_id, src_channel_id
--set-mixer-source mixer_id, dst_channel_id, src_channel_id
Allows the selection of the mixer inputs. Sets mixer input (dst) to src

View File

@@ -51,9 +51,11 @@
// version defs
//#include "version.h"
// libwn.h pulls in windows.h
#include "libwn.h"
// TUSBAUDIO driver API
#include "tusbaudioapi.h"
#include "TUsbAudioApiDll.h"
#endif // __global_h__

View File

@@ -4,14 +4,6 @@
#include "usb_mixer.h"
#include "global.h"
//########## Thesycon .dll ##########
// libwn.h pulls in windows.h
#include "libwn.h"
// TUSBAUDIO driver API
#include "tusbaudioapi.h"
#include "TUsbAudioApiDll.h"
//driver interface
TUsbAudioApiDll gDrvApi;

View File

@@ -104,76 +104,127 @@ The main requirements of this control utility are to
Whilst using the XMOS Host control example application, consider the example of setting the
mixer to perform a loop-back from analogue inputs 1 and 2 to analogue outputs 1 and 2.
.. note::
The command outputs shown are examples, actual output will depend on the mixer configuration.
Firstly consider the inputs to the mixer. The following will displays which channels are mapped
to which mixer inputs::
./xmos_mixer --display-aud-channel-map 0
$ ./xmos_mixer --display-aud-channel-map
Audio Output Channel Map
------------------------
0 (DEVICE OUT - Analogue 1) source is 0 (DAW OUT - Analogue 1)
1 (DEVICE OUT - Analogue 2) source is 1 (DAW OUT - Analogue 2)
2 (DEVICE OUT - SPDIF 1) source is 8 (DAW OUT - SPDIF 1)
3 (DEVICE OUT - SPDIF 2) source is 9 (DAW OUT - SPDIF 1)
$ _
This displays which channels are mapped to which outputs. By default all
of these bypass the mixer.
The following command will displays which channels could possibly be mapped to mixer inputs. Notice
that analogue inputs 1 and 2 are on mixer inputs 10 and 11::
./xmos_mixer --display-aud-channel-map-sources 0
$ ./xmos_mixer --display-aud-channel-map-sources
Now examine the audio output mapping using the following command::
Audio Output Channel Map Source List
------------------------------------
./xmos_mixer --display-aud-channel-map 0
0 (DAW OUT - Analogue 1)
1 (DAW OUT - Analogue 2)
2 (DAW OUT - SPDIF 1)
3 (DAW OUT - SPDIF 2)
4 (DEVICE IN - Analogue 1)
5 (DEVICE IN - Analogue 2)
6 (MIX - Mix 1)
7 (MIX - Mix 2)
$ _
This displays which channels are mapped to which outputs. By default all
of these bypass the mixer. We can also see what all the possible
mappings are with the following command::
Using the indexes output from the previous command, we will now map the first two mixer outputs to physical outputs 1 and 2::
./xmos_mixer --display-aud-channel-map-sources 0
We will now map the first two mixer outputs to physical outputs 1 and 2::
./xmos_mixer --set-aud-channel-map 0 26
./xmos_mixer --set-aud-channel-map 1 27
$ ./xmos_mixer --set-aud-channel-map 0 6
$ ./xmos_mixer --set-aud-channel-map 1 7
$ _
You can confirm the effect of this by re-checking the map::
./xmos_mixer --display-aud-channel-map 0
$ ./xmos_mixer --display-aud-channel-map
Audio Output Channel Map
------------------------
0 (DEVICE OUT - Analogue 1) source is 0 (MIX - Mix 1)
1 (DEVICE OUT - Analogue 2) source is 1 (MIX - Mix 2)
2 (DEVICE OUT - SPDIF 1) source is 8 (DAW OUT - SPDIF 1)
3 (DEVICE OUT - SPDIF 2) source is 9 (DAW OUT - SPDIF 1)
$ _
This now derives analogue outputs 1 and 2 from the mixer, rather than directly from USB. However,
since the mixer is still mapped to pass the USB channels through to the outputs there will be no
functional change.
The mixer nodes need to be individually set. They can be displayed
The mixer nodes need to be individually set. The nodes in mixer_id 0 can be displayed
with the following command::
./xmos_mixer --display-mixer-nodes 0
$ ./xmos_mixer --display-mixer-nodes 0
To get the audio from the analogue inputs to outputs 1 and 2, nodes 80
and 89 need to be set::
Mixer Values (0)
----------------
./xmos_mixer --set-value 0 80 0
./xmos_mixer --set-value 0 89 0
Mixer outputs
1 2
DAW - Analogue 1 0:[0000.000] 1:[ -inf ]
DAW - Analogue 2 2:[ -inf ] 3:[0000.000]
DAW - SPDIF 1 4:[ -inf ] 5:[ -inf ]
DAW - SPDIF 1 6:[ -inf ] 7:[ -inf ]
AUD - Analogue 1 8:[ -inf ] 9:[ -inf ]
AUD - Analogue 2 10:[ -inf ] 11:[ -inf ]
$ _
To get the audio from the analogue inputs to outputs 1 and 2, mixer_id 0 node 8
and node 11 need to be set to 0::
$ ./xmos_mixer --set-value 0 8 0
$ ./xmos_mixer --set-value 0 11 0
$ _
At the same time, the original mixer outputs can be muted::
./xmos_mixer --set-value 0 0 -inf
./xmos_mixer --set-value 0 9 -inf
$ ./xmos_mixer --set-value 0 0 -inf
$ ./xmos_mixer --set-value 0 3 -inf
$ _
Now audio inputs on analogue 1/2 should be heard on outputs 1/2.
Now audio inputs on analogue 1 and 2 should be heard on outputs 1 and 2 respectively.
As mentioned above, the flexibility of the mixer is such that there will be multiple ways to create
a particular mix. Another option to create the same routing would be to change the mixer sources
such that mixer 1/2 outputs come from the analogue inputs.
.. As mentioned above, the flexibility of the mixer is such that there will be multiple ways to create
.. a particular mix. Another option to create the same routing would be to change the mixer sources
.. such that mixer outputs 1 and 2 come from the analogue inputs 1 and 2.
To demonstrate this, firstly undo the changes above (or simply reset the device)::
.. To demonstrate this, firstly undo the changes above (or simply reset the device)::
./xmos_mixer --set-value 0 80 -inf
./xmos_mixer --set-value 0 89 -inf
./xmos_mixer --set-value 0 0 0
./xmos_mixer --set-value 0 9 0
.. $ ./xmos_mixer --set-value 0 8 -inf
.. $ ./xmos_mixer --set-value 0 11 -inf
.. $ ./xmos_mixer --set-value 0 0 0
.. $ ./xmos_mixer --set-value 0 3 0
.. $ _
The mixer should now have the default values. The sources for mixer 1/2 can now be changed::
.. The mixer should now have the default values. The sources for mixer 0 output 1 and 2 can now be changed
.. using indices from the Audio Output Channel Map Source List::
./xmos_mixer --set-mixer-source 0 0 10
./xmos_mixer --set-mixer-source 0 1 11
.. $ ./xmos_mixer --set-mixer-source 0 0 4
If you re-run the following command then the first column now has "AUD - Analogue 1 and 2" rather
than "DAW (Digital Audio Workstation i.e. the host) - Analogue 1 and 2" confirming the new mapping.
Again, by playing audio into analogue inputs 1/2 this can be heard looped through to analogue outputs 1/2::
.. Set mixer(0) input 0 to device input 4 (AUD - Analogue 1)
.. $ ./xmos_mixer --set-mixer-source 0 1 5
.. Set mixer(0) input 1 to device input 5 (AUD - Analogue 2)
.. $ _
.. If you re-run the following command then the first column now has "AUD - Analogue 1 and 2" rather
.. than "DAW (Digital Audio Workstation i.e. the host) - Analogue 1 and 2" confirming the new mapping.
.. Again, by playing audio into analogue inputs 1/2 this can be heard looped through to analogue outputs 1/2::
./xmos_mixer --display-mixer-nodes 0
.. $ ./xmos_mixer --display-mixer-nodes 0