aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/qmpmidiplay.cpp15
-rw-r--r--core/qmpmidiread.cpp2
2 files changed, 10 insertions, 7 deletions
diff --git a/core/qmpmidiplay.cpp b/core/qmpmidiplay.cpp
index 0bb73f9..ec9f059 100644
--- a/core/qmpmidiplay.cpp
+++ b/core/qmpmidiplay.cpp
@@ -75,8 +75,11 @@ void CMidiPlayer::processEvent(const SEvent *e)
if(e->p1==6)rpnval[e->type&0x0F]=e->p2;
if(~rpnid[e->type&0x0F]&&~rpnval[e->type&0x0F])
{
- if(rpnid[e->type&0x0F]==0)fluid_synth_pitch_wheel_sens(synth,e->type&0x0F,rpnval[e->type&0x0F]);
- pbr[e->type&0x0F]=rpnval[e->type&0x0F];
+ if(rpnid[e->type&0x0F]==0)
+ {
+ fluid_synth_pitch_wheel_sens(synth,e->type&0x0F,rpnval[e->type&0x0F]);
+ pbr[e->type&0x0F]=rpnval[e->type&0x0F];
+ }
rpnid[e->type&0x0F]=rpnval[e->type&0x0F]=-1;
}
chstatus[e->type&0x0F][e->p1]=e->p2;
@@ -93,11 +96,11 @@ void CMidiPlayer::processEvent(const SEvent *e)
fluid_synth_program_change(synth,e->type&0x0F,e->p1);
break;
case 0xE0://PW
- pbv[e->type&0x0F]=e->p1;
+ pbv[e->type&0x0F]=(e->p1|(e->p2<<7))&0x3FFF;;
if(mappedoutput[e->type&0x0F])
- mapper->pitchBend(mappedoutput[e->type&0x0F]-1,e->type&0x0F,e->p1);
+ mapper->pitchBend(mappedoutput[e->type&0x0F]-1,e->type&0x0F,(e->p1|(e->p2<<7))&0x3FFF);
else
- fluid_synth_pitch_bend(synth,e->type&0x0F,e->p1);
+ fluid_synth_pitch_bend(synth,e->type&0x0F,(e->p1|(e->p2<<7))&0x3FFF);
break;
case 0xF0://Meta/SysEx
if((e->type&0x0F)==0x0F)
@@ -154,7 +157,7 @@ void CMidiPlayer::processEventStub(const SEvent *e)
ccc[e->type&0x0F][129]=e->p1;
break;
case 0xE0://PW
- ccc[e->type&0x0F][130]=e->p1;
+ ccc[e->type&0x0F][130]=(e->p1|(e->p2<<7))&0x3FFF;
break;
case 0xF0://Meta/SysEx
if((e->type&0x0F)==0x0F)
diff --git a/core/qmpmidiread.cpp b/core/qmpmidiread.cpp
index 92573d2..478ec82 100644
--- a/core/qmpmidiread.cpp
+++ b/core/qmpmidiread.cpp
@@ -82,7 +82,7 @@ int CSMFReader::eventReader()//returns 0 if End of Track encountered
break;
case 0xE0://Pitch wheel
p1=fgetc(f);p2=fgetc(f);byteread+=2;
- ret->eventList.push_back(SEvent(curid,curt,type,(p1|(p2<<7))&0x3FFF,0));
+ ret->eventList.push_back(SEvent(curid,curt,type,p1,p2));
break;
case 0xF0:
if((type&0x0F)==0x0F)//Meta Event