Using the Multiplexer Capelet - BelaPlatform/Bela GitHub Wiki

This material has been superseded. Visit learn.bela.io for the maintained version.

Using the multiplexer capelet you can expand the number of analog inputs of the Bela cape up to 64. This is obtained by multiplexing each analog input, so it comes with a corresponding drop of the sample rate of the analog channels.

Examples for using the multiplexer capelet are provided for C++ (examples//09-Capelets/multiplexer_display, examples//09-Capelets/multiplexer_spectrum) and Puredata (examples/08-PureData/multiplexerCapelet).

The multiplexer capelet pins are labelled using a x.y notation, where x is the analog input channel and y is the multiplexed input on that channel. You will always use the eight analog input channels (so x always goes from 0 to 7).

When using 16 inputs (multiplexing 2x), y will be 0 or 1, e.g.:

0.0
0.1
1.0
1.1
...
7.0
7.1

When using 32 inputs (multiplexing 4x), y will be one of 0, 1, 2, 3 e.g.:

0.0
0.1
0.2
0.3
1.0
1.1
1.2
1.3
...
7.0
7.1
7.2
7.3

When using 64 inputs (multiplexing 8x), y will be one of 0, 1, 2, 3, 5, 6, 7 e.g.:

0.0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
1.0
1.1
1.2
1.3
1.4
1.5
1.6
1.7
...
7.0
7.1
7.2
7.3
7.4
7.5
7.6
7.7