diese Linien werden das Kraut nicht fett machen:
`/////////////////////////////////////////////////////////////////////////////
// This hook is called when a MIDI package has been received
/////////////////////////////////////////////////////////////////////////////
void APP_MIDI_NotifyPackage(mios32_midi_port_t port, mios32_midi_package_t midi_package)
{
//909 Phatline
/// MIDI Control & Program-BANK LOAD STORE
#define CC_PC_Bank 32 // Bank for Program-Changes in order to use more then 128 songs....
static u8 Bank = 0; // Bank 0 = PC 0-127, Bank 1 = PC 128-255 ....
#define CC_SCENE 33 // SCENE 0-5
#define CC_Save 24 // external store signal, so this app save @ same time like external (only one save button in setup...)
// if( midi_package.type == CC) { MIOS32_MIDI_SendDebugMessage("cc: %d val: %d", midi_package.cc_number, midi_package.value);
switch( midi_package.cc_number ) {
// each Bank has 128 Programchanges...
case CC_PC_Bank: Bank = midi_package.value * 128; break;
// Program-NR + Programbank
case CC_Save: saveSession(midi_package.value + Bank); break;
case CC_SCENE: if(midi_package.value < 6) { sceneChangeRequested_ = midi_package.value; } break; // switch Scene in SYNC
break;
}
//909 Phatline
/// P R O G R A M C H A N G E Program
if( midi_package.type == ProgramChange) { loadSession(midi_package.evnt1 + Bank); }
}`