This project is an audio mixer to control two parameters of an audio file using an Arduino joystick. It combines both the hardware of Arduino with the audio processing of Plugdata to achieve this goal.
This project was developed as a way to create a baseline mixer that can control audio effects such as reverb and volume using nothing but an Arduino Uno and a basic joystick. The idea came to me as I was browsing the internet for an analog mixer and noticed how expensive they can be. With this project, one can have a physical device to control the mix of multiple audio tracks for roughly $20-30 CAD. I also thought it would be interesting to create a simple way to mix audios from my A Cappella group (the Chromatones), which requires very little work once the recordings are actually gathered. These two goals combined formed the basis for the concept of this project.
The mixer is designed to achieve the following:
Modifying audio effects (such as volume and reverb) of an audio file that can be brought into PureData (mp3, wav, etc) using a joystick.
Playing multiple audio tracks simultaneously
Being able to control the audio effects of each individual track separately, with the ability to change the track seamlessly
Real-time application of the effects while the tracks are playing.
The concept was quite simple: the x-value would control the amount of reverb applied to each track and the y-value would control the amount of volume. To switch tracks, one would just need to press the button of the
This was by far the easiest part of the project. All it does it read the voltage from the pins controlled by the Arduino. It then prints the x-value, y-value and whether the button is pressed to serial every 20ms. The only issue that was encountered was the serial wasn't printing properly when the baud rate was set to 115200, but it was easily fixed when the rate was set to 9600.
The Plugdata patch is made up of three parts: the receiver, the track modifiers, and the audio players, and each one came with it's own set of challenges.
This is built off of the version of the Arduino to PD receiver seen in Week 5 of MUMT 306. It takes the data from the serial and splits it into the x-value, y-value, and if the button is pressed. It also has a track switcher for tracks 1-4 when the button is pressed. There was an issue regarding the button pressing where unless the button was pressed incredibly rapidly, it would rapidly switch tracks. This was fixed by way of the change object, which limits it to one track switch per button press. By default, it looks for port 7 for the Arduino, but this can be modified. Finally, there was one issue where the default x-value of the joystick was incorrectly set to 496, rather than 512 and the y-value would drift between a default of 511 and 512. This is a hardware issue with the specific joystick I used and can easily be modified on a case by case basis by changing the -496 and -512 to the default values of the joystick's x and y values.
This takes the track number and sends it through two different gates: one for reverb and one for volume. Every 20ms, it will check for the value of the reverb or volume sent by the joystick and set it as a multiplier on a scale from 0 to 1, with a default of 0.5. There was an issue where it would go beyond 0 and 1, but that was easily fixed by way of a clip object. There is also a bang attached to each modifier to reset the value of the respective multiplier to 0.5.
The player is made of a couple of different parts. Firstly, by hitting the bang above each player, one can import an audio file that is recognized by PD for playback. Then it sends the audio through an amplitude modifier that is controlled by the multiplier sent by the track modifier section, as well as a reverb modifier that works the same way. Finally, the audio is sent to an output object, that plays the audio. The output object is set to 0 maximum volume by default, but this can be changed by the built in horizonal slider. The player plays all available audios at the same time by pressing the toggle audio at the top of the player section. An issue that came up was once the audios were played once, the player would forget the audio until it was imported again, which was fixed by the symbol object.
Credit for the general player design comes from this video from Sound Codex on YouTube.
This demo uses audios recorded by Chromatones A Cappella members Shipra Chandane (Soprano), Nicole McAdoo (Alto), Tobias Wang (Bass), and myself (Tenor). We used our arrangement of "That Lonesome Road" in this video.
This project is a good basis for a mixer like this and it can easily be expanded to suit the needs of any project. For example, the amount of tracks can be expanded by copying the player and track modifier designs for another track, as well as adding an additional slot gate number. Another improvement that could be made is adding a second joystick to control the amount of dry vs wet reverb, as well as additional buttons to control other parameters. A specific idea that came to mind is using a USB Arduino Module to connect a video game controller, which is natively recognized by windows, as a replacement for the joystick, as it already comes with 2 joysticks, multiple buttons, and two analog triggers to control other parameters with precision. Overall, this project accomplishes my goal of a basic mixer that can be made on a budget for the purposes I envisioned it for, while also being modular and easily modifiable for expansion and other purposes others may find it useful for.
This Google Drive folder contains the .pd file, the .ino file, and 4 demo tracks used in the demo video.