CreativeBlocks: a Physical Audio Workstation
by tristankanitz in Circuits > Audio
19 Views, 0 Favorites, 0 Comments
CreativeBlocks: a Physical Audio Workstation
Our system consists of three blocks that can be placed on three different pads to make different combinations of samples. Each pad represents a song, and each block represents a part of a song, for example melody, drums, and vocals. Placing the vocal block on the "Hey Ya" pad will play the vocals from "Hey Ya". Each block has two knobs that changes the reverb and tempo levels of its designated sample. In future iterations, blocks will also be stackable, which expands the creative output of the physical audio workstation by playing two or more parts from the same song.
References:
Installing RPi OS: https://www.raspberrypi.com/documentation/computers/getting-started.html#installing-the-operating-system
Adding device to Colby Guest Access: https://colby.teamdynamix.com/TDClient/1928/Portal/KB/ArticleDet?ID=146945
SuperCollider on RPi: https://github.com/redFrik/supercolliderStandaloneRPI64
SC docs: https://docs.supercollider.online/
Python libraries:
- board: https://pypi.org/project/board/
- Adafruit-Blinka: https://pypi.org/project/Adafruit-Blinka/
More info on Python virtual environments: https://python.land/virtual-environments/virtualenv
Raspberry Pi pinout: https://pinout.xyz/
MPR121 tutorial: https://learn.adafruit.com/adafruit-mpr121-12-key-capacitive-touch-sensor-breakout-tutorial
Arduino Nano ESP32 User Manual: https://docs.arduino.cc/tutorials/nano-esp32/cheat-sheet/
Arduino IDE: https://www.arduino.cc/en/software/
Arduino libraries:
- OSC by Adrian Freed: https://docs.arduino.cc/libraries/osc/
- Adafruit MPR121 by Adafruit: https://docs.arduino.cc/libraries/adafruit-mpr121/
Supplies
Link to git repository for code: https://github.com/colewbennett/CreativeBlocks
Software Requirements
Git https://git-scm.com/install/
Arduino IDE https://www.arduino.cc/en/software/
Raspberry Pi Imager https://www.raspberrypi.com/software/
SuperCollider (will be installed on Raspberry Pi later; standalone application: https://supercollider.github.io/downloads)
Python on RPi
Hardware Requirements
Raspberry Pi 3 Model B https://www.raspberrypi.com/products/raspberry-pi-3-model-b/
Keyboard
Mouse
Monitor
HDMI cable
Micro USB power supply cable
Micro SD card
Micro SD card reader
Behringer U-PHORIA UMC202HD Audio Interface (or any USB audio interface) https://www.sweetwater.com/store/detail/UMC202HD--behringer-u-phoria-umc202hd-usb-audio-interface
Quarter inch jack
Speakers
Hardware per block
Arduino Nano ESP32 https://store-usa.arduino.cc/products/nano-esp32
Adafruit MPR121 https://www.adafruit.com/product/1982
2 Potentiometers https://www.adafruit.com/product/356
4-AA battery pack https://www.adafruit.com/product/3788
DC barrel power jack https://www.adafruit.com/product/373
Conductive copper tape
Preparing the Breadboard
Place the ESP32 on the breadboard.
3V3 -> red "+" power bus on the breadboard
GND (surrounded by white border) -> black "-" ground bus on the breadboard
For each component, there is test code to make sure the wiring is correct. Refer to the git repo on how to use the test code: https://github.com/colewbennett/CreativeBlocks#test-code-instructions
Wiring the MPR121
Place the MPR121 on the breadboard.
VIN -> power bus
GND -> ground bus
SDA -> A4 pin on the ESP32
SCL -> A5 pin on the ESP32
Wiring the Potentiometers and Capacitive Touch Wire
Place the potentiometers on the breadboard.
Left pin -> power bus
Middle pin -> A0 for 1st pot., A1 for 2nd pot.
Right pin -> ground bus
Pin a wire on the 0 pin of the MPR121. This will be where the system will detect touches from the conductive tape.
Wiring the Raspberry Pi
Connect the MPR121 to the Raspberry Pi as shown.
MPR121 -> RPi
VIN -> Pin 1 (3v3 power)
GND -> Pin 6 (ground)
SDA -> Pin 3 (SDA)
SCL -> Pin 5 (SCL)
More info on configuring the RPi can be found in the git repo: https://github.com/colewbennett/CreativeBlocks#raspberry-pi-os
3D Printing
Print the 3D print files attached in this step.
As you may notice, the holes in the 2nd block piece don't print perfectly, with a thin layer of material covering the holes. We had to poke holes ourselves with a pen.
Since there are 3 parts for each block, our system requires 3 blocks, and each print job takes 2-3 hours, this will take:
( 3 parts * 3 blocks ) * 2-3 hours = 18-27 hours in total. So make sure you have an ample amount of time to print everything.
Soldering the Main Prototyping Board
This step is crucial because it is a pain trying to get solder off that has already melted onto a prototyping board (believe me, I've been there).
First, solder the headers onto the board. Make sure the header pins are the same number as the components' pins. If they have more pins, you can trim them to size. Also make sure the headers are spread apart enough to fit the width of the components.
At this point, you can also solder the DC barrel power jack to the board as well.
Then, solder the wiring. You can ignore the green and white wires in the first picture for now. They will be added later. Check and double check to make sure the wires will connect the right pins once the components are in place.
Use the test code for the MPR121 to test that all the soldering done at this point is correct.
Soldering the Potentiometer Board
We will be using a second prototyping board for our potentiometers so that they will stick out farther than the other components.
First, solder the header onto the board.
Once that is complete, solder the potentiometers to the board.
Then, solder the wiring. Make sure the right wires go to the right pins. You can also solder the green and white wires from the step before at this point to connect the potentiometers to the ESP32.
Use the test code for the potentiometers to test that the potentiometer board has been soldered correctly.
The white wire that goes off frame in the photo will be used to detect touches from the conductive tape. In the most current iteration, there are three wires like this one that connect to pins 0, 1, and 2 of the MPR121. There is also another wire that connects to power, which will feed power to the bottom of the block.
System Assembly
Once you have a working system on a prototyping board, follow the instructions for setting up the software on the git repository.
Place a singular soldered block system inside a 3D printed block, making sure the potentiometers poke through the holes on the side of the block. Feed the three wires connected to the MPR121 through the top grid of the block. Feed the wire connected to power through the bottom grid. Hold the wires down using conductive tape.
At this point, you should be able to attempt the Demo Operating Instructions in the git repo. Congratulations! You are on your way to make your own musical tangible user interface!