Expand your Touch Boards capabilities and learn how to play a large list of audio files at random
The Touch Board comes with the preloaded code "Touch_MP3", which allows you to play 12 tracks, one for each electrode. But if you want to play more than 12 tracks, the code "Random_Touch_MP3" might help you out. You could also modify the code from this tutorial to play a large list of tracks in sequence.
Another way to play more than 12 tracks is by using more Touch Boards.
We love it when you share your projects! Post your project on Instagram, YouTube, or Twitter, and make sure to tag @bareconductive or use #bareconductive. You can also send your videos and photos to firstname.lastname@example.org so we can post them on our site for the world to see.
You will need:
- 1 x Touch Board
- 1 x USB Micro B to USB A or USB C (depending on your computer's USB port type)
- 1 x Computer running Mac OS, Windows, or Linux
Step 1 Set-up the Touch Board
If you haven't set up the Touch Board yet, please do so now by following the Touch Board set-up tutorial.
Then, select the code "Random_Touch_MP3" under
File→Sketchbook→Touch Board Examples→Random_Touch_MP3
Make sure that you have selected the right settings for the Touch Board.
Step 2 Prepare the SD card
With this sketch, we play random files from a folder when pressing an electrode. Contrary to the Touch_MP3 sketch, you don't have to give your tracks specific names. Instead, you have to create 12 folders, labeled "E0", "E1", "E2" and so on, up to "E11". Each folder is accessed when the respective electrodes are touched. In each of these folders, you can add as many tracks as you want. On the right are some examples.
Step 3 Insert SD card and touch the electrodes to test
After you have ejected the SD card, insert it into the Touch Board, connect to speakers and turn the Touch Board back on. If you now touch the electrodes, it will play a random track from the respective folder!