Hi,
I am new to the arduino world, and I LOVE IT!
I am building a Midi- Footcontroller for my guitar-rig and it´s working quite good, but now i have a problem.
I am using the midi library and want to use the midi.send command... the arduino should send midi-commands of different types.. and the different types are in an array.
but:
Before thinking of arrays, i tried to just send a mid program change message with "midi.send" with no success...:
in the documentation of the library it says ProgramChange = 0xC0
this code:
#include <MIDI.h>
MIDI_CREATE_INSTANCE(HardwareSerial, Serial, MIDI);
void setup()
{
MIDI.begin();
}
void loop()
{
MIDI.send(0xC0, 10, 0, 1);
delay(1000);
}
results in an error:
invalid conversion from 'int' to 'midi::MidiType' [-fpermissive] ...
Same with MIDI.send(192, 10, 0, 1);
when i try
MIDI.send(ProgramChange, 10, 0, 1);
i get this error:
IDI_sendproblem.ino: In function 'void loop()':
MIDI_sendproblem.ino:13:19: error: 'ProgramChange' was not declared in this scope
MIDI_sendproblem.ino:13:19: note: suggested alternative:
In file included from /Users/mortl/Documents/Arduino/libraries/MIDI/MIDI.h:26:0,
from MIDI_sendproblem.ino:1:
/Users/mortl/Documents/Arduino/libraries/MIDI/midi_Defs.h:63:5: note: 'ProgramChange'
ProgramChange = 0xC0, ///< Program Change
^
As said, later the type of the message should be in an array to be able to send different types of messages in one loop.
any ideas?
thanks
Martin