aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--doc/visualization.html9
-rw-r--r--qmidiplayer-desktop/qmpplugin.cpp4
-rw-r--r--visualization/qmpvisualization.cpp15
4 files changed, 29 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 8cd9a0a..86085ab 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2016-06-02 0.8.2 alpha
+Add option to change note colors.
+
2016-06-01 0.8.2 alpha
Initial event modifier and event filter stub.
diff --git a/doc/visualization.html b/doc/visualization.html
index 5b0a557..5ca7537 100644
--- a/doc/visualization.html
+++ b/doc/visualization.html
@@ -75,6 +75,15 @@ left | right ← → │ │
<li>Font size: Change font size used by the visualization. Useful for HiDPI screens.</li>
</ul>
</li>
+ <li>
+ Key-only options<br>
+ Options listed here does not provide an entry in the option GUI. You have to add them to the configuration file manually if they don't exist in it.
+ <ul>
+ <li>px py pz rx ry rz (automatically created if save viewport is set to true): Doubles. Saves the last viewport. (px,py,pz): Position of the camera. (rx,ry,rz): Orientation of the camera.</li>
+ <li>chActiveColor&lt;channel id 0..15&gt; : Unsigned 32-bit integers. Colors of sounding notes.</li>
+ <li>chInactiveColor&lt;channel id 0..15&gt; : Unsigned 32-bit integers. Colors of normal notes.</li>
+ </ul>
+ </li>
</ul>
</div>
</body>
diff --git a/qmidiplayer-desktop/qmpplugin.cpp b/qmidiplayer-desktop/qmpplugin.cpp
index 99ac92f..1ffd32c 100644
--- a/qmidiplayer-desktop/qmpplugin.cpp
+++ b/qmidiplayer-desktop/qmpplugin.cpp
@@ -151,8 +151,8 @@ std::string qmpPluginAPI::getChannelPresetString(int ch)
return std::string(ret);
}
-void qmpPluginAPI::discardLastEvent(){}
-void qmpPluginAPI::commitEventChange(SEventCallBackData){}
+void qmpPluginAPI::discardLastEvent(){if(qmw&&qmw->getPlayer())qmw->getPlayer()->discardLastEvent();}
+void qmpPluginAPI::commitEventChange(SEventCallBackData d){if(qmw&&qmw->getPlayer())qmw->getPlayer()->commitEventChange(d);}
int qmpPluginAPI::registerEventHandlerIntf(IMidiCallBack *cb,void *userdata)
{return qmw->getPlayer()->setEventHandlerCB(cb,userdata);}
diff --git a/visualization/qmpvisualization.cpp b/visualization/qmpvisualization.cpp
index 106c6c9..2ba091b 100644
--- a/visualization/qmpvisualization.cpp
+++ b/visualization/qmpvisualization.cpp
@@ -73,6 +73,11 @@ void qmpVisualization::showThread()
notestretch=api->getOptionInt("Visualization/notestretch");
minnotelength=api->getOptionInt("Visualization/minnotelen");
chkrtint=api->getOptionUint("Visualization/chkrtint");
+ for(int i=0;i<16;++i)
+ {
+ accolors[i]=api->getOptionUint("Visualization/chActiveColor"+std::to_string(i));
+ iccolors[i]=api->getOptionUint("Visualization/chInactiveColor"+std::to_string(i));
+ }
sm=smGetInterface(SMELT_APILEVEL);
sm->smVidMode(wwidth,wheight,true);
sm->smUpdateFunc(h);sm->smQuitFunc(closeh);
@@ -640,6 +645,11 @@ void qmpVisualization::init()
api->registerOptionDouble("","","Visualization/rx",-999999999,999999999,0);
api->registerOptionDouble("","","Visualization/ry",-999999999,999999999,75);
api->registerOptionDouble("","","Visualization/rz",-999999999,999999999,90);
+ for(int i=0;i<16;++i)
+ {
+ api->registerOptionUint("","","Visualization/chActiveColor"+std::to_string(i),0,0xFFFFFFFF,accolors[i]);
+ api->registerOptionUint("","","Visualization/chInactiveColor"+std::to_string(i),0,0xFFFFFFFF,iccolors[i]);
+ }
wwidth=api->getOptionInt("Visualization/wwidth");
wheight=api->getOptionInt("Visualization/wheight");
wsupersample=api->getOptionInt("Visualization/supersampling");
@@ -661,6 +671,11 @@ void qmpVisualization::init()
notestretch=api->getOptionInt("Visualization/notestretch");
minnotelength=api->getOptionInt("Visualization/minnotelen");
chkrtint=api->getOptionUint("Visualization/chkrtint");
+ for(int i=0;i<16;++i)
+ {
+ accolors[i]=api->getOptionUint("Visualization/chActiveColor"+std::to_string(i));
+ iccolors[i]=api->getOptionUint("Visualization/chInactiveColor"+std::to_string(i));
+ }
}
void qmpVisualization::deinit()
{