Browse Source

Add CV-MIDI to Core. Move arrow key scrolling from ScrollWidget to RackWidget.

tags/v1.0.0
Andrew Belt 5 years ago
parent
commit
2862703f4c
13 changed files with 836 additions and 36 deletions
  1. +2
    -2
      include/engine/Input.hpp
  2. +9
    -6
      include/engine/Port.hpp
  3. +1
    -0
      include/rack.hpp
  4. +471
    -0
      res/Core/CV-MIDI.svg
  5. +319
    -0
      src/Core/CV_MIDI.cpp
  6. +5
    -0
      src/Core/Core.cpp
  7. +1
    -0
      src/Core/Core.hpp
  8. +1
    -1
      src/app/CableWidget.cpp
  9. +23
    -0
      src/app/RackWidget.cpp
  10. +2
    -2
      src/engine/Cable.cpp
  11. +1
    -1
      src/engine/Engine.cpp
  12. +1
    -0
      src/midi.cpp
  13. +0
    -24
      src/ui/ScrollWidget.cpp

+ 2
- 2
include/engine/Input.hpp View File

@@ -8,8 +8,8 @@ namespace rack {

struct Input : Port {
/** Returns the value if a cable is plugged in, otherwise returns the given default value */
float normalize(float normalVoltage, int index = 0) {
return active ? getVoltage(index) : normalVoltage;
float normalize(float normalVoltage, int channel = 0) {
return active ? getVoltage(channel) : normalVoltage;
}
};



+ 9
- 6
include/engine/Port.hpp View File

@@ -18,17 +18,20 @@ struct Port {
float value;
float values[PORT_MAX_CHANNELS] = {};
};
/** Number of polyphonic channels */
int numChannels = 1;
/** Number of polyphonic channels
May be 0 to PORT_MAX_CHANNELS.
*/
int channels = 1;
/** Whether a cable is plugged in */
bool active = false;
Light plugLights[2];

float getVoltage(int index = 0) {
return values[index];
float getVoltage(int channel = 0) {
return values[channel];
}
void setVoltage(float voltage, int index = 0) {
values[index] = voltage;

void setVoltage(float voltage, int channel = 0) {
values[channel] = voltage;
}
};



+ 1
- 0
include/rack.hpp View File

@@ -9,6 +9,7 @@
#include "asset.hpp"
#include "window.hpp"
#include "app.hpp"
#include "midi.hpp"
#include "helpers.hpp"

#include "widgets/Widget.hpp"


+ 471
- 0
res/Core/CV-MIDI.svg View File

@@ -0,0 +1,471 @@
<?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"
width="40.639721mm"
height="128.50069mm"
viewBox="0 0 40.639721 128.50069"
version="1.1"
id="svg21354"
inkscape:version="0.92.2 2405546, 2018-03-11"
sodipodi:docname="CV-MIDI.svg">
<defs
id="defs21348" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.98994949"
inkscape:cx="95.039225"
inkscape:cy="231.46292"
inkscape:document-units="mm"
inkscape:current-layer="layer2"
showgrid="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:snap-bbox="true"
inkscape:snap-bbox-midpoints="true"
inkscape:snap-nodes="false"
inkscape:bbox-nodes="true"
inkscape:window-width="1600"
inkscape:window-height="882"
inkscape:window-x="0"
inkscape:window-y="18"
inkscape:window-maximized="0" />
<metadata
id="metadata21351">
<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>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-311.42837,-118.49952)"
style="display:inline">
<path
inkscape:connector-curvature="0"
style="fill:#e6e6e6;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277775"
d="m 311.5207,118.59323 h 40.45369 V 246.9065 H 311.5207 Z m 0,0"
id="path9544" />
<path
inkscape:connector-curvature="0"
style="fill:#ababab;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277775"
d="m 352.06809,118.49952 h -40.63972 v 128.50069 h 40.63972 z M 351.88068,246.8128 H 311.61441 V 118.68694 h 40.26627 z m 0,0"
id="path9546" />
<path
inkscape:connector-curvature="0"
style="fill:none;stroke:#000000;stroke-width:0.35277775;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-opacity:1"
d="m 320.14861,230.7504 h 23.19927"
id="path9568" />
<path
inkscape:connector-curvature="0"
style="fill:none;stroke:#000000;stroke-width:0.35277775;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-opacity:1"
d="m 320.14861,214.75136 h 23.19927"
id="path9570" />
<path
inkscape:connector-curvature="0"
style="fill:none;stroke:#000000;stroke-width:0.35277775;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-opacity:1"
d="m 320.14861,198.75096 h 23.19927"
id="path9572" />
<path
inkscape:connector-curvature="0"
style="fill:none;stroke:#000000;stroke-width:0.35277775;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-opacity:1"
d="m 320.14861,182.75056 h 23.19927"
id="path9574" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277775"
d="m 328.9956,242.85645 c -0.11713,0 -0.22462,-0.0661 -0.27561,-0.1695 l -1.00321,-2.00505 c -0.0758,-0.15296 -0.0138,-0.33761 0.1378,-0.41479 0.15159,-0.0758 0.33762,-0.0138 0.41342,0.13919 l 0.7276,1.45245 0.72622,-1.45245 c 0.0758,-0.15297 0.26183,-0.21498 0.41342,-0.13919 0.15296,0.0772 0.21497,0.26183 0.1378,0.41479 l -1.00183,2.00505 c -0.0524,0.10336 -0.15986,0.1695 -0.27561,0.1695"
id="path12754" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277775"
d="m 334.50086,242.85645 c -0.11713,0 -0.22324,-0.0661 -0.2756,-0.1695 l -1.00322,-2.00505 c -0.0758,-0.15296 -0.0138,-0.33761 0.13918,-0.41479 0.15159,-0.0758 0.33762,-0.0138 0.41341,0.13919 l 0.72623,1.45245 0.72623,-1.45245 c 0.0758,-0.15297 0.26183,-0.21498 0.41341,-0.13919 0.15296,0.0772 0.21497,0.26183 0.13918,0.41479 l -1.00321,2.00505 c -0.0524,0.10336 -0.15847,0.1695 -0.27561,0.1695"
id="path12756" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277775"
d="m 331.89775,242.85645 c -0.72347,0 -1.31189,-0.58705 -1.31189,-1.31051 0,-0.72209 0.58842,-1.31052 1.31189,-1.31052 0.28663,0 0.5581,0.091 0.78686,0.26183 0.13504,0.10197 0.16261,0.29628 0.0606,0.4327 -0.10198,0.13505 -0.2949,0.16261 -0.43133,0.0606 -0.12126,-0.091 -0.26458,-0.13919 -0.41616,-0.13919 -0.3831,0 -0.69454,0.31144 -0.69454,0.69454 0,0.38309 0.31144,0.69452 0.69454,0.69452 0.15158,0 0.2949,-0.0482 0.41616,-0.13918 0.13643,-0.10197 0.32935,-0.0744 0.43133,0.062 0.10198,0.13504 0.0744,0.32935 -0.0606,0.43132 -0.22876,0.17088 -0.50023,0.26183 -0.78686,0.26183"
id="path12758" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277775"
d="m 332.31805,241.53077 c 0,0.22187 -0.17915,0.40102 -0.40101,0.40102 -0.22049,0 -0.39963,-0.17915 -0.39963,-0.40102 0,-0.22186 0.17914,-0.401 0.39963,-0.401 0.22186,0 0.40101,0.17914 0.40101,0.401"
id="path12760" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775"
d="m 324.56488,128.11472 c 0.47405,0 0.78824,-0.1378 1.05834,-0.36931 0.0551,-0.0551 0.11024,-0.13229 0.11024,-0.23703 0,-0.16536 -0.14332,-0.29765 -0.30868,-0.29765 -0.0772,0 -0.14332,0.0276 -0.19293,0.0717 -0.18741,0.14882 -0.36931,0.23151 -0.64492,0.23151 -0.50712,0 -0.85989,-0.42444 -0.85989,-0.93156 v -0.005 c 0,-0.50711 0.3638,-0.92604 0.85989,-0.92604 0.23151,0 0.42444,0.0772 0.60634,0.21497 0.0496,0.0276 0.10473,0.0606 0.19292,0.0606 0.18191,0 0.32522,-0.13781 0.32522,-0.3142 0,-0.11575 -0.0606,-0.20946 -0.12678,-0.25906 -0.24804,-0.18191 -0.5457,-0.30318 -0.99219,-0.30318 -0.9095,0 -1.5434,0.68903 -1.5434,1.53238 v 0.011 c 0,0.84887 0.64492,1.52135 1.51584,1.52135 z m 0,0"
id="path20334" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775"
d="m 327.48848,128.10921 h 0.0441 c 0.17639,0 0.29766,-0.0937 0.3638,-0.25356 l 0.97014,-2.32062 c 0.0165,-0.0386 0.0331,-0.0937 0.0331,-0.14331 0,-0.1819 -0.14332,-0.31419 -0.31971,-0.31419 -0.15434,0 -0.27009,0.0992 -0.31419,0.20395 l -0.74966,1.94027 -0.73863,-1.91823 c -0.0496,-0.13229 -0.15985,-0.22599 -0.33073,-0.22599 -0.1819,0 -0.32521,0.1378 -0.32521,0.3197 0,0.0551 0.0165,0.10473 0.0386,0.15985 l 0.95911,2.29857 c 0.0661,0.15985 0.19293,0.25356 0.36932,0.25356 z m 0,0"
id="path20326" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775"
d="m 329.46592,127.0619 h 0.73311 c 0.17088,0 0.3142,-0.1378 0.3142,-0.30868 0,-0.17088 -0.14332,-0.30868 -0.3142,-0.30868 h -0.73311 c -0.17088,0 -0.30868,0.1378 -0.30868,0.30868 0,0.17088 0.1378,0.30868 0.30868,0.30868 z m 0,0"
id="path20330" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775"
d="m 331.15141,127.77297 c 0,0.17639 0.1378,0.3197 0.31419,0.3197 0.17639,0 0.31971,-0.14331 0.31971,-0.3197 v -1.47174 l 0.56775,0.8654 c 0.0661,0.10473 0.14883,0.16537 0.27009,0.16537 0.11576,0 0.20396,-0.0606 0.2701,-0.16537 l 0.57326,-0.88194 v 1.47725 c 0,0.18191 0.14332,0.33073 0.31971,0.33073 0.1819,0 0.32522,-0.14882 0.32522,-0.33073 v -2.35368 c 0,-0.18191 -0.14332,-0.32522 -0.32522,-0.32522 h -0.0717 c -0.13229,0 -0.226,0.0551 -0.29214,0.16536 l -0.79375,1.28985 -0.78824,-1.28433 c -0.0551,-0.0992 -0.15434,-0.17088 -0.29214,-0.17088 h -0.0717 c -0.1819,0 -0.32522,0.14331 -0.32522,0.32522 z m 0,0"
id="path20322" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775"
d="m 334.89711,127.76194 c 0,0.18191 0.14332,0.33073 0.32522,0.33073 0.1819,0 0.32522,-0.14882 0.32522,-0.33073 v -2.3592 c 0,-0.1819 -0.14332,-0.32521 -0.32522,-0.32521 -0.1819,0 -0.32522,0.14331 -0.32522,0.32521 z m 0,0"
id="path20318" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775"
d="m 336.32624,127.7399 c 0,0.1819 0.14332,0.32521 0.32522,0.32521 h 0.82683 c 0.93155,0 1.57647,-0.65043 1.57647,-1.48277 v -0.005 c 0,-0.83784 -0.64492,-1.47725 -1.57647,-1.47725 h -0.82683 c -0.1819,0 -0.32522,0.14882 -0.32522,0.33073 z m 0.65044,-0.26459 v -1.78594 h 0.50161 c 0.53467,0 0.89296,0.36932 0.89296,0.89297 v 0.011 c 0,0.52366 -0.35829,0.88194 -0.89296,0.88194 z m 0,0"
id="path20314" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775"
d="m 339.67232,127.76194 c 0,0.18191 0.14331,0.33073 0.32521,0.33073 0.18191,0 0.32522,-0.14882 0.32522,-0.33073 v -2.3592 c 0,-0.1819 -0.14331,-0.32521 -0.32522,-0.32521 -0.1819,0 -0.32521,0.14331 -0.32521,0.32521 z m 0,0"
id="path20310" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775"
d="m 325.7732,171.12381 c 0.60634,0 1.03629,-0.46302 1.03629,-1.01975 v -0.006 c 0,-0.55673 -0.42443,-1.01975 -1.03077,-1.01975 -0.60634,0 -1.03629,0.46854 -1.03629,1.02526 v 0.005 c 0,0.55673 0.42444,1.01424 1.03077,1.01424 z m 0.006,-0.3197 c -0.39136,0 -0.67248,-0.31971 -0.67248,-0.70005 v -0.006 c 0,-0.38585 0.27561,-0.70005 0.66697,-0.70005 0.39137,0 0.67248,0.31971 0.67248,0.70556 v 0.005 c 0,0.38034 -0.2756,0.69453 -0.66697,0.69453 z m 0,0"
id="path20306" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775"
d="m 328.10924,171.12381 c 0.51814,0 0.84887,-0.29765 0.84887,-0.88746 v -0.96462 c 0,-0.0937 -0.0772,-0.17088 -0.17087,-0.17088 -0.0992,0 -0.17639,0.0772 -0.17639,0.17088 v 0.98116 c 0,0.3638 -0.18742,0.5457 -0.4961,0.5457 -0.30868,0 -0.5016,-0.19292 -0.5016,-0.56224 v -0.96462 c 0,-0.0937 -0.0717,-0.17088 -0.17088,-0.17088 -0.0992,0 -0.17639,0.0772 -0.17639,0.17088 v 0.98116 c 0,0.57327 0.33073,0.87092 0.84336,0.87092 z m 0,0"
id="path20298" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775"
d="m 329.97971,170.93088 c 0,0.0992 0.0772,0.17639 0.17639,0.17639 0.0937,0 0.17639,-0.0772 0.17639,-0.17639 v -1.49379 h 0.47956 c 0.0882,0 0.15985,-0.0717 0.15985,-0.15985 0,-0.0882 -0.0717,-0.15985 -0.15985,-0.15985 h -1.3119 c -0.0882,0 -0.15985,0.0717 -0.15985,0.15985 0,0.0882 0.0717,0.15985 0.15985,0.15985 h 0.47956 z m 0,0"
id="path20302" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775"
d="m 331.36746,170.93088 c 0,0.0992 0.0772,0.17639 0.17639,0.17639 0.0937,0 0.17088,-0.0772 0.17088,-0.17639 v -0.47404 h 0.39136 c 0.43546,0 0.79375,-0.23151 0.79375,-0.678 v -0.006 c 0,-0.39687 -0.29214,-0.65594 -0.75516,-0.65594 h -0.60083 c -0.0992,0 -0.17639,0.0717 -0.17639,0.17088 z m 0.34727,-0.78823 v -0.71107 h 0.40239 c 0.25907,0 0.42994,0.12127 0.42994,0.35278 v 0.006 c 0,0.20394 -0.16536,0.35277 -0.42994,0.35277 z m 0,0"
id="path20294" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775"
d="m 334.12029,171.12381 c 0.51814,0 0.84887,-0.29765 0.84887,-0.88746 v -0.96462 c 0,-0.0937 -0.0772,-0.17088 -0.17088,-0.17088 -0.0992,0 -0.17639,0.0772 -0.17639,0.17088 v 0.98116 c 0,0.3638 -0.18741,0.5457 -0.49609,0.5457 -0.30868,0 -0.50161,-0.19292 -0.50161,-0.56224 v -0.96462 c 0,-0.0937 -0.0717,-0.17088 -0.17088,-0.17088 -0.0992,0 -0.17638,0.0772 -0.17638,0.17088 v 0.98116 c 0,0.57327 0.33072,0.87092 0.84336,0.87092 z m 0,0"
id="path20290" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775"
d="m 335.98936,170.93088 c 0,0.0992 0.0772,0.17639 0.17639,0.17639 0.0937,0 0.17639,-0.0772 0.17639,-0.17639 v -1.49379 h 0.47955 c 0.0882,0 0.15986,-0.0717 0.15986,-0.15985 0,-0.0882 -0.0717,-0.15985 -0.15986,-0.15985 h -1.31189 c -0.0882,0 -0.15985,0.0717 -0.15985,0.15985 0,0.0882 0.0717,0.15985 0.15985,0.15985 h 0.47956 z m 0,0"
id="path20286" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775"
d="m 338.05979,171.1183 c 0.41341,0 0.70556,-0.22049 0.70556,-0.5898 v -0.006 c 0,-0.32522 -0.21498,-0.47405 -0.6339,-0.57878 -0.38034,-0.0882 -0.47404,-0.15985 -0.47404,-0.30867 v -0.005 c 0,-0.1323 0.12126,-0.23703 0.32521,-0.23703 0.15434,0 0.29766,0.0551 0.452,0.14883 0.0276,0.0165 0.0551,0.0275 0.0937,0.0275 0.0882,0 0.15986,-0.0717 0.15986,-0.15986 0,-0.0661 -0.0331,-0.11575 -0.0772,-0.1378 -0.17639,-0.12127 -0.37483,-0.18741 -0.62288,-0.18741 -0.39136,0 -0.67799,0.23702 -0.67799,0.57326 v 0.006 c 0,0.3638 0.23702,0.49058 0.66145,0.5898 0.36381,0.0882 0.44649,0.16537 0.44649,0.30317 v 0.005 c 0,0.14883 -0.1378,0.24804 -0.35278,0.24804 -0.21497,0 -0.39136,-0.0716 -0.55121,-0.20394 -0.0221,-0.0165 -0.0551,-0.0275 -0.10473,-0.0275 -0.0882,0 -0.15986,0.0717 -0.15986,0.15985 0,0.0551 0.0275,0.10473 0.0661,0.1323 0.22049,0.16536 0.47405,0.24804 0.74414,0.24804 z m 0,0"
id="path20282" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775"
d="m 317.78371,192.88542 c 0,0.0772 0.0606,0.13229 0.13229,0.13229 0.0606,0 0.11024,-0.0331 0.13229,-0.0882 l 0.13229,-0.30867 h 0.78273 l 0.13229,0.29766 c 0.0221,0.0606 0.0661,0.0992 0.1378,0.0992 0.0717,0 0.1323,-0.0606 0.1323,-0.13229 0,-0.022 -0.005,-0.0441 -0.0165,-0.0606 l -0.59531,-1.33394 c -0.0331,-0.0661 -0.0882,-0.11025 -0.17088,-0.11025 h -0.011 c -0.0827,0 -0.1378,0.0441 -0.17087,0.11025 l -0.59531,1.33394 c -0.011,0.022 -0.022,0.0441 -0.022,0.0606 z m 0.50712,-0.51814 0.28112,-0.64492 0.28112,0.64492 z m 0,0"
id="path20274" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775"
d="m 319.71236,192.87991 c 0,0.0772 0.0661,0.1378 0.14332,0.1378 0.0772,0 0.14331,-0.0606 0.14331,-0.1378 v -0.52917 h 0.68902 c 0.0717,0 0.13229,-0.0551 0.13229,-0.12678 0,-0.0717 -0.0606,-0.12678 -0.13229,-0.12678 h -0.68902 v -0.44097 h 0.79375 c 0.0717,0 0.12678,-0.0551 0.12678,-0.12678 0,-0.0717 -0.0551,-0.12678 -0.12678,-0.12678 h -0.93706 c -0.0772,0 -0.14332,0.0606 -0.14332,0.14332 z m 0,0"
id="path20278" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775"
d="m 321.71941,192.87991 c 0,0.0772 0.0661,0.1378 0.14331,0.1378 0.0772,0 0.14332,-0.0606 0.14332,-0.1378 v -1.21818 h 0.39136 c 0.0717,0 0.12678,-0.0606 0.12678,-0.12679 0,-0.0717 -0.0551,-0.13229 -0.12678,-0.13229 h -1.06935 c -0.0717,0 -0.12679,0.0606 -0.12679,0.13229 0,0.0661 0.0551,0.12679 0.12679,0.12679 h 0.39136 z m 0,0"
id="path20270" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775"
d="m 329.89352,192.87991 c 0,0.0772 0.0661,0.1378 0.14331,0.1378 0.0772,0 0.14332,-0.0606 0.14332,-0.1378 v -0.39136 h 0.31419 c 0.35278,0 0.64492,-0.18742 0.64492,-0.54571 v -0.005 c 0,-0.32521 -0.23702,-0.53468 -0.61184,-0.53468 h -0.49059 c -0.0772,0 -0.14331,0.0606 -0.14331,0.14332 z m 0.28663,-0.64492 v -0.57878 h 0.32522 c 0.20946,0 0.34726,0.0992 0.34726,0.28663 v 0.006 c 0,0.17088 -0.13229,0.28663 -0.34726,0.28663 z m 0,0"
id="path20262" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775"
d="m 331.86982,192.91298 c 0.0276,0.0717 0.0772,0.11576 0.14332,0.11576 h 0.0275 c 0.0717,0 0.12126,-0.0441 0.14883,-0.11576 l 0.35829,-1.04731 0.35829,1.04731 c 0.0221,0.0717 0.0717,0.11576 0.14331,0.11576 h 0.0275 c 0.0661,0 0.12127,-0.0441 0.14883,-0.11576 l 0.47405,-1.32843 c 0.005,-0.0165 0.011,-0.0386 0.011,-0.0606 0,-0.0717 -0.0661,-0.13229 -0.13781,-0.13229 -0.0717,0 -0.11575,0.0441 -0.1378,0.0992 l -0.36931,1.10795 -0.36381,-1.10243 c -0.022,-0.0662 -0.0717,-0.11025 -0.14331,-0.11025 h -0.0165 c -0.0717,0 -0.12127,0.0441 -0.14332,0.11025 l -0.3638,1.10243 -0.36932,-1.10795 c -0.0165,-0.0551 -0.0717,-0.0992 -0.1378,-0.0992 -0.0772,0 -0.14883,0.0606 -0.14883,0.13781 0,0.0165 0.005,0.0386 0.0165,0.0551 z m 0,0"
id="path20266" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775"
d="m 341.27166,192.87991 c 0,0.0772 0.0606,0.1378 0.1378,0.1378 0.0827,0 0.14332,-0.0606 0.14332,-0.1378 v -0.95912 l 0.38585,0.58429 c 0.0331,0.0441 0.0717,0.0717 0.12127,0.0717 0.0496,0 0.0882,-0.0275 0.11575,-0.0717 l 0.39136,-0.5898 v 0.96463 c 0,0.0717 0.0661,0.1378 0.14332,0.1378 0.0772,0 0.14332,-0.0606 0.14332,-0.1378 v -1.34497 c 0,-0.0772 -0.0661,-0.14331 -0.14332,-0.14331 h -0.0331 c -0.0551,0 -0.0937,0.0276 -0.12678,0.0717 l -0.48507,0.76618 -0.49058,-0.76067 c -0.0276,-0.0441 -0.0662,-0.0772 -0.12678,-0.0772 h -0.033 c -0.0772,0 -0.14332,0.0662 -0.14332,0.14331 z m 0,0"
id="path20254" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775"
d="m 343.69052,192.91298 c 0.0276,0.0717 0.0772,0.11576 0.14332,0.11576 h 0.0275 c 0.0717,0 0.12127,-0.0441 0.14882,-0.11576 l 0.3583,-1.04731 0.35829,1.04731 c 0.022,0.0717 0.0717,0.11576 0.14331,0.11576 h 0.0275 c 0.0662,0 0.12127,-0.0441 0.14883,-0.11576 l 0.47404,-1.32843 c 0.005,-0.0165 0.011,-0.0386 0.011,-0.0606 0,-0.0717 -0.0661,-0.13229 -0.1378,-0.13229 -0.0717,0 -0.11576,0.0441 -0.13781,0.0992 l -0.36931,1.10795 -0.3638,-1.10243 c -0.022,-0.0662 -0.0717,-0.11025 -0.14332,-0.11025 h -0.0165 c -0.0717,0 -0.12127,0.0441 -0.14332,0.11025 l -0.3638,1.10243 -0.36931,-1.10795 c -0.0165,-0.0551 -0.0717,-0.0992 -0.13781,-0.0992 -0.0772,0 -0.14882,0.0606 -0.14882,0.13781 0,0.0165 0.005,0.0386 0.0165,0.0551 z m 0,0"
id="path20258" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775"
d="m 316.68324,176.87897 c 0,0.0772 0.0661,0.13781 0.14331,0.13781 0.0772,0 0.14332,-0.0606 0.14332,-0.13781 v -0.39136 h 0.31419 c 0.35278,0 0.64492,-0.18741 0.64492,-0.54571 v -0.006 c 0,-0.32521 -0.23702,-0.53468 -0.61184,-0.53468 h -0.49059 c -0.0772,0 -0.14331,0.0606 -0.14331,0.14332 z m 0.28663,-0.64492 v -0.57878 h 0.32522 c 0.20946,0 0.34726,0.0992 0.34726,0.28663 v 0.005 c 0,0.17088 -0.13229,0.28664 -0.34726,0.28664 z m 0,0"
id="path20250" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775"
d="m 318.28908,176.87897 c 0,0.0772 0.0661,0.13781 0.14332,0.13781 0.0772,0 0.14332,-0.0606 0.14332,-0.13781 v -1.35048 c 0,-0.0772 -0.0661,-0.1378 -0.14332,-0.1378 -0.0772,0 -0.14332,0.0606 -0.14332,0.1378 z m 0,0"
id="path20246" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775"
d="m 319.4399,176.87897 c 0,0.0772 0.0661,0.13781 0.14331,0.13781 0.0772,0 0.14332,-0.0606 0.14332,-0.13781 v -1.21818 h 0.39136 c 0.0717,0 0.12678,-0.0606 0.12678,-0.12678 0,-0.0717 -0.0551,-0.1323 -0.12678,-0.1323 h -1.06936 c -0.0717,0 -0.12677,0.0606 -0.12677,0.1323 0,0.0661 0.0551,0.12678 0.12677,0.12678 h 0.39137 z m 0,0"
id="path20238" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775"
d="m 321.26252,177.03331 c 0.25907,0 0.42995,-0.0827 0.57878,-0.21497 0.0276,-0.022 0.0496,-0.0606 0.0496,-0.0992 0,-0.0717 -0.0661,-0.13229 -0.1378,-0.13229 -0.0331,0 -0.0606,0.011 -0.0827,0.0331 -0.11576,0.0992 -0.23151,0.15434 -0.40239,0.15434 -0.30317,0 -0.52917,-0.25908 -0.52917,-0.57327 0,-0.31419 0.226,-0.56775 0.52917,-0.56775 0.15434,0 0.27561,0.0551 0.38585,0.14332 0.0165,0.0165 0.0441,0.0275 0.0827,0.0275 0.0772,0 0.14332,-0.0606 0.14332,-0.13781 0,-0.0496 -0.0275,-0.0882 -0.0551,-0.11024 -0.14333,-0.11024 -0.30318,-0.18189 -0.55122,-0.18189 -0.48507,0 -0.82683,0.37482 -0.82683,0.82682 v 0.005 c 0,0.46302 0.34727,0.82682 0.8158,0.82682 z m 0,0"
id="path20242" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775"
d="m 322.27715,176.87897 c 0,0.0772 0.0661,0.13781 0.14331,0.13781 0.0772,0 0.14332,-0.0606 0.14332,-0.13781 v -0.55121 h 0.76619 v 0.55121 c 0,0.0772 0.0606,0.13781 0.1378,0.13781 0.0772,0 0.14332,-0.0606 0.14332,-0.13781 v -1.35048 c 0,-0.0772 -0.0661,-0.1378 -0.14332,-0.1378 -0.0772,0 -0.1378,0.0606 -0.1378,0.1378 v 0.5402 h -0.76619 v -0.5402 c 0,-0.0772 -0.0661,-0.1378 -0.14332,-0.1378 -0.0772,0 -0.14331,0.0606 -0.14331,0.1378 z m 0,0"
id="path20234" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775"
d="m 329.43752,177.03331 c 0.23702,0 0.42995,-0.0827 0.56775,-0.17639 0.0661,-0.0386 0.0992,-0.0992 0.0992,-0.17639 v -0.42995 c 0,-0.0772 -0.0606,-0.14331 -0.14332,-0.14331 h -0.44648 c -0.0661,0 -0.12678,0.0551 -0.12678,0.12678 0,0.0661 0.0606,0.12127 0.12678,0.12127 h 0.3197 v 0.29765 c -0.0992,0.0772 -0.23702,0.12127 -0.39136,0.12127 -0.32522,0 -0.5457,-0.24253 -0.5457,-0.57326 0,-0.30868 0.22599,-0.56776 0.52365,-0.56776 0.17088,0 0.28663,0.0496 0.38585,0.12678 0.0276,0.0165 0.0551,0.0331 0.0882,0.0331 0.0772,0 0.14332,-0.0661 0.14332,-0.14331 0,-0.0551 -0.0331,-0.0937 -0.0606,-0.11576 -0.14332,-0.10473 -0.30868,-0.15985 -0.54571,-0.15985 -0.48507,0 -0.82682,0.38034 -0.82682,0.82682 v 0.005 c 0,0.46854 0.32522,0.82683 0.83234,0.82683 z m 0,0"
id="path20230" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775"
d="m 330.40858,176.88448 c 0,0.0772 0.0606,0.1323 0.13229,0.1323 0.0606,0 0.11025,-0.0331 0.13229,-0.0882 l 0.1323,-0.30869 h 0.78272 l 0.13229,0.29766 c 0.0221,0.0606 0.0662,0.0992 0.13781,0.0992 0.0717,0 0.13229,-0.0606 0.13229,-0.13229 0,-0.022 -0.005,-0.0441 -0.0165,-0.0606 l -0.59531,-1.33394 c -0.0331,-0.0662 -0.0882,-0.11025 -0.17088,-0.11025 h -0.011 c -0.0827,0 -0.1378,0.0441 -0.17088,0.11025 l -0.59531,1.33394 c -0.011,0.022 -0.022,0.0441 -0.022,0.0606 z m 0.50712,-0.51814 0.28112,-0.64492 0.28112,0.64492 z m 0,0"
id="path20222" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775"
d="m 332.55524,176.87897 c 0,0.0772 0.0661,0.13781 0.14332,0.13781 0.0772,0 0.14331,-0.0606 0.14331,-0.13781 v -1.21818 h 0.39137 c 0.0717,0 0.12677,-0.0606 0.12677,-0.12678 0,-0.0717 -0.0551,-0.1323 -0.12677,-0.1323 h -1.06936 c -0.0717,0 -0.12678,0.0606 -0.12678,0.1323 0,0.0661 0.0551,0.12678 0.12678,0.12678 h 0.39136 z m 0,0"
id="path20226" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775"
d="m 333.84171,177.00575 h 0.94809 c 0.0661,0 0.12678,-0.0551 0.12678,-0.12678 0,-0.0662 -0.0606,-0.12678 -0.12678,-0.12678 h -0.80478 v -0.42995 h 0.68902 c 0.0661,0 0.12678,-0.0551 0.12678,-0.12126 0,-0.0717 -0.0606,-0.13229 -0.12678,-0.13229 h -0.68902 v -0.41342 h 0.79375 c 0.0661,0 0.12127,-0.0551 0.12127,-0.12678 0,-0.0717 -0.0551,-0.12678 -0.12127,-0.12678 h -0.93706 c -0.0772,0 -0.14332,0.0606 -0.14332,0.14332 v 1.31741 c 0,0.0827 0.0661,0.14331 0.14332,0.14331 z m 0,0"
id="path20218" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775"
d="m 341.80604,177.0278 h 0.0165 c 0.0772,0 0.13229,-0.0441 0.15985,-0.11576 l 0.56775,-1.32842 c 0.005,-0.0165 0.011,-0.0386 0.011,-0.0606 0,-0.0717 -0.0606,-0.1323 -0.1378,-0.1323 -0.0661,0 -0.11576,0.0441 -0.13781,0.0882 l -0.46853,1.16858 -0.46302,-1.15755 c -0.022,-0.0606 -0.0717,-0.0992 -0.14332,-0.0992 -0.0827,0 -0.14331,0.0606 -0.14331,0.1378 0,0.022 0.005,0.0441 0.0165,0.0661 l 0.56224,1.31741 c 0.0275,0.0717 0.0827,0.11575 0.15985,0.11575 z m 0,0"
id="path20210" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775"
d="m 343.04993,177.00575 h 0.94809 c 0.0661,0 0.12678,-0.0551 0.12678,-0.12678 0,-0.0662 -0.0606,-0.12678 -0.12678,-0.12678 h -0.80478 v -0.42995 h 0.68902 c 0.0662,0 0.12678,-0.0551 0.12678,-0.12126 0,-0.0717 -0.0606,-0.13229 -0.12678,-0.13229 h -0.68902 v -0.41342 h 0.79375 c 0.0661,0 0.12127,-0.0551 0.12127,-0.12678 0,-0.0717 -0.0551,-0.12678 -0.12127,-0.12678 h -0.93706 c -0.0772,0 -0.14332,0.0606 -0.14332,0.14332 v 1.31741 c 0,0.0827 0.0661,0.14331 0.14332,0.14331 z m 0,0"
id="path20214" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775"
d="m 344.5074,176.86244 c 0,0.0827 0.0661,0.14331 0.14331,0.14331 h 0.86541 c 0.0716,0 0.1323,-0.0551 0.1323,-0.12678 0,-0.0717 -0.0606,-0.13229 -0.1323,-0.13229 h -0.72209 v -1.21819 c 0,-0.0772 -0.0661,-0.1378 -0.14332,-0.1378 -0.0772,0 -0.14331,0.0606 -0.14331,0.1378 z m 0,0"
id="path20206" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775"
d="m 318.66393,209.03431 c 0.25907,0 0.42995,-0.0827 0.57878,-0.21498 0.0276,-0.022 0.0496,-0.0606 0.0496,-0.0992 0,-0.0717 -0.0661,-0.13229 -0.1378,-0.13229 -0.0331,0 -0.0606,0.011 -0.0827,0.0331 -0.11576,0.0992 -0.23151,0.15434 -0.40239,0.15434 -0.30317,0 -0.52916,-0.25907 -0.52916,-0.57326 0,-0.31419 0.22599,-0.56775 0.52916,-0.56775 0.15434,0 0.27561,0.0551 0.38585,0.14331 0.0165,0.0165 0.0441,0.0275 0.0827,0.0275 0.0772,0 0.14332,-0.0606 0.14332,-0.1378 0,-0.0496 -0.0276,-0.0882 -0.0551,-0.11024 -0.14332,-0.11024 -0.30317,-0.1819 -0.55122,-0.1819 -0.48507,0 -0.82682,0.37482 -0.82682,0.82682 v 0.005 c 0,0.46302 0.34727,0.82682 0.8158,0.82682 z m 0,0"
id="path20020" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775"
d="m 319.67856,208.86343 c 0,0.0827 0.0661,0.14331 0.14331,0.14331 h 0.86541 c 0.0717,0 0.13229,-0.0551 0.13229,-0.12677 0,-0.0717 -0.0606,-0.13229 -0.13229,-0.13229 h -0.72209 v -1.21819 c 0,-0.0772 -0.0661,-0.1378 -0.14332,-0.1378 -0.0772,0 -0.14331,0.0606 -0.14331,0.1378 z m 0,0"
id="path20016" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775"
d="m 321.15413,208.87997 c 0,0.0772 0.0661,0.1378 0.14332,0.1378 0.0772,0 0.14331,-0.0606 0.14331,-0.1378 v -0.33625 l 0.25907,-0.24804 0.51815,0.65594 c 0.0275,0.0386 0.0606,0.0662 0.11575,0.0662 0.0827,0 0.14332,-0.0606 0.14332,-0.1378 0,-0.0441 -0.0165,-0.0717 -0.0386,-0.0992 l -0.54019,-0.67248 0.49609,-0.47956 c 0.0331,-0.0331 0.0551,-0.0662 0.0551,-0.11024 0,-0.0662 -0.0551,-0.12678 -0.13229,-0.12678 -0.0496,0 -0.0827,0.0165 -0.11576,0.0496 l -0.76068,0.76619 v -0.678 c 0,-0.0772 -0.0661,-0.1378 -0.14331,-0.1378 -0.0772,0 -0.14332,0.0606 -0.14332,0.1378 z m 0,0"
id="path20012" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775"
d="m 330.01942,209.02879 h 0.0165 c 0.0772,0 0.13229,-0.0441 0.15985,-0.11575 l 0.56775,-1.32843 c 0.006,-0.0165 0.011,-0.0386 0.011,-0.0606 0,-0.0717 -0.0606,-0.13229 -0.1378,-0.13229 -0.0661,0 -0.11576,0.0441 -0.13781,0.0882 l -0.46853,1.16857 -0.46302,-1.15755 c -0.022,-0.0606 -0.0717,-0.0992 -0.14331,-0.0992 -0.0827,0 -0.14332,0.0606 -0.14332,0.13781 0,0.022 0.005,0.0441 0.0165,0.0661 l 0.56224,1.3174 c 0.0275,0.0717 0.0827,0.11575 0.15985,0.11575 z m 0,0"
id="path20004" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775"
d="m 331.83574,209.03431 c 0.49609,0 0.84335,-0.38034 0.84335,-0.83234 0,-0.452 -0.34175,-0.82682 -0.83784,-0.82682 -0.49058,0 -0.83785,0.37482 -0.83785,0.82682 v 0.006 c 0,0.452 0.34175,0.82682 0.83234,0.82682 z m 0.006,-0.25908 c -0.31971,0 -0.5457,-0.25906 -0.5457,-0.57326 0,-0.31419 0.22599,-0.56775 0.54019,-0.56775 0.3197,0 0.5457,0.25907 0.5457,0.56775 v 0.006 c 0,0.31419 -0.22049,0.56775 -0.54019,0.56775 z m 0,0"
id="path20008" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775"
d="m 333.09087,208.86343 c 0,0.0827 0.0661,0.14331 0.14332,0.14331 h 0.86541 c 0.0717,0 0.13229,-0.0551 0.13229,-0.12677 0,-0.0717 -0.0606,-0.13229 -0.13229,-0.13229 h -0.7221 v -1.21819 c 0,-0.0772 -0.0661,-0.1378 -0.14331,-0.1378 -0.0772,0 -0.14332,0.0606 -0.14332,0.1378 z m 0,0"
id="path20000" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775"
d="m 340.98929,208.87997 c 0,0.0772 0.0661,0.1378 0.14331,0.1378 0.0772,0 0.14332,-0.0606 0.14332,-0.1378 v -0.39137 h 0.31419 c 0.35278,0 0.64493,-0.18741 0.64493,-0.5457 v -0.006 c 0,-0.32521 -0.23703,-0.53467 -0.61185,-0.53467 h -0.49059 c -0.0772,0 -0.14331,0.0606 -0.14331,0.14331 z m 0.28663,-0.64493 v -0.57877 h 0.32522 c 0.20946,0 0.34726,0.0992 0.34726,0.28663 v 0.005 c 0,0.17088 -0.13229,0.28663 -0.34726,0.28663 z m 0,0"
id="path19992" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775"
d="m 342.37183,208.88548 c 0,0.0772 0.0606,0.13229 0.13229,0.13229 0.0606,0 0.11024,-0.0331 0.13229,-0.0882 l 0.13229,-0.30868 h 0.78273 l 0.13229,0.29766 c 0.022,0.0606 0.0661,0.0992 0.1378,0.0992 0.0717,0 0.13229,-0.0606 0.13229,-0.13229 0,-0.022 -0.005,-0.0441 -0.0165,-0.0606 l -0.59531,-1.33395 c -0.0331,-0.0662 -0.0882,-0.11024 -0.17087,-0.11024 h -0.011 c -0.0827,0 -0.13781,0.0441 -0.17088,0.11024 l -0.59532,1.33395 c -0.011,0.022 -0.022,0.0441 -0.022,0.0606 z m 0.50711,-0.51815 0.28112,-0.64491 0.28112,0.64491 z m 0,0"
id="path19996" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775"
d="m 344.30138,208.87997 c 0,0.0772 0.0661,0.1378 0.14332,0.1378 0.0772,0 0.1378,-0.0606 0.1378,-0.1378 v -1.01975 l 0.82683,1.06935 c 0.0386,0.0496 0.0772,0.0882 0.14331,0.0882 h 0.011 c 0.0772,0 0.1378,-0.0662 0.1378,-0.14331 v -1.34497 c 0,-0.0772 -0.0606,-0.1378 -0.1378,-0.1378 -0.0772,0 -0.1378,0.0606 -0.1378,0.1378 v 0.98668 l -0.80478,-1.0418 c -0.0386,-0.0496 -0.0772,-0.0827 -0.14331,-0.0827 h -0.0331 c -0.0772,0 -0.14332,0.0661 -0.14332,0.14332 z m 0,0"
id="path19988" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775"
d="m 317.78401,225.02974 c 0.34176,0 0.57327,-0.17639 0.57327,-0.47956 v -0.005 c 0,-0.26458 -0.17088,-0.38585 -0.51264,-0.46853 -0.30868,-0.0717 -0.38033,-0.12678 -0.38033,-0.25356 0,-0.11024 0.0937,-0.19293 0.25907,-0.19293 0.12678,0 0.24805,0.0386 0.36931,0.12127 0.022,0.0165 0.0441,0.022 0.0717,0.022 0.0772,0 0.1378,-0.0606 0.1378,-0.13229 0,-0.0551 -0.0331,-0.0937 -0.0661,-0.11024 -0.14332,-0.0992 -0.30317,-0.14883 -0.50712,-0.14883 -0.3197,0 -0.5457,0.18741 -0.5457,0.46302 v 0.005 c 0,0.29766 0.18741,0.39688 0.52916,0.47956 0.30317,0.0661 0.3638,0.1323 0.3638,0.24254 v 0.005 c 0,0.12127 -0.11024,0.20395 -0.28111,0.20395 -0.17639,0 -0.31971,-0.0606 -0.452,-0.16536 -0.0165,-0.0165 -0.0441,-0.0275 -0.0827,-0.0275 -0.0717,0 -0.1323,0.0606 -0.1323,0.13229 0,0.0441 0.022,0.0827 0.0551,0.11024 0.17638,0.13229 0.38585,0.19844 0.60082,0.19844 z m 0,0"
id="path19984" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775"
d="m 319.1456,224.88091 c 0,0.0772 0.0661,0.13781 0.14331,0.13781 0.0772,0 0.14332,-0.0606 0.14332,-0.13781 v -1.21818 h 0.39136 c 0.0717,0 0.12678,-0.0606 0.12678,-0.12678 0,-0.0717 -0.0551,-0.13229 -0.12678,-0.13229 h -1.06935 c -0.0717,0 -0.12679,0.0606 -0.12679,0.13229 0,0.0661 0.0551,0.12678 0.12679,0.12678 h 0.39136 z m 0,0"
id="path19980" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775"
d="m 320.28851,224.88091 c 0,0.0772 0.0661,0.13781 0.14331,0.13781 0.0772,0 0.14332,-0.0606 0.14332,-0.13781 v -0.43546 h 0.35277 l 0.39137,0.50161 c 0.0331,0.0441 0.0717,0.0717 0.1378,0.0717 0.0661,0 0.13229,-0.0496 0.13229,-0.1323 0,-0.0441 -0.0165,-0.0716 -0.0441,-0.10473 l -0.30868,-0.38585 c 0.21498,-0.0717 0.3638,-0.226 0.3638,-0.47956 v -0.005 c 0,-0.14332 -0.0441,-0.25907 -0.13229,-0.34727 -0.0992,-0.0992 -0.25907,-0.15985 -0.46302,-0.15985 h -0.57326 c -0.0772,0 -0.14332,0.0606 -0.14332,0.14332 z m 0.28663,-0.6835 v -0.54019 h 0.4079 c 0.20946,0 0.33073,0.0937 0.33073,0.27009 0,0.16536 -0.12678,0.2701 -0.33073,0.2701 z m 0,0"
id="path19976" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775"
d="m 322.38797,224.88091 c 0,0.0772 0.0661,0.13781 0.14332,0.13781 0.0772,0 0.14331,-0.0606 0.14331,-0.13781 v -1.21818 h 0.39137 c 0.0717,0 0.12677,-0.0606 0.12677,-0.12678 0,-0.0717 -0.0551,-0.13229 -0.12677,-0.13229 h -1.06936 c -0.0717,0 -0.12678,0.0606 -0.12678,0.13229 0,0.0661 0.0551,0.12678 0.12678,0.12678 h 0.39136 z m 0,0"
id="path19972" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775"
d="m 329.23783,225.02974 c 0.34176,0 0.57327,-0.17639 0.57327,-0.47956 v -0.005 c 0,-0.26458 -0.17088,-0.38585 -0.51263,-0.46853 -0.30868,-0.0717 -0.38034,-0.12678 -0.38034,-0.25356 0,-0.11024 0.0937,-0.19293 0.25907,-0.19293 0.12678,0 0.24805,0.0386 0.36932,0.12127 0.0221,0.0165 0.0441,0.022 0.0717,0.022 0.0772,0 0.1378,-0.0606 0.1378,-0.13229 0,-0.0551 -0.0331,-0.0937 -0.0662,-0.11024 -0.14331,-0.0992 -0.30317,-0.14883 -0.50712,-0.14883 -0.3197,0 -0.5457,0.18741 -0.5457,0.46302 v 0.005 c 0,0.29766 0.18741,0.39688 0.52917,0.47956 0.30317,0.0661 0.3638,0.1323 0.3638,0.24254 v 0.005 c 0,0.12127 -0.11025,0.20395 -0.28112,0.20395 -0.17639,0 -0.31971,-0.0606 -0.452,-0.16536 -0.0165,-0.0165 -0.0441,-0.0275 -0.0827,-0.0275 -0.0717,0 -0.13229,0.0606 -0.13229,0.13229 0,0.0441 0.0221,0.0827 0.0551,0.11024 0.17639,0.13229 0.38585,0.19844 0.60083,0.19844 z m 0,0"
id="path19968" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775"
d="m 330.59942,224.88091 c 0,0.0772 0.0661,0.13781 0.14332,0.13781 0.0772,0 0.14331,-0.0606 0.14331,-0.13781 v -1.21818 h 0.39137 c 0.0717,0 0.12677,-0.0606 0.12677,-0.12678 0,-0.0717 -0.0551,-0.13229 -0.12677,-0.13229 h -1.06936 c -0.0717,0 -0.12678,0.0606 -0.12678,0.13229 0,0.0661 0.0551,0.12678 0.12678,0.12678 h 0.39136 z m 0,0"
id="path19960" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775"
d="m 332.43628,225.03525 c 0.49609,0 0.84336,-0.38034 0.84336,-0.83233 0,-0.452 -0.34175,-0.82683 -0.83785,-0.82683 -0.49058,0 -0.83784,0.37483 -0.83784,0.82683 v 0.005 c 0,0.452 0.34175,0.82682 0.83233,0.82682 z m 0.005,-0.25907 c -0.3197,0 -0.5457,-0.25907 -0.5457,-0.57326 0,-0.31419 0.226,-0.56775 0.54019,-0.56775 0.3197,0 0.5457,0.25907 0.5457,0.56775 v 0.005 c 0,0.31419 -0.22048,0.56775 -0.54019,0.56775 z m 0,0"
id="path19964" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775"
d="m 333.6912,224.88091 c 0,0.0772 0.0661,0.13781 0.14332,0.13781 0.0772,0 0.14331,-0.0606 0.14331,-0.13781 v -0.39136 h 0.3142 c 0.35277,0 0.64492,-0.18742 0.64492,-0.5457 v -0.006 c 0,-0.32521 -0.23703,-0.53467 -0.61185,-0.53467 h -0.49058 c -0.0772,0 -0.14332,0.0606 -0.14332,0.14331 z m 0.28663,-0.64492 v -0.57877 h 0.32522 c 0.20946,0 0.34726,0.0992 0.34726,0.28663 v 0.005 c 0,0.17088 -0.13229,0.28663 -0.34726,0.28663 z m 0,0"
id="path19956" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775"
d="m 340.75065,225.03525 c 0.25907,0 0.42995,-0.0827 0.57878,-0.21497 0.0276,-0.022 0.0496,-0.0606 0.0496,-0.0992 0,-0.0717 -0.0661,-0.13229 -0.13781,-0.13229 -0.0331,0 -0.0606,0.011 -0.0827,0.0331 -0.11575,0.0992 -0.23151,0.15434 -0.40238,0.15434 -0.30317,0 -0.52917,-0.25907 -0.52917,-0.57326 0,-0.31419 0.226,-0.56775 0.52917,-0.56775 0.15434,0 0.2756,0.0551 0.38585,0.14332 0.0165,0.0165 0.0441,0.0275 0.0827,0.0275 0.0772,0 0.14331,-0.0606 0.14331,-0.13781 0,-0.0496 -0.0276,-0.0882 -0.0551,-0.11024 -0.14331,-0.11024 -0.30316,-0.1819 -0.55121,-0.1819 -0.48507,0 -0.82683,0.37483 -0.82683,0.82682 v 0.006 c 0,0.46302 0.34727,0.82682 0.8158,0.82682 z m 0,0"
id="path19948" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775"
d="m 342.49157,225.03525 c 0.49609,0 0.84335,-0.38034 0.84335,-0.83233 0,-0.452 -0.34175,-0.82683 -0.83785,-0.82683 -0.49058,0 -0.83784,0.37483 -0.83784,0.82683 v 0.005 c 0,0.452 0.34175,0.82682 0.83234,0.82682 z m 0.005,-0.25907 c -0.31971,0 -0.54571,-0.25907 -0.54571,-0.57326 0,-0.31419 0.226,-0.56775 0.54019,-0.56775 0.31971,0 0.5457,0.25907 0.5457,0.56775 v 0.005 c 0,0.31419 -0.22048,0.56775 -0.54018,0.56775 z m 0,0"
id="path19952" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775"
d="m 343.74646,224.88091 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.01975 l 0.82683,1.06936 c 0.0386,0.0496 0.0772,0.0882 0.14331,0.0882 h 0.011 c 0.0772,0 0.13781,-0.0661 0.13781,-0.14332 v -1.34497 c 0,-0.0772 -0.0606,-0.1378 -0.13781,-0.1378 -0.0772,0 -0.1378,0.0606 -0.1378,0.1378 v 0.98668 l -0.80478,-1.0418 c -0.0386,-0.0496 -0.0772,-0.0827 -0.14331,-0.0827 h -0.0331 c -0.0772,0 -0.14332,0.0661 -0.14332,0.14332 z m 0,0"
id="path19944" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775"
d="m 346.00897,224.88091 c 0,0.0772 0.0662,0.13781 0.14331,0.13781 0.0772,0 0.14332,-0.0606 0.14332,-0.13781 v -1.21818 h 0.39136 c 0.0717,0 0.12678,-0.0606 0.12678,-0.12678 0,-0.0717 -0.0551,-0.13229 -0.12678,-0.13229 h -1.06936 c -0.0716,0 -0.12678,0.0606 -0.12678,0.13229 0,0.0661 0.0551,0.12678 0.12678,0.12678 h 0.39137 z m 0,0"
id="path19940" />
</g>
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="widgets"
style="display:none">
<circle
style="opacity:1;vector-effect:none;fill:#0000ff;fill-opacity:1;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="path23016"
cx="8.7195301"
cy="64.251724"
r="2.4054251" />
<circle
r="2.4054251"
cy="64.251724"
cx="20.31986"
id="circle23018"
style="opacity:1;vector-effect:none;fill:#0000ff;fill-opacity:1;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" />
<circle
style="opacity:1;vector-effect:none;fill:#0000ff;fill-opacity:1;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="circle23020"
cx="31.9195"
cy="64.251724"
r="2.4054251" />
<circle
r="2.4054251"
cy="80.251434"
cx="8.7195349"
id="circle23022"
style="opacity:1;vector-effect:none;fill:#0000ff;fill-opacity:1;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" />
<circle
style="opacity:1;vector-effect:none;fill:#0000ff;fill-opacity:1;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="circle23024"
cx="20.319866"
cy="80.251434"
r="2.4054251" />
<circle
r="2.4054251"
cy="80.251434"
cx="31.919506"
id="circle23026"
style="opacity:1;vector-effect:none;fill:#0000ff;fill-opacity:1;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" />
<circle
style="opacity:1;vector-effect:none;fill:#0000ff;fill-opacity:1;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="circle23028"
cx="8.7195301"
cy="96.251152"
r="2.4054251" />
<circle
r="2.4054251"
cy="96.251152"
cx="20.31986"
id="circle23030"
style="opacity:1;vector-effect:none;fill:#0000ff;fill-opacity:1;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" />
<circle
style="opacity:1;vector-effect:none;fill:#0000ff;fill-opacity:1;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="circle23032"
cx="31.9195"
cy="96.251152"
r="2.4054251" />
<circle
r="2.4054251"
cy="112.25155"
cx="8.7195301"
id="circle23034"
style="opacity:1;vector-effect:none;fill:#0000ff;fill-opacity:1;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" />
<circle
style="opacity:1;vector-effect:none;fill:#0000ff;fill-opacity:1;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="circle23036"
cx="20.31986"
cy="112.25155"
r="2.4054251" />
<circle
r="2.4054251"
cy="112.25155"
cx="31.9195"
id="circle23038"
style="opacity:1;vector-effect:none;fill:#0000ff;fill-opacity:1;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
style="opacity:1;vector-effect:none;fill:#0000ff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.27329969;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
id="rect23040"
width="33.840481"
height="28.00036"
x="3.4175301"
y="14.838721" />
</g>
</svg>

+ 319
- 0
src/Core/CV_MIDI.cpp View File

@@ -0,0 +1,319 @@
#include "Core.hpp"


template <int C>
struct PolyphonicMidiOutput : midi::Output {
int vels[C];
int lastNotes[C];
int notes[C];
bool lastGates[C];
bool gates[C];
int lastAfts[C];
int lastPw;
int lastMw;
bool lastClk;
int lastVol;
int lastPan;
bool lastStart;
bool lastStop;
bool lastCont;

PolyphonicMidiOutput() {
reset();
}

void reset() {
for (int c = 0; c < C; c++) {
vels[c] = 100;
lastNotes[c] = notes[c] = 60;
lastGates[c] = gates[c] = false;
lastAfts[c] = -1;
}
lastPw = 0x2000;
lastMw = 0;
lastClk = false;
lastVol = 127;
lastPan = 64;
lastStart = false;
lastStop = false;
lastCont = false;
}

void panic() {
reset();
// Send all note off commands
for (int note = 0; note <= 127; note++) {
// Note off
midi::Message m;
m.cmd = 0x8;
m.data1 = note;
m.data2 = 0;
sendMessage(m);
}
}

void setVel(int vel, int c) {
vels[c] = vel;
}

void setNote(int note, int c) {
notes[c] = note;
}

void setGate(bool gate, int c) {
gates[c] = gate;
}

void stepChannel(int c) {
bool changedNote = gates[c] && lastGates[c] && notes[c] != lastNotes[c];
bool enabledGate = gates[c] && !lastGates[c];
bool disabledGate = !gates[c] && lastGates[c];
if (changedNote || enabledGate) {
// Note on
midi::Message m;
m.cmd = 0x9;
m.data1 = notes[c];
m.data2 = vels[c];
sendMessage(m);
}
if (changedNote || disabledGate) {
// Note off
midi::Message m;
m.cmd = 0x8;
m.data1 = lastNotes[c];
m.data2 = vels[c];
sendMessage(m);
}
lastNotes[c] = notes[c];
lastGates[c] = gates[c];
}

void setAftertouch(int aft, int c) {
if (lastAfts[c] == aft)
return;
lastAfts[c] = aft;
// Polyphonic key pressure
midi::Message m;
m.cmd = 0xa;
m.data1 = notes[c];
m.data2 = aft;
sendMessage(m);
}

void setPitchWheel(int pw) {
if (lastPw == pw)
return;
lastPw = pw;
// Pitch wheel
midi::Message m;
m.cmd = 0xe;
m.data1 = pw & 0x7f;
m.data2 = (pw >> 7) & 0x7f;
sendMessage(m);
}

void setModWheel(int mw) {
if (lastMw == mw)
return;
lastMw = mw;
// CC Mod wheel
midi::Message m;
m.cmd = 0xb;
m.data1 = 0x01;
m.data2 = mw;
sendMessage(m);
}

void setClock(bool clk) {
if (lastClk == clk)
return;
lastClk = clk;
if (clk) {
// Timing clock
midi::Message m;
m.cmd = 0xf;
m.data1 = 0x8;
sendMessage(m);
}
}

void setVolume(int vol) {
if (lastVol == vol)
return;
lastVol = vol;
// CC Volume
midi::Message m;
m.cmd = 0xb;
m.data1 = 0x07;
m.data2 = vol;
sendMessage(m);
}

void setPan(int pan) {
if (lastPan == pan)
return;
lastPan = pan;
// CC Pan
midi::Message m;
m.cmd = 0xb;
m.data1 = 0x0a;
m.data2 = pan;
sendMessage(m);
}

void setStart(bool start) {
if (lastStart == start)
return;
lastStart = start;
if (start) {
// Start
midi::Message m;
m.cmd = 0xf;
m.data1 = 0xa;
sendMessage(m);
}
}

void setStop(bool stop) {
if (lastStop == stop)
return;
lastStop = stop;
if (stop) {
// Stop
midi::Message m;
m.cmd = 0xf;
m.data1 = 0xb;
sendMessage(m);
}
}

void setContinue(bool cont) {
if (lastCont == cont)
return;
lastCont = cont;
if (cont) {
// Continue
midi::Message m;
m.cmd = 0xf;
m.data1 = 0xc;
sendMessage(m);
}
}
};


struct CV_MIDI : Module {
enum ParamIds {
NUM_PARAMS
};
enum InputIds {
PITCH_INPUT,
GATE_INPUT,
VEL_INPUT,
AFT_INPUT,
PW_INPUT,
MW_INPUT,
CLK_INPUT,
VOL_INPUT,
PAN_INPUT,
START_INPUT,
STOP_INPUT,
CONTINUE_INPUT,
NUM_INPUTS
};
enum OutputIds {
NUM_OUTPUTS
};
enum LightIds {
NUM_LIGHTS
};

PolyphonicMidiOutput<PORT_MAX_CHANNELS> midiOutput;

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

void step() override {
for (int c = 0; c < inputs[PITCH_INPUT].channels; c++) {
int vel = (int) std::round(inputs[VEL_INPUT].normalize(10.f * 100 / 127, c) / 10.f * 127);
vel = clamp(vel, 0, 127);
midiOutput.setVel(vel, c);

int note = (int) std::round(inputs[PITCH_INPUT].getVoltage(c) * 12.f + 60.f);
note = clamp(note, 0, 127);
midiOutput.setNote(note, c);

bool gate = inputs[GATE_INPUT].getVoltage(c) >= 1.f;
midiOutput.setGate(gate, c);

midiOutput.stepChannel(c);

int aft = (int) std::round(inputs[AFT_INPUT].getVoltage(c) / 10.f * 127);
aft = clamp(aft, 0, 127);
midiOutput.setAftertouch(aft, c);
}

int pw = (int) std::round((inputs[PW_INPUT].getVoltage() + 5.f) / 10.f * 0x4000);
pw = clamp(pw, 0, 0x3fff);
midiOutput.setPitchWheel(pw);

int mw = (int) std::round(inputs[MW_INPUT].getVoltage() / 10.f * 127);
mw = clamp(mw, 0, 127);
midiOutput.setModWheel(mw);

bool clk = inputs[CLK_INPUT].value >= 1.f;
midiOutput.setClock(clk);

int vol = (int) std::round(inputs[VOL_INPUT].normalize(10.f) / 10.f * 127);
vol = clamp(vol, 0, 127);
midiOutput.setVolume(vol);

int pan = (int) std::round((inputs[PAN_INPUT].getVoltage() + 5.f) / 10.f * 127);
pan = clamp(pan, 0, 127);
midiOutput.setPan(pan);

bool start = inputs[START_INPUT].value >= 1.f;
midiOutput.setStart(start);

bool stop = inputs[STOP_INPUT].value >= 1.f;
midiOutput.setStop(stop);

bool cont = inputs[CONTINUE_INPUT].value >= 1.f;
midiOutput.setContinue(cont);
}
};


struct CV_MIDIWidget : ModuleWidget {
CV_MIDIWidget(CV_MIDI *module) : ModuleWidget(module) {
setPanel(SVG::load(asset::system("res/Core/CV-MIDI.svg")));

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(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH)));

addInput(createInputCentered<PJ301MPort>(mm2px(Vec(9, 64)), module, CV_MIDI::PITCH_INPUT));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(20, 64)), module, CV_MIDI::GATE_INPUT));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(32, 64)), module, CV_MIDI::VEL_INPUT));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(9, 80)), module, CV_MIDI::AFT_INPUT));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(20, 80)), module, CV_MIDI::PW_INPUT));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(32, 80)), module, CV_MIDI::MW_INPUT));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(9, 96)), module, CV_MIDI::CLK_INPUT));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(20, 96)), module, CV_MIDI::VOL_INPUT));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(32, 96)), module, CV_MIDI::PAN_INPUT));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(9, 112)), module, CV_MIDI::START_INPUT));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(20, 112)), module, CV_MIDI::STOP_INPUT));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(32, 112)), module, CV_MIDI::CONTINUE_INPUT));

MidiWidget *midiWidget = createWidget<MidiWidget>(mm2px(Vec(3.41891, 14.8373)));
midiWidget->box.size = mm2px(Vec(33.840, 28));
if (module)
midiWidget->midiIO = &module->midiOutput;
addChild(midiWidget);
}
};


Model *modelCV_MIDI = createModel<CV_MIDI, CV_MIDIWidget>("CV-MIDI");

+ 5
- 0
src/Core/Core.cpp View File

@@ -38,6 +38,11 @@ void init(rack::Plugin *p) {
modelMIDITriggerToCVInterface->tags = {"External", "MIDI"};
p->addModel(modelMIDITriggerToCVInterface);

modelCV_MIDI->name = "CV-MIDI";
modelCV_MIDI->description = "";
modelCV_MIDI->tags = {"External", "MIDI"};
p->addModel(modelCV_MIDI);

modelBlank->name = "Blank";
modelBlank->description = "";
modelBlank->tags = {"Blank"};


+ 1
- 0
src/Core/Core.hpp View File

@@ -10,6 +10,7 @@ extern Model *modelMIDIToCVInterface;
extern Model *modelQuadMIDIToCVInterface;
extern Model *modelMIDICCToCVInterface;
extern Model *modelMIDITriggerToCVInterface;
extern Model *modelCV_MIDI;
extern Model *modelBlank;
extern Model *modelNotes;



+ 1
- 1
src/app/CableWidget.cpp View File

@@ -182,7 +182,7 @@ void CableWidget::draw(NVGcontext *vg) {
float thickness = 5;
if (cable && cable->outputModule) {
Output *output = &cable->outputModule->outputs[cable->outputId];
if (output->numChannels != 1) {
if (output->channels != 1) {
thickness = 7;
}
}


+ 23
- 0
src/app/RackWidget.cpp View File

@@ -589,6 +589,29 @@ void RackWidget::draw(NVGcontext *vg) {
}

void RackWidget::onHover(const event::Hover &e) {
// Scroll with arrow keys
float arrowSpeed = 30.0;
if (app()->window->isShiftPressed() && app()->window->isModPressed())
arrowSpeed /= 16.0;
else if (app()->window->isShiftPressed())
arrowSpeed *= 4.0;
else if (app()->window->isModPressed())
arrowSpeed /= 4.0;

ScrollWidget *scrollWidget = app()->scene->scrollWidget;
if (glfwGetKey(app()->window->win, GLFW_KEY_LEFT) == GLFW_PRESS) {
scrollWidget->offset.x -= arrowSpeed;
}
if (glfwGetKey(app()->window->win, GLFW_KEY_RIGHT) == GLFW_PRESS) {
scrollWidget->offset.x += arrowSpeed;
}
if (glfwGetKey(app()->window->win, GLFW_KEY_UP) == GLFW_PRESS) {
scrollWidget->offset.y -= arrowSpeed;
}
if (glfwGetKey(app()->window->win, GLFW_KEY_DOWN) == GLFW_PRESS) {
scrollWidget->offset.y += arrowSpeed;
}

OpaqueWidget::onHover(e);
lastMousePos = e.pos;
}


+ 2
- 2
src/engine/Cable.cpp View File

@@ -8,9 +8,9 @@ void Cable::step() {
Output *output = &outputModule->outputs[outputId];
Input *input = &inputModule->inputs[inputId];
// Match number of polyphonic channels to output port
input->numChannels = output->numChannels;
input->channels = output->channels;
// Copy values from output to input
for (int i = 0; i < output->numChannels; i++) {
for (int i = 0; i < output->channels; i++) {
input->values[i] = output->values[i];
}
}


+ 1
- 1
src/engine/Engine.cpp View File

@@ -131,7 +131,7 @@ static void Engine_step(Engine *engine) {
if (module->bypass) {
// Bypass module
for (Output &output : module->outputs) {
output.numChannels = 1;
output.channels = 1;
output.setVoltage(0.f);
}
module->cpuTime = 0.f;


+ 1
- 0
src/midi.cpp View File

@@ -228,6 +228,7 @@ void Output::setDeviceId(int deviceId) {
}

void Output::sendMessage(Message message) {
// DEBUG("sendMessage %02x %02x %02x", message.cmd, message.data1, message.data2);
if (outputDevice) {
outputDevice->sendMessage(message);
}


+ 0
- 24
src/ui/ScrollWidget.cpp View File

@@ -69,30 +69,6 @@ void ScrollWidget::step() {
}

void ScrollWidget::onHover(const event::Hover &e) {
// Scroll with arrow keys
if (!app()->event->selectedWidget) {
float arrowSpeed = 30.0;
if (app()->window->isShiftPressed() && app()->window->isModPressed())
arrowSpeed /= 16.0;
else if (app()->window->isShiftPressed())
arrowSpeed *= 4.0;
else if (app()->window->isModPressed())
arrowSpeed /= 4.0;

if (glfwGetKey(app()->window->win, GLFW_KEY_LEFT) == GLFW_PRESS) {
offset.x -= arrowSpeed;
}
if (glfwGetKey(app()->window->win, GLFW_KEY_RIGHT) == GLFW_PRESS) {
offset.x += arrowSpeed;
}
if (glfwGetKey(app()->window->win, GLFW_KEY_UP) == GLFW_PRESS) {
offset.y -= arrowSpeed;
}
if (glfwGetKey(app()->window->win, GLFW_KEY_DOWN) == GLFW_PRESS) {
offset.y += arrowSpeed;
}
}

OpaqueWidget::onHover(e);
}



Loading…
Cancel
Save