From acf466561f17bf0eb6c19ea0467b27f5392aeb36 Mon Sep 17 00:00:00 2001 From: Chris Xiong Date: Fri, 10 Feb 2017 23:56:09 +0800 Subject: Road to standardize: use two parameters for pitchbend. Documentation. Minor bug fix. --- ChangeLog | 5 +++++ core/qmpmidiplay.cpp | 15 +++++++++------ core/qmpmidiread.cpp | 2 +- doc/miscellaneous.html | 15 ++++++++------- doc/troubleshooting.html | 8 +++++++- include/qmpcorepublic.hpp | 2 +- midifmt-plugin/midifmtplugin.cpp | 4 +--- qmidiplayer-desktop/qmpmainwindow.cpp | 4 +--- qmidiplayer-desktop/qmpplugin.cpp | 2 +- 9 files changed, 34 insertions(+), 23 deletions(-) diff --git a/ChangeLog b/ChangeLog index fdcd7c6..f4c6f0d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2017-02-10 0.8.5 indev +Road to standardize: use two parameters for pitchbend. +Documentation. +Minor bug fix. + 2017-02-09 0.8.5 indev Fix building on Windows. Behavior changes: 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 diff --git a/doc/miscellaneous.html b/doc/miscellaneous.html index ff496fa..d8e90c3 100644 --- a/doc/miscellaneous.html +++ b/doc/miscellaneous.html @@ -44,9 +44,10 @@
  • 0.6.x Settings and experimental Windows support
  • 0.7.2 MIDI mapping, first stable version
  • 0.7.8 Plugin interface, UI refactoring
  • -
  • 0.8.x Visualization (the default visualization plugin)
  • -
  • 0.9.x File reader plugin API, event filter/modifier API. Stable version.
  • -
  • 1.x+ Translation, documentation, Maintaince only
  • +
  • 0.8.x Visualization (the default visualization plugin).
  • +
  • 0.8.5+ File reader plugin API, event filter/modifier API.
  • +
  • 0.9.x API Stablization. Revive lite version.
  • +
  • 1.x+ Translation, documentation, Maintaince only.
  • FAQs

    0. (Windows version) It complains about a missing dll!

    @@ -64,21 +65,21 @@ github issue tracker. Don't forget to check if the bug has already been fixed in a newer version!

    -

    3. On which platform(s) do you develop this project?

    +

    3. On what platform(s) do you develop this project?

    Major platforms used:

    Platforms for building the Windows version:

    Contact the author

    - E-mail: chirs241097 'at' gmail 'dot' com + E-mail: chirs241097 'at' gmail 'dot' com
    Twitter: @chirs241097

    diff --git a/doc/troubleshooting.html b/doc/troubleshooting.html index 0c5e434..b6b5a8d 100644 --- a/doc/troubleshooting.html +++ b/doc/troubleshooting.html @@ -60,6 +60,12 @@ Bank selecting to external devices is sent in raw format. The midi file may be incompatible with your device.

    +

    9. 3D visualization is upsidedown/rotated/black.

    +

    + For those who see a rotated display, try setting Visualization-Video/Multisampling + to 1 or above. If that doesn't solve your problem or you see nothing at + all, please send me more details about your problem. +

    - \ No newline at end of file + diff --git a/include/qmpcorepublic.hpp b/include/qmpcorepublic.hpp index 3ce0545..18b2f6a 100644 --- a/include/qmpcorepublic.hpp +++ b/include/qmpcorepublic.hpp @@ -8,7 +8,7 @@ #else #define EXPORTSYM __attribute__ ((visibility ("default"))) #endif -#define QMP_PLUGIN_API_REV "1+indev" +#define QMP_PLUGIN_API_REV "1+indev2" //MIDI Event structure struct SEvent { diff --git a/midifmt-plugin/midifmtplugin.cpp b/midifmt-plugin/midifmtplugin.cpp index 33e636e..0a0c75d 100644 --- a/midifmt-plugin/midifmtplugin.cpp +++ b/midifmt-plugin/midifmtplugin.cpp @@ -32,7 +32,7 @@ bool CMidiStreamReader::midsBodyReader() readDWLE();//size uint32_t cblocks=readDWLE(); uint32_t curid=0,cts=0; - for(int i=0;ieventList.push_back(ev);eventdiscarded=0; qmpMidiFmtPlugin::api->callEventReaderCB(SEventCallBackData(ev.type,ev.p1,ev.p2,ev.time)); if(eventdiscarded)ret->eventList.pop_back(); diff --git a/qmidiplayer-desktop/qmpmainwindow.cpp b/qmidiplayer-desktop/qmpmainwindow.cpp index 56d3824..491c39d 100644 --- a/qmidiplayer-desktop/qmpmainwindow.cpp +++ b/qmidiplayer-desktop/qmpmainwindow.cpp @@ -259,9 +259,7 @@ void qmpMainWindow::updateWidgets() ui->lbCurTime->setText("00:00"); } else - { - - } + switchTrack(plistw->getNextItem()); } if(renderTh) { diff --git a/qmidiplayer-desktop/qmpplugin.cpp b/qmidiplayer-desktop/qmpplugin.cpp index 7370e20..5b4dd11 100644 --- a/qmidiplayer-desktop/qmpplugin.cpp +++ b/qmidiplayer-desktop/qmpplugin.cpp @@ -146,7 +146,7 @@ int qmpPluginAPI::getChannelCC(int ch,int cc) {return qmw&&qmw->getPlayer()?qmw->getPlayer()->getCC(ch,cc):0;} int qmpPluginAPI::getChannelPreset(int ch) { - int b,p;char nm[25],ret[33];ret[0]=0; + int b,p;char nm[25]; if(qmw&&qmw->getPlayer()) { qmw->getPlayer()->getChannelPreset(ch,&b,&p,nm); -- cgit v1.2.3