|
|
|
@ -15,7 +15,7 @@ index d50795d..53493c6 100644 |
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
diff --git a/src/Input/MidiIn.cpp b/src/Input/MidiIn.cpp
|
|
|
|
|
index 3d7c5b2..a17b89a 100644
|
|
|
|
|
index 3d7c5b2..5df311d 100644
|
|
|
|
|
--- a/src/Input/MidiIn.cpp
|
|
|
|
|
+++ b/src/Input/MidiIn.cpp
|
|
|
|
|
@@ -28,6 +28,9 @@ int MidiIn::getcontroller(unsigned char b)
|
|
|
|
@ -23,7 +23,7 @@ index 3d7c5b2..a17b89a 100644 |
|
|
|
|
int ctl = C_NULL;
|
|
|
|
|
switch(b) {
|
|
|
|
|
+ case 0:
|
|
|
|
|
+ ctl = C_bank_select_msb; //Bank Select MSB
|
|
|
|
|
+ ctl = C_bankselectmsb; //Bank Select MSB
|
|
|
|
|
+ break;
|
|
|
|
|
case 1:
|
|
|
|
|
ctl = C_modwheel; //Modulation Wheel
|
|
|
|
@ -33,7 +33,7 @@ index 3d7c5b2..a17b89a 100644 |
|
|
|
|
ctl = C_expression; //Expression
|
|
|
|
|
break;
|
|
|
|
|
+ case 32:
|
|
|
|
|
+ ctl = C_bank_select_lsb; //Bank Select LSB
|
|
|
|
|
+ ctl = C_bankselectlsb; //Bank Select LSB
|
|
|
|
|
+ break;
|
|
|
|
|
case 64:
|
|
|
|
|
ctl = C_sustain; //Sustain pedal
|
|
|
|
@ -52,46 +52,40 @@ index 5d978ea..a83efac 100644 |
|
|
|
|
#define MP_MAX_BYTES 4000 //in case of loooong SYS_EXes
|
|
|
|
|
|
|
|
|
|
diff --git a/src/Misc/Master.cpp b/src/Misc/Master.cpp
|
|
|
|
|
index fa5e1b0..def5fb5 100644
|
|
|
|
|
index fa5e1b0..8f8996c 100644
|
|
|
|
|
--- a/src/Misc/Master.cpp
|
|
|
|
|
+++ b/src/Misc/Master.cpp
|
|
|
|
|
@@ -70,6 +70,8 @@ Master::Master()
|
|
|
|
|
sysefx[nefx] = new EffectMgr(0, &mutex);
|
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
+ bankmsb = 0;
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
defaults();
|
|
|
|
|
}
|
|
|
|
|
@@ -176,6 +178,15 @@ void Master::SetController(unsigned char chan, unsigned int type, int par)
|
|
|
|
|
setcontroller(chan, type, par);
|
|
|
|
|
@@ -177,6 +177,16 @@ void Master::SetController(unsigned char chan, unsigned int type, int par)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
+ * Program Change
|
|
|
|
|
+ */
|
|
|
|
|
+void Master::SetProgram(unsigned char chan, unsigned int pgm)
|
|
|
|
|
+{
|
|
|
|
|
+ if(bankmsb > 0 && (strcmp(bank.bankfiletitle, bank.banks[bankmsb].dir) != 0))
|
|
|
|
|
+ bank.loadbank(bank.banks[bankmsb].dir);
|
|
|
|
|
+ for(int npart = 0; npart < NUM_MIDI_PARTS; npart++)
|
|
|
|
|
+ if(chan == part[npart]->Prcvchn)
|
|
|
|
|
+ bank.loadfromslot(pgm, part[npart]);
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
/*
|
|
|
|
|
+/*
|
|
|
|
|
* Internal Controllers
|
|
|
|
|
*/
|
|
|
|
|
@@ -202,6 +213,9 @@ void Master::setcontroller(unsigned char chan, unsigned int type, int par)
|
|
|
|
|
void Master::setcontroller(unsigned char chan, unsigned int type, int par)
|
|
|
|
|
@@ -202,6 +212,11 @@ void Master::setcontroller(unsigned char chan, unsigned int type, int par)
|
|
|
|
|
}
|
|
|
|
|
;
|
|
|
|
|
}
|
|
|
|
|
+ else if(type == C_bank_select_msb) { //Bank Select messages
|
|
|
|
|
+ bankmsb = par + 1;
|
|
|
|
|
+ else if(type == C_bankselectmsb) { //Bank Select messages
|
|
|
|
|
+ par += 1;
|
|
|
|
|
+ if(par > 0 && (strcmp(bank.bankfiletitle, bank.banks[par].dir) != 0))
|
|
|
|
|
+ bank.loadbank(bank.banks[par].dir);
|
|
|
|
|
+ }
|
|
|
|
|
else { //other controllers
|
|
|
|
|
for(int npart = 0; npart < NUM_MIDI_PARTS; npart++) //Send the controller to all part assigned to the channel
|
|
|
|
|
if((chan == part[npart]->Prcvchn) && (part[npart]->Penabled != 0))
|
|
|
|
|
diff --git a/src/Misc/Master.h b/src/Misc/Master.h
|
|
|
|
|
index eb47522..f720082 100644
|
|
|
|
|
index eb47522..18ae4d3 100644
|
|
|
|
|
--- a/src/Misc/Master.h
|
|
|
|
|
+++ b/src/Misc/Master.h
|
|
|
|
|
@@ -77,6 +77,7 @@ class Master
|
|
|
|
@ -102,17 +96,8 @@ index eb47522..f720082 100644 |
|
|
|
|
//void NRPN...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -170,6 +171,8 @@ class Master
|
|
|
|
|
unsigned char velocity);
|
|
|
|
|
void noteoff(unsigned char chan, unsigned char note);
|
|
|
|
|
void setcontroller(unsigned char chan, unsigned int type, int par);
|
|
|
|
|
+
|
|
|
|
|
+ int bankmsb;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/globals.h b/src/globals.h
|
|
|
|
|
index 7c07171..9dc005c 100644
|
|
|
|
|
index 7c07171..0875b4c 100644
|
|
|
|
|
--- a/src/globals.h
|
|
|
|
|
+++ b/src/globals.h
|
|
|
|
|
@@ -201,7 +201,8 @@ enum ONOFFTYPE {
|
|
|
|
@ -120,8 +105,8 @@ index 7c07171..9dc005c 100644 |
|
|
|
|
|
|
|
|
|
enum MidiControllers {
|
|
|
|
|
- C_NULL = 0, C_pitchwheel = 1000, C_expression = 11, C_panning = 10,
|
|
|
|
|
+ C_bank_select_msb = 0, C_pitchwheel = 1000, C_NULL = 1001,
|
|
|
|
|
+ C_expression = 11, C_panning = 10, C_bank_select_lsb = 32,
|
|
|
|
|
+ C_bankselectmsb = 0, C_pitchwheel = 1000, C_NULL = 1001,
|
|
|
|
|
+ C_expression = 11, C_panning = 10, C_bankselectlsb = 32,
|
|
|
|
|
C_filtercutoff = 74, C_filterq = 71, C_bandwidth = 75, C_modwheel = 1,
|
|
|
|
|
C_fmamp = 76,
|
|
|
|
|
C_volume = 7, C_sustain = 64, C_allnotesoff = 123, C_allsoundsoff = 120,
|
|
|
|
|