aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2017-02-10 23:56:09 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2017-02-10 23:56:09 +0800
commitacf466561f17bf0eb6c19ea0467b27f5392aeb36 (patch)
treee2a2eb7c87e99a47d2536c10abcee6e3b50cdded
parent70f0007154992c0bc89e11af4fe7dcc2c493aac3 (diff)
downloadQMidiPlayer-acf466561f17bf0eb6c19ea0467b27f5392aeb36.tar.xz
Road to standardize: use two parameters for pitchbend.
Documentation. Minor bug fix.
-rw-r--r--ChangeLog5
-rw-r--r--core/qmpmidiplay.cpp15
-rw-r--r--core/qmpmidiread.cpp2
-rw-r--r--doc/miscellaneous.html15
-rw-r--r--doc/troubleshooting.html8
-rw-r--r--include/qmpcorepublic.hpp2
-rw-r--r--midifmt-plugin/midifmtplugin.cpp4
-rw-r--r--qmidiplayer-desktop/qmpmainwindow.cpp4
-rw-r--r--qmidiplayer-desktop/qmpplugin.cpp2
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 @@
<li>0.6.x Settings and experimental Windows support</li>
<li>0.7.2 MIDI mapping, first stable version</li>
<li>0.7.8 Plugin interface, UI refactoring</li>
- <li>0.8.x Visualization (the default visualization plugin)</li>
- <li>0.9.x File reader plugin API, event filter/modifier API. Stable version.</li>
- <li>1.x+ Translation, documentation, Maintaince only</li>
+ <li>0.8.x Visualization (the default visualization plugin).</li>
+ <li>0.8.5+ File reader plugin API, event filter/modifier API. </li>
+ <li>0.9.x API Stablization. Revive lite version.</li>
+ <li>1.x+ Translation, documentation, Maintaince only.</li>
</ul>
<h3 id="faq">FAQs</h3>
<h4>0. (Windows version) It complains about a missing dll!</h4>
@@ -64,21 +65,21 @@
github issue tracker</a>. Don't forget to check if the bug has already been
fixed in a newer version!
</p>
- <h4>3. On which platform(s) do you develop this project?</h4>
+ <h4>3. On what platform(s) do you develop this project?</h4>
<p>
Major platforms used:
<ul>
- <li>Debian GNU/Linux unstable(sid) amd64 on a Lenovo ideapad Y570 (i7-2960XM, 16GB RAM, HD3000/GT555M)</li>
+ <li>Debian GNU/Linux unstable(sid) amd64 on custom machine (i7-2960XM, 16GB RAM, GTX960, X9SCV-QV4)</li>
<li>Arch Linux amd64 on a Lenovo ThinkPad X1 yoga 1st Gen. (i7-6600U, 16GB RAM, HD520)</li>
</ul>
Platforms for building the Windows version:
<ul>
- <li>Windows 10 Pro on the ThinkPad X1 yoga mentioned above.</li>
+ <li>Windows 10 Insider Pro on the ThinkPad X1 yoga mentioned above.</li>
</ul>
</p>
<h3 id="contact">Contact the author</h3>
<p>
- E-mail: chirs241097 'at' gmail 'dot' com
+ E-mail: chirs241097 'at' gmail 'dot' com<br>
Twitter: @chirs241097
</p>
</div>
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.
</p>
+ <h3>9. 3D visualization is upsidedown/rotated/black.</h3>
+ <p>
+ 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.
+ </p>
</div>
</body>
-</html> \ No newline at end of file
+</html>
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;i<cblocks;++i)
+ for(uint32_t i=0;i<cblocks;++i)
{
readDWLE();
uint32_t blocksz=readDWLE(),cpos=ftell(f);
@@ -50,8 +50,6 @@ bool CMidiStreamReader::midsBodyReader()
//fprintf(stderr,"ev: @ %x t %x p1 %x p2 %x\n",ev.time,ev.type,ev.p1,ev.p2);
if((ev.type&0xF0)==0x90&&ev.p2==0)//Note on with zero velo
ev.type=(ev.type&0x0F)|0x80;
- if((ev.type&0xF0)==0xE0)//pitch wheel
- {ev.p1=(ev.p1|(ev.p2<<7))&0x3FFF;ev.p2=0;}
ret->eventList.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);