aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--img/kb.svg63
-rwxr-xr-ximg/kb_128.pngbin0 -> 8727 bytes
-rw-r--r--img/kb_128_pre.svg126
-rw-r--r--visualization/qmpvisualization.cpp159
-rw-r--r--visualization/qmpvisualization.hpp2
-rw-r--r--visualization/visualization.pro2
7 files changed, 335 insertions, 20 deletions
diff --git a/ChangeLog b/ChangeLog
index d553837..bd1d4f9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2016-05-26 0.8.1 alpha
+Keyboard for 2D visualization.
+
2016-05-25 0.8.1 alpha
Horizontal 2D visualization.
diff --git a/img/kb.svg b/img/kb.svg
new file mode 100644
index 0000000..a7a186a
--- /dev/null
+++ b/img/kb.svg
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.91 r13725"
+ width="512"
+ height="460"
+ viewBox="0 0 512 460"
+ sodipodi:docname="kb.svg">
+ <metadata
+ id="metadata8">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <defs
+ id="defs6" />
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1366"
+ inkscape:window-height="699"
+ id="namedview4"
+ showgrid="false"
+ inkscape:zoom="0.7265402"
+ inkscape:cx="388.09271"
+ inkscape:cy="243.78333"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg2"
+ fit-margin-top="0"
+ fit-margin-left="0"
+ fit-margin-right="0"
+ fit-margin-bottom="0" />
+ <path
+ style="fill:#000000"
+ d="M 0,230 0,0 l 256,0 256,0 0,0.93877551 0,0.93877549 -19.54562,0 -19.54563,0 0,153.020409 0,153.10222 -31.46368,0 0,75.959 0,76.04082 -1.43017,0 -1.43017,0 0,-76.04082 0,-75.959 c -3.15722,-3e-4 -6.66858,5e-4 -9.50873,-3.7e-4 -0.003,-51.71075 -0.008,-103.50334 -0.0127,-155.2141 l -0.013,-150.908159 -20.02235,0 -20.02234,0 0,153.020409 0,153.10204 -20.02235,0 0,75.95918 0,76.04082 -1.43017,0 -1.43016,0 0,-76.04082 0,-75.95918 -20.02235,0 0,-153.10204 0,-153.020409 -20.49907,0 -20.49907,0 0,152.968969 0,153.15348 -9.05773,0 -0.244,76.19388 -0.244,75.80612 -1.41889,0 -1.41889,0 -0.244,-75.80612 -0.244,-76.19388 -30.03352,0 0,-153.12587 0,-152.996579 -20.02234,0 -20.02235,0 0,229.061229 0,229.06122 -1.43017,0 -1.43017,0 0,-229.06122 0,-229.061229 -21.92923,0 -21.92924,0 0,153.020409 0,153.10204 -25.74301,0 0,75.95918 0,76.04082 -1.43017,0 -1.43017,0 0,-76.04082 0,-75.95918 -13.34823,0 0,-153.10204 0,-153.020409 -21.92924,0 -21.929232,0 0,153.020409 0,153.10204 -13.348231,0 0,75.95918 0,76.04082 -1.430167,0 -1.430168,0 0,-76.04082 0,-75.95918 -26.696462,0 0,-153.10204 0,-153.020409 -21.452514,0 -22.405316,0 0,229.061229 L 2.861,460 1.43,460 0,460 Z"
+ id="path4138"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc" />
+</svg>
diff --git a/img/kb_128.png b/img/kb_128.png
new file mode 100755
index 0000000..2d1bcc8
--- /dev/null
+++ b/img/kb_128.png
Binary files differ
diff --git a/img/kb_128_pre.svg b/img/kb_128_pre.svg
new file mode 100644
index 0000000..ec2a189
--- /dev/null
+++ b/img/kb_128_pre.svg
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.91 r13725"
+ width="5485"
+ height="460"
+ viewBox="0 0 5485 460"
+ sodipodi:docname="kb_128.svg"
+ inkscape:export-filename="/home/chrisoft/devel/qmidiplayer/qmidiplayer/img/kb_128.png"
+ inkscape:export-xdpi="33.604374"
+ inkscape:export-ydpi="33.604374">
+ <metadata
+ id="metadata8">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <defs
+ id="defs6" />
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="1"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1366"
+ inkscape:window-height="699"
+ id="namedview4"
+ showgrid="false"
+ inkscape:zoom="1.027483"
+ inkscape:cx="121.81761"
+ inkscape:cy="189.93351"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg2"
+ fit-margin-top="0"
+ fit-margin-left="0"
+ fit-margin-right="0"
+ fit-margin-bottom="0" />
+ <path
+ style="fill:#000000"
+ d="M 0,230 0,4.0000001e-6 l 256,0 256,0 0,0.9387755099999 0,0.93877549 -19.54562,0 -19.54563,0 0,153.020405 0,153.10222 -31.46368,0 0,75.959 0,76.04082 -1.43017,0 -1.43017,0 0,-76.04082 0,-75.959 c -3.15722,-3e-4 -6.66858,5e-4 -9.50873,-3.7e-4 -0.003,-51.71075 -0.008,-103.50334 -0.0127,-155.2141 l -0.013,-150.908155 -20.02235,0 -20.02234,0 0,153.020405 0,153.10204 -20.02235,0 0,75.95918 0,76.04082 -1.43017,0 -1.43016,0 0,-76.04082 0,-75.95918 -20.02235,0 0,-153.10204 0,-153.020405 -20.49907,0 -20.49907,0 0,152.968965 0,153.15348 -9.05773,0 -0.244,76.19388 -0.244,75.80612 -1.41889,0 -1.41889,0 -0.244,-75.80612 -0.244,-76.19388 -30.03352,0 0,-153.12587 0,-152.996575 -20.02234,0 -20.02235,0 0,229.061225 0,229.06122 -1.43017,0 -1.43017,0 0,-229.06122 0,-229.061225 -21.92923,0 -21.92924,0 0,153.020405 0,153.10204 -25.74301,0 0,75.95918 0,76.04082 -1.43017,0 -1.43017,0 0,-76.04082 0,-75.95918 -13.34823,0 0,-153.10204 0,-153.020405 -21.92924,0 -21.929232,0 0,153.020405 0,153.10204 -13.348231,0 0,75.95918 0,76.04082 -1.430167,0 -1.430168,0 0,-76.04082 0,-75.95918 -26.696462,0 0,-153.10204 0,-153.020405 -21.452514,0 -22.405316,0 0,229.061225 L 2.861,460 1.43,460 0,460 Z"
+ id="path4138"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc" />
+ <path
+ style="fill:#000000"
+ d="M 512,230 512,4.0000001e-6 l 256,0 256,0 0,0.9387699999999 0,0.93878 -19.5456,0 -19.54565,0 0,153.020406 0,153.10222 -31.46368,0 0,75.959 0,76.04082 -1.43017,0 -1.43017,0 0,-76.04082 0,-75.959 c -3.15722,-3e-4 -6.66858,5e-4 -9.50873,-3.7e-4 -0.003,-51.71075 -0.008,-103.50334 -0.0127,-155.2141 l -0.013,-150.908156 -20.02235,0 -20.02234,0 0,153.020406 0,153.10204 -20.02235,0 0,75.95918 0,76.04082 -1.43017,0 -1.43016,0 0,-76.04082 0,-75.95918 -20.02235,0 0,-153.10204 0,-153.020406 -20.49907,0 -20.49907,0 0,152.968966 0,153.15348 -9.05773,0 -0.244,76.19388 -0.244,75.80612 -1.41889,0 -1.41889,0 -0.244,-75.80612 -0.244,-76.19388 -30.03352,0 0,-153.12587 0,-152.996576 -20.02234,0 -20.02235,0 0,229.061226 0,229.06122 -1.43017,0 -1.43017,0 0,-229.06122 0,-229.061226 -21.92923,0 -21.92924,0 0,153.020406 0,153.10204 -25.74301,0 0,75.95918 0,76.04082 -1.43017,0 -1.43017,0 0,-76.04082 0,-75.95918 -13.34823,0 0,-153.10204 0,-153.020406 -21.92924,0 -21.92924,0 0,153.020406 0,153.10204 -13.34823,0 0,75.95918 0,76.04082 -1.43016,0 -1.43017,0 0,-76.04082 0,-75.95918 -26.69646,0 0,-153.10204 0,-153.020406 -21.45252,0 -22.40531,0 0,229.061226 0,229.06122 -1.431,0 -1.43,0 z"
+ id="path4138-6"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc" />
+ <path
+ style="fill:#000000"
+ d="m 1024.0003,230 0,-229.9999959999999 256,0 256,0 0,0.9387699999999 0,0.93878 -19.5456,0 -19.5457,0 0,153.020406 0,153.10222 -31.4636,0 0,75.959 0,76.04082 -1.4302,0 -1.4302,0 0,-76.04082 0,-75.959 c -3.1572,-3e-4 -6.6686,5e-4 -9.5087,-3.7e-4 0,-51.71075 -0.01,-103.50334 -0.013,-155.2141 l -0.013,-150.908156 -20.0224,0 -20.0223,0 0,153.020406 0,153.10204 -20.0223,0 0,75.95918 0,76.04082 -1.4302,0 -1.4302,0 0,-76.04082 0,-75.95918 -20.0223,0 0,-153.10204 0,-153.020406 -20.4991,0 -20.4991,0 0,152.968966 0,153.15348 -9.0577,0 -0.244,76.19388 -0.244,75.80612 -1.4189,0 -1.4189,0 -0.244,-75.80612 -0.244,-76.19388 -30.0335,0 0,-153.12587 0,-152.996576 -20.0223,0 -20.0224,0 0,229.061226 0,229.06122 -1.4302,0 -1.4301,0 0,-229.06122 0,-229.061226 -21.9293,0 -21.9292,0 0,153.020406 0,153.10204 -25.743,0 0,75.95918 0,76.04082 -1.4302,0 -1.4301,0 0,-76.04082 0,-75.95918 -13.3483,0 0,-153.10204 0,-153.020406 -21.9292,0 -21.9292,0 0,153.020406 0,153.10204 -13.3483,0 0,75.95918 0,76.04082 -1.4301,0 -1.4302,0 0,-76.04082 0,-75.95918 -26.6965,0 0,-153.10204 0,-153.020406 -21.4525,0 -22.4053,0 0,229.061226 0,229.06122 -1.431,0 -1.43,0 z"
+ id="path4138-8"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc" />
+ <path
+ style="fill:#000000"
+ d="m 1536.0003,230 0,-229.9999959999999 256,0 256,0 0,0.9387699999999 0,0.93878 -19.5456,0 -19.5457,0 0,153.020406 0,153.10222 -31.4636,0 0,75.959 0,76.04082 -1.4302,0 -1.4302,0 0,-76.04082 0,-75.959 c -3.1572,-3e-4 -6.6686,5e-4 -9.5087,-3.7e-4 0,-51.71075 -0.01,-103.50334 -0.013,-155.2141 l -0.013,-150.908156 -20.0224,0 -20.0223,0 0,153.020406 0,153.10204 -20.0224,0 0,75.95918 0,76.04082 -1.4301,0 -1.4302,0 0,-76.04082 0,-75.95918 -20.0223,0 0,-153.10204 0,-153.020406 -20.4991,0 -20.4991,0 0,152.968966 0,153.15348 -9.0577,0 -0.244,76.19388 -0.244,75.80612 -1.4189,0 -1.4189,0 -0.244,-75.80612 -0.244,-76.19388 -30.0335,0 0,-153.12587 0,-152.996576 -20.0223,0 -20.0224,0 0,229.061226 0,229.06122 -1.4302,0 -1.4301,0 0,-229.06122 0,-229.061226 -21.9293,0 -21.9292,0 0,153.020406 0,153.10204 -25.743,0 0,75.95918 0,76.04082 -1.4302,0 -1.4302,0 0,-76.04082 0,-75.95918 -13.3482,0 0,-153.10204 0,-153.020406 -21.9292,0 -21.9293,0 0,153.020406 0,153.10204 -13.3482,0 0,75.95918 0,76.04082 -1.4302,0 -1.4301,0 0,-76.04082 0,-75.95918 -26.6965,0 0,-153.10204 0,-153.020406 -21.4525,0 -22.4053,0 0,229.061226 0,229.06122 -1.431,0 -1.43,0 z"
+ id="path4138-6-3"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc" />
+ <path
+ style="fill:#000000"
+ d="m 2048.0003,230 0,-230 256,0 256,0 0,0.938775 0,0.938776 -19.5456,0 -19.5456,0 0,153.020409 0,153.10222 -31.4637,0 0,75.959 0,76.04082 -1.4302,0 -1.4301,0 0,-76.04082 0,-75.959 c -3.1573,-3e-4 -6.6686,5e-4 -9.5088,-3.7e-4 0,-51.71075 -0.01,-103.50334 -0.013,-155.2141 l -0.013,-150.908159 -20.0223,0 -20.0224,0 0,153.020409 0,153.10204 -20.0223,0 0,75.95918 0,76.04082 -1.4302,0 -1.4301,0 0,-76.04082 0,-75.95918 -20.0224,0 0,-153.10204 0,-153.020409 -20.4991,0 -20.499,0 0,152.968969 0,153.15348 -9.0578,0 -0.244,76.19388 -0.244,75.80612 -1.4189,0 -1.4188,0 -0.244,-75.80612 -0.244,-76.19388 -30.0336,0 0,-153.12587 0,-152.996579 -20.0223,0 -20.0224,0 0,229.061229 0,229.06122 -1.4301,0 -1.4302,0 0,-229.06122 0,-229.061229 -21.9292,0 -21.9293,0 0,153.020409 0,153.10204 -25.743,0 0,75.95918 0,76.04082 -1.4301,0 -1.4302,0 0,-76.04082 0,-75.95918 -13.3482,0 0,-153.10204 0,-153.020409 -21.9293,0 -21.9292,0 0,153.020409 0,153.10204 -13.3482,0 0,75.95918 0,76.04082 -1.4302,0 -1.4302,0 0,-76.04082 0,-75.95918 -26.6964,0 0,-153.10204 0,-153.020409 -21.4526,0 -22.4053,0 0,229.061229 0,229.06122 -1.431,0 -1.43,0 z"
+ id="path4138-80"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc" />
+ <path
+ style="fill:#000000"
+ d="m 2560.0003,230 0,-230 256,0 256,0 0,0.93877 0,0.93878 -19.5456,0 -19.5456,0 0,153.02041 0,153.10222 -31.4637,0 0,75.959 0,76.04082 -1.4302,0 -1.4301,0 0,-76.04082 0,-75.959 c -3.1573,-3e-4 -6.6686,5e-4 -9.5088,-3.7e-4 0,-51.71075 -0.01,-103.50334 -0.013,-155.2141 l -0.013,-150.90816 -20.0223,0 -20.0224,0 0,153.02041 0,153.10204 -20.0223,0 0,75.95918 0,76.04082 -1.4302,0 -1.4301,0 0,-76.04082 0,-75.95918 -20.0224,0 0,-153.10204 0,-153.02041 -20.4991,0 -20.499,0 0,152.96897 0,153.15348 -9.0578,0 -0.244,76.19388 -0.244,75.80612 -1.4189,0 -1.4188,0 -0.244,-75.80612 -0.244,-76.19388 -30.0336,0 0,-153.12587 0,-152.99658 -20.0223,0 -20.0224,0 0,229.06123 0,229.06122 -1.4301,0 -1.4302,0 0,-229.06122 0,-229.06123 -21.9292,0 -21.9293,0 0,153.02041 0,153.10204 -25.743,0 0,75.95918 0,76.04082 -1.4301,0 -1.4302,0 0,-76.04082 0,-75.95918 -13.3482,0 0,-153.10204 0,-153.02041 -21.9293,0 -21.9292,0 0,153.02041 0,153.10204 -13.3483,0 0,75.95918 0,76.04082 -1.4301,0 -1.4302,0 0,-76.04082 0,-75.95918 -26.6964,0 0,-153.10204 0,-153.02041 -21.4526,0 -22.4053,0 0,229.06123 0,229.06122 -1.431,0 -1.43,0 z"
+ id="path4138-6-5"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc" />
+ <path
+ style="fill:#000000"
+ d="m 3072.0006,230 0,-230 256,0 256,0 0,0.93877 0,0.93878 -19.5456,0 -19.5457,0 0,153.02041 0,153.10222 -31.4636,0 0,75.959 0,76.04082 -1.4302,0 -1.4302,0 0,-76.04082 0,-75.959 c -3.1572,-3e-4 -6.6686,5e-4 -9.5087,-3.7e-4 0,-51.71075 -0.01,-103.50334 -0.013,-155.2141 l -0.013,-150.90816 -20.0224,0 -20.0223,0 0,153.02041 0,153.10204 -20.0223,0 0,75.95918 0,76.04082 -1.4302,0 -1.4302,0 0,-76.04082 0,-75.95918 -20.0223,0 0,-153.10204 0,-153.02041 -20.4991,0 -20.4991,0 0,152.96897 0,153.15348 -9.0577,0 -0.244,76.19388 -0.244,75.80612 -1.4189,0 -1.4189,0 -0.244,-75.80612 -0.244,-76.19388 -30.0335,0 0,-153.12587 0,-152.99658 -20.0223,0 -20.0224,0 0,229.06123 0,229.06122 -1.4302,0 -1.4301,0 0,-229.06122 0,-229.06123 -21.9293,0 -21.9292,0 0,153.02041 0,153.10204 -25.743,0 0,75.95918 0,76.04082 -1.4302,0 -1.4301,0 0,-76.04082 0,-75.95918 -13.3483,0 0,-153.10204 0,-153.02041 -21.9292,0 -21.9292,0 0,153.02041 0,153.10204 -13.3483,0 0,75.95918 0,76.04082 -1.4301,0 -1.4302,0 0,-76.04082 0,-75.95918 -26.6965,0 0,-153.10204 0,-153.02041 -21.4525,0 -22.4053,0 0,229.06123 0,229.06122 -1.431,0 -1.43,0 z"
+ id="path4138-8-7"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc" />
+ <path
+ style="fill:#000000"
+ d="m 3584.0006,230 0,-230 256,0 256,0 0,0.93877 0,0.93878 -19.5456,0 -19.5457,0 0,153.02041 0,153.10222 -31.4636,0 0,75.959 0,76.04082 -1.4302,0 -1.4302,0 0,-76.04082 0,-75.959 c -3.1572,-3e-4 -6.6686,5e-4 -9.5087,-3.7e-4 0,-51.71075 -0.01,-103.50334 -0.013,-155.2141 l -0.013,-150.90816 -20.0224,0 -20.0223,0 0,153.02041 0,153.10204 -20.0224,0 0,75.95918 0,76.04082 -1.4301,0 -1.4302,0 0,-76.04082 0,-75.95918 -20.0223,0 0,-153.10204 0,-153.02041 -20.4991,0 -20.4991,0 0,152.96897 0,153.15348 -9.0577,0 -0.244,76.19388 -0.244,75.80612 -1.4189,0 -1.4189,0 -0.244,-75.80612 -0.244,-76.19388 -30.0335,0 0,-153.12587 0,-152.99658 -20.0223,0 -20.0224,0 0,229.06123 0,229.06122 -1.4302,0 -1.4301,0 0,-229.06122 0,-229.06123 -21.9293,0 -21.9292,0 0,153.02041 0,153.10204 -25.743,0 0,75.95918 0,76.04082 -1.4302,0 -1.4302,0 0,-76.04082 0,-75.95918 -13.3482,0 0,-153.10204 0,-153.02041 -21.9292,0 -21.9293,0 0,153.02041 0,153.10204 -13.3482,0 0,75.95918 0,76.04082 -1.4302,0 -1.4301,0 0,-76.04082 0,-75.95918 -26.6965,0 0,-153.10204 0,-153.02041 -21.4525,0 -22.4053,0 0,229.06123 0,229.06122 -1.431,0 -1.43,0 z"
+ id="path4138-6-3-1"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc" />
+ <path
+ style="fill:#000000"
+ d="m 4096.0003,230 0,-229.9999919999999 256,0 256,0 0,0.9387699999999 0,0.93878 -19.5456,0 -19.5457,0 0,153.020402 0,153.10222 -31.4636,0 0,75.959 0,76.04082 -1.4302,0 -1.4302,0 0,-76.04082 0,-75.959 c -3.1572,-3e-4 -6.6686,5e-4 -9.5087,-3.7e-4 0,-51.71075 -0.01,-103.50334 -0.013,-155.2141 l -0.013,-150.908152 -20.0224,0 -20.0223,0 0,153.020402 0,153.10204 -20.0223,0 0,75.95918 0,76.04082 -1.4302,0 -1.4302,0 0,-76.04082 0,-75.95918 -20.0223,0 0,-153.10204 0,-153.020402 -20.4991,0 -20.4991,0 0,152.968962 0,153.15348 -9.0577,0 -0.244,76.19388 -0.244,75.80612 -1.4189,0 -1.4189,0 -0.244,-75.80612 -0.244,-76.19388 -30.0335,0 0,-153.12587 0,-152.996572 -20.0223,0 -20.0224,0 0,229.061222 0,229.06122 -1.4302,0 -1.4301,0 0,-229.06122 0,-229.061222 -21.9293,0 -21.9292,0 0,153.020402 0,153.10204 -25.743,0 0,75.95918 0,76.04082 -1.4302,0 -1.4301,0 0,-76.04082 0,-75.95918 -13.3483,0 0,-153.10204 0,-153.020402 -21.9292,0 -21.9292,0 0,153.020402 0,153.10204 -13.3483,0 0,75.95918 0,76.04082 -1.4301,0 -1.4302,0 0,-76.04082 0,-75.95918 -26.6965,0 0,-153.10204 0,-153.020402 -21.4525,0 -22.4053,0 0,229.061222 0,229.06122 -1.431,0 -1.43,0 z"
+ id="path4138-8-7-2"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc" />
+ <path
+ style="fill:#000000"
+ d="m 4608.0003,230 0,-229.9999919999999 256,0 256,0 0,0.9387699999999 0,0.93878 -19.5456,0 -19.5457,0 0,153.020402 0,153.10222 -31.4636,0 0,75.959 0,76.04082 -1.4302,0 -1.4302,0 0,-76.04082 0,-75.959 c -3.1572,-3e-4 -6.6686,5e-4 -9.5087,-3.7e-4 0,-51.71075 -0.01,-103.50334 -0.013,-155.2141 l -0.013,-150.908152 -20.0224,0 -20.0223,0 0,153.020402 0,153.10204 -20.0224,0 0,75.95918 0,76.04082 -1.4301,0 -1.4302,0 0,-76.04082 0,-75.95918 -20.0223,0 0,-153.10204 0,-153.020402 -20.4991,0 -20.4991,0 0,152.968962 0,153.15348 -9.0577,0 -0.244,76.19388 -0.244,75.80612 -1.4189,0 -1.4189,0 -0.244,-75.80612 -0.244,-76.19388 -30.0335,0 0,-153.12587 0,-152.996572 -20.0223,0 -20.0224,0 0,229.061222 0,229.06122 -1.4302,0 -1.4301,0 0,-229.06122 0,-229.061222 -21.9293,0 -21.9292,0 0,153.020402 0,153.10204 -25.743,0 0,75.95918 0,76.04082 -1.4302,0 -1.4302,0 0,-76.04082 0,-75.95918 -13.3482,0 0,-153.10204 0,-153.020402 -21.9292,0 -21.9293,0 0,153.020402 0,153.10204 -13.3482,0 0,75.95918 0,76.04082 -1.4302,0 -1.4301,0 0,-76.04082 0,-75.95918 -26.6965,0 0,-153.10204 0,-153.020402 -21.4525,0 -22.4053,0 0,229.061222 0,229.06122 -1.431,0 -1.43,0 z"
+ id="path4138-6-3-1-9"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc" />
+ <path
+ style="fill:#000000"
+ d="m 5120.0003,230 0,-229.9999959999999 256,0 c 96.8001,0.09732679 108.9996,0 108.9996,0 L 5484.9999,308 l 2e-4,75.95918 0,76.04082 -2.0001,0 -1.481,0 0,-76.04082 0,-75.95918 0,-307.9999959999999 0,1.8779999999999 -56.4166,0 0,152.968516 0,153.15348 -9.0574,0 0,76.194 0,75.806 -1.9072,0 -1.9068,0 0,-75.80612 0,-76.19388 -30.0336,0 0,-153.12587 0,-152.996576 -20.0223,0 -20.0224,0 0,229.061226 0,229.06122 -1.4302,0 -1.4301,0 0,-229.06122 0,-229.061226 -21.9293,0 -21.9292,0 0,153.020406 0,153.10204 -25.743,0 0,75.95918 0,76.04082 -1.4302,0 -1.4302,0 0,-76.04082 0,-75.95918 -13.3482,0 0,-153.10204 0,-153.020406 -21.9292,0 -21.9293,0 0,153.020406 0,153.10204 -13.3482,0 0,75.95918 0,76.04082 -1.4302,0 -1.4301,0 0,-76.04082 0,-75.95918 -26.6965,0 0,-153.10204 0,-153.020406 -21.4525,0 -22.4053,0 0,229.061226 0,229.06122 -1.431,0 -1.43,0 z"
+ id="path4138-6-3-1-9-9"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc" />
+</svg>
diff --git a/visualization/qmpvisualization.cpp b/visualization/qmpvisualization.cpp
index 64920ce..9e4abe8 100644
--- a/visualization/qmpvisualization.cpp
+++ b/visualization/qmpvisualization.cpp
@@ -13,6 +13,8 @@ int wwidth=800,wheight=600,wsupersample=1,wmultisample=1,showparticle=1;
int horizontal=1,flat=0;
int fov=60,vsync=1,tfps=60;
DWORD chkrtint=0xFF999999;
+double fpoffsets[]={0,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,
0XFFBFFF00,0XFF80FF00,0XFF00FF00,0XFF00FFBF,
0XFF00FFFF,0XFF333333,0XFF00BFFF,0XFF007FFF,
@@ -77,6 +79,7 @@ void qmpVisualization::showThread()
sm->smTextureOpt(TPOT_POT,TFLT_LINEAR);
chequer=sm->smTextureLoad("chequerboard.png");if(!chequer)
chequer=sm->smTextureLoad("/usr/share/qmidiplayer/img/chequerboard.png");
+ pianotex=sm->smTextureLoad("kb_128.png");
particletex=sm->smTextureLoad("particle.png");
bgtex=sm->smTextureLoad(api->getOptionString("Visualization/background").c_str());
if(showparticle&&!horizontal)
@@ -166,6 +169,7 @@ void qmpVisualization::close()
font2.releaseTTF();
fonthdpi.releaseTTF();
sm->smTextureFree(chequer);
+ sm->smTextureFree(pianotex);
sm->smTextureFree(particletex);
if(bgtex)sm->smTextureFree(bgtex);
sm->smTargetFree(tdscn);
@@ -347,58 +351,177 @@ bool qmpVisualization::update()
memset(notestatus,0,sizeof(notestatus));
if(!horizontal)
{
- double notew=wwidth/128;
+ double notew=wwidth/128,nh=showpiano?wwidth/2048.*172.:0;
smQuad nq;nq.blend=BLEND_ALPHABLEND;nq.tex=0;
for(int i=0;i<4;++i)nq.v[i].z=0,nq.v[i].tx=nq.v[i].ty=0;
for(uint32_t i=elb;i<pool.size();++i)
{
- if(((double)pool[i]->tcs-ctk)*lpt+wheight-64<0)break;
- if(fabs((double)pool[i]->tcs-ctk)*lpt+wheight-64>0||fabs((double)pool[i]->tce-ctk)*lpt+wheight-64<wheight)
+ if(((double)pool[i]->tcs-ctk)*lpt+wheight-nh<0)break;
+ if(fabs((double)pool[i]->tcs-ctk)*lpt+wheight-nh>0||fabs((double)pool[i]->tce-ctk)*lpt+wheight-nh<wheight)
{
if(api->getChannelMask(pool[i]->ch))continue;
- smvec2d a(notew*(double)pool[i]->key,((double)pool[i]->tce-ctk)*lpt+wheight-64);
- smvec2d b(notew*(double)pool[i]->key+notew*0.9,((double)pool[i]->tcs-ctk)*lpt+wheight-64);
+ smvec2d a((froffsets[12]*(pool[i]->key/12)+froffsets[pool[i]->key%12])*wwidth/2048.,((double)pool[i]->tce-ctk)*lpt+wheight-nh);
+ smvec2d b(a.x+notew*0.9,((double)pool[i]->tcs-ctk)*lpt+wheight-nh);
bool isnoteon=pool[i]->tcs<=ctk&&pool[i]->tce>=ctk;if(isnoteon)
- a.x=notew*((double)pool[i]->key+api->getPitchBend(pool[i]->ch)),
- b.x=notew*((double)pool[i]->key+api->getPitchBend(pool[i]->ch))+notew*0.9;
+ a.x+=notew*api->getPitchBend(pool[i]->ch),
+ b.x+=notew*api->getPitchBend(pool[i]->ch);
notestatus[pool[i]->ch][pool[i]->key]|=isnoteon;
if(((double)pool[i]->tcs-pool[i]->tce)*lpt<minnotelength*0.04)
- a.y=((double)pool[i]->tcs-ctk)*lpt+wheight-64-minnotelength*0.04;
+ a.y=((double)pool[i]->tcs-ctk)*lpt+wheight-nh-minnotelength*0.04;
nq.v[0].x=nq.v[3].x=a.x;nq.v[0].y=nq.v[1].y=a.y;
nq.v[1].x=nq.v[2].x=b.x;nq.v[2].y=nq.v[3].y=b.y;for(int j=0;j<4;++j)
nq.v[j].col=SETA(isnoteon?accolors[pool[i]->ch]:iccolors[pool[i]->ch],int(pool[i]->vel*1.6+(isnoteon?52:32)));
sm->smRenderQuad(&nq);
}
}
- while(pool.size()&&elb<pool.size()&&fabs((double)pool[elb]->tce-ctk)*lpt+wheight-64>wheight)++elb;
+ while(pool.size()&&elb<pool.size()&&fabs((double)pool[elb]->tce-ctk)*lpt+wheight-nh>wheight)++elb;
+ q.tex=pianotex;
+ q.v[0].ty=q.v[3].ty=0;q.v[1].ty=q.v[2].ty=172./256.;
+ q.v[0].tx=q.v[1].tx=0;q.v[2].tx=q.v[3].tx=1.;
+ q.v[0].x=q.v[1].x=0;q.v[2].x=q.v[3].x=wwidth;
+ q.v[0].y=q.v[3].y=wheight-nh;q.v[1].y=q.v[2].y=wheight;
+ sm->smRenderQuad(&q);
+ for(int i=0,j;i<128;++i)
+ {
+ DWORD c=0;for(j=0;j<16;++j)if(notestatus[j][i]){c=SETA(iccolors[j],0xFF);break;}
+ q.v[0].x=q.v[1].x=(fpoffsets[12]*(i/12)+fpoffsets[i%12])*wwidth/2048.;
+ q.v[2].x=q.v[3].x=q.v[0].x;
+ q.v[0].y=q.v[3].y=wheight-nh;q.v[1].y=q.v[2].y=wheight;
+ if(!c)continue;for(int j=0;j<4;++j)q.v[j].col=c;
+ switch(i%12)
+ {
+ case 1:case 3:case 6:case 8:case 10:
+ q.v[1].y=q.v[2].y=wheight-nh+115*wwidth/2048.;
+ q.v[2].x+=15.*wwidth/2048;q.v[3].x+=15.*wwidth/2048;
+ q.v[0].ty=q.v[1].ty=1.;q.v[2].ty=q.v[3].ty=1.-15/256.;
+ q.v[0].tx=q.v[3].tx=1344/2048.;q.v[1].tx=q.v[2].tx=1459/2048.;
+ break;
+ case 0:
+ q.v[2].x+=27.*wwidth/2048;q.v[3].x+=27.*wwidth/2048;
+ q.v[0].ty=q.v[1].ty=1.;q.v[2].ty=q.v[3].ty=1.-27/256.;
+ q.v[0].tx=q.v[3].tx=0/2048.;q.v[1].tx=q.v[2].tx=172/2048.;
+ break;
+ case 2:
+ q.v[2].x+=29.*wwidth/2048;q.v[3].x+=29.*wwidth/2048;
+ q.v[0].ty=q.v[1].ty=1.;q.v[2].ty=q.v[3].ty=1.-29/256.;
+ q.v[0].tx=q.v[3].tx=192/2048.;q.v[1].tx=q.v[2].tx=364/2048.;
+ break;
+ case 4:
+ q.v[2].x+=28.*wwidth/2048;q.v[3].x+=28.*wwidth/2048;
+ q.v[0].ty=q.v[1].ty=1.;q.v[2].ty=q.v[3].ty=1.-28/256.;
+ q.v[0].tx=q.v[3].tx=384/2048.;q.v[1].tx=q.v[2].tx=556/2048.;
+ break;
+ case 5:
+ q.v[2].x+=28.*wwidth/2048;q.v[3].x+=28.*wwidth/2048;
+ q.v[0].ty=q.v[1].ty=1.;q.v[2].ty=q.v[3].ty=1.-28/256.;
+ q.v[0].tx=q.v[3].tx=576/2048.;q.v[1].tx=q.v[2].tx=748/2048.;
+ break;
+ case 7:
+ q.v[2].x+=29.*wwidth/2048;q.v[3].x+=29.*wwidth/2048;
+ q.v[0].ty=q.v[1].ty=1.;q.v[2].ty=q.v[3].ty=1.-29/256.;
+ q.v[0].tx=q.v[3].tx=768/2048.;q.v[1].tx=q.v[2].tx=940/2048.;
+ break;
+ case 9:
+ q.v[2].x+=28.*wwidth/2048;q.v[3].x+=28.*wwidth/2048;
+ q.v[0].ty=q.v[1].ty=1.;q.v[2].ty=q.v[3].ty=1.-28/256.;
+ q.v[0].tx=q.v[3].tx=960/2048.;q.v[1].tx=q.v[2].tx=1132/2048.;
+ break;
+ case 11:
+ q.v[2].x+=28.*wwidth/2048;q.v[3].x+=28.*wwidth/2048;
+ q.v[0].ty=q.v[1].ty=1.;q.v[2].ty=q.v[3].ty=1.-28/256.;
+ q.v[0].tx=q.v[3].tx=1152/2048.;q.v[1].tx=q.v[2].tx=1324/2048.;
+ break;
+ }
+ sm->smRenderQuad(&q);
+ }
}
else
{
- double notew=wheight/128;lpt=-lpt;
+ double notew=wheight/128,nh=showpiano?wheight/2048.*172.:0;lpt=-lpt;
smQuad nq;nq.blend=BLEND_ALPHABLEND;nq.tex=0;
for(int i=0;i<4;++i)nq.v[i].z=0,nq.v[i].tx=nq.v[i].ty=0;
for(uint32_t i=elb;i<pool.size();++i)
{
- if(((double)pool[i]->tcs-ctk)*lpt+64>wwidth)break;
- if(fabs((double)pool[i]->tcs-ctk)*lpt+64<wwidth||fabs((double)pool[i]->tce-ctk)*lpt+64>0)
+ if(((double)pool[i]->tcs-ctk)*lpt+nh>wwidth)break;
+ if(fabs((double)pool[i]->tcs-ctk)*lpt+nh<wwidth||fabs((double)pool[i]->tce-ctk)*lpt+nh>0)
{
if(api->getChannelMask(pool[i]->ch))continue;
- smvec2d a(((double)pool[i]->tce-ctk)*lpt+64,notew*(double)pool[i]->key);
- smvec2d b(((double)pool[i]->tcs-ctk)*lpt+64,notew*(double)pool[i]->key+notew*0.9);
+ smvec2d a(((double)pool[i]->tce-ctk)*lpt+nh,(froffsets[12]*(pool[i]->key/12)+froffsets[pool[i]->key%12])*wheight/2048.);
+ smvec2d b(((double)pool[i]->tcs-ctk)*lpt+nh,a.y+notew*0.9);
bool isnoteon=pool[i]->tcs<=ctk&&pool[i]->tce>=ctk;if(isnoteon)
- a.y=notew*((double)pool[i]->key+api->getPitchBend(pool[i]->ch)),
- b.y=notew*((double)pool[i]->key+api->getPitchBend(pool[i]->ch))+notew*0.9;
+ a.y+=notew*api->getPitchBend(pool[i]->ch),
+ b.y+=notew*api->getPitchBend(pool[i]->ch);
a.y=wheight-a.y;b.y=wheight-b.y;
notestatus[pool[i]->ch][pool[i]->key]|=isnoteon;
if(((double)pool[i]->tce-pool[i]->tcs)*lpt<minnotelength*0.04)
- a.y=((double)pool[i]->tcs-ctk)*lpt+64-minnotelength*0.04;
+ a.x=((double)pool[i]->tcs-ctk)*lpt+nh-minnotelength*0.04;
nq.v[0].x=nq.v[3].x=a.x;nq.v[0].y=nq.v[1].y=a.y;
nq.v[1].x=nq.v[2].x=b.x;nq.v[2].y=nq.v[3].y=b.y;for(int j=0;j<4;++j)
nq.v[j].col=SETA(isnoteon?accolors[pool[i]->ch]:iccolors[pool[i]->ch],int(pool[i]->vel*1.6+(isnoteon?52:32)));
sm->smRenderQuad(&nq);
}
}
- while(pool.size()&&elb<pool.size()&&fabs((double)pool[elb]->tce-ctk)*lpt+64<0)++elb;
+ while(pool.size()&&elb<pool.size()&&fabs((double)pool[elb]->tce-ctk)*lpt+nh<0)++elb;
+ q.tex=pianotex;
+ q.v[0].tx=q.v[3].tx=0;q.v[1].tx=q.v[2].tx=1;
+ q.v[0].ty=q.v[1].ty=0;q.v[2].ty=q.v[3].ty=172./256.;
+ q.v[0].x=q.v[1].x=nh;q.v[2].x=q.v[3].x=0;
+ q.v[0].y=q.v[3].y=wheight;q.v[1].y=q.v[2].y=0;
+ sm->smRenderQuad(&q);
+ for(int i=0,j;i<128;++i)
+ {
+ DWORD c=0;for(j=0;j<16;++j)if(notestatus[j][i]){c=SETA(iccolors[j],0xFF);break;}
+ q.v[0].y=q.v[1].y=(fpoffsets[12]*(i/12)+fpoffsets[i%12])*wheight/2048.;
+ q.v[2].y=q.v[3].y=q.v[0].y;
+ q.v[0].x=q.v[3].x=nh;q.v[1].x=q.v[2].x=0;
+ if(!c)continue;for(int j=0;j<4;++j)q.v[j].col=c;
+ switch(i%12)
+ {
+ case 1:case 3:case 6:case 8:case 10:
+ q.v[1].x=q.v[2].x=nh-115*wheight/2048.;
+ q.v[2].y+=15.*wheight/2048;q.v[3].y+=15.*wheight/2048;
+ q.v[0].ty=q.v[1].ty=1.;q.v[2].ty=q.v[3].ty=1.-15/256.;
+ q.v[0].tx=q.v[3].tx=1344/2048.;q.v[1].tx=q.v[2].tx=1459/2048.;
+ break;
+ case 0:
+ q.v[2].y+=27.*wheight/2048;q.v[3].y+=27.*wheight/2048;
+ q.v[0].ty=q.v[1].ty=1.;q.v[2].ty=q.v[3].ty=1.-27/256.;
+ q.v[0].tx=q.v[3].tx=0/2048.;q.v[1].tx=q.v[2].tx=172/2048.;
+ break;
+ case 2:
+ q.v[2].y+=29.*wheight/2048;q.v[3].y+=29.*wheight/2048;
+ q.v[0].ty=q.v[1].ty=1.;q.v[2].ty=q.v[3].ty=1.-29/256.;
+ q.v[0].tx=q.v[3].tx=192/2048.;q.v[1].tx=q.v[2].tx=364/2048.;
+ break;
+ case 4:
+ q.v[2].y+=28.*wheight/2048;q.v[3].y+=28.*wheight/2048;
+ q.v[0].ty=q.v[1].ty=1.;q.v[2].ty=q.v[3].ty=1.-28/256.;
+ q.v[0].tx=q.v[3].tx=384/2048.;q.v[1].tx=q.v[2].tx=556/2048.;
+ break;
+ case 5:
+ q.v[2].y+=28.*wheight/2048;q.v[3].y+=28.*wheight/2048;
+ q.v[0].ty=q.v[1].ty=1.;q.v[2].ty=q.v[3].ty=1.-28/256.;
+ q.v[0].tx=q.v[3].tx=576/2048.;q.v[1].tx=q.v[2].tx=748/2048.;
+ break;
+ case 7:
+ q.v[2].y+=29.*wheight/2048;q.v[3].y+=29.*wheight/2048;
+ q.v[0].ty=q.v[1].ty=1.;q.v[2].ty=q.v[3].ty=1.-29/256.;
+ q.v[0].tx=q.v[3].tx=768/2048.;q.v[1].tx=q.v[2].tx=940/2048.;
+ break;
+ case 9:
+ q.v[2].y+=28.*wheight/2048;q.v[3].y+=28.*wheight/2048;
+ q.v[0].ty=q.v[1].ty=1.;q.v[2].ty=q.v[3].ty=1.-28/256.;
+ q.v[0].tx=q.v[3].tx=960/2048.;q.v[1].tx=q.v[2].tx=1132/2048.;
+ break;
+ case 11:
+ q.v[2].y+=28.*wheight/2048;q.v[3].y+=28.*wheight/2048;
+ q.v[0].ty=q.v[1].ty=1.;q.v[2].ty=q.v[3].ty=1.-28/256.;
+ q.v[0].tx=q.v[3].tx=1152/2048.;q.v[1].tx=q.v[2].tx=1324/2048.;
+ break;
+ }
+ for(int j=0;j<4;++j)q.v[j].y=wheight-q.v[j].y;
+ sm->smRenderQuad(&q);
+ }
}
if(playing)ctk+=(int)(1e6/(api->getRawTempo()/api->getDivision())*sm->smGetDelta());
}
diff --git a/visualization/qmpvisualization.hpp b/visualization/qmpvisualization.hpp
index e724961..76cfee2 100644
--- a/visualization/qmpvisualization.hpp
+++ b/visualization/qmpvisualization.hpp
@@ -48,7 +48,7 @@ class qmpVisualization:public qmpPluginIntf
std::stack<uint32_t> pendingt[16][128],pendingv[16][128];
SMELT *sm;
SMTRG tdscn,tdparticles;
- SMTEX chequer,bgtex,particletex;
+ SMTEX chequer,bgtex,particletex,pianotex;
smTTFont font,font2,fonthdpi;
qmpVirtualPiano3D* p3d[16];
smEntity3DBuffer* nebuf;
diff --git a/visualization/visualization.pro b/visualization/visualization.pro
index 7c79220..b0be291 100644
--- a/visualization/visualization.pro
+++ b/visualization/visualization.pro
@@ -31,7 +31,7 @@ unix {
QMAKE_LFLAGS_RELEASE -= -O1
QMAKE_LFLAGS_RELEASE += -O3
res.path = $$DATADIR/qmidiplayer/img
- res.files += ../img/chequerboard.png ../img/particle.png
+ res.files += ../img/chequerboard.png ../img/particle.png ../img/kb_128.png
}
#well...
INCLUDEPATH += /home/chrisoft/devel/BulletLabRemixIII/include/ /usr/include/freetype2