Project tutorial

Arduino LED MIDI Controller with FL Studio © GPL3+

This project is about making an LED MINI controller using Arduino and FL Studio to synchronize between music and lights.

  • 1 comment
  • 21 respects

Components and supplies

Apps and online services

About this project

I- Introduction:

Hello my friends in this project I made a led midi controller using Arduino and fl-studio to synchronize between music and lights, in order to do that I had to made a research about midi messages witch is the most important thing in this project. I know that there are some midi libraries in Arduino that can do the work for you without any knowledge about midi messages but midi messages is a grate thing to add to your knowledge so I recommend you to search about it. I used the leds with midi messages because of that the only thing I have and can use with it so this project is not limited to leds with a batter materials you can use midi to automate robots movement or synchronize between music and fountains...

II- Explanation:

1- About the project:

This project is a very simple project, all you need to have is the basic knowledge about pwm pings and serial communication on Arduino.

2- About midi messages:

So, MIDI is a music description language in digital form also it is used for communication between musical instrumentation.

Etch midi message consist at maximum of three bytes:

The first one is the status byte and it holds information about the midi message and the other two are data bytes and they hold the data of the message

and there are a lot of types in midi messages

In our case we will use cc midi messages and they consist of three bytes. The first 4 bits of the status byte hold the value of 11 which indicate a cc midi message and the other 4 hold the number of communication channel. The first data byte holds the controller number which is in our case the led number.

The second data byte holds the controller value and it controls the brightness of the led:

3- Communication method

Usually we use a midi to usb cable to connect a midi devise to the computer

In my case it will cost a lot of money but we can use this two programs:

The first one is loop midi that will create a virtual midi devise to the system in order to connect it to fl-studio. The second one is hairless midi that will connect the virtual midi to the serial of the Arduino and debug the messages too.

4- The circuit:

The circuit is very simple, we will use 10 leds connected with pwm pins in Arduino mega in order to control the brightness. In series with 330ohm resistors:


// arduino mega PWM pins we will use with leds
int led[10]={2,3,4,5,6,7,8,9,10,11};
//cc midi messages three bytes
byte statusByte;
byte ControllerNumber;
byte ControllerValue;
//cc midi message channel 1  1011 0000
byte ccmidi = 176;

void setup(){
  //test the leds
  for(int i=0;i<10;i++){
    for(int j=0;j<255;j++){
  //start the serial into the boud rate of 115200
void loop(){
  //waite for a midi message
  while(Serial.available() <3);
  //run the function that will control the leds
void readmidi(){
    //sheck if there is any message
    if (Serial.available()){
      //store the data into the variables 
      statusByte =;
      ControllerNumber =;
      ControllerValue =; 
      //check if the message is a cc midi message
      if (statusByte==ccmidi){

        //controll the leds acording to the data bytes
        for(int i=0;i<10;i++){
          if(ControllerNumber==i+22) analogWrite(led[i],ControllerValue*2);
  //repeat until there is no message
  while (Serial.available() > 2);


Leds sercuit z0n0itlkp3


Similar projects you might like

Ondes Martenot Style MIDI Controller

Project showcase by christophemagnanb

  • 1 comment
  • 9 respects

Arduino: Continuous MIDI Controller / Keyboard

Project tutorial by abhilash_patel

  • 13 respects

XY MIDI Pad With Arduino and TFT

Project tutorial by Silvius

  • 16 respects

Unopad - Arduino MIDI Controller with Ableton

Project tutorial by Stefan Vasic

  • 9 respects

Modem Turned Into a MIDI Guitar Sort of: GuitArnet

Project tutorial by Roni Bandini

  • 1 comment
  • 4 respects

USB MIDI Adapter

Project tutorial by Dennis V

  • 11 respects
Add projectSign up / Login