Possible to get 32 midi channels with one Arduino?

Hello!

I'm planning to do a hardware midi sequencer with Arduino Giga (or Teensy 4.1).

Question: Is it possible to get two MIDI outputs from the Arduino at the same time? So that I could get 32 midi tracks playing at the same time with two independent midi outputs (so that for example Cubase would recognize them as a separate midi outputs).

Thanks!
, Pete.

At the very exact nano second, no. With a delay of some micto seconds, yes.

Great, thanks. Does some midi libraries support making two midi outputs at once or how it could be done?

The Control Surface library supports multiple virtual MIDI over USB cables (on boards that support it, like the Teensy):

#include <Control_Surface.h> // Include the Control Surface library

// The MIDI over USB interface to use
USBMIDI_Interface midi;

void setup() {
  midi.begin(); // Initialize the MIDI interface
}

// MIDI note number, channel, virtual cable, and velocity to use
MIDIAddress address {MIDI_Notes::C[4], Channel_1, Cable_2};
const uint8_t velocity = 0x7F;

void loop() {
  midi.sendNoteOn(address, velocity);
  delay(500);
  midi.sendNoteOff(address, velocity);
  delay(500);

  midi.update(); // Handle or discard MIDI input
}

You'll have to select the "MIDI x4" USB Type in the Arduino IDE. The Teensy will then show up as 4 virtual MIDI devices, and the code above will send as the second one (Cable_2).

See Control Surface: MIDI Tutorial for details.

Control Surface also supports instantiating multiple serial MIDI interfaces if that's what you're after.

Great info, PieterP! Thank you. I have to check out that library now.