commit 765b4b784fbb21309f610d34dcc9d82506e35bed
parent d77a5be8c50de6d527043bbc252163f857a588d6
Author: fundamental <mark.d.mccurry@gmail.com>
Date: Sun, 30 Oct 2011 22:50:09 -0400
Bank Select: adding parameter update for PADnote
- Adding a call to update PADnote parameters when loading instruments with bank
select events
- This is not real time safe in its current implementation, but it does load the
instrument properly
- Added patch submitter in AUTHORS.txt
Diffstat:
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/AUTHORS.txt b/AUTHORS.txt
@@ -19,4 +19,5 @@ Contributors:
Stephen Parry (DSSI rebuild)
Ryan Billing (APhaser)
Hans Petter Selasky (OSS Midi, FreeBSD support)
+ Damien Goutte-Gattat (Bank select midi support)
diff --git a/src/Misc/Master.cpp b/src/Misc/Master.cpp
@@ -195,9 +195,18 @@ void Master::setController(char chan, int type, int par)
void Master::setProgram(char chan, unsigned int pgm)
{
- for(int npart = 0; npart < NUM_MIDI_PARTS; ++npart)
- if(chan == part[npart]->Prcvchn)
+ for(int npart = 0; npart < NUM_MIDI_PARTS; ++npart) {
+ if(chan == part[npart]->Prcvchn) {
bank.loadfromslot(pgm, part[npart]);
+
+ //Hack to get pad note parameters to update
+ //this is not real time safe and makes assumptions about the calling
+ //convention of this function...
+ pthread_mutex_unlock(&mutex);
+ part[npart]->applyparameters();
+ pthread_mutex_lock(&mutex);
+ }
+ }
}
void Master::vuUpdate(const float *outl, const float *outr)