I’m a final year product design student working on a project that will allow users to control various parameters in pre-recorded music.
My project is a handheld device that will allow users to listen to and control 5 different parameters: tempo, reverb, band-pass filter, bass/treble and music looping. These parameters will be controlled through squeezing the device and different gestural motions. For my project I need to build a tech rig to prove my concept. Through following some tutorials on YouTube, I have successfully managed to make changes to bass/treble, reverb and the band-pass filter parameters in Ableton Live using potentiometers combined with the Firmata library. But to further prove my concept, I need to use a Gyroscope/Accelerometer. I have tried using a ADXL335 module, but it doesn’t seem to communicate with Ableton. Is the ADXL335 the right module to use or do I need a different gyroscope/accelerometer module? Do I need to hack Firmata or do I need to use a different code?
I have had some success with Arduino back in my second year, but I am not a confident user. I do not have an official Arduino board, I have an ELEGOO UNO R3 Board which I bought from Amazon. I also have a Kuman starter kit which was supplied to me by my university.
Do I need to hack Firmata or do I need to use a different code?
Well I am not a great fan of Firmata, it simply turns the Arduino into an input / output machine. However the ADXL335 simply has three analogue outputs so you should be able to just connect it to three analogue inputs and read them with Firmata. But an analog read returns a value between 0 and 1023, so you can’t simply send that to Ableton you have to get it into the range 0 to 127.
However you can’t power this through 5V you have to use the 3V3 output. In fact connecting it to 5V could damage it.
As you have not said much of what you have done I can’t say where you have gone wrong.
So far I have connected two potentiometers to A1 and A2 on the Elegoo board, using 5V. This works and I am able to control selected parameters on Ableton. I followed this tutorial: Make An Arduino Analog Controller for Ableton Live - YouTube
When using the ADXL335, I have connected the X,Y and Z outputs to A0, A1 and A2. The power to 5v and the Gnd to Gnd. On Ableton, this causes the parameter to be locked in place, unmovable, and tilting the the gyroscope has no effect. The MIDI mapping on Ableton still works because when a parameter is mapped to say, the A0 port, it grays out.
Little update. I have since put the power source to 3.3V instead of 5v. It now works, and Ableton is reading the accelerometer data through firmata. But this is from waving it around. The next step is to be able to hold the parameter changes in place. For the project I'm doing, I'm hoping to use the method of squeezing to do this. For example, squeezing the device and moving it forwards will increase the tempo, releasing from the squeeze will set the tempo change in place.