Browse Source

Replace Octave with Octave-CV.

tags/v1.2.0
Andrew Belt 5 years ago
parent
commit
350067dc7a
2 changed files with 131 additions and 131 deletions
  1. +79
    -73
      res/Octave.svg
  2. +52
    -58
      src/Octave.cpp

+ 79
- 73
res/Octave.svg View File

@@ -9,15 +9,15 @@
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="15.23972mm"
height="128.49931mm"
viewBox="0 0 15.23972 128.49931"
width="14.8mm"
height="128.5mm"
viewBox="0 0 14.8 128.5"
version="1.1" version="1.1"
id="svg55191"
inkscape:version="0.92.2 2405546, 2018-03-11"
id="svg4352"
inkscape:version="0.92.4 5da689c313, 2019-01-14"
sodipodi:docname="Octave.svg"> sodipodi:docname="Octave.svg">
<defs <defs
id="defs55185" />
id="defs4346" />
<sodipodi:namedview <sodipodi:namedview
id="base" id="base"
pagecolor="#ffffff" pagecolor="#ffffff"
@@ -25,28 +25,25 @@
borderopacity="1.0" borderopacity="1.0"
inkscape:pageopacity="0.0" inkscape:pageopacity="0.0"
inkscape:pageshadow="2" inkscape:pageshadow="2"
inkscape:zoom="0.98994949"
inkscape:cx="-65.862266"
inkscape:cy="195.84867"
inkscape:zoom="1.4"
inkscape:cx="165.26832"
inkscape:cy="237.67967"
inkscape:document-units="mm" inkscape:document-units="mm"
inkscape:current-layer="layer1"
inkscape:current-layer="layer5"
showgrid="false" showgrid="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:snap-bbox="true"
inkscape:snap-nodes="false"
inkscape:snap-bbox-midpoints="true"
inkscape:snap-others="false"
inkscape:snap-page="true"
inkscape:window-width="1600" inkscape:window-width="1600"
inkscape:window-height="882" inkscape:window-height="882"
inkscape:window-x="0" inkscape:window-x="0"
inkscape:window-y="18" inkscape:window-y="18"
inkscape:window-maximized="0" inkscape:window-maximized="0"
inkscape:snap-bbox="true"
inkscape:snap-bbox-midpoints="true"
inkscape:snap-nodes="false"
inkscape:snap-others="false"
inkscape:bbox-nodes="true" />
inkscape:bbox-nodes="false" />
<metadata <metadata
id="metadata55188">
id="metadata4349">
<rdf:RDF> <rdf:RDF>
<cc:Work <cc:Work
rdf:about=""> rdf:about="">
@@ -61,108 +58,117 @@
inkscape:label="Layer 1" inkscape:label="Layer 1"
inkscape:groupmode="layer" inkscape:groupmode="layer"
id="layer1" id="layer1"
transform="translate(-90.65395,-49.809869)">
transform="translate(0,-168.5)">
<path <path
inkscape:connector-curvature="0" inkscape:connector-curvature="0"
style="fill:#e6e6e6;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277778" style="fill:#e6e6e6;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277778"
d="M 90.747648,49.903575 H 105.79994 V 178.21685 H 90.747648 Z m 0,0"
id="path34071" />
d="M 0.09375,168.59371 H 15.14602 V 296.90698 H 0.09375 Z m 0,0"
id="path30861" />
<path <path
inkscape:connector-curvature="0" inkscape:connector-curvature="0"
style="fill:#ababab;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277778" style="fill:#ababab;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277778"
d="M 105.89367,49.809869 H 90.65395 V 178.30918 h 15.23972 z M 105.70761,178.12315 H 90.83997 V 49.997282 h 14.86764 z m 0,0"
id="path34073" />
d="M 15.23977,168.5 H 0 V 296.99931 H 15.23977 Z M 15.05371,296.81328 H 0.18606 V 168.68741 h 14.86765 z m 0,0"
id="path30863" />
<path <path
inkscape:connector-curvature="0" inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277778" style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277778"
d="m 95.309488,59.424614 c 0.915,0 1.576459,-0.689019 1.576459,-1.532378 v -0.0055 c 0,-0.84336 -0.655955,-1.526867 -1.570955,-1.526867 -0.915035,0 -1.576494,0.689019 -1.576494,1.532379 v 0.01103 c 0,0.843359 0.655955,1.521354 1.57099,1.521354 z m 0.0056,-0.600824 c -0.523663,0 -0.898489,-0.424436 -0.898489,-0.931554 v -0.0055 c 0,-0.507119 0.363819,-0.926042 0.892986,-0.926042 0.523628,0 0.892951,0.424436 0.892951,0.931554 v 0.01103 c 0,0.507118 -0.363784,0.92053 -0.887448,0.92053 z m 0,0"
id="path55078" />
d="m 4.6553698,178.11475 c 0.91504,0 1.5765,-0.68902 1.5765,-1.53238 v -0.005 c 0,-0.84336 -0.65596,-1.52687 -1.57097,-1.52687 -0.91503,0 -1.57649,0.68902 -1.57649,1.53238 v 0.011 c 0,0.84336 0.65596,1.52135 1.57096,1.52135 z m 0.006,-0.60083 c -0.52366,0 -0.89847,-0.42443 -0.89847,-0.93155 v -0.005 c 0,-0.50712 0.36377,-0.92604 0.89294,-0.92604 0.52366,0 0.893,0.42443 0.893,0.93155 v 0.011 c 0,0.50712 -0.36383,0.92053 -0.88747,0.92053 z m 0,0"
id="path53219" />
<path <path
inkscape:connector-curvature="0" inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277778" style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277778"
d="m 98.865418,59.424614 c 0.474028,0 0.788247,-0.137804 1.058333,-0.369314 0.0551,-0.05512 0.110239,-0.132292 0.110239,-0.237023 0,-0.165364 -0.143329,-0.297656 -0.308676,-0.297656 -0.07719,0 -0.143334,0.02756 -0.192934,0.07166 -0.187396,0.148828 -0.369323,0.23151 -0.644913,0.23151 -0.507119,0 -0.859896,-0.424435 -0.859896,-0.931554 v -0.0055 c 0,-0.507118 0.363784,-0.926041 0.859896,-0.926041 0.231493,0 0.424427,0.07717 0.606319,0.214974 0.04964,0.02756 0.10474,0.06063 0.192934,0.06063 0.181892,0 0.32523,-0.137804 0.32523,-0.314193 0,-0.115755 -0.06065,-0.209462 -0.126793,-0.259071 -0.248037,-0.181905 -0.545711,-0.303173 -0.992187,-0.303173 -0.909497,0 -1.543403,0.689019 -1.543403,1.532379 v 0.01102 c 0,0.848872 0.644913,1.521354 1.515851,1.521355 z m 0,0"
id="path55082" />
d="m 8.2112398,178.11475 c 0.47403,0 0.78825,-0.13781 1.05834,-0.36932 0.0551,-0.0551 0.11022,-0.13229 0.11022,-0.23702 0,-0.16537 -0.14332,-0.29766 -0.30866,-0.29766 -0.0772,0 -0.14335,0.0276 -0.19294,0.0717 -0.1874,0.14883 -0.36933,0.23151 -0.64492,0.23151 -0.50712,0 -0.85989,-0.42443 -0.85989,-0.93155 v -0.005 c 0,-0.50712 0.36377,-0.92604 0.85989,-0.92604 0.23149,0 0.42442,0.0772 0.60632,0.21497 0.0496,0.0276 0.10475,0.0606 0.19294,0.0606 0.1819,0 0.32522,-0.1378 0.32522,-0.31419 0,-0.11576 -0.0606,-0.20946 -0.12679,-0.25907 -0.24804,-0.18241 -0.5457,-0.30368 -0.99218,-0.30368 -0.90951,0 -1.5434,0.68902 -1.5434,1.53238 v 0.011 c 0,0.84887 0.6449,1.52135 1.51585,1.52135 z m 0,0"
id="path53215" />
<path <path
inkscape:connector-curvature="0" inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277778" style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277778"
d="m 101.33525,59.071837 c 0,0.181901 0.14333,0.330729 0.32523,0.330729 0.18189,0 0.32522,-0.148828 0.32522,-0.330729 v -2.061546 h 0.62837 c 0.16538,0 0.29767,-0.132291 0.29767,-0.297656 0,-0.165365 -0.13229,-0.303169 -0.29767,-0.303169 h -1.90719 c -0.16538,0 -0.29767,0.137804 -0.29767,0.303169 0,0.165365 0.13229,0.297656 0.29767,0.297656 h 0.62837 z m 0,0"
id="path55074" />
d="m 10.68118,177.76197 c 0,0.1819 0.14333,0.33073 0.32523,0.33073 0.18187,0 0.32522,-0.14883 0.32522,-0.33073 v -2.06155 h 0.62836 c 0.16539,0 0.29768,-0.13229 0.29768,-0.29765 0,-0.16537 -0.13229,-0.30317 -0.29768,-0.30317 H 10.0528 c -0.1653702,0 -0.2976602,0.1378 -0.2976602,0.30317 0,0.16536 0.13229,0.29765 0.2976602,0.29765 h 0.62838 z m 0,0"
id="path53223" />
<path <path
inkscape:connector-curvature="0" inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277778" style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277778"
d="m 98.908386,170.28487 c 0,0.22048 -0.17914,0.401 -0.401002,0.401 -0.221862,0 -0.401038,-0.18052 -0.401038,-0.401 0,-0.22187 0.179176,-0.40101 0.401038,-0.40101 0.221862,0 0.401002,0.17914 0.401002,0.40101"
id="path34139" />
d="m 8.2544798,288.975 c 0,0.22048 -0.17913,0.40101 -0.40101,0.40101 -0.22185,0 -0.40103,-0.18053 -0.40103,-0.40101 0,-0.22187 0.17918,-0.40101 0.40103,-0.40101 0.22188,0 0.40101,0.17914 0.40101,0.40101"
id="path38469" />
<path <path
inkscape:connector-curvature="0" inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277778" style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277778"
d="m 95.584549,171.61054 c -0.117122,0 -0.223237,-0.0661 -0.27559,-0.17088 l -1.001854,-2.00367 c -0.07715,-0.15296 -0.01517,-0.33762 0.137795,-0.41478 0.151589,-0.0758 0.337644,-0.0138 0.413421,0.1378 l 0.726228,1.45383 0.726229,-1.45383 c 0.07719,-0.15159 0.261831,-0.2136 0.414796,-0.1378 0.151588,0.0772 0.213607,0.26182 0.137795,0.41478 l -1.003195,2.00367 c -0.05239,0.10473 -0.158502,0.17088 -0.275625,0.17088"
id="path34141" />
d="m 4.9306498,290.30067 c -0.11713,0 -0.22323,-0.0661 -0.27559,-0.17088 l -1.00185,-2.00367 c -0.0772,-0.15296 -0.0151,-0.33761 0.1378,-0.41478 0.15158,-0.0758 0.33763,-0.0138 0.41341,0.1378 l 0.72623,1.45383 0.72623,-1.45383 c 0.0772,-0.15159 0.26183,-0.2136 0.41478,-0.1378 0.15161,0.0772 0.21363,0.26182 0.1378,0.41478 l -1.0032,2.00367 c -0.0524,0.10473 -0.15848,0.17088 -0.27561,0.17088"
id="path38471" />
<path <path
inkscape:connector-curvature="0" inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277778" style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277778"
d="m 101.08982,171.61054 c -0.11574,0 -0.22323,-0.0661 -0.27562,-0.17088 l -1.00182,-2.00367 c -0.07581,-0.15296 -0.01517,-0.33762 0.137795,-0.41478 0.151585,-0.0758 0.337605,-0.0138 0.413415,0.1378 l 0.72623,1.45383 0.72761,-1.45383 c 0.0758,-0.15159 0.26045,-0.2136 0.41342,-0.1378 0.15155,0.0772 0.21357,0.26182 0.13779,0.41478 l -1.00185,2.00367 c -0.0523,0.10473 -0.15984,0.17088 -0.27697,0.17088"
id="path34143" />
d="m 10.43591,290.30067 c -0.11573,0 -0.22323,-0.0661 -0.27561,-0.17088 l -1.0018202,-2.00367 c -0.0758,-0.15296 -0.0151,-0.33761 0.13779,-0.41478 0.15158,-0.0758 0.33761,-0.0138 0.41341,0.1378 l 0.7262302,1.45383 0.72761,-1.45383 c 0.0758,-0.15159 0.26045,-0.2136 0.41343,-0.1378 0.15156,0.0772 0.21358,0.26182 0.1378,0.41478 l -1.00187,2.00367 c -0.0523,0.10473 -0.15984,0.17088 -0.27697,0.17088"
id="path38473" />
<path <path
inkscape:connector-curvature="0" inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277778" style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277778"
d="m 98.486711,171.61054 c -0.722101,0 -1.310534,-0.58843 -1.310534,-1.31052 0,-0.72347 0.588433,-1.31051 1.310534,-1.31051 0.286632,0 0.55947,0.0909 0.786836,0.26183 0.136454,0.10197 0.164006,0.29627 0.06202,0.43132 -0.101953,0.13643 -0.296263,0.16399 -0.432682,0.062 -0.11991,-0.0909 -0.264584,-0.13918 -0.416172,-0.13918 -0.381741,0 -0.693173,0.31144 -0.693173,0.69453 0,0.3831 0.311432,0.69316 0.693173,0.69316 0.151588,0 0.296262,-0.0469 0.416172,-0.13781 0.136419,-0.10197 0.330729,-0.0758 0.432682,0.0606 0.101988,0.13642 0.07444,0.33073 -0.06202,0.4327 -0.227366,0.17088 -0.500204,0.26183 -0.786836,0.26183"
id="path34145" />
d="m 7.8328098,290.30067 c -0.7221,0 -1.31054,-0.58842 -1.31054,-1.31051 0,-0.72348 0.58844,-1.31052 1.31054,-1.31052 0.28662,0 0.55946,0.091 0.78684,0.26183 0.13645,0.10197 0.16399,0.29627 0.062,0.43133 -0.10197,0.13642 -0.29628,0.16398 -0.4327,0.062 -0.11991,-0.091 -0.26458,-0.13919 -0.41616,-0.13919 -0.38174,0 -0.69318,0.31144 -0.69318,0.69454 0,0.38309 0.31144,0.69315 0.69318,0.69315 0.15158,0 0.29625,-0.0469 0.41616,-0.13781 0.13642,-0.10197 0.33073,-0.0758 0.4327,0.0606 0.10197,0.13642 0.0744,0.33073 -0.062,0.4327 -0.22738,0.17088 -0.50022,0.26183 -0.78684,0.26183"
id="path38475" />
<path <path
inkscape:connector-curvature="0" inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277778" style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277778"
d="m 103.11554,154.72819 c 0,-0.54983 -0.45063,-0.99908 -1.00047,-0.99908 h -7.682552 c -0.549839,0 -0.999067,0.44925 -0.999067,0.99908 v 11.67336 c 0,0.54984 0.449228,1.00046 0.999067,1.00046 h 7.682552 c 0.54984,0 1.00047,-0.45062 1.00047,-1.00046 z m 0,0"
id="path34173" />
d="m 12.46164,273.41832 c 0,-0.54984 -0.45064,-0.99908 -1.00047,-0.99908 H 3.7786198 c -0.54985,0 -0.9990598,0.44924 -0.9990598,0.99908 v 11.67336 c 0,0.54984 0.4492098,1.00046 0.9990598,1.00046 H 11.46117 c 0.54983,0 1.00047,-0.45062 1.00047,-1.00046 z m 0,0"
id="path38477" />
<path <path
inkscape:connector-curvature="0" inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.35277778" style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.35277778"
d="m 96.605347,156.56751 c 0.496111,0 0.859896,-0.37482 0.859896,-0.83233 0,-0.45751 -0.358281,-0.82682 -0.854393,-0.82682 -0.496076,0 -0.854357,0.37482 -0.854357,0.82682 v 0.005 c 0,0.45752 0.358281,0.82683 0.848854,0.82683 z m 0.0056,-0.32521 c -0.281093,0 -0.48507,-0.23151 -0.48507,-0.50712 0,-0.27561 0.198438,-0.50161 0.479567,-0.50161 0.286631,0 0.490572,0.226 0.490572,0.50161 v 0.005 c 0,0.27561 -0.198437,0.50161 -0.485069,0.50161 z m 0,0"
id="path55066" />
d="m 5.9512798,275.25765 c 0.49606,0 0.85989,-0.37483 0.85989,-0.83234 0,-0.45751 -0.3583,-0.82682 -0.85439,-0.82682 -0.49609,0 -0.85439,0.37483 -0.85439,0.82682 v 0.006 c 0,0.45752 0.3583,0.82682 0.84889,0.82682 z m 0.006,-0.32522 c -0.28112,0 -0.48506,-0.23151 -0.48506,-0.50712 0,-0.27561 0.19844,-0.50161 0.47956,-0.50161 0.28662,0 0.49056,0.226 0.49056,0.50161 v 0.006 c 0,0.2756 -0.19843,0.50161 -0.48506,0.50161 z m 0,0"
id="path53243" />
<path <path
inkscape:connector-curvature="0" inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.35277778" style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.35277778"
d="m 98.593426,156.56751 c 0.259045,0 0.429931,-0.0772 0.573264,-0.20394 0.03316,-0.0276 0.06061,-0.0717 0.06061,-0.12127 0,-0.0937 -0.07715,-0.16537 -0.165347,-0.16537 -0.0441,0 -0.07719,0.0165 -0.104739,0.0386 -0.10474,0.0827 -0.198438,0.12678 -0.352778,0.12678 -0.270087,0 -0.463021,-0.23151 -0.463021,-0.50712 0,-0.27561 0.192934,-0.50161 0.463021,-0.50161 0.126788,0 0.231528,0.0386 0.330729,0.11576 0.02752,0.0165 0.05514,0.0331 0.10474,0.0331 0.0992,0 0.176389,-0.0772 0.176389,-0.17088 0,-0.0662 -0.03316,-0.11576 -0.07165,-0.14332 -0.132292,-0.0992 -0.292171,-0.15985 -0.534706,-0.15985 -0.496076,0 -0.837847,0.37483 -0.837847,0.82682 v 0.006 c 0,0.46302 0.352778,0.82682 0.821337,0.82682 z m 0,0"
id="path55070" />
d="m 7.9392798,275.25765 c 0.25905,0 0.42992,-0.0772 0.57327,-0.20395 0.0332,-0.0275 0.0606,-0.0717 0.0606,-0.12127 0,-0.0937 -0.0771,-0.16536 -0.16534,-0.16536 -0.0441,0 -0.0772,0.0165 -0.10475,0.0386 -0.10472,0.0827 -0.19843,0.12678 -0.35277,0.12678 -0.27008,0 -0.46302,-0.23151 -0.46302,-0.50712 0,-0.27561 0.19294,-0.50161 0.46302,-0.50161 0.12679,0 0.23154,0.0386 0.33073,0.11576 0.0275,0.0165 0.0551,0.0331 0.10475,0.0331 0.0992,0 0.17637,-0.0772 0.17637,-0.17088 0,-0.0662 -0.0331,-0.11575 -0.0716,-0.14332 -0.13229,-0.0992 -0.29215,-0.15985 -0.53469,-0.15985 -0.49607,0 -0.83786,0.37483 -0.83786,0.82683 v 0.005 c 0,0.46302 0.3528,0.82682 0.82135,0.82682 z m 0,0"
id="path53239" />
<path <path
inkscape:connector-curvature="0" inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.35277778" style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.35277778"
d="m 99.990321,156.37459 c 0,0.0992 0.07715,0.17639 0.176389,0.17639 0.0992,0 0.17639,-0.0772 0.17639,-0.17639 v -1.11345 h 0.33623 c 0.0937,0 0.16535,-0.0717 0.16535,-0.16537 0,-0.0882 -0.0716,-0.15985 -0.16535,-0.15985 h -1.03078 c -0.08819,0 -0.159844,0.0717 -0.159844,0.15985 0,0.0937 0.07165,0.16537 0.159844,0.16537 h 0.341771 z m 0,0"
id="path55062" />
d="m 9.3362498,275.06472 c 0,0.0992 0.0771,0.17639 0.17637,0.17639 0.0992,0 0.1764,-0.0772 0.1764,-0.17639 v -1.11345 H 10.02525 c 0.0937,0 0.16534,-0.0717 0.16534,-0.16537 0,-0.0882 -0.0716,-0.15985 -0.16534,-0.15985 H 8.9944598 c -0.0882,0 -0.15983,0.0717 -0.15983,0.15985 0,0.0937 0.0716,0.16537 0.15983,0.16537 h 0.34179 z m 0,0"
id="path53247" />
<path <path
inkscape:connector-curvature="0" inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277778" style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277778"
d="m 97.187995,141.01531 c 0,0.0772 0.06615,0.1378 0.143298,0.1378 0.07719,0 0.143334,-0.0606 0.143334,-0.1378 v -1.35048 c 0,-0.0772 -0.06615,-0.1378 -0.143334,-0.1378 -0.07715,0 -0.143298,0.0606 -0.143298,0.1378 z m 0,0"
id="path55054" />
d="m 6.5338098,259.70544 c 0,0.0772 0.0662,0.13781 0.1433,0.13781 0.0772,0 0.14332,-0.0606 0.14332,-0.13781 v -1.35047 c 0,-0.0772 -0.0661,-0.13781 -0.14332,-0.13781 -0.0771,0 -0.1433,0.0606 -0.1433,0.13781 z m 0,0"
id="path53255" />
<path <path
inkscape:connector-curvature="0" inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277778" style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277778"
d="m 97.971656,141.01531 c 0,0.0772 0.06615,0.1378 0.143333,0.1378 0.07715,0 0.137795,-0.0606 0.137795,-0.1378 v -1.01975 l 0.826806,1.06936 c 0.03859,0.0496 0.07719,0.0882 0.143333,0.0882 h 0.01094 c 0.07719,0 0.137831,-0.0661 0.137831,-0.14332 v -1.34496 c 0,-0.0772 -0.06064,-0.13781 -0.137831,-0.13781 -0.07715,0 -0.137795,0.0606 -0.137795,0.13781 v 0.98667 l -0.804756,-1.04179 c -0.03859,-0.0496 -0.07719,-0.0827 -0.143334,-0.0827 h -0.03316 c -0.07719,0 -0.143334,0.0661 -0.143334,0.14332 z m 0,0"
id="path55058" />
d="m 7.3175898,259.70544 c 0,0.0772 0.0661,0.13781 0.14332,0.13781 0.0772,0 0.1378,-0.0606 0.1378,-0.13781 v -1.01974 l 0.82684,1.06935 c 0.0385,0.0496 0.0772,0.0882 0.1433,0.0882 h 0.0109 c 0.0771,0 0.1378,-0.0662 0.1378,-0.14331 v -1.34497 c 0,-0.0772 -0.0607,-0.1378 -0.1378,-0.1378 -0.0772,0 -0.13782,0.0606 -0.13782,0.1378 v 0.98667 l -0.80476,-1.04179 c -0.0386,-0.0496 -0.0772,-0.0827 -0.14335,-0.0827 h -0.0331 c -0.0772,0 -0.14333,0.0662 -0.14333,0.14332 z m 0,0"
id="path53251" />
<path
inkscape:connector-curvature="0"
style="fill:none;stroke:#000000;stroke-width:0.23495002;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-opacity:1"
d="m 7.6205598,251.02658 v -7.06796"
id="path38495" />
</g> </g>
<g <g
inkscape:groupmode="layer" inkscape:groupmode="layer"
id="layer2"
inkscape:label="widgets"
id="layer5"
inkscape:label="components"
style="display:none"> style="display:none">
<rect <rect
style="opacity:1;vector-effect:none;fill:#00ff00;fill-opacity:0.50196078;fill-rule:evenodd;stroke:none;stroke-width:0.69999999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
id="rect56028"
width="6"
height="6"
x="4.6198416"
y="94.252983" />
<rect
y="109.25293"
x="4.6198425"
height="6"
width="6"
id="rect56030"
style="opacity:1;vector-effect:none;fill:#0000ff;fill-opacity:0.50196078;fill-rule:evenodd;stroke:none;stroke-width:0.69999999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" />
<rect
y="14.583808"
x="0"
height="72.001122"
width="15.23972"
id="rect56032"
style="opacity:1;vector-effect:none;fill:#ffff00;fill-opacity:0.50196078;fill-rule:evenodd;stroke:none;stroke-width:3.86460304;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" />
style="display:inline;opacity:1;vector-effect:none;fill:#ffff00;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.82156646;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
id="rect7595"
width="15.23977"
height="62.999779"
x="3.5527137e-15"
y="12.81713" />
<circle
r="2"
cy="82.752579"
cx="7.6198997"
id="circle8989"
style="display:inline;opacity:1;vector-effect:none;fill:#00ff00;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" />
<circle
style="display:inline;opacity:1;vector-effect:none;fill:#00ff00;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
id="circle61507"
cx="7.619885"
cy="97.252983"
r="2" />
<circle
style="display:inline;opacity:1;vector-effect:none;fill:#0000ff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
id="circle7496"
cx="7.619885"
cy="112.25293"
r="2" />
</g> </g>
</svg> </svg>

+ 52
- 58
src/Octave.cpp View File

@@ -3,66 +3,64 @@


struct Octave : Module { struct Octave : Module {
enum ParamIds { enum ParamIds {
OCTAVE_PARAM,
NUM_PARAMS NUM_PARAMS
}; };
enum InputIds { enum InputIds {
CV_INPUT,
PITCH_INPUT,
OCTAVE_INPUT,
NUM_INPUTS NUM_INPUTS
}; };
enum OutputIds { enum OutputIds {
CV_OUTPUT,
PITCH_OUTPUT,
NUM_OUTPUTS NUM_OUTPUTS
}; };
enum LightIds { enum LightIds {
NUM_LIGHTS NUM_LIGHTS
}; };


int octave = 0;

Octave() { Octave() {
config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS);
}

void onReset() override {
octave = 0;
}

void onRandomize() override {
octave = (random::u32() % 9) - 4;
configParam(OCTAVE_PARAM, -4.f, 4.f, 0.f, "Octave shift");
} }


void process(const ProcessArgs &args) override { void process(const ProcessArgs &args) override {
int channels = std::max(inputs[CV_INPUT].getChannels(), 1);
int channels = std::max(inputs[PITCH_INPUT].getChannels(), 1);
float octaveParam = params[OCTAVE_PARAM].getValue();

for (int c = 0; c < channels; c++) { for (int c = 0; c < channels; c++) {
float cv = inputs[CV_INPUT].getVoltage(c);
float octave = octaveParam + inputs[OCTAVE_INPUT].getPolyVoltage(c);
octave = std::round(octave);
float cv = inputs[PITCH_INPUT].getVoltage(c);
cv += octave; cv += octave;
outputs[CV_OUTPUT].setVoltage(cv, c);
outputs[PITCH_OUTPUT].setVoltage(cv, c);
} }
outputs[CV_OUTPUT].setChannels(channels);
}

json_t *dataToJson() override {
json_t *rootJ = json_object();
json_object_set_new(rootJ, "octave", json_integer(octave));
return rootJ;
outputs[PITCH_OUTPUT].setChannels(channels);
} }


void dataFromJson(json_t *rootJ) override { void dataFromJson(json_t *rootJ) override {
// In Fundamental 1.1.1 and earlier, the octave param was internal data.
json_t *octaveJ = json_object_get(rootJ, "octave"); json_t *octaveJ = json_object_get(rootJ, "octave");
if (octaveJ)
octave = json_integer_value(octaveJ);
if (octaveJ) {
params[OCTAVE_PARAM].setValue(json_integer_value(octaveJ));
}
} }
}; };




struct OctaveButton : OpaqueWidget {
Octave *module;
struct OctaveButton : Widget {
int octave; int octave;


void draw(const DrawArgs &args) override { void draw(const DrawArgs &args) override {
Vec c = box.size.div(2); Vec c = box.size.div(2);


if ((module && module->octave == octave) || octave == 0) {
int activeOctave = 0;
ParamWidget *paramWidget = getAncestorOfType<ParamWidget>();
if (paramWidget && paramWidget->paramQuantity) {
activeOctave = std::round(paramWidget->paramQuantity->getValue());
}

if (activeOctave == octave) {
// Enabled // Enabled
nvgBeginPath(args.vg); nvgBeginPath(args.vg);
nvgCircle(args.vg, c.x, c.y, mm2px(4.0/2)); nvgCircle(args.vg, c.x, c.y, mm2px(4.0/2));
@@ -95,34 +93,20 @@ struct OctaveButton : OpaqueWidget {
} }
} }


void onButton(const event::Button &e) override {
if (e.button == GLFW_MOUSE_BUTTON_RIGHT && e.action == GLFW_PRESS) {
module->octave = 0;
void onDragHover(const event::DragHover &e) override {
if (e.button == GLFW_MOUSE_BUTTON_LEFT) {
e.consume(this); e.consume(this);
return;
} }
OpaqueWidget::onButton(e);
Widget::onDragHover(e);
} }


void onDragEnter(const event::DragEnter &e) override {
if (e.button == GLFW_MOUSE_BUTTON_LEFT) {
OctaveButton *w = dynamic_cast<OctaveButton*>(e.origin);
if (w) {
module->octave = octave;
}
}
}
void onDragEnter(const event::DragEnter &e) override;
}; };




struct OctaveDisplay : OpaqueWidget {
OctaveDisplay() {
box.size = mm2px(Vec(15.240, 72.000));
}

void setModule(Octave *module) {
clearChildren();

struct OctaveParam : ParamWidget {
OctaveParam() {
box.size = mm2px(Vec(15.24, 63.0));
const int octaves = 9; const int octaves = 9;
const float margin = mm2px(2.0); const float margin = mm2px(2.0);
float height = box.size.y - 2*margin; float height = box.size.y - 2*margin;
@@ -130,7 +114,6 @@ struct OctaveDisplay : OpaqueWidget {
OctaveButton *octaveButton = new OctaveButton(); OctaveButton *octaveButton = new OctaveButton();
octaveButton->box.pos = Vec(0, height / octaves * i + margin); octaveButton->box.pos = Vec(0, height / octaves * i + margin);
octaveButton->box.size = Vec(box.size.x, height / octaves); octaveButton->box.size = Vec(box.size.x, height / octaves);
octaveButton->module = module;
octaveButton->octave = 4 - i; octaveButton->octave = 4 - i;
addChild(octaveButton); addChild(octaveButton);
} }
@@ -143,29 +126,40 @@ struct OctaveDisplay : OpaqueWidget {
nvgFillColor(args.vg, nvgRGB(0, 0, 0)); nvgFillColor(args.vg, nvgRGB(0, 0, 0));
nvgFill(args.vg); nvgFill(args.vg);


Widget::draw(args);
ParamWidget::draw(args);
} }
}; };




inline void OctaveButton::onDragEnter(const event::DragEnter &e) {
if (e.button == GLFW_MOUSE_BUTTON_LEFT) {
OctaveParam *origin = dynamic_cast<OctaveParam*>(e.origin);
if (origin) {
ParamWidget *paramWidget = getAncestorOfType<ParamWidget>();
if (paramWidget && paramWidget->paramQuantity) {
paramWidget->paramQuantity->setValue(octave);
}
}
}
Widget::onDragEnter(e);
}



struct OctaveWidget : ModuleWidget { struct OctaveWidget : ModuleWidget {
OctaveWidget(Octave *module) { OctaveWidget(Octave *module) {
setModule(module); setModule(module);
setPanel(APP->window->loadSvg(asset::plugin(pluginInstance, "res/Octave.svg"))); setPanel(APP->window->loadSvg(asset::plugin(pluginInstance, "res/Octave.svg")));


addChild(createWidget<ScrewSilver>(Vec(RACK_GRID_WIDTH, 0))); addChild(createWidget<ScrewSilver>(Vec(RACK_GRID_WIDTH, 0)));
addChild(createWidget<ScrewSilver>(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0)));
addChild(createWidget<ScrewSilver>(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); addChild(createWidget<ScrewSilver>(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH)));
addChild(createWidget<ScrewSilver>(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH)));


addInput(createInputCentered<PJ301MPort>(mm2px(Vec(7.62, 97.253)), module, Octave::CV_INPUT));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(7.62, 82.753)), module, Octave::OCTAVE_INPUT));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(7.62, 97.253)), module, Octave::PITCH_INPUT));


addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(7.62, 112.253)), module, Octave::CV_OUTPUT));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(7.62, 112.253)), module, Octave::PITCH_OUTPUT));


OctaveDisplay *octaveDisplay = new OctaveDisplay();
octaveDisplay->box.pos = mm2px(Vec(0.0, 14.584));
octaveDisplay->setModule(module);
addChild(octaveDisplay);
addParam(createParam<OctaveParam>(mm2px(Vec(0.0, 12.817)), module, Octave::OCTAVE_PARAM));
} }
}; };




Loading…
Cancel
Save