This tutorial describes how to build a DIY controller for the Voice Reaping Machine. As this controller is intended to replicate the controls of the Boss RC-1, it supports four types of events:
- Simple Press button;
- Press button twice (in less than a second);
- Press & Hold (during 2 seconds);
- Knobs events (both 'persistence' and 'phasing').
Materials & Steps
The circuit is looks like the following:
As materials, we are going to need:
- A 5v Arduino;
- A Bluefruit board (Bluefruit LE UART Friend);
- A button;
- Two 10k potentiometers with plastic knobs;
- One 10k resistor (you can find such resistor inside a resistor kit like this one);
- A bunch of jumpers;
- A battery snap holder;
- A rocker switch.
That said, these are the steps to get the 'pedal' working:
- Get started on Arduino;
- Bluetooth BLE board (Bluefruit & Arduino);
- MIDI on Arduino;
- MIDI BLE from Arduino to a Mobile;
- Connect the button;
- Connect the two potentiometers;
- Connect battery and rocker switch;
- Writing the Arduino code;
- Test the circuit with the VRM app;
- Record a video of the prototype;
Each step is detailed in the following subsections.
Get started on Arduino!
Because there was no cable (get it ASAP!), decided to use my old Arduino Uno (still working!) instead of the brand new Arduino Micro. I also updated Arduino's IDE software.
Bluetooth BLE board
First, I soldered the connectors into the board. Then, I tested to see if the module was working all right by following the tutorial here.
In short, you'll need:
Setting Adafruit's BLE on Arduino
For this I used this tutorial.
The tutorial is effective, covering things such as configuring the board; sketch examples (e.g. using AT commands from your computer to the board). By the end, you'll hopefully get your arduino, your BLE board, and you computer via serial port!
PS: Detailed documentation of AT commands can be found here.
Testing the BLE with a tablet/smartphone
You can test communication with your Android/iOs doing as demonstrate in this video.
Midi on Arduino
Sidenote: If I was to synthesize these notes on the computer, we would need someone like the Hairless MIDI to route messages from serial to your MIDI synth. For my purposes, won't bother doing that.
MIDI BLE from Arduino to a Mobile
Afterwards, my goal moved towards replicating the same 'MIDI on Arduino' example now over BLE to a mobile device, which will synthesize the notes.
It wasn't hard. The default MIDI example available on the Adafruits'BLE library seemed to have worked (almost) out-of-the-box:
- Inside the code, I needed to adjust the configurations to use Software Serial (I have an Arduino Uno);
- Also needed to use Adafruit's BLE connect app to connect to the board;
- To route the MIDI to GarageBand, I used the MidiMttr app.
I think that was all. The sketch used is available here.
Sidenote 1: Very often, I get errors when uploading the sketches to the board. These errors differ: Sometimes I get "Couldn't factory reset"; Sometimes, I get "Could not enable MIDI". Sometimes, fortunately, it works fine (i.e. "waiting for a connection"). Need to study why that happens.
Sidenote 2: Need to study how to make the BLE connection more reliable & straightforward (e.g. no need of external Adafruit's or MidiMttr app).
Connecting the button
Regarding Arcade buttons I use, there are two pairs of connectors: one pair for controlling the LEDs, another for using the button itself. For the LED connectors, specification says there is no need to use resistors so that it is possible to connect the button directly to the 5v and GND (these have built-in 1k resistors). For the button, you can follow this basic tutorial in order to read the button inside Arduino. Here, I used a 10k resistor.
I've modified this demo to work with the LEDs: if the button is pressed, the LED will light up. The code is here.
Connect the potentiometers
Connect battery and rocker switch
Simple as this!
Writing the Arduino code
Once done with the hardware part, it's time to code a Arduino Sketch that will combine all previous points MIDI BLE, the button, and the potentiometers.
The resulting Arduino Sketch is available here.
Test the circuit with the VRM app
After some updates in the source code, and some fine tuning so that the visuals could match the physical controls, I was able to test this circuit with the VRM app! ;)
The final result can be watched in this video. Have fun! ;)
Update: Port to USB
In order to remove intermediary software (Adafruit's BLE connect app) and simplify power supply, I've decided to replace the BLE module by standard USB connection.
My case, in short:
- Get an MIDI-over-USB compatible Arduino (in my case, the Arduino Micro);
- Test the device with the 'Blink' example;
- Install the MIDIUSB library, available in Arduino IDE library manager;
- Use this sketch here as a test.
And we are ready to go! ;)