aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--doc/version.html4
-rw-r--r--doc/visualization.html8
-rw-r--r--qmidiplayer-desktop/qmphelpwindow.hpp2
-rw-r--r--visualization/qmpvisualization.cpp34
5 files changed, 38 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index 5c7849f..d1457fd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2016-05-28 0.8.2 alpha
+Add option to tweak the OSD. More info shown in the OSD.
+Bump version. We have stayed at 0.8.1 for a long time
+and the visualization plugin is almost fully functional now.
+
2016-05-27 0.8.1 alpha
Compute coordinates of pitch-bent notes more precisely.
Also load resources from system-wide folder.
diff --git a/doc/version.html b/doc/version.html
index 5a5a775..93bd344 100644
--- a/doc/version.html
+++ b/doc/version.html
@@ -26,11 +26,11 @@
<h1>Version information</h1>
<div style="text-align:center;">
<img src="../img/qmidiplyr.png"><br>
- QMidiPlayer documentation for version 0.8.1<br>
+ QMidiPlayer documentation for version 0.8.2<br>
An MIDI player based on fluidsynth and Qt.<br>
Written by Chris Xiong.<br>
</div><br>
<a href="index.html">Return</a>
</div>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/doc/visualization.html b/doc/visualization.html
index d11f3fa..1993537 100644
--- a/doc/visualization.html
+++ b/doc/visualization.html
@@ -53,10 +53,11 @@ left | right ← → │ │
<li>Show channel labels: If checked, channel preset will be shown on the left side.</li>
<li>Show particles: Whether to draw particles. Very resource-intensive!</li>
<li>Horizontal Visualization: Uses a horizontal visualization style. Overrides everything above except 3D Notes.</li>
- <li>View distance: This option affects the maximum number of notes rendered on the screen.</li>
+ <li>2D Visualization: Tick this to use a simple 2D visualization instead. Much less resource-demanding.</li>
+ <li>View distance: This option affects the maximum number of notes rendered on the screen. Only applies to 3D visualization.</li>
<li>Note stretch: The length multiplier of notes.</li>
<li>Minimum note length: Avoid notes that are too short to be visible by adjusting this value.</li>
- <li>Chequer board tint: change the color of the chequer board background.</li>
+ <li>Chequer board tint (AARRGGBB): change the color of the chequer board background.</li>
<li>Background Image: Use a background image instead of the default dull grey color.</li>
</ul>
</li>
@@ -70,9 +71,10 @@ left | right ← → │ │
<li>Supersampling: Supersample anti-aliasing. 1 means no SSAA.</li>
<li>Multisampling: Multisample anti-aliasing. 0 means no MSAA.</li>
<li>FOV: Field of view.</li>
+ <li>OSD Position: Change position of the on screen display, or just disable it.</li>
</ul>
</li>
</ul>
</div>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/qmidiplayer-desktop/qmphelpwindow.hpp b/qmidiplayer-desktop/qmphelpwindow.hpp
index 6b1d719..beae1fa 100644
--- a/qmidiplayer-desktop/qmphelpwindow.hpp
+++ b/qmidiplayer-desktop/qmphelpwindow.hpp
@@ -2,7 +2,7 @@
#define QMPHELPWINDOW_H
#include <QDialog>
-#define APP_VERSION "0.8.1"
+#define APP_VERSION "0.8.2"
namespace Ui {
class qmpHelpWindow;
diff --git a/visualization/qmpvisualization.cpp b/visualization/qmpvisualization.cpp
index c166543..8e169fa 100644
--- a/visualization/qmpvisualization.cpp
+++ b/visualization/qmpvisualization.cpp
@@ -10,9 +10,11 @@ int notestretch=100;//length of quarter note
int minnotelength=100;
int noteappearance=1,showpiano=1,stairpiano=1,savevp=1,showlabel=1;
int wwidth=800,wheight=600,wsupersample=1,wmultisample=0,showparticle=1;
-int horizontal=1,flat=0;
+int horizontal=1,flat=0,osdpos;
int fov=60,vsync=1,tfps=60;
DWORD chkrtint=0xFF999999;
+const char* minors="abebbbf c g d a e b f#c#g#d#a#";
+const char* majors="CbGbDbAbEbBbF C G D A E B F#C#";
double fpoffsets[]={1,18,28,50,55,82,98,109,130,137,161,164,191};
double froffsets[]={0,18,33,50,65,82,98,113,130,145,161,176,191};
DWORD iccolors[]={0XFFFF0000,0XFFFF8000,0XFFFFBF00,0XFFFFFF00,
@@ -65,6 +67,7 @@ void qmpVisualization::showThread()
savevp=api->getOptionBool("Visualization/savevp");
vsync=api->getOptionBool("Visualization/vsync");
tfps=api->getOptionInt("Visualization/tfps");
+ osdpos=api->getOptionEnumInt("Visualization/osdpos");
viewdist=api->getOptionInt("Visualization/viewdist");
notestretch=api->getOptionInt("Visualization/notestretch");
minnotelength=api->getOptionInt("Visualization/minnotelen");
@@ -549,18 +552,28 @@ bool qmpVisualization::update()
sm->smRenderQuad(&q);
}
}
+ if(osdpos==4){sm->smRenderEnd();return shouldclose;}
+ int t,r;t=api->getKeySig();r=(int8_t)((t>>8)&0xFF)+7;t&=0xFF;
+ std::string ts(t?minors:majors);ts=ts.substr(2*r,2);
+ int step=20,xp=(osdpos&1)?wwidth-20:1,yp=osdpos<2?wheight-step*5-4:step+4,align=osdpos&1?ALIGN_RIGHT:ALIGN_LEFT;
font2.updateString(L"Title: %ls",api->getWTitle().c_str());
- font2.render(1,wheight-64,0.5,0xFFFFFFFF,ALIGN_LEFT);
- font2.render(0,wheight-65,0.5,0xFF000000,ALIGN_LEFT);
+ font2.render(xp,yp,0.5,0xFFFFFFFF,align);
+ font2.render(xp-1,yp-1,0.5,0xFF000000,align);
+ font.updateString(L"Time Sig: %d/%d",api->getTimeSig()>>8,1<<(api->getTimeSig()&0xFF));
+ font.render(xp,yp+=step,0.5,0xFFFFFFFF,align);
+ font.render(xp-1,yp-1,0.5,0xFF000000,align);
+ font.updateString(L"Key Sig: %s",ts.c_str());
+ font.render(xp,yp+=step,0.5,0xFFFFFFFF,align);
+ font.render(xp-1,yp-1,0.5,0xFF000000,align);
font.updateString(L"Tempo: %.2f",api->getRealTempo());
- font.render(1,wheight-44,0.5,0xFFFFFFFF,ALIGN_LEFT);
- font.render(0,wheight-45,0.5,0xFF000000,ALIGN_LEFT);
+ font.render(xp,yp+=step,0.5,0xFFFFFFFF,align);
+ font.render(xp-1,yp-1,0.5,0xFF000000,align);
font.updateString(L"Current tick: %d",ctk);
- font.render(1,wheight-24,0.5,0xFFFFFFFF,ALIGN_LEFT);
- font.render(0,wheight-25,0.5,0xFF000000,ALIGN_LEFT);
+ font.render(xp,yp+=step,0.5,0xFFFFFFFF,align);
+ font.render(xp-1,yp-1,0.5,0xFF000000,align);
font.updateString(L"FPS: %.2f",sm->smGetFPS());
- font.render(1,wheight-4,0.5,0xFFFFFFFF,ALIGN_LEFT);
- font.render(0,wheight-5,0.5,0xFF000000,ALIGN_LEFT);
+ font.render(xp,yp+=step,0.5,0xFFFFFFFF,align);
+ font.render(xp-1,yp-1,0.5,0xFF000000,align);
sm->smRenderEnd();
return shouldclose;
}
@@ -612,6 +625,8 @@ void qmpVisualization::init()
api->registerOptionInt("Visualization-Video","Supersampling","Visualization/supersampling",1,16,0);
api->registerOptionInt("Visualization-Video","Multisampling","Visualization/multisampling",0,16,0);
api->registerOptionInt("Visualization-Video","FOV","Visualization/fov",30,180,60);
+ std::vector<std::string> tv;tv.push_back("Bottom left");tv.push_back("Bottom right");tv.push_back("Top left");tv.push_back("Top right");tv.push_back("Hidden");
+ api->registerOptionEnumInt("Visualization-Video","OSD Position","Visualization/osdpos",tv,0);
api->registerOptionInt("Visualization-Appearance","View distance","Visualization/viewdist",20,1000,100);
api->registerOptionInt("Visualization-Appearance","Note stretch","Visualization/notestretch",20,500,100);
api->registerOptionInt("Visualization-Appearance","Minimum note length","Visualization/minnotelen",20,500,100);
@@ -638,6 +653,7 @@ void qmpVisualization::init()
savevp=api->getOptionBool("Visualization/savevp");
vsync=api->getOptionBool("Visualization/vsync");
tfps=api->getOptionInt("Visualization/tfps");
+ osdpos=api->getOptionEnumInt("Visualization/osdpos");
viewdist=api->getOptionInt("Visualization/viewdist");
notestretch=api->getOptionInt("Visualization/notestretch");
minnotelength=api->getOptionInt("Visualization/minnotelen");