So, can an Arduino Micro device be Midi-Class-Compliant?
What basics do I need to do that?
Which Library should I use?
So, can an Arduino Micro device be Midi-Class-Compliant?
What basics do I need to do that?
Which Library should I use?
describing in detail with screen-shots how you wish the midi-device should work.
Write this description how the midi-device should work based on an example with another MIDI-device and post screenshots of each step how you configure this midi-device to work with your MAX-software.
I mean you have to configure your MAX-software somehow to receive MIDI-data from the MIDI-device.
As I'm not an midi-expert I don't know it
I guess You choose from a list of possible midi-sources
I guess you choose from a list of interfaces
these things.
You are an MIDI-expert and know from a short term as PnP-classcompliant what this in detail means.
You are beginner about writing code.
For the users here it is vice versa
beginners about Midi
and experts about writing code
Here is a USB-midi-library
this library has an example
which simply sends a note on/off.
You should use this example to check if MIDI-communication with your MAX-Software
works at all
If you write untested code and want to combine the untested with a computer-software you multiply possible places where something is wrong.
This is the reason why you start small.
Small test-setup small number of possible bugs
This demo-code is well known to work. So you can exclude if it is not working that the bug is in the code.
If it is not working the bug must be somewhere else but not in the midiwrite -code.
So upload this demo-code midiwrite into your arduino and test if your MAX-software plays the notes.
If your MAX-Software can't play simple notes this is another detail that must be explained guess how ?: in detail
best regards Stefan
I think so. The readme of the MIDIUSB-libarary describes itself as
This library allows an Arduino board with USB capabilities to act as a MIDI instrument over USB. The library is based on PluggableUSB, so is only compatible with Arduino IDE 1.6.6 and newer.
Furthermore, since PluggableUSB only targets boards with native USB capabilities, this library only supports these boards (eg. Leonardo, Micro, Due, Zero and so on)
Sounds like an easy question but is a very complicated question.
What should I answer especcially to you??
The one I linked above
in combination with the demo-code MIDI-write
Last go. Try this code to get random notes fired into your interface. Load in MIDI monitor to see where they come from.
/*
* MIDIUSB_test.ino
*
* Created: 4/6/2015 10:47:08 AM
* Author: gurbrinder grewal
* Modified by Arduino LLC (2015)
*/
#include "MIDIUSB.h"
// First parameter is the event type (0x09 = note on, 0x08 = note off).
// Second parameter is note-on/note-off, combined with the channel.
// Channel can be anything between 0-15. Typically reported to the user as 1-16.
// Third parameter is the note number (48 = middle C).
// Fourth parameter is the velocity (64 = normal, 127 = fastest).
void noteOn(byte channel, byte pitch, byte velocity) {
midiEventPacket_t noteOn = {0x09, 0x90 | channel, pitch, velocity};
MidiUSB.sendMIDI(noteOn);
}
void noteOff(byte channel, byte pitch, byte velocity) {
midiEventPacket_t noteOff = {0x08, 0x80 | channel, pitch, velocity};
MidiUSB.sendMIDI(noteOff);
}
void setup() {
Serial.begin(250000);
Serial1.begin(250000);
}
// First parameter is the event type (0x0B = control change).
// Second parameter is the event type, combined with the channel.
// Third parameter is the control number number (0-119).
// Fourth parameter is the control value (0-127).
void controlChange(byte channel, byte control, byte value) {
midiEventPacket_t event = {0x0B, 0xB0 | channel, control, value};
MidiUSB.sendMIDI(event);
}
void loop() {
int val;
val = random(20,100);
noteOn(0, val, 64);
MidiUSB.flush();
delay(100);
noteOff(0, val, 64);
MidiUSB.flush();
delay(400);
Serial1.println(val); // sends ASCII output on pins 0 & 1
}
Next we can get closer to what you need.
From :- This website
An external device that is USB Class Compliant will work out-of-the-box both on Mac and Windows by using these pre-installed generic drivers.
If your device is not class compliant, it simply means you’ll have to install additional proprietary drivers on your computer. These drivers are generally provided by your device’s manufacturer when you buy their product.
So basically a class complaint device is one that will work with the drivers built it to your computer. Therefore by definition you can't make a class complaint device with an Arduino. You would have to hack into your computer's drivers to make them Class-Compliant.
The next best thing is we can help make the drives for you with an Arduino. If that is not good enough for you then goodbye.
Is your understanding of what a Class-Compliant MIDI Device different from the definition here?
Of course you can. That's the whole point of standardized device classes.
The Arduino MIDIUSB library is class-compliant, and works out-of-the-box on your Linux/macOS/Windows computer.