Reading And Decoding USB MIDI Messages With An Arduino

Поделиться
HTML-код
  • Опубликовано: 27 авг 2024

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

  • @MMMMMMMMMMBALLS
    @MMMMMMMMMMBALLS Месяц назад

    The first and only in depth vid on this topic. THANKS!

    • @eleneasy
      @eleneasy  Месяц назад

      You are very welcome.

    • @eleneasy
      @eleneasy  Месяц назад

      You are very welcome

  • @nimaesmaeil9318
    @nimaesmaeil9318 7 месяцев назад +1

    Thanks ❤

  • @oflittleconsequence
    @oflittleconsequence 2 месяца назад +1

    Fantastic video. Thank you for the in-depth information. Is there a way you know of to poll or query a MIDI device to find out the current value of a specific control parameter?
    I would like to build a controller that has some kind of feedback mechanism to not just capture and show CC messages to change a parameter value, but be able to read what a value is set at, so I can show the value on a meter/lights/OLED scribble strip, or whatever element, before it is changed.
    Imagine a controller that has rotary encoders and multiple banks... When I change the bank, I would need the display value to change to reflect the set value of what those encoders are assigned to now.

    • @eleneasy
      @eleneasy  2 месяца назад +1

      Hi "oflittleconsequence". The MIDI 1.0 specification doesn't have a built-in mechanism to directly retrieve the value of a parameter from one device to another. It's designed primarily for sending control messages that trigger actions or set specific values, not for querying information.
      The only workaround that I can think of to solve your problem, is to store in the controller memory the value of every parameter that has been changed. And this can be done with a separate block of memory for each bank. This way, when you switch bank, rather than retrieving the info from the other MIDI device, you would retrieve the information locally, from the memory block of the controller itself used for that bank.

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

      Thanks for your quick response!
      Is there some way to poll all the parameters at once, so I can "initialize" the controller by parsing through that dump and reading it all into memory when it is first connected?

    • @eleneasy
      @eleneasy  2 месяца назад +1

      Unfortunately, no. The only thing you can do is to store locally a parameter every time you change it. That way, when you move to another bank and then you come back, all the parameters you previously changed are already available in memory. But it is not possible to query the device you are connecting to for reading the parameters already set in there.

  • @shidqi100
    @shidqi100 4 месяца назад

    Great video dude, had a few question though. In this video you're using adruino due because it has feature USB port as Host so other adruino boards such as uno, mega, etc can't read and decode USB Midi Messages? as context I want to build digital piano using adruino and I'm really new to adruino

    • @eleneasy
      @eleneasy  4 месяца назад

      Hi! I am using Arduino DUE because it has two USB ports, one of which, the so-called native port, I can use in the future to add new features to the MIDI module. The Host USB is provided by the USB Host Shield, not the Arduino DUE. The Arduino DUE does not have this capability, as far as I was able to discover.
      However, I decided to use the Arduino DUE also for other reasons: its speed (84MHz clock), its big amount of memory, and the availability of several I/O ports, both digital and analog.

  • @nimaesmaeil9318
    @nimaesmaeil9318 7 месяцев назад

    14:40

  • @Gratiman
    @Gratiman 4 месяца назад

    This cant be done without the shield?

    • @eleneasy
      @eleneasy  4 месяца назад

      Unfortunately not. The native usb port works only as device, not as host, as far as I was able to figure out.

    • @Gratiman
      @Gratiman 4 месяца назад

      @@eleneasy thank you

  • @minkloco619
    @minkloco619 6 месяцев назад

    What arduino is best for this?

    • @eleneasy
      @eleneasy  6 месяцев назад +1

      The one tha worked for me was the Arduino DUE.

    • @minkloco619
      @minkloco619 6 месяцев назад

      Thanks 🙏🏾 Can I get the data to display on a 1602 lcd from Logic Pro X?

    • @eleneasy
      @eleneasy  6 месяцев назад +1

      Unfortunately the 1602 is not directly compatible with the arduino due. The arduino due has a logic running at 3.3V, while the 1602 works at 5V. I am currently working on a solution to make the two circuits work together. Stay tuned. A video on that will come out soon.

    • @minkloco619
      @minkloco619 6 месяцев назад

      Thanks I’m trying to build a drum machine midi controller with 8 faders 8 drum pads and a 1602 lcd. I’m trying to figure it out

    • @eleneasy
      @eleneasy  6 месяцев назад +1

      If that is your intent, probably you can try using the Arduino Mega, or even the Arduino UNO, if it has enough programming memory in it for you. They are both compatible with the 1602. My choice of the Arduino DUE was because it is the only way to use the USB port as Host, as far I was able to figure out. But since you are making a controller, you will use the USB port as a device, not host, so you should be able to use any Arduino that ha a 5V logic and, therefore, compatible with the 1602.