thanks, working nearly as i want it butā¦
I wrote the following;
/////////////////////////////////////////////////////////////////////////////
// This function is called by MIOS after startup to initialize the
// application
/////////////////////////////////////////////////////////////////////////////
void Init(void) __wparam
{
// set shift register update frequency
MIOS_SRIO_UpdateFrqSet(1); // ms
// only one DOUTX4 module is connected
// the maximum value is 16 (-> 128 digital outputs)
MIOS_SRIO_NumberSet(16);
}
/////////////////////////////////////////////////////////////////////////////
// This function is called by MIOS when a complete MIDI event has been received
/////////////////////////////////////////////////////////////////////////////
void MPROC_NotifyReceivedEvnt(
unsigned char evnt0, unsigned char evnt1, unsigned char evnt2, unsigned char pin, unsigned char value) __wparam
{
// a note event provides 128 different note values (0..127)
// in this simple example, each note sets an individual pin
// for DOUT pin numbers, see also this documentation:
// http://www.ucapps.de/mios/mios_pin_list.txt
if( evnt0 == 0x80 || evnt0 == 0x90 ) {
// 90 xx 00 is the same like a note off event!
// (-> http://www.borg.com/~jglatt/tech/midispec.htm)
if( evnt0 == 0x80 || evnt2 == 0x00 ) {
// Note Off
MIOS_DOUT_PinSet(pin, 0);
} else {
// Note On
MIOS_DOUT_PinSet(pin, 1);
}
}
}
and every note I send I get the same first led to light only. Can I modify the code so that each led corresponds to a different note?
Thanks