MIDI for the Arduino - Reading MIDI CC Messages

Поделиться
HTML-код
  • Опубликовано: 3 июл 2024
  • Learn how to read MIDI CC messages with your Arduino then build a MIDI controlled light show as a demonstration!
    Like my videos? Please consider supporting Notes and Volts on Patreon / notesandvolts
    Visit Notes and Volts for downloads, program files, and more! www.notesandvolts.com/2015/09/...
  • ХоббиХобби

Комментарии • 91

  • @ericmuehlstein2238
    @ericmuehlstein2238 3 года назад +13

    less than 700 views?!?! these MIDI videos are the most concise and easy to understand that I've seen on the topic. Thank you!

  • @_emanmodnar
    @_emanmodnar 3 года назад +5

    I love that you go in details in how the things actually work

  • @eric.slyfield
    @eric.slyfield 4 года назад

    Brilliantly delivered information. Thank you!

  • @jakobhovman
    @jakobhovman 8 лет назад

    Great series...! Very instructional, easy to follow...and great video finish here...!

  • @freddelsaux
    @freddelsaux 4 года назад

    thanks for those precious learning, thanks for your code and channel..very useful for beginner like me, THANKS !

  • @IANBRITTOIANBRITTO
    @IANBRITTOIANBRITTO 8 лет назад +1

    thank u so much for this!! just what i needed

  • @mikehattias5837
    @mikehattias5837 6 лет назад

    EXACTLY what i needed. thank you

  • @Ratchet2
    @Ratchet2 Год назад

    Always top shelf. Thanks for sharing this.

  • @3dafex
    @3dafex 8 лет назад

    Thanks , just in time for what I was looking for !!!
    Great videos !

    • @NotesAndVolts
      @NotesAndVolts  8 лет назад

      +Omar Nelson Thanks Omar!

    • @3dafex
      @3dafex 8 лет назад

      Any ideas on how to get this setup to work via USB ?

    • @NotesAndVolts
      @NotesAndVolts  8 лет назад

      Omar Nelson For USB we will look at the Teensy. It's much better at USB than the Uno. I'm going to look at it after the MIDI for the Arduino series is finished.

    • @3dafex
      @3dafex 8 лет назад

      Awesome !
      Looking forward to seeing what's next, subscribed ...

  • @benhur9624
    @benhur9624 4 года назад

    Excellent !

  • @Gomawoyo7766
    @Gomawoyo7766 6 лет назад

    great video!

  • @TomHornOfficial
    @TomHornOfficial 7 лет назад

    GREAT!!!

  • @daholcroft
    @daholcroft 5 лет назад +1

    Great Video! I'm still getting to grips with the Arduino code, is there a way to keep the byte number the same, eg (22) but use the byte value to change from led to led?

  • @mrbjjackson
    @mrbjjackson 6 лет назад

    So useful for me. Thanks man.

    • @NotesAndVolts
      @NotesAndVolts  6 лет назад

      Thanks Ben!

    • @mrbjjackson
      @mrbjjackson 6 лет назад

      Hi Dave, I'm just starting out with all this and I wondered if you could help me with a problem.
      I've built the interface and I'm receiving MIDI from my DAW just fine. I'm using it to control LEDs in an RGB LED strip using the FastLED library.
      My plan is to use one CC channel to control the LED strip's Red brightness, one CC to control the Blue, and one to control the Green.
      I've got this working for up to two colours - with 2 CCs being automated in tracks the DAW. But as soon as I add a third CC track, the LEDs don't respond as I want them to. One of the colours won't change.
      The only thing I can think of is that the processor isn't fast enough to receive 3 different CC instructions and send them to the LEDs in time before the next CC change information comes in. Does this sound right? Or would you expect the chip to easily respond to this in time?
      If it is a speed issue can you suggest a solution? If you don't have time to write an exact reply, if could just give me a rough idea of what to google that would be super helpful. As I say, I'm very new to this.
      Thanks so much again for these tutorials Dave, really appreciate it.
      Ben

    • @mrbjjackson
      @mrbjjackson 6 лет назад

      Just an update - I've been doing some debugging and I've found that if I nudge the each controller channel in my DAW very slightly it seems to respond much better. The issue seems to be if the exact midi cc message is transmitted from the same channel at the same time. I'm guessing that's too much information hitting the serial port at the same time. Does this sound right?
      If you have any suggestions on how to combat that I'd be very interested... Thanks again.

    • @NotesAndVolts
      @NotesAndVolts  6 лет назад

      Hi Ben. Are you using a Midi Library for your Midi code or are you reading the serial port directly?

    • @mrbjjackson
      @mrbjjackson 6 лет назад

      I'm using the Midi library.

  • @intichavez2418
    @intichavez2418 8 лет назад

    Hi Dave! Awesome video!!! I tried to build that circuit... and everything is fine when my DAW sends MIDI data, but the leds don't light up

  • @hfgdebruin
    @hfgdebruin 6 лет назад +3

    Is there a way to read MIDI clock signals as well?

  • @memaxsea
    @memaxsea 6 лет назад

    Great tutorial! Can you do a video to explain how to send/ receive midi SysEx with arduino? thanks

  • @creggles2g
    @creggles2g 7 лет назад +1

    Hey There!
    I'm looking at creating my own controller for Live Lighting for my band.
    How would I go about controller RGB LEDs ?
    If you have any material on this, that'd be sweet!
    --Craig

  • @duicenasty1078
    @duicenasty1078 6 лет назад +1

    Love the videos and the closest thing to what im looking for and i hope you know how i can do it. I need to control a machine with a squencer as its the best way to write the data for the machine. I can send a midi signal to control the machine but i need to get a clock signal into the sequencer so they are in sync. In midi I think there are 24 clock messages for each quarter note (“beat”) so if you send 48 tick messages each second that corresponds to 120bpm. I have no idea how to set this up in an arduino... The pulse signal from the machine can only be a open and close circuit. Can you help?

  • @demianferiy
    @demianferiy 7 лет назад

    Hi! Your Videos are so cool!!! Can you make video about midi splitter? what should i do if i want to plug few midi devices into my sound card) ?

  • @andreas-franke
    @andreas-franke 4 года назад

    Nice! Maybe you should use Midi notes (witch LED) and velocity values (brightness) to control the LEDs. So you could play them via Keyboard. :-)

  • @mikelee1906
    @mikelee1906 4 года назад

    Great video!!! I have been working on trying to convert midi note data to led's. No conversion or drawing would be required. Simply play the tracks from finished songs and have easy light shows for every single track/song already finished.You are very close to this in the code you have written for this project. Would it just require a substitution of CC for note on? And separating by track #? Any chance you already have this code?

  • @Astron2L
    @Astron2L 2 года назад

    Great video!! My laptop does not have a MIDI port, so can I connect the MIDI input jack on the breadboard to my laptop using MIDI to USB cable?

  • @lanzevalencia6614
    @lanzevalencia6614 7 лет назад

    Just a few questions, can this project be applied in boss GT-100 controlling a Laney IRT Studio amp? I'm planning to build an amp channel switcher using the midi functions of the Boss GT-100 for amp switching of the Laney IRT Studio :)

  • @adg_tube
    @adg_tube 8 лет назад

    Great tutorial! I'm trying to implement this same sort of thing but I want to read MIDI notes and map them to some relays I have attached to digital pins on my Arduino. I've set the code up like this:
    void MyHandleNoteOn(byte channel, byte pitch, byte velocity) {
    switch (pitch){
    case 60:
    digitalWrite(R1,LOW); //Turn R1 on
    break;
    case 62:
    digitalWrite(R2,LOW); //Turn R2 on
    break;
    case 64:
    digitalWrite(R3,LOW); //Turn R3 on
    break;
    case 65:
    digitalWrite(R4,LOW); //Turn R4 on
    break;
    case 67:
    digitalWrite(R5,LOW); //Turn R5 on
    break;
    case 69:
    digitalWrite(R6,LOW); //Turn R6 on
    break;
    case 71:
    digitalWrite(R7,LOW); //Turn R7 on
    break;
    case 72:
    digitalWrite(R8,LOW); //Turn R8 on
    break;
    }
    }
    // MyHandleNoteOFF is the function that will be called by the Midi Library
    // when a MIDI NOTE OFF message is received.
    // * A NOTE ON message with Velocity = 0 will be treated as a NOTE OFF message *
    // It will be passed bytes for Channel, Pitch, and Velocity
    void MyHandleNoteOff(byte channel, byte pitch, byte velocity) {
    switch (pitch){
    case 60:
    digitalWrite(R1,HIGH); //Turn R1 off
    break;
    case 62:
    digitalWrite(R2,HIGH); //Turn R2 off
    break;
    case 64:
    digitalWrite(R3,HIGH); //Turn R3 off
    break;
    case 65:
    digitalWrite(R4,HIGH); //Turn R4 off
    break;
    case 67:
    digitalWrite(R5,HIGH); //Turn R5 off
    break;
    case 69:
    digitalWrite(R6,HIGH); //Turn R6 off
    break;
    case 71:
    digitalWrite(R7,HIGH); //Turn R7 off
    break;
    case 72:
    digitalWrite(R8,HIGH); //Turn R8 off
    break;
    }
    }
    For some reason, the only pitch that triggers a relay is 60 (middle C). Any ideas what I'm missing?
    THANKS!!

    • @NotesAndVolts
      @NotesAndVolts  8 лет назад

      +Aaron Griffin Hi Aaron. I don't see anything obviously wrong with your code. As a test, you may want to set the first case to 62 for R1 and the second to 60 for R2.
      If a 'D' note now triggers R1 you know that the keys are being read correctly and the problem may be in the other relays.
      On the other hand, if a 'C' note now triggers R2 you will know that the incoming midi is at fault.
      Good luck!

    • @sesmusician
      @sesmusician 7 лет назад

      hi, did you find the solution? i have the same problem, only that i am using servos.

  • @carlosmaranhao5637
    @carlosmaranhao5637 5 лет назад

    obrigado...

  • @morpheuz2006
    @morpheuz2006 5 лет назад

    Very Nice work... It was cooller if you can convert the cde to a Esp8266 and have the capacity of read the midi files from a file. :)

  • @SunghoHeo
    @SunghoHeo 8 лет назад

    Thank's for this great series but I have a question, how can I export the logic pro midi cc track to a midi file? I'm trying to do the same thing using my android smart phone and bluetooth.

    • @NotesAndVolts
      @NotesAndVolts  8 лет назад

      +Sungho Her Hi Sungho. This is something I haven't tried but you can export Format 0 Midi files from logic which should include all data. How your software on the phone will treat the data is something you will need to explore. support.apple.com/kb/PH12960?locale=en_US

  • @lunabucks8404
    @lunabucks8404 7 лет назад

    Hi, love all of your videos
    Is there a way to have more PWM outputs on a single Arduino Uno
    also can you do some LED Rotary encoders like the ones at Mayhew Labs?

    • @NotesAndVolts
      @NotesAndVolts  7 лет назад

      Thanks Luna! There may be a way to turn a regular digital output into PWM via software - but this is something I haven't tried myself. You could also move to an Arduino Mega which has 15 PWM pins I believe.

  • @DeusDomino
    @DeusDomino 7 лет назад

    Hey, with this set-up, is it possible to send midi note values from a DAW to the arduino? (I.e. is it possible to assign an LED to a note value so a pattern could be recorded on a piano roll? Great content, keep it up!

    • @NotesAndVolts
      @NotesAndVolts  7 лет назад +1

      Hi Deus. Yes this is possible. You just need to change from Midi CC to Midi note reading. Check out this video for the basic idea ruclips.net/video/Twx0kzxXvp4/видео.html

  • @kavtech_midi
    @kavtech_midi 3 года назад

    can we use usb midi converter cable as usb midi interface?

  • @BritishBeachcomber
    @BritishBeachcomber 4 года назад +1

    2:22 I would not use MIDI to control stage lighting. It has its own serial control protocol - DMX512 (Digital Multiplex). See en.m.wikipedia.org/wiki/DMX512

  • @WillitoTube
    @WillitoTube 7 лет назад

    Hi. Awesome project! Is this possible to make this LED fading effect using a expression pedal from a MIDI foot controller (ie. Voodoo Lab GCPro) with Arduino?
    Thanx!

    • @NotesAndVolts
      @NotesAndVolts  7 лет назад

      Thanks William! If the GCPro can output MIDI CC messages from the pedal it should work with no problem. You just need to find out the controller number that the pedal uses and program that into the arduino software.

  • @galbby
    @galbby 7 лет назад +5

    Your videos are excellent. Please make a video about rotary encoder sending MIDI CC the Arduino to the PC ( for use in programs such as Traktor for example). Please help me.

    • @NotesAndVolts
      @NotesAndVolts  7 лет назад +6

      Thanks MArd! It's on my to do list.

    • @DJShOnYProjects
      @DJShOnYProjects 6 лет назад +1

      estoy esperando tambien el que nos enseñes un video sobre el codificador rotatorio para usarlo con arduino enviando mensajes midi para usarlo con traktor o virtual dj .... :D

    • @geraldoribeiro9779
      @geraldoribeiro9779 5 лет назад

      Hey....im waiting.....lol...

    • @P3Hi
      @P3Hi 5 лет назад

      @@geraldoribeiro9779 Here is the info for rotary.. Works fine for me in Traktor.
      tttapa.github.io/Arduino/MIDI/Chap04-MIDI-Controller.html

  • @antonio.scalia
    @antonio.scalia 8 лет назад

    Explicas muy bien. Muy buen ingles, entiendo todo lo que dices.

  • @jacoposbrighi1952
    @jacoposbrighi1952 2 года назад

    Is it possible do the same but with midi thought the usb?

  • @intichavez2418
    @intichavez2418 8 лет назад

    by the way... the tx led on the arduino board blinks when DAW sends MIDI data, is that ok?

  • @unifly8241
    @unifly8241 8 лет назад

    Maybe you know what potentiometers/knobs should be used to read midi input and set current position automatically? It's like APC40, Behringer BCR or any modern controller where is the light indication around the knob.

    • @NotesAndVolts
      @NotesAndVolts  8 лет назад

      Hi Laimis. Those controllers use Rotary Encoders. Those are not supported by this code currently.

  • @neutroxbeats6069
    @neutroxbeats6069 5 лет назад

    how to make midi DIN to usb adapter using arduino nano
    or how to make a usb midi keyboard with velocity using arduino mega and old keyboard
    i have a 49 key keyboard with a 15 pin midi DIN and i wanna found a solution to convert it to usb keyboard.
    for the midi interfaces are not cheap in my country. the midi keyboards too. plz make a tutorial explaining how could i make this project

  • @parranoic
    @parranoic 8 лет назад

    Thank's for this great series but I have a question, how can I use a push button like an arcade button to be my input and have as an output a midi note that can be played in a DAW, I want my arcade buttons to be like the keys from a midi controller.

    • @NotesAndVolts
      @NotesAndVolts  8 лет назад

      +Daniel Tevi (Jizzy) Hi Daniel. The next videos in this series will cover constructing midi controllers.

    • @parranoic
      @parranoic 8 лет назад

      Notes and Volts Awesome! Just in time, my parts are coming this week :D

  • @luishdz1589
    @luishdz1589 3 года назад

    Hello, very good project ,,, could you help me with a project of a midi hit hat pedal, the code is the original arduino mididrums example, but I want to install this sensor ultrasonic for the hit hat, thank you very much.

  • @MilesQuickster
    @MilesQuickster 5 лет назад

    Can you use PWM to affect the samples used in MIDI playback?

  • @ashutoshmallik2435
    @ashutoshmallik2435 2 месяца назад

    Is it possible to display midi codes on a simple 16x2 LCD monitor and without using laptop display or any software there ??

  • @nthechocolatefactory372
    @nthechocolatefactory372 Год назад

    What about doing this with RGB leds ?

  • @granolakitti8521
    @granolakitti8521 10 месяцев назад

    I know this is an old video, but is it possible to send the MIDI data to the arduino over USB?

  • @Rayyarhs
    @Rayyarhs 5 лет назад

    Nice Work! Thnx for the info on how to build and program. Started my project already :) Can it work with midi shield?

    • @NotesAndVolts
      @NotesAndVolts  5 лет назад

      Thanks Paul. I haven't tested but it should work with a Midi shield.

    • @Rayyarhs
      @Rayyarhs 5 лет назад

      @@NotesAndVolts I managed to read the midi cc trough USB using hairless.
      Now my problem is as follow:
      I want to run my dc motor (has an pot for position read)
      I use the: www.amazon.de/Stereo-Potentiometer-2-Fach-Motorpotentiometer-Widerstand/dp/B07B41CYH8/ref=sr_1_3?s=ce-de&ie=UTF8&qid=1541074007&sr=1-3&keywords=motor+potentiometer
      to go to desired (cc) value but the motor only "chokes".
      I think its because the "byte value" does not have a "int" and when i tried to declare it it wont work :/
      Any Ideas?
      MY code:
      #include
      #include
      #include
      #include "utility/Adafruit_MS_PWMServoDriver.h"
      Adafruit_MotorShield AFMS = Adafruit_MotorShield();
      Adafruit_DCMotor *myMotor = AFMS.getMotor(3);
      MIDI_CREATE_DEFAULT_INSTANCE();
      //static const unsigned ledPin = 13; // LED pin on Arduino Uno
      int citaj = 0;
      int controlerWert = 0;
      void setup()
      {
      AFMS.begin();
      myMotor->setSpeed(255);// Motor speed 0(stop) 255 (fast)
      pinMode(13, OUTPUT);
      MIDI.begin(MIDI_CHANNEL_OMNI); // Launch MIDI and listen to channel
      MIDI.setHandleControlChange(MyCCFunction);
      pinMode(A0, INPUT);
      Serial.begin(9600);
      }
      void loop()
      {
      citaj = analogRead(A0); // reads the pot
      controlerWert = map(citaj,0,1023,0,127);
      if (MIDI.read()); // If we have received a message

      }
      void MyCCFunction(byte channel, byte number, byte value) {
      switch (number) {
      case 21:{
      controlerWert > value, myMotor->run(BACKWARD);
      //


      }
      }

      }

    • @Rayyarhs
      @Rayyarhs 5 лет назад

      ok. I managed to Control the motor from daw and daw from pot, only thing is that i can only control the motor in 1 step. when i fix this its almost complete :)

  • @nthechocolatefactory372
    @nthechocolatefactory372 Год назад

    What if you wanted to do this with 30 leds

  • @AlexContek
    @AlexContek 8 лет назад

    saludos! congratulations great video! could you sell me what´s the software program´s name you user in this video with lights midi arduino je! sorry i speak little english

    • @NotesAndVolts
      @NotesAndVolts  8 лет назад

      +Alex Contek Hi Alex. The music software in the video is Logic Pro 9.

    • @AlexContek
      @AlexContek 8 лет назад

      thanks! I´m like yours videos! como no los vi a antes I make yours proyects!

  • @freddelsaux
    @freddelsaux 4 года назад

    Hi Dave I tried via patreon this question : is this possible to multiplexe led like button and apply this method but with mux...? I don't have enough knowledge in code for the moment to figure out how to adapt this code to mux...

  • @SCAFI80
    @SCAFI80 4 года назад

    Works perfectly on Arduino Uno !!! But nothing happens in Arduino Mega. Why ? I realign the outputs in your software for Arduino Mega (#define LEDPWM1 2, ....). But I got no result. Could you help-me please ? Thanks

  • @bboymac84
    @bboymac84 6 лет назад

    fuckin siiick!!!

  • @jayfehr
    @jayfehr 8 лет назад

    I know you're a music guy but the background music is really distracting. You should lower the volume and use something a little less thumpy.
    You're content is great, nothing else like it that I can find. So I suffer through. But it would be nice to not be distracted.

  • @jeffdasler5829
    @jeffdasler5829 5 лет назад

    "First you'll need to watch my video on building a MIDI input circuit. To go there, click on the video or check the link in the description."
    This is no working.

    • @mefugoenmicarro
      @mefugoenmicarro 5 лет назад

      the playlist
      ruclips.net/video/0L7WAMFWSgY/видео.html

  • @bensoloart
    @bensoloart 5 лет назад

    can you shorten your logo video? please ? like seriously so unnecessary

    • @Gyrbae
      @Gyrbae 5 лет назад

      If there's one thing people love to complain about, it's free content. Have you not seen the red line below the video that lets you skip the parts you don't want to see?