computerscare-vcv-modules

computerscare modules for VCV Rack
Log | Files | Refs

commit 0285695d6009c0b2abb0c62e5875397501ce0a97
parent 0ca6408ebd77582db49459e51090f3be7d283373
Author: Adam M <aemalone@gmail.com>
Date:   Wed, 21 Aug 2019 01:30:54 -0500

Merge branch 'folypace' of https://github.com/freddyz/computerscare-vcv-modules into laundrypoly

Diffstat:
Mres/ComputerscareFolyPacePanel.svg | 30+++++++++++++++---------------
Msrc/ComputerscareFolyPace.cpp | 108++++++++++++++++++++++++++++++++++++++++++++-----------------------------------
2 files changed, 75 insertions(+), 63 deletions(-)

diff --git a/res/ComputerscareFolyPacePanel.svg b/res/ComputerscareFolyPacePanel.svg @@ -36,7 +36,7 @@ inkscape:pageshadow="2" inkscape:zoom="5.6568546" inkscape:cx="75.559802" - inkscape:cy="336.14095" + inkscape:cy="10.871851" inkscape:document-units="mm" inkscape:current-layer="g1669" showgrid="false" @@ -63,7 +63,7 @@ <dc:format>image/svg+xml</dc:format> <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - <dc:title></dc:title> + <dc:title /> </cc:Work> </rdf:RDF> </metadata> @@ -157,37 +157,37 @@ sodipodi:nodetypes="ccccc" /> <g aria-label="computerscare" - transform="matrix(1.4457532,0.02712605,-0.03651719,1.0739475,3.9763638,-22.739031)" + transform="matrix(0.88239335,0.02712605,-0.02228771,1.0739475,17.442054,-22.739031)" style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332" id="text1651"> <path - d="m 9.7635177,294.7977 -0.022491,0.23707 q -0.1028223,-0.0489 -0.2099211,-0.0673 -0.1055806,-0.0199 -0.2168506,-0.009 -0.2488775,0.0238 -0.4014201,0.19401 -0.1524199,0.16888 -0.1792271,0.45145 -0.026804,0.28254 0.095932,0.42654 0.1228661,0.14262 0.371738,0.11887 0.1112317,-0.0106 0.2224055,-0.0498 0.1127112,-0.0408 0.2267849,-0.11044 l -0.022229,0.23431 q -0.111772,0.0599 -0.2295122,0.0956 -0.1163563,0.0357 -0.2456588,0.048 -0.3517468,0.0335 -0.5381239,-0.16582 -0.1863704,-0.19938 -0.1510635,-0.57153 0.035829,-0.37767 0.2649098,-0.61397 0.2304697,-0.23642 0.5947391,-0.27118 0.1181718,-0.0112 0.2283935,0.003 0.110394,0.0127 0.2114822,0.0509 z" + d="m 19.923396,292.01509 -0.02249,0.23707 q -0.102822,-0.0489 -0.209921,-0.0673 -0.10558,-0.0199 -0.21685,-0.009 -0.248878,0.0238 -0.40142,0.19401 -0.15242,0.16888 -0.179227,0.45145 -0.0268,0.28254 0.09593,0.42654 0.122866,0.14262 0.371738,0.11887 0.111231,-0.0106 0.222405,-0.0498 0.112711,-0.0408 0.226785,-0.11044 l -0.02223,0.23431 q -0.111772,0.0599 -0.229512,0.0956 -0.116357,0.0357 -0.245659,0.048 -0.351747,0.0335 -0.538124,-0.16582 -0.18637,-0.19938 -0.151063,-0.57153 0.03583,-0.37767 0.264909,-0.61397 0.23047,-0.23642 0.594739,-0.27118 0.118172,-0.0112 0.228394,0.003 0.110394,0.0127 0.211482,0.0509 z" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82222223px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;stroke-width:0.26458332" id="path1701" inkscape:connector-curvature="0" /> <path - d="m 10.831533,295.01572 q -0.205711,0.0223 -0.339672,0.22398 -0.133845,0.20011 -0.158859,0.52726 -0.02501,0.32715 0.07869,0.50317 0.105218,0.17425 0.312311,0.15186 0.204306,-0.0221 0.338283,-0.22384 0.133968,-0.20175 0.15886,-0.52727 0.02477,-0.32389 -0.08032,-0.49977 -0.104967,-0.17751 -0.309282,-0.15539 z m 0.01941,-0.25391 q 0.333568,-0.0361 0.504572,0.19722 0.170997,0.23332 0.136646,0.68254 -0.03423,0.4476 -0.244185,0.72373 -0.209831,0.27449 -0.543405,0.31058 -0.33497,0.0363 -0.505964,-0.19707 -0.169483,-0.23508 -0.135254,-0.68269 0.03435,-0.44922 0.242794,-0.72358 0.209832,-0.27449 0.544796,-0.31073 z" + d="m 20.991412,292.23311 q -0.205711,0.0223 -0.339672,0.22398 -0.133845,0.20011 -0.158859,0.52726 -0.02501,0.32715 0.07869,0.50317 0.105218,0.17425 0.312311,0.15186 0.204306,-0.0221 0.338283,-0.22384 0.133968,-0.20175 0.15886,-0.52727 0.02477,-0.32389 -0.08032,-0.49977 -0.104967,-0.17751 -0.309282,-0.15539 z m 0.01941,-0.25391 q 0.333568,-0.0361 0.504572,0.19722 0.170997,0.23332 0.136646,0.68254 -0.03423,0.4476 -0.244185,0.72373 -0.209831,0.27449 -0.543405,0.31058 -0.33497,0.0363 -0.505964,-0.19707 -0.169483,-0.23508 -0.135254,-0.68269 0.03435,-0.44922 0.242794,-0.72358 0.209832,-0.27449 0.544796,-0.31073 z" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82222223px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;stroke-width:0.28758317" id="path1703" inkscape:connector-curvature="0" /> <path - d="m 13.279332,295.03022 c 0.07212,-0.16189 0.158709,-0.28115 0.259781,-0.35779 0.101068,-0.0767 0.220289,-0.11452 0.357661,-0.11378 0.184923,10e-4 0.32797,0.0826 0.429142,0.24413 0.101165,0.16033 0.152468,0.38843 0.15391,0.6843 l 0.0065,1.3275 -0.293235,-0.002 c -0.03516,-0.22899 -0.03645,-0.67288 -0.0064,-1.31574 -10e-4,-0.21077 -0.0319,-0.36739 -0.09263,-0.46989 -0.06074,-0.10241 -0.15292,-0.15409 -0.276549,-0.15483 -0.151108,-9e-4 -0.270213,0.0605 -0.357313,0.18438 -0.0871,0.12385 -0.130127,0.29313 -0.12908,0.50783 l 0.006,1.24308 -0.293236,-0.002 -0.0064,-1.31574 c -10e-4,-0.21208 -0.03192,-0.36871 -0.09263,-0.46988 -0.06074,-0.10252 -0.153976,-0.15409 -0.279718,-0.15485 -0.148996,-9.1e-4 -0.267039,0.0613 -0.354134,0.18636 -0.0871,0.12385 -0.13013,0.29247 -0.129091,0.50587 l 0.006,1.24305 -0.293229,-0.002 -0.01076,-2.19941 0.293234,0.002 0.0017,0.34168 c 0.06591,-0.13442 0.145214,-0.23344 0.237888,-0.29703 0.09267,-0.0635 0.202947,-0.0949 0.330808,-0.0941 0.128919,7.7e-4 0.238485,0.0419 0.328699,0.12367 0.09127,0.0817 0.158948,0.19987 0.203026,0.35467 z" + d="m 23.439211,292.24761 c 0.07212,-0.16189 0.158709,-0.28115 0.259781,-0.35779 0.101068,-0.0767 0.220289,-0.11452 0.357661,-0.11378 0.184923,10e-4 0.32797,0.0826 0.429142,0.24413 0.101165,0.16033 0.152468,0.38843 0.15391,0.6843 l 0.0065,1.3275 -0.293235,-0.002 c -0.03516,-0.22899 -0.03645,-0.67288 -0.0064,-1.31574 -0.001,-0.21077 -0.0319,-0.36739 -0.09263,-0.46989 -0.06074,-0.10241 -0.15292,-0.15409 -0.276549,-0.15483 -0.151108,-9e-4 -0.270213,0.0605 -0.357313,0.18438 -0.0871,0.12385 -0.130127,0.29313 -0.12908,0.50783 l 0.006,1.24308 -0.293236,-0.002 -0.0064,-1.31574 c -10e-4,-0.21208 -0.03192,-0.36871 -0.09263,-0.46988 -0.06074,-0.10252 -0.153976,-0.15409 -0.279718,-0.15485 -0.148996,-9.1e-4 -0.267039,0.0613 -0.354134,0.18636 -0.0871,0.12385 -0.13013,0.29247 -0.129091,0.50587 l 0.006,1.24305 -0.293229,-0.002 -0.01076,-2.19941 0.293234,0.002 0.0017,0.34168 c 0.06591,-0.13442 0.145214,-0.23344 0.237888,-0.29703 0.09267,-0.0635 0.202947,-0.0949 0.330808,-0.0941 0.128919,7.7e-4 0.238485,0.0419 0.328699,0.12367 0.09127,0.0817 0.158948,0.19987 0.203026,0.35467 z" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82222223px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;stroke-width:0.33873674" id="path1705" inkscape:connector-curvature="0" sodipodi:nodetypes="ccccccccccccccccccccccccccccc" /> <path - d="m 15.24757,295.82836 0.0037,0.96694 -0.254966,-10e-4 -0.0097,-2.51668 0.254967,10e-4 0.0011,0.27673 q 0.07931,-0.16242 0.200283,-0.24001 0.12235,-0.0791 0.291869,-0.0784 0.281152,10e-4 0.457205,0.26579 0.177431,0.26453 0.179097,0.69429 0.0017,0.42976 -0.17372,0.69267 -0.174009,0.26291 -0.455161,0.26162 -0.169519,-7.7e-4 -0.29248,-0.0794 -0.121592,-0.0803 -0.202158,-0.24347 z m 0.860284,-0.63255 q -0.0013,-0.33046 -0.117775,-0.5182 -0.115122,-0.18934 -0.31634,-0.19027 -0.201216,-9.2e-4 -0.316254,0.18738 -0.113664,0.18667 -0.112383,0.51715 0.0013,0.33045 0.116404,0.5198 0.116494,0.18773 0.317711,0.18866 0.201217,9.1e-4 0.314882,-0.18576 0.115036,-0.1883 0.113755,-0.51876 z" - style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82222223px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;stroke-width:0.28758317" + d="m 25.430632,293.96359 0.01789,1.52891 -0.255075,-0.005 -0.04664,-3.97933 0.255076,0.005 0.0052,0.43756 q 0.07695,-0.25564 0.196834,-0.37655 0.121234,-0.12327 0.290826,-0.11967 0.281271,0.006 0.461276,0.42696 0.18138,0.42086 0.189355,1.10039 0.008,0.67953 -0.163618,1.09264 -0.170214,0.41314 -0.451489,0.40698 -0.169593,-0.004 -0.293754,-0.12984 -0.122816,-0.12875 -0.205807,-0.38792 z m 0.851318,-0.98751 q -0.0062,-0.52252 -0.125425,-0.82107 -0.117943,-0.30106 -0.31925,-0.30548 -0.201304,-0.004 -0.313621,0.29163 -0.110966,0.29348 -0.104833,0.81603 0.0062,0.5225 0.124077,0.82357 0.119292,0.29854 0.320598,0.30296 0.201304,0.004 0.312272,-0.28909 0.112314,-0.29603 0.106182,-0.81855 z" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82222223px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;stroke-width:0.36165768" id="path1707" inkscape:connector-curvature="0" /> <path - d="m 16.387765,295.8211 -0.0088,-1.28326 0.251393,-0.0861 0.0088,1.27002 q 0.0021,0.30093 0.08782,0.42346 0.08573,0.1206 0.255154,0.0629 0.203576,-0.0691 0.319839,-0.28926 0.117632,-0.22034 0.115499,-0.53075 l -0.0083,-1.20185 0.251393,-0.0861 0.0146,2.11985 -0.251392,0.0861 -0.0022,-0.32555 q -0.09022,0.22424 -0.211162,0.36035 -0.119596,0.13358 -0.27945,0.18824 -0.263689,0.0901 -0.401877,-0.0907 -0.138189,-0.18057 -0.141192,-0.61777 z" + d="m 26.547644,293.03849 -0.0088,-1.28326 0.251393,-0.0861 0.0088,1.27002 q 0.0021,0.30093 0.08782,0.42346 0.08573,0.1206 0.255154,0.0629 0.203576,-0.0691 0.319839,-0.28926 0.117632,-0.22034 0.115499,-0.53075 l -0.0083,-1.20185 0.251393,-0.0861 0.0146,2.11985 -0.251392,0.0861 -0.0022,-0.32555 q -0.09022,0.22424 -0.211162,0.36035 -0.119596,0.13358 -0.27945,0.18824 -0.263689,0.0901 -0.401877,-0.0907 -0.138189,-0.18057 -0.141192,-0.61777 z" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82222223px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;stroke-width:0.30911627" id="path1709" inkscape:connector-curvature="0" /> <path - d="m 18.443635,293.95112 0.004,0.59805 0.522398,0.005 0.0018,0.26893 -0.522398,-0.005 0.0077,1.14343 q 0.0017,0.25764 0.05323,0.33147 0.05288,0.0737 0.211384,0.0752 l 0.26051,0.002 0.002,0.28963 -0.260512,-0.002 q -0.29359,-0.003 -0.406241,-0.1523 -0.112663,-0.15148 -0.115329,-0.54642 l -0.0077,-1.14342 -0.186078,-0.002 -0.0018,-0.26893 0.186079,0.002 -0.004,-0.59804 z" + d="m 28.603514,291.16851 0.004,0.59805 0.522398,0.005 0.0018,0.26893 -0.522398,-0.005 0.0077,1.14343 q 0.0017,0.25764 0.05323,0.33147 0.05288,0.0737 0.211384,0.0752 l 0.26051,0.002 0.002,0.28963 -0.260512,-0.002 q -0.29359,-0.003 -0.406241,-0.1523 -0.112663,-0.15148 -0.115329,-0.54642 l -0.0077,-1.14342 -0.186078,-0.002 -0.0018,-0.26893 0.186079,0.002 -0.004,-0.59804 z" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82222223px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;stroke-width:0.30911627" id="path1711" inkscape:connector-curvature="0" /> @@ -231,22 +231,22 @@ inkscape:connector-curvature="0" id="path1148" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82222223px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;stroke-width:0.26458332" - d="m 10.094521,295.0942 -0.02249,0.23707 q -0.1028223,-0.0489 -0.2099211,-0.0673 -0.1055806,-0.0199 -0.2168506,-0.009 -0.2488775,0.0238 -0.4014201,0.19401 -0.1524199,0.16888 -0.1792271,0.45145 -0.026804,0.28254 0.095932,0.42654 0.1228661,0.14262 0.371738,0.11887 0.1112317,-0.0106 0.2224055,-0.0498 0.1127112,-0.0408 0.2267849,-0.11044 l -0.022229,0.23431 q -0.111772,0.0599 -0.2295122,0.0956 -0.1163563,0.0357 -0.2456588,0.048 -0.3517468,0.0335 -0.5381239,-0.16582 -0.1863704,-0.19938 -0.1510635,-0.57153 0.035829,-0.37767 0.2649098,-0.61397 0.2304697,-0.23642 0.5947391,-0.27118 0.1181718,-0.0112 0.2283935,0.003 0.110394,0.0127 0.2114825,0.0509 z" /> + d="m 20.2544,292.31159 -0.02249,0.23707 q -0.102823,-0.0489 -0.209921,-0.0673 -0.105581,-0.0199 -0.216851,-0.009 -0.248877,0.0238 -0.40142,0.19401 -0.15242,0.16888 -0.179227,0.45145 -0.0268,0.28254 0.09593,0.42654 0.122866,0.14262 0.371738,0.11887 0.111232,-0.0106 0.222405,-0.0498 0.112712,-0.0408 0.226785,-0.11044 l -0.02223,0.23431 q -0.111772,0.0599 -0.229512,0.0956 -0.116356,0.0357 -0.245659,0.048 -0.351747,0.0335 -0.538124,-0.16582 -0.18637,-0.19938 -0.151063,-0.57153 0.03583,-0.37767 0.26491,-0.61397 0.230469,-0.23642 0.594739,-0.27118 0.118172,-0.0112 0.228393,0.003 0.110394,0.0127 0.211483,0.0509 z" /> <path inkscape:connector-curvature="0" id="path1150" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82222223px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;stroke-width:0.28758317" - d="m 11.162536,295.31222 q -0.205711,0.0223 -0.339672,0.22398 -0.133845,0.20011 -0.158859,0.52726 -0.02501,0.32715 0.07869,0.50317 0.105218,0.17425 0.312311,0.15186 0.204306,-0.0221 0.338283,-0.22384 0.133968,-0.20175 0.15886,-0.52727 0.02477,-0.32389 -0.08032,-0.49977 -0.104967,-0.17751 -0.309282,-0.15539 z m 0.01941,-0.25391 q 0.333568,-0.0361 0.504572,0.19722 0.170997,0.23332 0.136646,0.68254 -0.03423,0.4476 -0.244185,0.72373 -0.209831,0.27449 -0.543405,0.31058 -0.33497,0.0363 -0.505964,-0.19707 -0.169483,-0.23508 -0.135254,-0.68269 0.03435,-0.44922 0.242794,-0.72358 0.209832,-0.27449 0.544796,-0.31073 z" /> + d="m 21.322415,292.52961 q -0.205711,0.0223 -0.339672,0.22398 -0.133845,0.20011 -0.158859,0.52726 -0.02501,0.32715 0.07869,0.50317 0.105218,0.17425 0.312311,0.15186 0.204306,-0.0221 0.338283,-0.22384 0.133968,-0.20175 0.15886,-0.52727 0.02477,-0.32389 -0.08032,-0.49977 -0.104967,-0.17751 -0.309282,-0.15539 z m 0.01941,-0.25391 q 0.333568,-0.0361 0.504572,0.19722 0.170997,0.23332 0.136646,0.68254 -0.03423,0.4476 -0.244185,0.72373 -0.209831,0.27449 -0.543405,0.31058 -0.33497,0.0363 -0.505964,-0.19707 -0.169483,-0.23508 -0.135254,-0.68269 0.03435,-0.44922 0.242794,-0.72358 0.209832,-0.27449 0.544796,-0.31073 z" /> <path sodipodi:nodetypes="ccccccccccccccccccccccccccccc" inkscape:connector-curvature="0" id="path1152" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82222223px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;stroke-width:0.33873674" - d="m 13.610335,295.32672 c 0.07212,-0.16189 0.158709,-0.28115 0.259781,-0.35779 0.101068,-0.0767 0.220289,-0.11452 0.357661,-0.11378 0.184923,0.001 0.32797,0.0826 0.429142,0.24413 0.101165,0.16033 0.152468,0.38843 0.15391,0.6843 l 0.0065,1.3275 -0.293235,-0.002 c -0.03516,-0.22899 -0.03645,-0.67288 -0.0064,-1.31574 -0.001,-0.21077 -0.0319,-0.36739 -0.09263,-0.46989 -0.06074,-0.10241 -0.15292,-0.15409 -0.276549,-0.15483 -0.151108,-9e-4 -0.270213,0.0605 -0.357313,0.18438 -0.0871,0.12385 -0.130127,0.29313 -0.12908,0.50783 l 0.006,1.24308 -0.293236,-0.002 -0.0064,-1.31574 c -0.001,-0.21208 -0.03192,-0.36871 -0.09263,-0.46988 -0.06074,-0.10252 -0.153976,-0.15409 -0.279718,-0.15485 -0.148996,-9.1e-4 -0.267039,0.0613 -0.354134,0.18636 -0.0871,0.12385 -0.13013,0.29247 -0.129091,0.50587 l 0.006,1.24305 -0.293229,-0.002 -0.01076,-2.19941 0.293234,0.002 0.0017,0.34168 c 0.06591,-0.13442 0.145214,-0.23344 0.237888,-0.29703 0.09267,-0.0635 0.202947,-0.0949 0.330808,-0.0941 0.128919,7.7e-4 0.238485,0.0419 0.328699,0.12367 0.09127,0.0817 0.158948,0.19987 0.203026,0.35467 z" /> + d="m 23.770214,292.54411 c 0.07212,-0.16189 0.158709,-0.28115 0.259781,-0.35779 0.101068,-0.0767 0.220289,-0.11452 0.357661,-0.11378 0.184923,10e-4 0.32797,0.0826 0.429142,0.24413 0.101165,0.16033 0.152468,0.38843 0.15391,0.6843 l 0.0065,1.3275 -0.293235,-0.002 c -0.03516,-0.22899 -0.03645,-0.67288 -0.0064,-1.31574 -10e-4,-0.21077 -0.0319,-0.36739 -0.09263,-0.46989 -0.06074,-0.10241 -0.15292,-0.15409 -0.276549,-0.15483 -0.151108,-9e-4 -0.270213,0.0605 -0.357313,0.18438 -0.0871,0.12385 -0.130127,0.29313 -0.12908,0.50783 l 0.006,1.24308 -0.293236,-0.002 -0.0064,-1.31574 c -0.001,-0.21208 -0.03192,-0.36871 -0.09263,-0.46988 -0.06074,-0.10252 -0.153976,-0.15409 -0.279718,-0.15485 -0.148996,-9.1e-4 -0.267039,0.0613 -0.354134,0.18636 -0.0871,0.12385 -0.13013,0.29247 -0.129091,0.50587 l 0.006,1.24305 -0.293229,-0.002 -0.01076,-2.19941 0.293234,0.002 0.0017,0.34168 c 0.06591,-0.13442 0.145214,-0.23344 0.237888,-0.29703 0.09267,-0.0635 0.202947,-0.0949 0.330808,-0.0941 0.128919,7.7e-4 0.238485,0.0419 0.328699,0.12367 0.09127,0.0817 0.158948,0.19987 0.203026,0.35467 z" /> </g> <g id="g9547" - transform="matrix(0.24212987,0,0,0.24730558,-1.4914498,290.43704)"> + transform="matrix(0.24212987,0,0,0.24730558,19.088303,290.53059)"> <g style="display:inline" inkscape:label="Layer 1" @@ -383,7 +383,7 @@ id="path1209" /> </g> <g - transform="matrix(0.20133147,0.13450841,-0.21327925,0.31923525,2.8224111,285.66267)" + transform="matrix(0.20133147,0.13450841,-0.21327925,0.31923525,23.402164,285.75622)" id="g1174"> <g id="g1154" diff --git a/src/ComputerscareFolyPace.cpp b/src/ComputerscareFolyPace.cpp @@ -108,11 +108,22 @@ struct FolyPace : Module { if (bufferIndex < BUFFER_SIZE) { if (++frameIndex > frameCount) { frameIndex = 0; - for (int c = 0; c < channelsX; c++) { - bufferX[c][bufferIndex] = inputs[X_INPUT].getVoltage(c); + float trimVal = params[TRIM].getValue(); + float offsetVal = params[OFFSET].getValue(); + + if (inputs[X_INPUT].isConnected()) { + for (int c = 0; c < channelsX; c++) { + bufferX[c][bufferIndex] = inputs[X_INPUT].getVoltage(c) * trimVal + offsetVal + 99 + (1071 * c) % 19; + } + } + else { + for (int c = 0; c < 16; c++) { + bufferX[c][bufferIndex] = offsetVal + 99 + (1071 * c) % 19; + } } + for (int c = 0; c < channelsY; c++) { - bufferY[c][bufferIndex] = inputs[Y_INPUT].getVoltage(c); + bufferY[c][bufferIndex] = inputs[Y_INPUT].getVoltage(c) * trimVal + offsetVal; } bufferIndex++; } @@ -210,10 +221,10 @@ struct FolyPaceDisplay : TransparentWidget { float frx = sf * (70 + 40 * sin(A - B / 2)); // face x radius float fry = sf * (150 + 80 * sin(F / 2.2)); //face y radius float fr = 0.04 * sin(H - M) + 0.02 * sin(H / 3 + 2.2) + 0.02 * sin(L + P + 8.222); //face rotation - NVGcolor faceColor=nvgHSLA(h, s, l, 0xff); + NVGcolor faceColor = nvgHSLA(h, s, l, 0xff); float mpx = ox - 3 * sin(G + I + A); - float mpy = oy +20 + sf *(7+0.2* sin(G - I)); + float mpy = oy + 20 + sf * (7 + 0.2 * sin(G - I)); float msx = mpx - 30 * sf + 3 * sin(G); float msy = mpy + 5 * sin(L + I + P); @@ -233,19 +244,19 @@ struct FolyPaceDisplay : TransparentWidget { float epx = ox; float epy = oy - 10 * (2 + sf + sin(I - J / 2)); - float eyeSpacing = frx/2*(1.8+0.5*sin(200-J)); - float erlx = frx/3*(1+0.4*sin(G)); - float erly = frx/3*(1+0.4*sin(H-N+100)); + float eyeSpacing = frx / 2 * (1.8 + 0.5 * sin(200 - J)); + float erlx = frx / 3 * (1 + 0.4 * sin(G)); + float erly = frx / 3 * (1 + 0.4 * sin(H - N + 100)); float errx = 10 + 3 * sin(M) + 4 * sin(M - 2 - 882.2); float erry = 10 + 2 * sin(J) + 4 * sin(J - erly / 20); - float irisRad = erly*0.4*(1.3+0.4*sin(K-D+1)); - float pupilRad = irisRad * 0.4 * (1 + 0.6*sin(E)); + float irisRad = erly * 0.4 * (1.3 + 0.4 * sin(K - D + 1)); + float pupilRad = irisRad * 0.4 * (1 + 0.6 * sin(E)); float gazeDir = 3.14159 * (1 + sin(B - K)); - float gazeStrength = 4 * (1.3 + 0.3 * sin(D - 1) + 0.4 * sin(1 - L / 2)); + float gazeStrength = 4 * (1.3 + 0.5 * sin(D - 1) + 0.6 * sin(1 - L / 2)); - NVGcolor irisColor = nvgHSLA(l,s,h, 0xff); + NVGcolor irisColor = nvgHSLA(l, s, h, 0xff); NVGcolor pupilColor = nvgHSLA(0.1, 0.1, 0.1, 0xff); //nvgSave(args.vg); @@ -257,29 +268,29 @@ struct FolyPaceDisplay : TransparentWidget { nvgRotate(args.vg, fr); - drawHead(args,fx,fy,frx,fry,faceColor); + drawHead(args, fx, fy, frx, fry, faceColor); - float leftEyebrowHeight = erly*(1.9 + 0.6*sin(G)+0.3*sin(K-B/2)); - float rightEyebrowHeight = erly*(1.9 + 0.6*sin(G-2.2+N)+0.2*sin(L+33)); - float leftEyebrowAngle = 0.5*sin(C)+0.2*sin(H/2-2); - float rightEyebrowAngle = 0.7*sin(F)+0.3*sin(2-I); - NVGcolor eyebrowColor = nvgHSLA(0.1,0.2,0.2,0xff); - float eyebrowThickness = 5.f * (1.3+sin(M-2)); - float eyebrowLength = frx*0.3*(2.2+sin(G)+0.4*sin(B-2)); + float leftEyebrowHeight = erly * (1.9 + 0.6 * sin(G) + 0.3 * sin(K - B / 2)); + float rightEyebrowHeight = erly * (1.9 + 0.6 * sin(G - 2.2 + N) + 0.2 * sin(L + 33)); + float leftEyebrowAngle = 0.5 * sin(C) + 0.2 * sin(H / 2 - 2); + float rightEyebrowAngle = 0.7 * sin(F) + 0.3 * sin(2 - I); + NVGcolor eyebrowColor = nvgHSLA(0.1, 0.2, 0.2, 0xff); + float eyebrowThickness = 5.f * (1.3 + sin(M - 2)); + float eyebrowLength = frx * 0.3 * (2.2 + sin(G) + 0.4 * sin(B - 2)); drawEyes(args, epx, epy, eyeSpacing, erlx, erly, 1, irisRad, pupilRad, gazeDir, gazeStrength, irisColor, pupilColor); - drawEyebrows(args,epx,epy,eyeSpacing,leftEyebrowHeight,rightEyebrowHeight,leftEyebrowAngle,rightEyebrowAngle,eyebrowColor,eyebrowThickness,eyebrowLength); + drawEyebrows(args, epx, epy, eyeSpacing, leftEyebrowHeight, rightEyebrowHeight, leftEyebrowAngle, rightEyebrowAngle, eyebrowColor, eyebrowThickness, eyebrowLength); float mouthX = ox; - float mouthY = oy +0.5*fry*(1+0.4*sin(C/2)); - float mouthWidth = frx*0.7 * (1.2 + 0.6*sin(C)); - float mouthOpen = fry*0.06*(1+sin(O)-sin(A*2+44)); + float mouthY = oy + 0.5 * fry * (1 + 0.4 * sin(C / 2)); + float mouthWidth = frx * 0.7 * (1.2 + 0.6 * sin(C)); + float mouthOpen = fry * 0.06 * (1 + sin(O) - sin(A * 2 + 44)); float mouthSmile = sin(D) * 2.3; float mouthSkew = sin(L) - sin(H); - float mouthThickness = 5.4*(sin(H)-sin(M/2)); - NVGcolor mouthLipColor = nvgHSLA(0.1*sin(N)-0.1, 0.6+0.3*sin(M), 0.5+.4*sin(I), 0xff); + float mouthThickness = 5.4 * (sin(H) - sin(M / 2)); + NVGcolor mouthLipColor = nvgHSLA(0.1 * sin(N) - 0.1, 0.6 + 0.3 * sin(M), 0.5 + .4 * sin(I), 0xff); nvgGlobalCompositeOperation(args.vg, NVG_ATOP); @@ -292,27 +303,27 @@ struct FolyPaceDisplay : TransparentWidget { //nvgRestore(args.vg); } - void drawEyebrows(const DrawArgs &args,float x,float y, float eyeSpacing,float leftEyebrowHeight,float rightEyebrowHeight,float leftEyebrowAngle,float rightEyebrowAngle,NVGcolor eyebrowColor,float eyebrowThickness,float eyebrowLength) { - nvgBeginPath(args.vg); - nvgStrokeColor(args.vg,eyebrowColor); + void drawEyebrows(const DrawArgs &args, float x, float y, float eyeSpacing, float leftEyebrowHeight, float rightEyebrowHeight, float leftEyebrowAngle, float rightEyebrowAngle, NVGcolor eyebrowColor, float eyebrowThickness, float eyebrowLength) { + nvgBeginPath(args.vg); + nvgStrokeColor(args.vg, eyebrowColor); nvgStrokeWidth(args.vg, eyebrowThickness); - float cosLeft = cos(leftEyebrowAngle); - float sinLeft = sin(leftEyebrowAngle); - float cosRight = cos(rightEyebrowAngle); - float sinRight = sin(rightEyebrowAngle); + float cosLeft = cos(leftEyebrowAngle); + float sinLeft = sin(leftEyebrowAngle); + float cosRight = cos(rightEyebrowAngle); + float sinRight = sin(rightEyebrowAngle); - float r = eyebrowLength / 2; + float r = eyebrowLength / 2; - nvgMoveTo(args.vg,x - eyeSpacing/2 - r * cosLeft,y - leftEyebrowHeight - r*sinLeft); - nvgLineTo(args.vg,x - eyeSpacing/2 + r * cosLeft,y - leftEyebrowHeight + r*sinLeft); - //nvgStroke(args.vg); + nvgMoveTo(args.vg, x - eyeSpacing / 2 - r * cosLeft, y - leftEyebrowHeight - r * sinLeft); + nvgLineTo(args.vg, x - eyeSpacing / 2 + r * cosLeft, y - leftEyebrowHeight + r * sinLeft); + //nvgStroke(args.vg); - nvgMoveTo(args.vg,x + eyeSpacing/2 - r * cosRight,y - rightEyebrowHeight - r*sinRight); - nvgLineTo(args.vg,x + eyeSpacing/2 + r * cosRight,y - rightEyebrowHeight + r*sinRight); - nvgStroke(args.vg); + nvgMoveTo(args.vg, x + eyeSpacing / 2 - r * cosRight, y - rightEyebrowHeight - r * sinRight); + nvgLineTo(args.vg, x + eyeSpacing / 2 + r * cosRight, y - rightEyebrowHeight + r * sinRight); + nvgStroke(args.vg); - nvgClosePath(args.vg); - } + nvgClosePath(args.vg); + } void drawHead(const DrawArgs &args, float x, float y, float width, float height, NVGcolor color) { nvgBeginPath(args.vg); @@ -329,7 +340,7 @@ struct FolyPaceDisplay : TransparentWidget { void drawMouth(const DrawArgs &args, float x, float y, float width, float open, float smile, float skew, float thickness, NVGcolor lipColor) { nvgBeginPath(args.vg); nvgStrokeWidth(args.vg, thickness); - nvgStrokeColor(args.vg,lipColor); + nvgStrokeColor(args.vg, lipColor); //nvgStrokeWidth(args.vg, 4.5f); nvgMoveTo(args.vg, x - width / 2, y - 20.f * smile); @@ -341,10 +352,10 @@ struct FolyPaceDisplay : TransparentWidget { nvgBezierTo(args.vg, x + width / 4, y + smile * open, x - width / 4, y + smile * open, x - width / 2, y - 10.f * smile); nvgClosePath(args.vg); nvgGlobalCompositeOperation(args.vg, NVG_ATOP); - nvgFillColor(args.vg,nvgRGBA(0,0,0,0xff)); + nvgFillColor(args.vg, nvgRGBA(0, 0, 0, 0xff)); nvgStroke(args.vg); nvgFill(args.vg); - + } void drawEyes(const DrawArgs &args, float x, float y, float spacing, float rx, float ry, float open, float irisRad, float pupilRad, float gazeDir, float gazeStrength, NVGcolor irisColor, NVGcolor pupilColor) { float leftX = x - spacing / 2; @@ -436,9 +447,10 @@ struct FolyPaceWidget : ModuleWidget { addChild(display); } - addInput(createInput<PJ301MPort>(Vec(17, 319), module, FolyPace::X_INPUT)); - addInput(createInput<PJ301MPort>(Vec(63, 319), module, FolyPace::Y_INPUT)); - addInput(createInput<PJ301MPort>(Vec(154, 319), module, FolyPace::TRIG_INPUT)); + addInput(createInput<PointingUpPentagonPort>(Vec(1, 353), module, FolyPace::X_INPUT)); + addParam(createParam<SmallKnob>(Vec(31, 356), module, FolyPace::TRIM)); + addParam(createParam<SmoothKnob>(Vec(51, 353), module, FolyPace::OFFSET)); + } };