“MIDI LED Matrix” – Diego Casillas

"MIDI LED Matrix" - Diego Casillas

“MIDI LED Matrix” – Diego Casillas

For this project I was inspired by all of the concerts I’ve gone to that had a strong visual component. I saw the band Bon Iver at the Santa Barbara Bowl about a year ago and the mood was perfectly reflected by the visuals and light show. It was so inspiring because it took the music to the next level and created a spectacle, as opposed to just a band playing on a stage. It was one of the most memorable concerts I’ve ever been to. This got me thinking about visual music when it came time to start this project. I liked the idea of controlling multiple parameters of hardware and software with one MIDI signal.

MIDI Controlled LED Matrix
by Diego Casillas

///////////////////////////MATRIX DEFINITIONS//////////////////////////
#include // Core graphics library
#include // Hardware-specific library

#define CLK 8 // MUST be on PORTB!
#define OE 9
#define LAT 10
#define A A0
#define B A1
#define C A2
#define D A3

RGBmatrixPanel matrix(A, B, C, D, CLK, LAT, OE, false);
//////////////////////END MATRIX DEFINITIONS//////////////////////////

byte incomingByte;

////////////////////////////////SETUP FUNCTION////////////////////////
void setup() {
//start serial with midi baudrate 31250
//initialize matrix
///////////////////////////END SETUP FUNCTION//////////////////////////

//////////////////////////////CORE FUNCTION////////////////////////////
void loop () {
if (Serial.available() > 0) { //if there’s serial data available
// read the incoming byte:
incomingByte = Serial.read();
if (incomingByte == 144) // If there’s a Note On, DO SHIT!
int x = (random(10));
int y = (random(10));
int z = (random(10));
matrix.fillRect(0, 0, 32, 32, matrix.Color333(x,y,z));
else if (incomingByte == 128) // Note off
matrix.fillRect(0, 0, 32, 32, matrix.Color333(0, 0, 0));

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>