M4L Device + Arduino + LCD SCREEN
Hi Guys,
I have a question concerning the capabilities of M4L. I use Ableton a lot to dj so I thought about building an Arduino driven LCD display that displays the waveforms of the tracks currently playing all at the same time. Is there any way to achieve that with M4L?
Cheers Niko
I think you would be able to do this, yes. A max for live device can talk to an Arduino via the [serial] object (I have tried this, yes, but only with the turning on/off of a LED). On the Arduino side of things you can watch for incoming data in your loop():
if(Serial.available() > 0)
{
int incoming = Serial.read();
// Do something with that incoming data.
}
So that takes care of sending data from M4L to your Arduino. There probably won't be any traffic in the other direction (from the Arduino to Max), so that could all be pretty simple.
Then for the LCD, you will want to get one of those bitmap LCD's. There's an Arduino library to talk to such a device: http://playground.arduino.cc/Code/LCDBitmap.
The tricky bit will be to get all that real time waveform data to the Arduino. You may have to thin the data a bit if it turns out to be too much. You may also have to experiment with the amount of code that's running in M4L and on the Arduino side of things. Will you bombard the Arduino with waveform data and have it parse/thin that, draw the bitmap and scroll it...? Or will M4L send bitmaps to the Arduino and is that just a drawing device? Both might work. Good luck and have fun!
Wow thanks for that nice answer! I actually thought about just replecation the waveforms as you already see them in Ableton when you click on a clip. Just that if you have to songs playing you could see the two waveforms simultaniousely and ther playback-position. So you could better preview drops and breaks and thus improvise better with music you dont know so well.
So actually M4L would probably just "draw" the entire waveform of the song one time and then it just has to update die "playback position bar".
How can i access the clips waveform? Or would you have to sort of analyze the clip via M4l and than create the waveform also via M4L. I though it might be possible to acess the "waveform ableton displays it self and just sort of copy that part of the screen over to the LCD-display:D
Cheers and thanks for alls your help!
Greetings Niko