🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    MIDI Over Serial

    M5stack Grey
    2
    2
    3.1k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      jkirchheimer
      last edited by

      Hey!

      I am quite stuck with getting MIDI to work on my Grey Core. I am Using Serial2 (that should be GIOP16 for RX and GIOP17 for TX) and am using the MIDI Library from FortySevenEffects (its the most common used one, as far as I know). I connected the DIN Port to 3.3V, GND and the Port labeled 17 via a 220Ohm resistor to the 3rd pin. As i did a lot of Midi Projects with Arduino, Teensy and ESB32 boards, this should run without any issues. Even the Test-DIN Port is reused from the Teensy Project. But I get no result. My standard test sketch, that sends NoteOn and NoteOff on all MidiChannels does not Trigger any notes?
      Is the Labeling on the M5 Stacks button not the Number of the GIOP?

      Any help aprecheated!

      #include <M5Stack.h>
      #include <MIDI.h>
      
      MIDI_CREATE_INSTANCE(HardwareSerial, Serial2, MIDI);
      
      void setup() {
        M5.begin();
        dacWrite(25, 0);
        M5.Lcd.print( "M5 MIDI Test");
        MIDI.begin(MIDI_CHANNEL_OMNI);
      }
      
      void loop() {
        M5.Lcd.setCursor( 0, 30);
        M5.Lcd.fillRect( 0, 30, 100, 100, BLACK);
        M5.Lcd.print( "ON");
        for( uint8_t i = 0; i < 16; ++i) {
          MIDI.sendNoteOn( 62, 127, i);
        }
        delay( 1000);
        M5.Lcd.setCursor( 0, 30);
        M5.Lcd.fillRect( 0, 30, 100, 100, BLACK);
        M5.Lcd.print( "Off");
        for( uint8_t i = 0; i < 16; ++i) {
          MIDI.sendNoteOff( 62, 127, i);
        }
        delay( 1000);
      }
      
      1 Reply Last reply Reply Quote 0
      • world101W
        world101
        last edited by world101

        @jkirchheimer are you using the M5stack internal speaker for the MIDI sounds, because “dacWrite(25, 0);“ mutes the speaker

        1 Reply Last reply Reply Quote 0
        • First post
          Last post