commit 8efe67ac7c62f12b9b7428fb4cd9c67acf6305c2
parent e450c5390c76cefcae5001693c28906091677660
Author: Adam M <[email protected]>
Date: Sun, 5 Apr 2020 17:15:33 -0500
PolyModule class and common poly channels knob and display. Horse increases its poly functionality
Diffstat:
8 files changed, 414 insertions(+), 60 deletions(-)
diff --git a/res/computerscare-channels-empty-knob-auto-mode.svg b/res/computerscare-channels-empty-knob-auto-mode.svg
@@ -0,0 +1,186 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ id="Layer_1"
+ data-name="Layer 1"
+ viewBox="0 0 18 18"
+ version="1.1"
+ sodipodi:docname="computerscare-channels-empty-knob-auto-mode.svg"
+ inkscape:version="0.92.2 5c3e80d, 2017-08-06"
+ width="18"
+ height="18">
+ <metadata
+ id="metadata1289">
+ <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>01 Big Knob</dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1398"
+ inkscape:window-height="834"
+ id="namedview1287"
+ showgrid="false"
+ inkscape:zoom="44.756014"
+ inkscape:cx="10.167848"
+ inkscape:cy="12.585836"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
+ inkscape:window-maximized="0"
+ inkscape:current-layer="Big_Knob"
+ inkscape:snap-global="false" />
+ <defs
+ id="defs1279">
+ <marker
+ inkscape:stockid="Arrow1Lstart"
+ orient="auto"
+ refY="0.0"
+ refX="0.0"
+ id="marker1120"
+ style="overflow:visible"
+ inkscape:isstock="true">
+ <path
+ id="path1118"
+ d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
+ style="fill-rule:evenodd;stroke:#fb2020;stroke-width:1pt;stroke-opacity:1;fill:#bfbfbf;fill-opacity:1"
+ transform="scale(0.8) translate(12.5,0)" />
+ </marker>
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0.0"
+ refX="0.0"
+ id="Arrow1Lend"
+ style="overflow:visible;"
+ inkscape:isstock="true">
+ <path
+ id="path837"
+ d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
+ style="fill-rule:evenodd;stroke:#fb2020;stroke-width:1pt;stroke-opacity:1;fill:#bfbfbf;fill-opacity:1"
+ transform="scale(0.8) rotate(180) translate(12.5,0)" />
+ </marker>
+ <marker
+ inkscape:stockid="Arrow1Lstart"
+ orient="auto"
+ refY="0.0"
+ refX="0.0"
+ id="Arrow1Lstart"
+ style="overflow:visible"
+ inkscape:isstock="true">
+ <path
+ id="path834"
+ d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
+ style="fill-rule:evenodd;stroke:#fb2020;stroke-width:1pt;stroke-opacity:1;fill:#bfbfbf;fill-opacity:1"
+ transform="scale(0.8) translate(12.5,0)" />
+ </marker>
+ <style
+ id="style1277">.cls-1{fill:#245559;}.cls-2{fill:none;stroke:#24c9a6;stroke-miterlimit:10;stroke-width:3px;}</style>
+ </defs>
+ <title
+ id="title1281">01 Big Knob</title>
+ <g
+ id="Big_Knob"
+ data-name="Big Knob"
+ transform="translate(0,-42)">
+ <path
+ sodipodi:nodetypes="ccccccccccccccccc"
+ inkscape:connector-curvature="0"
+ id="path1623"
+ d="m 4.5808552,43.048284 c -0.916995,0.776532 -1.6722965,1.803125 -1.9013601,3.031798 -0.5431233,2.168432 -0.4358872,4.429132 -0.5395994,6.645897 0.036253,1.148227 0.7926187,2.062573 1.410674,2.938392 0.7968887,0.857174 2.0119906,0.865255 3.0251773,1.270916 1.136957,-0.01439 2.0164644,0.595913 2.750354,0.670576 1.570628,-0.13174 1.855081,0.101175 3.049879,0.287472 1.151066,0.157815 1.854001,0.671787 2.426802,-0.144803 0.448227,-0.952378 0.917889,-1.929294 0.971381,-3.009072 0.06756,-0.932379 0.610671,-1.738462 0.626678,-2.683326 0.05254,-1.041607 0.08676,-2.098552 -0.02634,-3.134093 -0.119858,-1.021423 -0.668707,-1.886466 -0.817907,-2.88858 -0.386676,-0.862701 -0.6563,-1.904954 -1.530782,-2.37809 -0.789007,-0.637386 -1.719449,-1.034032 -2.735757,-0.896557 -1.223655,-0.191187 -2.4577279,-0.05624 -3.6867338,-0.01441 -1.0038807,0.03353 -2.0628646,0.04852 -3.0224776,0.303872 z"
+ style="fill:#ffffff;stroke:#f2f2f2;stroke-width:0.48204279;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;fill-opacity:1" />
+ <path
+ style="fill:none;stroke:#5b5b5b;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 4.2899263,43.063729 c -0.9705151,0.789392 -1.7698995,1.832986 -2.0123323,3.082008 -0.5748226,2.204344 -0.4613277,4.502483 -0.5710931,6.75596 0.03837,1.167243 0.8388798,2.096731 1.4930076,2.987054 0.8433989,0.87137 2.1294198,0.879586 3.2017409,1.291965 1.2033151,-0.01462 1.9856308,-0.335365 2.7289111,0.382967 1.1941025,0.476388 2.1453185,0.401565 3.4098495,0.590947 1.218249,0.160429 1.899013,-0.138643 2.505246,-0.968757 0.474388,-0.96815 1.034658,-1.139689 1.091272,-2.23735 0.07151,-0.947819 0.646313,-1.767252 0.663254,-2.727765 0.05561,-1.058857 0.09182,-2.133305 -0.02787,-3.185996 -0.126854,-1.038339 -0.707737,-1.917709 -0.865645,-2.936419 -0.409243,-0.876986 -0.694604,-1.936501 -1.620124,-2.417472 -0.835058,-0.647942 -1.819806,-1.051157 -2.895429,-0.911406 -1.295073,-0.194353 -2.6011726,-0.05717 -3.9019091,-0.01464 -1.0624719,0.03408 -2.183263,0.04933 -3.1988836,0.308904 z"
+ id="path1618"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccccccccccccccc" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="m 3.9734774,44.20859 c -0.1556976,0.138731 -0.3113952,0.277463 -0.4670929,0.416193 -0.044484,0.03964 -0.08439,0.08511 -0.1334549,0.118913 -0.050556,0.03486 -0.1212185,0.04071 -0.1631859,0.08554 -0.2757606,0.294652 -0.1081798,0.176646 -0.2110896,0.367644 -0.067028,0.124403 -0.1587667,0.236375 -0.2110895,0.367645 -0.01233,0.03095 0.032692,0.06381 0.026089,0.09645 -0.1429818,0.707321 -0.079313,0.08453 -0.1552689,0.497464 -0.021051,0.114415 -0.022201,0.23261 -0.051542,0.345187 -0.011879,0.04559 -0.067652,0.07553 -0.070361,0.122551 -0.00383,0.0665 0.034791,0.128608 0.052185,0.192912 -0.014755,0.073 -0.029516,0.146 -0.04427,0.219005"
+ id="path1583"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="m 14.205974,44.049178 c 0.05588,0.02548 0.115676,0.04371 0.167636,0.07646 0.06299,0.03972 0.116488,0.09283 0.174731,0.139256 0.09319,0.07426 0.18638,0.148537 0.27957,0.222806 0.05825,0.04642 0.116488,0.09283 0.17473,0.139254 0.0466,0.03713 0.109195,0.06027 0.139785,0.111409 0.0034,0.0056 0.106341,0.416092 0.112463,0.432483 0.0052,0.01398 0.02976,0.01387 0.03495,0.02786 0.02606,0.06976 0.03352,0.145315 0.05624,0.216242 0.01015,0.03172 0.03366,0.05841 0.04204,0.09065 0.0106,0.04077 0.0036,0.08482 0.01419,0.125588 0.0084,0.03224 0.03366,0.05841 0.04204,0.09065 0.01061,0.04078 0.0095,0.08373 0.01419,0.125588 0.0047,0.04187 0.0095,0.08373 0.01419,0.125588"
+ id="path1585"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:0.57568485px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;paint-order:markers fill stroke"
+ d="m 9.1906545,43.330522 c -0.090627,0.01623 -0.2337072,0.02864 -0.2718787,0.04869 -0.03626,0.01904 0.054257,0.03877 0.067971,0.05842 0.08755,0.125412 -0.1384119,-0.05311 0.1359416,0.07789 0.039602,0.01891 0.027441,0.03955 0.067971,0.05842 0.1282938,0.05973 0.2909041,0.07321 0.3398522,0.136312 0.0056,0.0072 -0.073565,0.01226 -0.067971,0.01947 0.018215,0.02348 0.095937,0.04523 0.1359417,0.06816 0.028019,0.01605 0.045313,0.03246 0.067971,0.04868 0.022657,0.01623 0.053641,0.03226 0.067971,0.04868 0.00843,0.0097 0,0.01947 0,0.02921 0,0.02272 0,0.04544 0,0.06816 0,0.0032 -0.00549,0.0066 0,0.0097 0.017376,0.01 0.050593,0.01925 0.067971,0.02921 0.00549,0.0031 0.022657,0.0097 0,0.0097 -0.022657,0 0,-0.01298 0,-0.0097 0,0.0065 0,0.01298 0,0.01947"
+ id="path1587"
+ inkscape:connector-curvature="0" />
+ <path
+ inkscape:connector-curvature="0"
+ id="path1610"
+ d="m 9.3171816,43.153085 c 0.061818,0.03123 0.3288925,-0.02443 0.4021806,0 0.014131,0.0047 0,0.02979 0,0.04469 0.029791,0.02979 0.049404,0.07605 0.089373,0.08937 0.019985,0.0067 0.024702,-0.03802 0.044687,-0.04469 0.053097,-0.0177 0.1405251,0.0065 0.1787468,0.04469 0.01053,0.01053 -0.044687,-0.0149 -0.044687,0 0,0.02107 0.023621,0.04469 0.044687,0.04469 0.0149,0 0,-0.05958 0,-0.04469 0,0.05958 0,0.119165 0,0.178747 0,0.0149 0.01332,0.03802 0,0.04469 -0.1191645,0.05958 -0.089374,-0.08937 -0.089374,0.08937 0,0.05958 0.014896,-0.163851 -0.044687,-0.04469 -0.013323,0.02665 0.021066,0.06831 0,0.08937 -0.014896,0.0149 -0.025845,-0.03527 -0.044687,-0.04469 -0.013323,-0.0067 -0.044687,0.0149 -0.044687,0 0,-0.0149 0.038025,-0.01332 0.044687,0 0.013323,0.02665 0,0.05958 0,0.08937 0,0.0149 0,-0.05958 0,-0.04469 0,0.02979 0.013323,0.06273 0,0.08937 -0.026706,0.05341 -0.089374,-0.08607 -0.089374,0.04469 0,0.0149 0.034154,-0.01053 0.044687,0 0.010533,0.01053 0.010533,0.03415 0,0.04469 -0.010533,0.01053 -0.044687,0.0149 -0.044687,0 0,-0.0149 0.034154,0.01053 0.044687,0 0.074478,-0.07448 -0.1638513,-0.04469 0.089373,-0.04469"
+ style="fill:none;stroke:#cacaca;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+ <path
+ inkscape:connector-curvature="0"
+ id="path1612"
+ d="m 7.912063,43.332592 c -0.332798,0 -0.665596,0 -0.9983941,0 -0.095085,0 -0.1909044,0.0085 -0.2852554,0 -0.097255,-0.0086 -0.1876463,-0.05738 -0.2852553,-0.05103 -0.6413871,0.04172 -0.3164345,0.06841 -0.6418248,0.153087 -0.2119368,0.05515 -0.4401187,0.08092 -0.6418247,0.153086 -0.047543,0.01713 -0.028792,0.07925 -0.071314,0.10205 -0.9212957,0.494424 -0.184246,0.01197 -0.7131386,0.306171 -0.1465512,0.08156 -0.273405,0.18145 -0.4278832,0.255142 -0.062546,0.02983 -0.1607874,0.01304 -0.2139416,0.05102 -0.075171,0.0538 -0.095085,0.136077 -0.1426285,0.204115 -0.095085,0.05103 -0.1901704,0.102037 -0.2852555,0.153087"
+ style="fill:none;stroke:#ee2b2b;stroke-width:1.34994042px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+ <path
+ inkscape:connector-curvature="0"
+ id="path1614"
+ d="m 11.071698,43.344096 c 0.09437,-0.01358 0.18645,-0.03472 0.283138,-0.04093 0.11725,-0.0076 0.235952,0 0.353928,0 0.18876,0 0.377521,0 0.566281,0 0.117979,0 0.235951,0 0.353927,0 0.09438,0 0.19477,-0.01915 0.283141,0 0.0098,0.0022 0.542513,0.23731 0.566281,0.245557 0.02023,0.0071 0.05055,-0.0071 0.07079,0 0.101156,0.03509 0.18498,0.08494 0.283141,0.122782 0.04389,0.01684 0.09937,0.02261 0.141565,0.04093 0.05338,0.02315 0.08818,0.05869 0.141565,0.08185 0.04222,0.0183 0.09937,0.02261 0.141565,0.04093 0.0534,0.02315 0.09437,0.05457 0.141565,0.08185 0.04719,0.02728 0.09437,0.05455 0.141565,0.08185"
+ style="fill:none;stroke:#ee2b2b;stroke-width:1.20445549px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+ <path
+ style="fill:none;fill-opacity:1;stroke:#510101;stroke-width:1.21000004;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 8.1139646,42.9247 c -0.9389905,1.5421 0.7095944,3.243621 1.3407824,3.058726 0.790221,-0.007 -0.012404,-3.549349 1.225147,-3.009979"
+ id="path1616"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccc" />
+ <ellipse
+ style="fill:#4d3b3b;fill-opacity:1;stroke:none;stroke-width:3.85056901;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
+ id="path1143"
+ cx="9.0845089"
+ cy="44.121857"
+ rx="1.1217393"
+ ry="1.4377222" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="m 8.5744311,43.016796 c 0.200089,0.0095 0.4165454,-0.0075 0.5945012,0.101971 0.070903,0.03733 0.1374363,0.120475 0.1012109,0.203617 -0.1587148,0.865545 0.6210495,1.925098 -0.5887648,0.762365"
+ id="path1581"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cccc" />
+ <path
+ inkscape:connector-curvature="0"
+ id="path1178"
+ d="m 16.833858,48.514084 c 0.02859,0.05435 0.06472,0.10537 0.08576,0.163072 0.0255,0.06997 0.0353,0.144711 0.05294,0.217074 0.02824,0.115765 0.05647,0.231543 0.0847,0.347315 0.01765,0.07236 0.0353,0.14471 0.05294,0.217072 0.01412,0.05789 0.04946,0.114498 0.04235,0.173662 -7.39e-4,0.0065 -0.170596,0.394129 -0.175788,0.410838 -0.0044,0.01424 0.01504,0.02918 0.01058,0.04342 -0.02209,0.07112 -0.06244,0.13543 -0.08789,0.205425 -0.01139,0.0313 -0.0091,0.06679 -0.02224,0.09742 -0.01657,0.03873 -0.04907,0.06928 -0.06565,0.107998 -0.01309,0.03064 -0.0091,0.06679 -0.02224,0.09742 -0.01657,0.03874 -0.04374,0.07203 -0.06565,0.107999 -0.02191,0.03599 -0.04374,0.07203 -0.06565,0.107998"
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+ <path
+ style="fill:none;stroke:#ee2b2b;stroke-width:1.20445549px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="m 14.786906,46.038035 c 0.08294,0.04702 0.168693,0.08667 0.248954,0.140942 0.09737,0.06576 0.186586,0.144425 0.27988,0.216638 0.149268,0.115539 0.298537,0.23108 0.447805,0.346619 0.0933,0.07221 0.186586,0.144425 0.279879,0.216638 0.07463,0.05777 0.165742,0.104075 0.223903,0.17331 0.0064,0.0077 0.283753,0.519731 0.2975,0.540801 0.01165,0.018 0.04432,0.02533 0.05598,0.04333 0.05851,0.08967 0.09429,0.180395 0.148748,0.270404 0.0244,0.04018 0.06474,0.0787 0.08689,0.119018 0.02804,0.05098 0.03381,0.100386 0.06185,0.151377 0.02219,0.04031 0.06474,0.0787 0.08689,0.119019 0.02806,0.05099 0.04122,0.100916 0.06185,0.151377 0.02062,0.05046 0.04124,0.100901 0.06185,0.151377"
+ id="path1180"
+ inkscape:connector-curvature="0" />
+ <path
+ inkscape:connector-curvature="0"
+ id="path1182"
+ d="m 1.7946273,50.161561 c 0.020712,0.207506 0.041424,0.415014 0.062135,0.62252 0.00592,0.05929 0.019248,0.1183 0.017754,0.177863 -0.00152,0.06139 -0.03832,0.121995 -0.026721,0.182299 0.076277,0.396289 0.079317,0.191352 0.1733416,0.386876 0.061242,0.127352 0.097901,0.267386 0.1733425,0.386878 0.017791,0.02817 0.070839,0.01106 0.093363,0.03559 0.4881739,0.531445 0.021763,0.113852 0.3111777,0.418028 0.080187,0.08429 0.1751307,0.154692 0.2489582,0.244603 0.0299,0.03641 0.021337,0.09913 0.057784,0.128959 0.051547,0.04219 0.1244941,0.04745 0.1867402,0.07118 0.050384,0.05485 0.1007637,0.109699 0.1511519,0.164549"
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+ <path
+ style="fill:none;stroke:#ee2b2b;stroke-width:1.34994042px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="m 3.4010994,46.460334 c -0.195623,0.269233 -0.391246,0.538465 -0.586869,0.807698 -0.055892,0.07692 -0.1053396,0.159438 -0.1676769,0.230771 -0.064125,0.07362 -0.1567211,0.118076 -0.2089598,0.200774 -0.3432643,0.543404 -0.1306609,0.296207 -0.2534261,0.609221 -0.079963,0.203874 -0.1932434,0.403621 -0.2534268,0.60922 -0.014088,0.04853 0.047189,0.06988 0.040639,0.117679 -0.1415621,1.035954 -0.098619,0.156091 -0.1715008,0.756898 -0.020163,0.166502 -0.013918,0.327843 -0.045106,0.496132 -0.012633,0.06813 -0.083964,0.137742 -0.084483,0.203069 -6.625e-4,0.09244 0.054194,0.156911 0.08129,0.235367 -0.014609,0.10692 -0.029237,0.213826 -0.04383,0.320757"
+ id="path1184"
+ inkscape:connector-curvature="0" />
+ </g>
+</svg>
diff --git a/res/computerscare-channels-empty-knob.svg b/res/computerscare-channels-empty-knob.svg
@@ -42,7 +42,7 @@
showgrid="false"
inkscape:zoom="31.647281"
inkscape:cx="8.4242681"
- inkscape:cy="11.314634"
+ inkscape:cy="10.050702"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="0"
@@ -50,6 +50,48 @@
inkscape:snap-global="false" />
<defs
id="defs1279">
+ <marker
+ inkscape:stockid="Arrow1Lstart"
+ orient="auto"
+ refY="0.0"
+ refX="0.0"
+ id="marker1120"
+ style="overflow:visible"
+ inkscape:isstock="true">
+ <path
+ id="path1118"
+ d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
+ style="fill-rule:evenodd;stroke:#fb2020;stroke-width:1pt;stroke-opacity:1;fill:#bfbfbf;fill-opacity:1"
+ transform="scale(0.8) translate(12.5,0)" />
+ </marker>
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0.0"
+ refX="0.0"
+ id="Arrow1Lend"
+ style="overflow:visible;"
+ inkscape:isstock="true">
+ <path
+ id="path837"
+ d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
+ style="fill-rule:evenodd;stroke:#fb2020;stroke-width:1pt;stroke-opacity:1;fill:#bfbfbf;fill-opacity:1"
+ transform="scale(0.8) rotate(180) translate(12.5,0)" />
+ </marker>
+ <marker
+ inkscape:stockid="Arrow1Lstart"
+ orient="auto"
+ refY="0.0"
+ refX="0.0"
+ id="Arrow1Lstart"
+ style="overflow:visible"
+ inkscape:isstock="true">
+ <path
+ id="path834"
+ d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
+ style="fill-rule:evenodd;stroke:#fb2020;stroke-width:1pt;stroke-opacity:1;fill:#bfbfbf;fill-opacity:1"
+ transform="scale(0.8) translate(12.5,0)" />
+ </marker>
<style
id="style1277">.cls-1{fill:#245559;}.cls-2{fill:none;stroke:#24c9a6;stroke-miterlimit:10;stroke-width:3px;}</style>
</defs>
@@ -67,34 +109,23 @@
style="fill:#ffffff;stroke:#f2f2f2;stroke-width:0.48204279;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;fill-opacity:1" />
<path
style="fill:none;stroke:#5b5b5b;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- d="m 4.2899263,43.063729 c -0.9705151,0.789392 -1.7698995,1.832986 -2.0123323,3.082008 -0.5748226,2.204344 -0.4613277,4.502483 -0.5710931,6.75596 0.03837,1.167243 0.8388798,2.096731 1.4930076,2.987054 0.8433989,0.87137 2.1294198,0.879586 3.2017409,1.291965 1.2033151,-0.01462 1.9856308,-0.335365 2.7289111,0.382967 1.1941025,0.476388 2.1453185,0.401565 3.4098495,0.590947 1.218249,0.160429 1.96221,0.682913 2.568443,-0.147201 0.474388,-0.96815 0.971461,-1.961245 1.028075,-3.058906 0.07151,-0.947819 0.646313,-1.767252 0.663254,-2.727765 0.05561,-1.058857 0.09182,-2.133305 -0.02787,-3.185996 -0.126854,-1.038339 -0.707737,-1.917709 -0.865645,-2.936419 -0.409243,-0.876986 -0.694604,-1.936501 -1.620124,-2.417472 -0.835058,-0.647942 -1.819806,-1.051157 -2.895429,-0.911406 -1.295073,-0.194353 -2.6011726,-0.05717 -3.9019091,-0.01464 -1.0624719,0.03408 -2.183263,0.04933 -3.1988836,0.308904 z"
+ d="m 4.2899263,43.063729 c -0.9705151,0.789392 -1.7698995,1.832986 -2.0123323,3.082008 -0.5748226,2.204344 -0.4613277,4.502483 -0.5710931,6.75596 0.03837,1.167243 0.8388798,2.096731 1.4930076,2.987054 0.8433989,0.87137 2.1294198,0.879586 3.2017409,1.291965 1.2033151,-0.01462 1.9856308,-0.335365 2.7289111,0.382967 1.1941025,0.476388 2.1453185,0.401565 3.4098495,0.590947 1.218249,0.160429 1.899013,-0.138643 2.505246,-0.968757 0.474388,-0.96815 1.034658,-1.139689 1.091272,-2.23735 0.07151,-0.947819 0.646313,-1.767252 0.663254,-2.727765 0.05561,-1.058857 0.09182,-2.133305 -0.02787,-3.185996 -0.126854,-1.038339 -0.707737,-1.917709 -0.865645,-2.936419 -0.409243,-0.876986 -0.694604,-1.936501 -1.620124,-2.417472 -0.835058,-0.647942 -1.819806,-1.051157 -2.895429,-0.911406 -1.295073,-0.194353 -2.6011726,-0.05717 -3.9019091,-0.01464 -1.0624719,0.03408 -2.183263,0.04933 -3.1988836,0.308904 z"
id="path1618"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccccccccccccc" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 8.669226,42.795608 c 0.061818,0.03123 0.3288925,-0.02443 0.4021806,0 0.014131,0.0047 0,0.02979 0,0.04469 0.029791,0.02979 0.049404,0.07605 0.089373,0.08937 0.019985,0.0067 0.024702,-0.03802 0.044687,-0.04469 0.053097,-0.0177 0.1405251,0.0065 0.1787469,0.04469 0.010533,0.01053 -0.044687,-0.0149 -0.044687,0 0,0.02107 0.023621,0.04469 0.044687,0.04469 0.014896,0 0,-0.05958 0,-0.04469 0,0.05958 0,0.119165 0,0.178747 0,0.0149 0.013323,0.03802 0,0.04469 -0.1191646,0.05958 -0.089374,-0.08937 -0.089374,0.08937 0,0.05958 0.014896,-0.163851 -0.044687,-0.04469 -0.013323,0.02665 0.021066,0.06831 0,0.08937 -0.014896,0.0149 -0.025845,-0.03527 -0.044687,-0.04469 -0.013323,-0.0067 -0.044687,0.0149 -0.044687,0 0,-0.0149 0.038025,-0.01332 0.044687,0 0.013323,0.02665 0,0.05958 0,0.08937 0,0.0149 0,-0.05958 0,-0.04469 0,0.02979 0.013323,0.06273 0,0.08937 -0.026706,0.05341 -0.089374,-0.08607 -0.089374,0.04469 0,0.0149 0.034154,-0.01053 0.044687,0 0.010533,0.01053 0.010533,0.03415 0,0.04469 -0.010533,0.01053 -0.044687,0.0149 -0.044687,0 0,-0.0149 0.034154,0.01053 0.044687,0 0.074478,-0.07448 -0.1638513,-0.04469 0.089373,-0.04469"
- id="path1581"
- inkscape:connector-curvature="0" />
- <path
- style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 7.6861179,43.912776 c -0.2085381,0 -0.4170762,0 -0.6256143,0 -0.059582,0 -0.1196247,0.0074 -0.1787469,0 -0.060942,-0.0076 -0.1175831,-0.05025 -0.1787469,-0.04469 -0.4019063,0.03654 -0.1982843,0.05992 -0.4021806,0.13406 -0.132804,0.04829 -0.2757874,0.07086 -0.4021806,0.13406 -0.029791,0.0149 -0.018041,0.06939 -0.044687,0.08937 -0.5773028,0.432977 -0.1154523,0.01035 -0.4468673,0.26812 -0.091832,0.07142 -0.1713212,0.158901 -0.2681204,0.223434 -0.039193,0.02613 -0.1007527,0.01138 -0.1340602,0.04469 -0.047104,0.0471 -0.059582,0.119165 -0.089374,0.178747 -0.059582,0.04469 -0.1191646,0.08937 -0.1787469,0.134061"
+ d="m 7.2753401,43.344007 c -0.2085381,0 -0.4170762,0 -0.6256143,0 -0.059582,0 -0.1196247,0.0074 -0.1787469,0 -0.060942,-0.0076 -0.1175831,-0.05025 -0.1787469,-0.04469 -0.4019063,0.03654 -0.1982843,0.05992 -0.4021806,0.13406 -0.132804,0.04829 -0.2757874,0.07086 -0.4021806,0.13406 -0.029791,0.0149 -0.018041,0.06939 -0.044687,0.08937 -0.5773028,0.432977 -0.1154523,0.01035 -0.4468673,0.26812 -0.091832,0.07142 -0.1713212,0.158901 -0.2681204,0.223434 -0.039193,0.02613 -0.1007527,0.01138 -0.1340602,0.04469 -0.047104,0.0471 -0.059582,0.119165 -0.089374,0.178747 -0.059582,0.04469 -0.1191646,0.08937 -0.1787469,0.134061"
id="path1583"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 10.412009,43.465909 c 0.05958,-0.0149 0.117706,-0.03791 0.178746,-0.04469 0.07402,-0.0082 0.148956,0 0.223434,0 0.119165,0 0.238329,0 0.357494,0 0.07448,0 0.148956,0 0.223434,0 0.05958,0 0.122958,-0.02092 0.178747,0 0.0062,0.0023 0.342489,0.259118 0.357493,0.268121 0.01277,0.0077 0.03191,-0.0077 0.04469,0 0.06386,0.03832 0.116778,0.09275 0.178747,0.13406 0.02771,0.01848 0.06273,0.0247 0.08937,0.04469 0.0337,0.02528 0.05567,0.06409 0.08937,0.08937 0.02665,0.01998 0.06273,0.0247 0.08937,0.04469 0.03371,0.02528 0.05958,0.05958 0.08937,0.08937 0.02979,0.02979 0.05958,0.05958 0.08937,0.08937"
+ d="m 10.412009,43.213123 c 0.05958,-0.0149 0.117706,-0.03791 0.178746,-0.04469 0.07402,-0.0082 0.148956,0 0.223434,0 0.119165,0 0.238329,0 0.357494,0 0.07448,0 0.148956,0 0.223434,0 0.05958,0 0.122958,-0.02092 0.178747,0 0.0062,0.0023 0.342489,0.259118 0.357493,0.268121 0.01277,0.0077 0.03191,-0.0077 0.04469,0 0.06386,0.03832 0.116778,0.09275 0.178747,0.13406 0.02771,0.01848 0.06273,0.0247 0.08937,0.04469 0.0337,0.02528 0.05567,0.06409 0.08937,0.08937 0.02665,0.01998 0.06273,0.0247 0.08937,0.04469 0.03371,0.02528 0.05958,0.05958 0.08937,0.08937 0.02979,0.02979 0.05958,0.05958 0.08937,0.08937"
id="path1585"
inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
- id="path1616"
- d="m 9.8981071,43.778682 c -0.059582,0.07448 -0.1536493,0.131429 -0.1787449,0.223451 -0.023839,0.08741 0.035671,0.177964 0.044687,0.26812 0.057559,0.575585 -0.090998,-0.243745 0.089374,0.357494 0.026036,0.08679 0.018041,0.181521 0.044687,0.268121 0.084346,0.274124 0.1912528,0.335989 0.2234338,0.625614 0.0037,0.0331 -0.04836,0.05627 -0.04469,0.08937 0.01197,0.107778 0.06307,0.207603 0.08937,0.312807 0.01842,0.07368 0.02979,0.148956 0.04469,0.223434 0.0149,0.07448 0.03527,0.148067 0.04469,0.223433 0.0055,0.04434 0,0.08937 0,0.134061 v 0.312807 c 0,0.0149 -0.0036,0.03024 0,0.04469 0.01142,0.0457 0.03326,0.08836 0.04469,0.13406 0.0036,0.01445 -0.182589,0.344874 0,0.04469 0.0077,-0.01273 -0.01282,-0.03711 0,-0.04469 l 0.276485,-0.163416"
- style="fill:#bfbfbf;stroke:#fb2020;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:1"
- sodipodi:nodetypes="ccccccccccssccssc" />
- <path
- style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;paint-order:markers fill stroke"
- d="m 9.2501515,43.421205 c -0.059582,0.07448 -0.1536493,0.131429 -0.1787449,0.223451 -0.023839,0.08741 0.035671,0.177964 0.044687,0.26812 0.057559,0.575585 -0.090998,-0.243745 0.089374,0.357494 0.026036,0.08679 0.018041,0.181521 0.044687,0.268121 0.084346,0.274124 0.1912531,0.335989 0.2234337,0.625614 0.00368,0.0331 -0.048365,0.05627 -0.044687,0.08937 0.011975,0.107778 0.063073,0.207603 0.089374,0.312807 0.018421,0.07368 0.029791,0.148956 0.044687,0.223434 0.014896,0.07448 0.035266,0.148067 0.044687,0.223433 0.00554,0.04434 0,0.08937 0,0.134061 0,0.104269 0,0.208538 0,0.312807 0,0.0149 -0.00361,0.03024 0,0.04469 0.011424,0.0457 0.033262,0.08836 0.044687,0.13406 0.00361,0.01445 0.014896,0.04469 0,0.04469 -0.014896,0 0,-0.05958 0,-0.04469 0,0.02979 0,0.05958 0,0.08937"
+ style="fill:none;stroke:#000000;stroke-width:0.57568485px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;paint-order:markers fill stroke"
+ d="m 9.1906545,43.330522 c -0.090627,0.01623 -0.2337072,0.02864 -0.2718787,0.04869 -0.03626,0.01904 0.054257,0.03877 0.067971,0.05842 0.08755,0.125412 -0.1384119,-0.05311 0.1359416,0.07789 0.039602,0.01891 0.027441,0.03955 0.067971,0.05842 0.1282938,0.05973 0.2909041,0.07321 0.3398522,0.136312 0.0056,0.0072 -0.073565,0.01226 -0.067971,0.01947 0.018215,0.02348 0.095937,0.04523 0.1359417,0.06816 0.028019,0.01605 0.045313,0.03246 0.067971,0.04868 0.022657,0.01623 0.053641,0.03226 0.067971,0.04868 0.00843,0.0097 0,0.01947 0,0.02921 0,0.02272 0,0.04544 0,0.06816 0,0.0032 -0.00549,0.0066 0,0.0097 0.017376,0.01 0.050593,0.01925 0.067971,0.02921 0.00549,0.0031 0.022657,0.0097 0,0.0097 -0.022657,0 0,-0.01298 0,-0.0097 0,0.0065 0,0.01298 0,0.01947"
id="path1587"
inkscape:connector-curvature="0" />
<path
@@ -105,12 +136,31 @@
<path
inkscape:connector-curvature="0"
id="path1612"
- d="m 8.3340735,44.252013 c -0.2085381,0 -0.4170762,0 -0.6256143,0 -0.059582,0 -0.1196247,0.0044 -0.1787469,0 -0.060942,-0.0045 -0.1175831,-0.02997 -0.1787469,-0.02665 -0.4019063,0.02179 -0.1982843,0.03573 -0.4021806,0.07995 -0.132804,0.0288 -0.2757874,0.04226 -0.4021806,0.07995 -0.029791,0.0089 -0.018041,0.04138 -0.044687,0.0533 -0.5773028,0.258204 -0.1154523,0.0062 -0.4468673,0.159892 -0.091832,0.04259 -0.1713212,0.09476 -0.2681204,0.133244 -0.039193,0.01558 -0.1007527,0.0068 -0.1340602,0.02665 -0.047104,0.02809 -0.059582,0.07106 -0.089374,0.106595 -0.059582,0.02665 -0.1191646,0.05329 -0.1787469,0.07995"
+ d="m 7.9232957,43.683244 c -0.2085381,0 -0.4170762,0 -0.6256143,0 -0.059582,0 -0.1196247,0.0044 -0.1787469,0 -0.060942,-0.0045 -0.1175831,-0.02997 -0.1787469,-0.02665 -0.4019063,0.02179 -0.1982843,0.03573 -0.4021806,0.07995 -0.132804,0.0288 -0.2757874,0.04226 -0.4021806,0.07995 -0.029791,0.0089 -0.018041,0.04138 -0.044687,0.0533 -0.5773028,0.258204 -0.1154523,0.0062 -0.4468673,0.159892 -0.091832,0.04259 -0.1713212,0.09476 -0.2681204,0.133244 -0.039193,0.01558 -0.1007527,0.0068 -0.1340602,0.02665 -0.047104,0.02809 -0.059582,0.07106 -0.089374,0.106595 -0.059582,0.02665 -0.1191646,0.05329 -0.1787469,0.07995"
style="fill:none;stroke:#cacaca;stroke-width:0.7722345px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
inkscape:connector-curvature="0"
id="path1614"
- d="m 11.059964,44.129328 c 0.05958,-0.0085 0.117706,-0.02169 0.178746,-0.02557 0.07402,-0.0047 0.148956,0 0.223434,0 0.119165,0 0.238329,0 0.357494,0 0.07448,0 0.148956,0 0.223434,0 0.05958,0 0.122958,-0.01197 0.178747,0 0.0062,0.0013 0.342489,0.148241 0.357493,0.153392 0.01277,0.0044 0.03191,-0.0044 0.04469,0 0.06386,0.02192 0.116778,0.05306 0.178747,0.0767 0.02771,0.01057 0.06273,0.01413 0.08937,0.02557 0.0337,0.01446 0.05567,0.03666 0.08937,0.05113 0.02665,0.01143 0.06273,0.01413 0.08937,0.02557 0.03371,0.01446 0.05958,0.03409 0.08937,0.05113 0.02979,0.01704 0.05958,0.03408 0.08937,0.05113"
+ d="m 11.059964,43.876542 c 0.05958,-0.0085 0.117706,-0.02169 0.178746,-0.02557 0.07402,-0.0047 0.148956,0 0.223434,0 0.119165,0 0.238329,0 0.357494,0 0.07448,0 0.148956,0 0.223434,0 0.05958,0 0.122958,-0.01197 0.178747,0 0.0062,0.0013 0.342489,0.148241 0.357493,0.153392 0.01277,0.0044 0.03191,-0.0044 0.04469,0 0.06386,0.02192 0.116778,0.05306 0.178747,0.0767 0.02771,0.01057 0.06273,0.01413 0.08937,0.02557 0.0337,0.01446 0.05567,0.03666 0.08937,0.05113 0.02665,0.01143 0.06273,0.01413 0.08937,0.02557 0.03371,0.01446 0.05958,0.03409 0.08937,0.05113 0.02979,0.01704 0.05958,0.03408 0.08937,0.05113"
style="fill:none;stroke:#cacaca;stroke-width:0.7563718px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+ <path
+ style="fill:none;fill-opacity:1;stroke:#fb2020;stroke-width:1.21000004;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 8.1139646,42.9247 c -0.9389905,1.5421 0.7095944,3.243621 1.3407824,3.058726 0.790221,-0.007 -0.012404,-3.549349 1.225147,-3.009979"
+ id="path1616"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccc" />
+ <ellipse
+ style="fill:#ed0a0a;fill-opacity:1;stroke:none;stroke-width:3.85056901;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
+ id="path1143"
+ cx="9.0845089"
+ cy="44.121857"
+ rx="1.1217393"
+ ry="1.4377222" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="m 8.5744311,43.016796 c 0.200089,0.0095 0.4165454,-0.0075 0.5945012,0.101971 0.070903,0.03733 0.1374363,0.120475 0.1012109,0.203617 -0.1587148,0.865545 0.6210495,1.925098 -0.5887648,0.762365"
+ id="path1581"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cccc" />
</g>
</svg>
diff --git a/src/Computerscare.hpp b/src/Computerscare.hpp
@@ -318,12 +318,7 @@ struct MediumDotSnapKnob : RoundBlackSnapKnob {
setSvg(APP->window->loadSvg(asset::plugin(pluginInstance, "res/computerscare-medium-knob-dot-indicator.svg")));
}
};
-struct TinyChannelsSnapKnob: RoundBlackSnapKnob {
- TinyChannelsSnapKnob() {
- setSvg(APP->window->loadSvg(asset::plugin(pluginInstance, "res/computerscare-channels-empty-knob.svg")));
- }
- void randomize() override {return;}
-};
+
struct SmoothKnob : RoundKnob {
SmoothKnob() {
@@ -481,3 +476,5 @@ struct SmallLetterDisplay : Widget {
}
};
+
+#include "ComputerscarePolyModule.hpp"
diff --git a/src/ComputerscareDebug.cpp b/src/ComputerscareDebug.cpp
@@ -266,7 +266,7 @@ struct HidableSmallSnapKnob : SmallSnapKnob {
HidableSmallSnapKnob() {
SmallSnapKnob();
}
- void draw(const DrawArgs &args) {
+ void draw(const DrawArgs &args) override {
if (module ? (hackIndex == 0 ? module->clockMode == 0 : module->inputMode == 0) : true) {
Widget::draw(args);
}
diff --git a/src/ComputerscareHorseADoodleDoo.cpp b/src/ComputerscareHorseADoodleDoo.cpp
@@ -22,6 +22,7 @@ struct HorseSequencer {
int otherPrimes[16] = {80651, 85237, 11813, 22343, 19543, 28027, 9203, 39521, 42853, 58411, 33811, 76771, 10939, 22721, 17851, 10163};
int channel = 0;
+
std::vector<std::vector<int>> octets = {{0, 0, 0, 0}, {0, 0, 0, 1}, {0, 0, 1, 0}, {0, 0, 1, 1}, {0, 1, 0, 0}, {0, 1, 0, 1}, {0, 1, 1, 0}, {0, 1, 1, 1}, {1, 0, 0, 0}, {1, 0, 0, 1}, {1, 0, 1, 0}, {1, 0, 1, 1}, {1, 1, 0, 0}, {1, 1, 0, 1}, {1, 1, 1, 0}, {1, 1, 1, 1}};
std::vector<int> somethin = {1, 0, 0, 1};
std::vector<int> absoluteSequence;
@@ -60,7 +61,7 @@ struct HorseSequencer {
for (int i = 0; i < numSteps; i++) {
float val = 0.f;
float cvVal = 0.f;
- float arg = pattern + ((float) i)*trigConst;
+ float arg = pattern + ((float) i) * trigConst;
for (int k = 0; k < 4; k++) {
val += std::sin(primes[((i + 1) * (k + 1)) % 16] * arg + otherPrimes[(otherPrimes[0] + i) % 16]);
cvVal += std::sin(primes[((i + 11) * (k + 1) + 201) % 16] * arg + otherPrimes[(otherPrimes[3] + i - 7) % 16]);
@@ -122,9 +123,8 @@ struct HorseSequencer {
}
};
-struct ComputerscareHorseADoodleDoo : Module {
+struct ComputerscareHorseADoodleDoo : ComputerscarePolyModule {
int counter = 0;
- int numChannels = 1;
ComputerscareSVGPanel* panelRef;
float currentValues[16] = {0.f};
bool atFirstStepPoly[16] = {false};
@@ -176,6 +176,9 @@ struct ComputerscareHorseADoodleDoo : Module {
int seqVal[16] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
float cvVal[16] = {0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f};
+ int clockChannels[16] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
+ int resetChannels[16] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
+
bool changePending[16] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
HorseSequencer seq[16];
@@ -209,24 +212,31 @@ struct ComputerscareHorseADoodleDoo : Module {
int stepsNum = inputs[STEPS_CV].getChannels();
int densityNum = inputs[DENSITY_CV].getChannels();
+ int clockNum = inputs[CLOCK_INPUT].getChannels();
+ int resetNum = inputs[RESET_INPUT].getChannels();
+
lastStepsKnob = std::floor(params[STEPS_KNOB].getValue());
lastPolyKnob = std::floor(params[POLY_KNOB].getValue());
- outputs[TRIGGER_OUTPUT].setChannels(lastPolyKnob);
- outputs[CV_OUTPUT].setChannels(lastPolyKnob);
- for (int i = 0; i < lastPolyKnob; i++) {
+ polyChannels = lastPolyKnob == 0 ? std::max(clockNum, std::max(pattNum, std::max(stepsNum, densityNum))) : lastPolyKnob;
+
+ for (int i = 0; i < 16; i++) {
+ clockChannels[i] = std::max(1, std::min(i, clockNum));
+ resetChannels[i] = std::max(1, std::min(i, resetNum));
+ }
+
+ outputs[TRIGGER_OUTPUT].setChannels(polyChannels);
+ outputs[CV_OUTPUT].setChannels(polyChannels);
+
+ for (int i = 0; i < polyChannels; i++) {
float patternVal = params[PATTERN_KNOB].getValue() + params[PATTERN_TRIM].getValue() * inputs[PATTERN_CV].getVoltage(fmin(i, pattNum));
int stepsVal = std::floor(params[STEPS_KNOB].getValue() + params[STEPS_TRIM].getValue() * inputs[STEPS_CV].getVoltage(fmin(i, stepsNum)));
float densityVal = params[DENSITY_KNOB].getValue() + params[DENSITY_TRIM].getValue() * inputs[DENSITY_CV].getVoltage(fmin(i, densityNum)) / 10;
seq[i].checkAndArm(patternVal, stepsVal, densityVal);
}
}
- void processChannel(int ch) {
- bool clockInputHigh = clockInputTrigger[ch].isHigh();
- bool clocked = clockInputTrigger[ch].process(inputs[CLOCK_INPUT].getVoltage());
-
- bool reset = resetInputTrigger[ch].process(inputs[RESET_INPUT].getVoltage());
+ void processChannel(int ch, bool clocked, bool reset, bool clockInputHigh) {
if (reset) {
seq[ch].armChange();
@@ -275,10 +285,21 @@ struct ComputerscareHorseADoodleDoo : Module {
checkKnobChanges();
counter = 0;
}
+
+
+ bool currentClock[16] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+
+ bool currentReset[16] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+ bool isHigh[16] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
for (int i = 0; i < 16; i++) {
- processChannel(i);
+ currentClock[i] = clockInputTrigger[i].process(inputs[CLOCK_INPUT].getVoltage(i));
+ currentReset[i] = resetInputTrigger[i].process(inputs[RESET_INPUT].getVoltage(i));
+ isHigh[i] = clockInputTrigger[i].isHigh();
}
+ for (int i = 0; i < 16; i++) {
+ processChannel(i, currentClock[clockChannels[i] - 1], currentReset[resetChannels[i] - 1], isHigh[clockChannels[i] - 1]);
+ }
}
};
diff --git a/src/ComputerscareKnolyPobs.cpp b/src/ComputerscareKnolyPobs.cpp
@@ -1,14 +1,12 @@
#include "Computerscare.hpp"
+#include "ComputerscarePolyModule.hpp"
struct ComputerscareKnolyPobs;
const int numKnobs = 16;
-struct ComputerscareKnolyPobs : Module {
- int counterPeriod = 64;
- int counter = counterPeriod + 1;
- int polyChannels = 16;
+struct ComputerscareKnolyPobs : ComputerscarePolyModule {
ComputerscareSVGPanel* panelRef;
enum ParamIds {
KNOB,
@@ -39,25 +37,20 @@ struct ComputerscareKnolyPobs : Module {
configParam(POLY_CHANNELS, 1.f, 16.f, 16.f, "Poly Channels");
}
void process(const ProcessArgs &args) override {
- counter++;
- if (counter > counterPeriod) {
- checkPoly();
- counter = 0;
- }
+ ComputerscarePolyModule::checkCounter();
for (int i = 0; i < polyChannels; i++) {
outputs[POLY_OUTPUT].setVoltage(params[KNOB + i].getValue(), i);
}
}
- void checkPoly() {
- float candidate = params[POLY_CHANNELS].getValue();
- if (polyChannels != candidate) {
- polyChannels = candidate;
+ void checkPoly() override {
+ polyChannels = params[POLY_CHANNELS].getValue();
outputs[POLY_OUTPUT].setChannels(polyChannels);
- }
}
};
+
+
struct DisableableSmoothKnob : RoundKnob {
std::shared_ptr<Svg> enabledSvg = APP->window->loadSvg(asset::plugin(pluginInstance, "res/computerscare-medium-knob-effed.svg"));
std::shared_ptr<Svg> disabledSvg = APP->window->loadSvg(asset::plugin(pluginInstance, "res/computerscare-medium-knob-disabled.svg"));
@@ -100,7 +93,16 @@ struct ComputerscareKnolyPobsWidget : ModuleWidget {
addChild(panel);
}
- addParam(createParam<TinyChannelsSnapKnob>(Vec(8, 26), module, ComputerscareKnolyPobs::POLY_CHANNELS));
+
+
+ //addParam(createParam<TinyChannelsSnapKnob>(Vec(8, 26), module, ComputerscareKnolyPobs::POLY_CHANNELS));
+
+ channelWidget = new PolyOutputChannelsWidget(Vec(1,23),module,ComputerscareKnolyPobs::POLY_CHANNELS);
+
+
+ addChild(channelWidget);
+
+
float xx;
float yy;
@@ -136,6 +138,8 @@ struct ComputerscareKnolyPobsWidget : ModuleWidget {
addChild(smallLetterDisplay);
}
+ PolyOutputChannelsWidget* channelWidget;
+ PolyChannelsDisplay* channelDisplay;
DisableableSmoothKnob* fader;
SmallLetterDisplay* smallLetterDisplay;
};
diff --git a/src/ComputerscarePolyModule.hpp b/src/ComputerscarePolyModule.hpp
@@ -0,0 +1,102 @@
+#pragma once
+
+using namespace rack;
+
+struct ComputerscarePolyModule : Module {
+ int polyChannels = 16;
+ int polyChannelsKnobSetting=0;
+ int counterPeriod = 64;
+ int counter = counterPeriod + 1;
+
+ virtual void checkCounter() {
+ counter++;
+ if (counter > counterPeriod) {
+ checkPoly();
+ counter = 0;
+ }
+ }
+
+ virtual void checkPoly() {};
+};
+struct TinyChannelsSnapKnob: RoundBlackSnapKnob {
+ std::shared_ptr<Svg> manualChannelsSetSvg = APP->window->loadSvg(asset::plugin(pluginInstance, "res/computerscare-channels-empty-knob.svg"));
+ std::shared_ptr<Svg> autoChannelsSvg = APP->window->loadSvg(asset::plugin(pluginInstance, "res/computerscare-channels-empty-knob-auto-mode.svg"));
+ int prevSetting=-1;
+ int paramId=-1;
+
+ ComputerscarePolyModule *module;
+
+ TinyChannelsSnapKnob() {
+ setSvg(APP->window->loadSvg(asset::plugin(pluginInstance, "res/computerscare-channels-empty-knob.svg")));
+ }
+ void randomize() override {return;}
+ void draw(const DrawArgs& args) override {
+ if (module) {
+ int currentSetting = module->params[paramId].getValue();;
+ if (currentSetting != prevSetting) {
+ setSvg(currentSetting == 0 ? autoChannelsSvg : manualChannelsSetSvg);
+ dirtyValue = -20.f;
+ prevSetting = currentSetting;
+ }
+ }
+ else {
+ }
+ RoundBlackSnapKnob::draw(args);
+ }
+};
+
+struct PolyChannelsDisplay : SmallLetterDisplay
+{
+ ComputerscarePolyModule *module;
+ bool controlled=false;
+ int prevChannels=-1;
+ int paramId=-1;
+
+ PolyChannelsDisplay(math::Vec pos)
+ {
+ box.pos = pos;
+ fontSize = 14;
+ letterSpacing = 1.f;
+ textAlign = 18;
+ textColor = BLACK;
+ breakRowWidth = 20;
+ SmallLetterDisplay();
+ };
+ void draw(const DrawArgs &args)
+ {
+ if (module)
+ {
+ int newChannels = module->polyChannels;
+ if(newChannels != prevChannels) {
+ std::string str = std::to_string(newChannels);
+ value = str;
+ prevChannels=newChannels;
+ }
+
+ }
+ SmallLetterDisplay::draw(args);
+ }
+};
+struct PolyOutputChannelsWidget : Widget {
+ ComputerscarePolyModule *module;
+ PolyChannelsDisplay *channelCountDisplay;
+ TinyChannelsSnapKnob *channelsKnob;
+ PolyOutputChannelsWidget(math::Vec pos,ComputerscarePolyModule *mod,int paramId) {
+ //Vec(8, 26) +7,+3
+ // //addParam(createParam<TinyChannelsSnapKnob>(Vec(8, 26), module, ComputerscareKnolyPobs::POLY_CHANNELS));
+ module = mod;
+
+
+ channelsKnob = createParam<TinyChannelsSnapKnob>(pos.plus(Vec(7,3)),module,paramId);
+ channelsKnob->module=module;
+ channelsKnob->paramId=paramId;
+
+
+ channelCountDisplay = new PolyChannelsDisplay(pos);
+
+ channelCountDisplay->module = module;
+
+ addChild(channelsKnob);
+ addChild(channelCountDisplay);
+ }
+};
+\ No newline at end of file
diff --git a/src/ComputerscareRolyPouter.cpp b/src/ComputerscareRolyPouter.cpp
@@ -96,7 +96,6 @@ struct PouterSmallDisplay : SmallLetterDisplay
int ch;
PouterSmallDisplay(int outputChannelNumber)
{
-
ch = outputChannelNumber;
SmallLetterDisplay();
};
@@ -105,17 +104,11 @@ struct PouterSmallDisplay : SmallLetterDisplay
//this->setNumDivisionsString();
if (module)
{
-
-
std::string str = std::to_string(module->routing[ch]);
value = str;
-
-
-
}
SmallLetterDisplay::draw(args);
}
-
};
struct ComputerscareRolyPouterWidget : ModuleWidget {