Tuesday, November 17, 2015

32 Capacitive Touch Sensors and Ableton Live





Hardware










The hardware is quite straightforward. Two 4067 multiplexers have a common address bus, going from Teensy 3.2 digital pins 0, 1, 2 and 3 to s0, s1, s2 and s3. Teensy 3.3v is connected to VCC on both multiplexers. Teensy ground is connected to both gnd and en on both multiplexers. Sig from multiplexer 1 goes to Teensy digital pin 23, and sig from multiplexer 2 goes to Teensy digital pin 22.

The 32 inputs across both multiplexers can be connected to conductive things, and used as capacitive sensors. 






Software 

The code is for Teensy3.x and Teensy LC, as it makes use of the TouchRead function and the Teensy's touch pins. The board should be set to USB MIDI mode in the Arduino IDE.



Download the code here: http://milkcrate.com.au/_other/downloads/arduino/touchReadMultiCC/touchReadMultiCC.ino




Data
Multiplexer 1 appears as MIDI CC1 - 16, channel 1 and multiplexer 2 appears as MIDI CC1 - 16, channel 2. This data can be easily sent to Max. An example patch is shown below.






----------begin_max5_patcher----------
630.3oc4WFtaaBCDG+yjmBj+bZD1P.xdUllpb.qF2AFjwzkzp9tO6yPJsMMw
fBoSZJRP8YG6+2ub9tqurvCssZOqA4+C+e5648xBOOvjwfW2XOTIceVAsAVF
Rv9S01GQKsSoX6Uf4ZIqlIx8aXp94DskUspBlB9h3NqVSpC0L6ohP9+papc7
7blX3hqoprcbwC2KYYJ652DtJXo+cQAlWIQlmDxpfiaBOGziVi2gC6kRi5PA
bdnAhiKNpMisWWrv7XoibnrsPwaJ34L4wSg+LbH33SR.R+xXJ8Yq2LqCANBl
jLvG9LiVNjSmfJjH.Kqs3HA1xT7fsrlJokLESdOSP2ZgQP2bYTQ9A8CvX5I3
Xfqbry3C6pZTaoRis0AS.te2AYtGis4+lPrYL.K8ej3qmK7krmPmEsW.biH7
BG.+tDt4bwWINhFx0iBRsKx7w9jSChvyBhoBiDfEqSOGKhcjEgWwLNzre6yM
etEIbvgVJb1LNjaOExTEbwHiF3BkIXXvqIQjXfH1LweYc9IjCF1Gj1s9X2Of
TL1eOlZpZkY89VWhe+2TSNqQwETEuRLXMouaMe1sK440UZzzIALY0ZyUAa15
9+9syf2XRrB98oS54p1SbP6wWP6WO0D6fZ1LIRFEYdMXvLvRi5wWP8lFQGi7
CI19OrxOXV0OwA5mbyhE9.o9BbFLxngfAWrHqmyaVXGjOYRwx3vgAyvnYR+X
GzO1c8S5qsA52VgaV0OwA8SFwkwvg7OJYD72VjgVW+DS1zIBP55ptOVAsulr
DFxE1gPGyHcSn790CM5inRc8Qkt3XqzVfaepsaHTYk9eOPzx6JvoO4WW7WPO
46ns
-----------end_max5_patcher-----------

0 comments: