diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/qmpmidimapperrtmidi.cpp | 4 | ||||
-rw-r--r-- | core/qmpmidiplay.cpp | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/core/qmpmidimapperrtmidi.cpp b/core/qmpmidimapperrtmidi.cpp index adba267..10f830e 100644 --- a/core/qmpmidimapperrtmidi.cpp +++ b/core/qmpmidimapperrtmidi.cpp @@ -77,8 +77,8 @@ void qmpMidiMapperRtMidi::pitchBend(int iid,int ch,int val) { if(!ports[iid])return;ch&=0x0F; std::vector<unsigned char>message; - message.push_back(0xE0|ch);message.push_back(val&0xFF); - message.push_back(val>>8);ports[iid]->sendMessage(&message); + message.push_back(0xE0|ch);message.push_back(val&0x7F); + message.push_back(val>>7);ports[iid]->sendMessage(&message); } void qmpMidiMapperRtMidi::sysEx(int iid,int length,const char *data) { diff --git a/core/qmpmidiplay.cpp b/core/qmpmidiplay.cpp index 4ee812f..2ea0873 100644 --- a/core/qmpmidiplay.cpp +++ b/core/qmpmidiplay.cpp @@ -48,7 +48,7 @@ void CMidiPlayer::processEvent(const SEvent *e) { case 0x80://Note off if(mappedoutput[e->type&0x0F]) - mapper->noteOff(mappedoutput[e->type&0x0F]-1,e->type*0x0F,e->p1); + mapper->noteOff(mappedoutput[e->type&0x0F]-1,e->type&0x0F,e->p1); else fluid_synth_noteoff(synth,e->type&0x0F,e->p1); break; @@ -57,7 +57,7 @@ void CMidiPlayer::processEvent(const SEvent *e) if(solo&&!((solo>>(e->type&0x0F))&1))break; if(noteOnCB)noteOnCB->callBack(noteOnCBUserData); if(mappedoutput[e->type&0x0F]) - mapper->noteOn(mappedoutput[e->type&0x0F]-1,e->type*0x0F,e->p1,e->p2); + mapper->noteOn(mappedoutput[e->type&0x0F]-1,e->type&0x0F,e->p1,e->p2); else fluid_synth_noteon(synth,e->type&0x0F,e->p1,e->p2); chstate[e->type&0x0F]=1; @@ -71,19 +71,19 @@ void CMidiPlayer::processEvent(const SEvent *e) rpnid=rpnval=-1; } if(mappedoutput[e->type&0x0F]) - mapper->ctrlChange(mappedoutput[e->type&0x0F]-1,e->type*0x0F,e->p1,e->p2); + mapper->ctrlChange(mappedoutput[e->type&0x0F]-1,e->type&0x0F,e->p1,e->p2); else fluid_synth_cc(synth,e->type&0x0F,e->p1,e->p2); break; case 0xC0://PC if(mappedoutput[e->type&0x0F]) - mapper->progChange(mappedoutput[e->type&0x0F]-1,e->type*0x0F,e->p1); + mapper->progChange(mappedoutput[e->type&0x0F]-1,e->type&0x0F,e->p1); else fluid_synth_program_change(synth,e->type&0x0F,e->p1); break; case 0xE0://PW 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); else fluid_synth_pitch_bend(synth,e->type&0x0F,e->p1); break; |