computerscare-vcv-modules

computerscare modules for VCV Rack
Log | Files | Refs

commit ac200b090ec73ab8b0c32674d756fc30b79041d0
parent fd4cd20d598e7e4e828651054265d8ec03f19d44
Author: Adam M <aemalone@gmail.com>
Date:   Sun, 15 Mar 2020 15:19:01 -0500

cv input for Horsa

Diffstat:
Mres/ComputerscareHorseADoodleDooPanel.svg | 95++++++++++++++++++++++++++++++++-----------------------------------------------
Ares/tiny-jack.svg | 77+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Msrc/Computerscare.hpp | 26+++++++++++++++++++++++++-
Msrc/ComputerscareHorseADoodleDoo.cpp | 157++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----------------------
4 files changed, 251 insertions(+), 104 deletions(-)

diff --git a/res/ComputerscareHorseADoodleDooPanel.svg b/res/ComputerscareHorseADoodleDooPanel.svg @@ -26,9 +26,9 @@ borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" - inkscape:zoom="2.0000001" - inkscape:cx="25.174513" - inkscape:cy="87.058115" + inkscape:zoom="8.0000004" + inkscape:cx="45.174512" + inkscape:cy="31.494625" inkscape:document-units="mm" inkscape:current-layer="g1669" showgrid="false" @@ -139,36 +139,16 @@ id="g1669" inkscape:groupmode="layer" inkscape:label="Layer 1 copy"> - <path - style="fill:#fcfcfc;fill-opacity:1;stroke:#666666;stroke-width:0.92207193;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers" - d="m 1.4662713,254.0889 -0.2318916,-36.24253 1.3491347,0.65764 12.6271306,0.20928 0.218116,34.43767 z" - id="rect1127" - inkscape:connector-curvature="0" - sodipodi:nodetypes="cccccc" /> <rect - style="fill:#fcfcfc;fill-opacity:1;stroke:#666666;stroke-width:0.26300001;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers" + style="fill:#fcfcfc;fill-opacity:1;stroke:#666666;stroke-width:0.17828479;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers" id="rect4821" - width="15.668674" - height="13.6107" - x="0.093544334" - y="283.3425" /> - <rect - style="fill:#fcfcfc;fill-opacity:1;stroke:#666666;stroke-width:0.29740328;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers" - id="rect1125" - width="12.070284" - height="46.313881" - x="2.3323057" - y="238.41199" /> - <rect - style="fill:#fcfcfc;fill-opacity:1;stroke:#666666;stroke-width:0.22220333;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers" - id="rect1123" - width="14.857461" - height="29.14496" - x="0.83949763" - y="257.75513" /> + width="15.753389" + height="6.2209363" + x="0.051186722" + y="290.77463" /> <g aria-label="computerscare" - transform="matrix(0.60064444,-0.07085766,0.25618802,1.4708996,-78.364238,-142.16422)" + transform="matrix(0.60064444,-0.02803149,0.25618802,0.58189205,-78.364238,122.71866)" 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 @@ -187,62 +167,62 @@ id="path1705" inkscape:connector-curvature="0" /> <path - d="m 14.194053,294.39558 -0.116432,1.14614 -0.273689,0.004 0.303039,-2.98303 0.273689,-0.004 -0.03332,0.32801 q 0.105411,-0.19423 0.245004,-0.2888 0.141267,-0.0965 0.323234,-0.0992 0.301797,-0.005 0.457926,0.30525 0.157609,0.30975 0.10586,0.81916 -0.05175,0.50939 -0.272866,0.8248 -0.219637,0.31539 -0.521434,0.31991 -0.181967,0.003 -0.304231,-0.0879 -0.120586,-0.0926 -0.186786,-0.28427 z m 1.002747,-0.76829 q 0.03979,-0.39171 -0.06194,-0.61174 -0.100053,-0.22198 -0.316046,-0.21875 -0.215991,0.003 -0.362999,0.22891 -0.145331,0.22373 -0.185124,0.61543 -0.03979,0.3917 0.06026,0.61368 0.101729,0.22003 0.317721,0.2168 0.215993,-0.003 0.361324,-0.22696 0.147007,-0.22568 0.186798,-0.61737 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.32414466" + d="m 14.227932,295.60712 -0.530986,2.11807 -0.279885,0.0186 1.38199,-5.51268 0.279886,-0.0186 -0.151961,0.60617 q 0.17715,-0.36243 0.353202,-0.54248 0.178451,-0.18368 0.364544,-0.19605 0.308827,-0.0215 0.355995,0.54424 0.04885,0.56472 -0.187159,1.50612 -0.235995,0.94137 -0.574472,1.53193 -0.336964,0.59047 -0.645621,0.61108 -0.186133,0.0124 -0.277869,-0.14971 -0.08935,-0.16585 -0.08771,-0.51657 z m 1.296669,-1.45741 q 0.181467,-0.72389 0.157169,-1.12546 -0.02189,-0.40524 -0.24279,-0.3905 -0.220843,0.0145 -0.451685,0.43683 -0.22838,0.41845 -0.409849,1.14232 -0.181466,0.72387 -0.159579,1.1291 0.0243,0.40158 0.245196,0.38684 0.220844,-0.0145 0.449279,-0.43317 0.230786,-0.42211 0.412251,-1.14596 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.44221964" id="path1707" inkscape:connector-curvature="0" /> <path - d="m 15.817295,294.59929 0.133589,-1.31662 0.279679,-0.0948 -0.13221,1.30302 q -0.03133,0.30876 0.04714,0.43231 0.07867,0.12157 0.267104,0.0581 0.226411,-0.0761 0.375861,-0.305 0.150937,-0.22909 0.183252,-0.54758 l 0.125112,-1.23308 0.27968,-0.0948 -0.220678,2.17493 -0.279678,0.0948 0.03389,-0.33401 q -0.121926,0.23241 -0.26703,0.37515 -0.143377,0.14014 -0.321206,0.2003 -0.293335,0.0992 -0.421647,-0.0827 -0.128329,-0.18177 -0.08282,-0.63032 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.32414466" + d="m 16.606986,292.74783 0.27071,-1.63811 0.277496,-0.0897 -0.267916,1.62119 q -0.06349,0.38415 -0.0019,0.54739 0.06194,0.16079 0.248864,0.10085 0.224573,-0.0718 0.392227,-0.34337 0.169095,-0.27166 0.234579,-0.66792 l 0.253534,-1.53417 0.277496,-0.0897 -0.447191,2.70599 -0.277493,0.0897 0.06868,-0.41557 q -0.14174,0.27886 -0.295879,0.44279 -0.152205,0.16084 -0.328632,0.21771 -0.29102,0.0938 -0.393834,-0.14796 -0.102845,-0.24152 -0.01062,-0.79959 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.35658139" id="path1709" inkscape:connector-curvature="0" /> <path - d="m 18.344702,293.59556 v 0.43822 h 0.522277 v 0.19706 h -0.522277 v 0.83784 q 0,0.18879 0.05099,0.24254 0.05237,0.0537 0.21084,0.0537 h 0.260449 v 0.21222 H 18.60653 q -0.293522,0 -0.405144,-0.10887 -0.111621,-0.11024 -0.111621,-0.39963 V 294.2308 H 17.90373 v -0.19706 h 0.186035 v -0.43822 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" + d="m 19.130634,291.75291 -0.04763,0.54988 0.498955,0.0549 -0.02142,0.24727 -0.498955,-0.0549 -0.09106,1.05132 q -0.02052,0.23689 0.02235,0.30967 0.0442,0.0728 0.195589,0.0895 l 0.24883,0.0268 -0.02307,0.2663 -0.248831,-0.0268 q -0.280419,-0.0306 -0.375224,-0.17902 -0.09466,-0.15001 -0.0632,-0.51313 l 0.09106,-1.05132 -0.177732,-0.0193 0.02142,-0.24727 0.177732,0.0193 0.04763,-0.54988 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.29105982" id="path1711" inkscape:connector-curvature="0" /> <path - d="m 20.508346,294.20141 2.1e-5,0.12482 -1.158332,0.29657 q 0.01648,0.25929 0.156153,0.36223 0.141049,0.1012 0.391609,0.037 0.145134,-0.0376 0.280676,-0.10793 0.136913,-0.0711 0.271081,-0.17758 l 4e-5,0.24133 q -0.135541,0.093 -0.277931,0.15998 -0.14239,0.0669 -0.288893,0.10441 -0.366941,0.094 -0.581938,-0.0673 -0.213628,-0.16169 -0.213688,-0.53061 -6.1e-5,-0.38138 0.202543,-0.65655 0.203972,-0.2769 0.549007,-0.36523 0.309435,-0.0789 0.488832,0.0774 0.180765,0.15485 0.18082,0.50156 z m -0.251942,-0.0103 q -0.0028,-0.2087 -0.116435,-0.30445 -0.112293,-0.0961 -0.298502,-0.0484 -0.210854,0.0537 -0.338169,0.20723 -0.125945,0.15291 -0.145079,0.37694 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" + d="m 21.131835,292.73961 -0.01354,0.15663 -1.138847,0.25089 q -0.01241,0.32708 0.109815,0.47087 0.123754,0.14175 0.370106,0.0874 0.14274,-0.032 0.279874,-0.10605 0.138527,-0.0749 0.278276,-0.19444 l -0.02618,0.30282 q -0.139596,0.10251 -0.282908,0.17165 -0.143304,0.0691 -0.287342,0.10077 -0.360773,0.0795 -0.548642,-0.14537 -0.186518,-0.22525 -0.146482,-0.68818 0.04138,-0.47857 0.264851,-0.80264 0.224958,-0.3261 0.564188,-0.40081 0.304194,-0.0666 0.458595,0.1483 0.155866,0.21322 0.11824,0.64827 z m -0.239573,-0.0394 q 0.02001,-0.26217 -0.07815,-0.39421 -0.09684,-0.13234 -0.279915,-0.092 -0.207275,0.0453 -0.345591,0.22464 -0.13694,0.17868 -0.179568,0.4578 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.29105982" id="path1713" inkscape:connector-curvature="0" /> <path - d="m 21.832517,294.2708 q -0.04272,-0.0248 -0.09371,-0.0358 -0.04961,-0.0124 -0.110243,-0.0124 -0.214974,0 -0.330729,0.14056 -0.114377,0.13918 -0.114377,0.40101 v 0.81304 h -0.254937 v -1.5434 h 0.254937 v 0.23977 q 0.07993,-0.14056 0.208084,-0.20808 0.128157,-0.0689 0.311436,-0.0689 0.02618,0 0.05788,0.004 0.03169,0.003 0.07028,0.01 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" + d="m 22.389345,292.9653 q -0.03811,-0.0356 -0.08563,-0.0548 -0.04604,-0.0208 -0.103972,-0.0271 -0.205372,-0.0226 -0.331239,0.14176 -0.124396,0.16266 -0.15285,0.49121 l -0.08836,1.0202 -0.243565,-0.0262 0.167732,-1.93666 0.243565,0.0262 -0.02606,0.30087 q 0.09163,-0.16801 0.221408,-0.23932 0.129924,-0.0731 0.305019,-0.0539 0.02501,0.003 0.05486,0.0108 0.02996,0.007 0.06605,0.0199 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.29105982" id="path1715" inkscape:connector-curvature="0" /> <path - d="m 21.917438,292.35903 -0.03488,0.23723 q -0.09833,-0.0702 -0.208837,-0.11429 -0.110508,-0.0442 -0.233212,-0.0622 -0.186783,-0.0275 -0.289279,0.016 -0.101136,0.0437 -0.117973,0.15816 -0.01283,0.0873 0.04655,0.14753 0.05959,0.0589 0.254751,0.13358 l 0.08309,0.0317 q 0.258799,0.0966 0.355164,0.21797 0.09793,0.12025 0.07046,0.30705 -0.03127,0.21268 -0.218575,0.31189 -0.185938,0.0994 -0.480428,0.0561 -0.122703,-0.018 -0.252707,-0.0622 -0.128844,-0.0426 -0.269062,-0.11204 l 0.03809,-0.25904 q 0.128445,0.0927 0.258001,0.14937 0.129765,0.0553 0.262013,0.0747 0.17724,0.0261 0.281492,-0.0199 0.104454,-0.0473 0.120693,-0.15775 0.01504,-0.10226 -0.04648,-0.16702 -0.06015,-0.0645 -0.285871,-0.14928 l -0.08424,-0.0333 q -0.225922,-0.0833 -0.314703,-0.19949 -0.08858,-0.11748 -0.06252,-0.29473 0.03167,-0.21541 0.201614,-0.31021 0.169938,-0.0948 0.450794,-0.0535 0.139065,0.0204 0.258757,0.059 0.119693,0.0385 0.217301,0.0946 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" + d="m 22.67824,290.5753 -0.0591,0.29402 q -0.08631,-0.0984 -0.187092,-0.16526 -0.100771,-0.067 -0.21604,-0.10247 -0.175456,-0.054 -0.278103,-0.0102 -0.10137,0.0442 -0.129894,0.1861 -0.02174,0.10821 0.02844,0.19 0.05053,0.0801 0.22886,0.19428 l 0.07594,0.0485 q 0.236747,0.1483 0.315618,0.31069 0.08049,0.16114 0.03394,0.39266 -0.05298,0.26359 -0.242711,0.36848 -0.188439,0.10526 -0.465075,0.0201 -0.115269,-0.0354 -0.234666,-0.1045 -0.118461,-0.0669 -0.244873,-0.16875 l 0.06454,-0.32105 q 0.112636,0.12977 0.230249,0.21443 0.117962,0.083 0.242196,0.12118 0.166491,0.0513 0.271087,0.004 0.104931,-0.0485 0.132449,-0.18531 0.02548,-0.12674 -0.02626,-0.21444 -0.05046,-0.0873 -0.256884,-0.21724 l -0.07686,-0.0506 q -0.206782,-0.12816 -0.278972,-0.28326 -0.07186,-0.15669 -0.0277,-0.37637 0.05366,-0.26698 0.226326,-0.36815 0.172653,-0.10117 0.436481,-0.02 0.13064,0.0401 0.240792,0.10114 0.110166,0.0608 0.197319,0.14146 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.29105982" id="path1717" inkscape:connector-curvature="0" /> <path - d="m 23.75281,292.59831 c -0.08645,0.15984 -0.310959,-0.0317 -0.546114,0.002 -0.163883,0.0136 -0.286821,0.0763 -0.368812,0.1882 -0.08207,0.11097 -0.115323,0.2603 -0.09977,0.44799 0.01555,0.18768 0.07297,0.32995 0.172262,0.42682 0.09921,0.096 0.230762,0.13713 0.394645,0.12355 0.07324,-0.006 0.144777,-0.0216 0.2146,-0.0468 0.07066,-0.0261 0.140065,-0.0618 0.208213,-0.10716 l 0.01935,0.23346 c -0.06777,0.0388 -0.138962,0.0696 -0.213589,0.0923 -0.07371,0.0227 -0.153138,0.0376 -0.238284,0.0446 -0.231635,0.0192 -0.421693,-0.0383 -0.570174,-0.17261 -0.14848,-0.13426 -0.232962,-0.32499 -0.253446,-0.57219 -0.02079,-0.25087 0.03153,-0.45386 0.15695,-0.60898 0.126338,-0.1552 0.309444,-0.24274 0.549319,-0.26262 0.07782,-0.007 0.154496,-0.005 0.230021,0.006 0.07545,0.009 0.411602,0.13108 0.483843,0.15738 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" + d="m 24.405663,291.06767 c -0.09996,0.19152 -0.293631,-0.0723 -0.521953,-0.0545 -0.158043,-1.1e-4 -0.282308,0.0658 -0.372798,0.19755 -0.09046,0.13066 -0.138463,0.31455 -0.144002,0.55169 -0.0055,0.23713 0.03385,0.42166 0.118186,0.5536 0.08435,0.13086 0.205556,0.19623 0.363598,0.19635 0.07063,10e-5 0.140661,-0.012 0.210105,-0.0363 0.07034,-0.0254 0.140528,-0.0629 0.210563,-0.11267 l -0.0069,0.29497 c -0.06896,0.0416 -0.14032,0.0728 -0.214083,0.0935 -0.07289,0.0208 -0.150388,0.0312 -0.232493,0.0311 -0.22338,-2.1e-4 -0.398704,-0.0922 -0.525959,-0.27628 -0.12726,-0.18402 -0.187242,-0.43218 -0.179947,-0.74451 0.0074,-0.31697 0.07945,-0.5662 0.216125,-0.74772 0.137564,-0.18152 0.322009,-0.2722 0.553335,-0.27204 0.0751,-4.1e-4 0.148151,0.009 0.219098,0.0317 0.0711,0.0192 0.37898,0.20756 0.445137,0.24812 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.29105982" id="path1719" inkscape:connector-curvature="0" sodipodi:nodetypes="cccccccccccccccccc" /> <path - d="m 25.018614,294.15331 c -0.322925,0.0369 -0.560556,0.10695 -0.712911,0.21046 -0.152364,0.1035 -0.26206,0.2629 -0.329076,0.4781 -0.05348,0.17155 -0.04966,0.30279 0.01143,0.39373 0.06308,0.089 0.174996,0.12418 0.335714,0.10598 0.221572,-0.0253 0.428408,-0.14007 0.620489,-0.34422 0.194095,-0.20613 0.340205,-0.46672 0.438328,-0.78176 l 0.03345,-0.1076 z m 0.859326,-0.29042 -0.5225,1.67759 -0.399634,0.0454 0.138993,-0.4463 c -0.146847,0.18892 -0.301683,0.33404 -0.46451,0.43533 -0.162271,0.0995 -0.341892,0.16049 -0.538852,0.18299 -0.249106,0.0285 -0.421324,-0.033 -0.516673,-0.18416 -0.09338,-0.15309 -0.09591,-0.37142 -0.0076,-0.65497 0.103022,-0.33078 0.27193,-0.59058 0.506724,-0.7794 0.236244,-0.18899 0.536104,-0.30422 0.89958,-0.34567 l 0.560447,-0.064 0.01464,-0.0471 c 0.06923,-0.22228 0.06183,-0.38687 -0.02219,-0.49376 -0.08203,-0.1088 -0.23238,-0.15075 -0.451042,-0.12579 -0.139039,0.0161 -0.280695,0.0515 -0.425026,0.10674 -0.144306,0.0553 -0.247216,0.029 -0.393955,0.12347 l 0.09638,-0.34521 c 0.167501,-0.0848 0.325212,-0.15172 0.473149,-0.20074 0.148467,-0.0507 0.287872,-0.0834 0.418243,-0.0984 0.351917,-0.0402 0.580402,0.0401 0.685466,0.24088 0.105088,0.20071 0.08785,0.5251 -0.0517,0.97315 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.45028558" + d="m 25.445959,293.15138 c -0.312517,0.0125 -0.547151,0.0755 -0.703953,0.18946 -0.15681,0.11392 -0.278931,0.30245 -0.366342,0.56547 -0.06973,0.20967 -0.08035,0.37475 -0.03187,0.49525 0.05059,0.11828 0.153688,0.17414 0.309207,0.16813 0.21443,-0.009 0.424504,-0.13092 0.630195,-0.36698 0.207831,-0.23833 0.375738,-0.55003 0.503717,-0.93507 l 0.04365,-0.13151 z m 0.852522,-0.27447 -0.681487,2.05034 -0.386726,0.0151 0.181291,-0.54547 c -0.160822,0.22168 -0.324516,0.38756 -0.491082,0.49763 -0.165839,0.10786 -0.344069,0.16559 -0.53468,0.1732 -0.241081,0.01 -0.398927,-0.0855 -0.473591,-0.28516 -0.07257,-0.20187 -0.05126,-0.47611 0.06392,-0.82266 0.134371,-0.40428 0.323972,-0.71259 0.568803,-0.92494 0.246236,-0.21242 0.54523,-0.32562 0.896983,-0.33958 l 0.542379,-0.0216 0.01911,-0.0576 c 0.0903,-0.27167 0.101113,-0.47897 0.03246,-0.62188 -0.06654,-0.14511 -0.205622,-0.21349 -0.417233,-0.20506 -0.134581,0.006 -0.27376,0.0353 -0.41765,0.0894 -0.143873,0.0543 -0.23933,0.0105 -0.389784,0.11369 l 0.129593,-0.42308 c 0.169238,-0.0889 0.327181,-0.15634 0.47384,-0.20236 0.147348,-0.0481 0.284083,-0.0745 0.410263,-0.0797 0.340575,-0.0136 0.550131,0.11107 0.628684,0.37402 0.07858,0.26285 0.02686,0.66808 -0.155151,1.21569 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.49534509" id="path1721" inkscape:connector-curvature="0" sodipodi:nodetypes="ccccccccccccccccccccccccccccccc" /> <path - d="m 27.811045,294.03187 q -0.04765,-0.0359 -0.114148,-0.0521 -0.06379,-0.0182 -0.149723,-0.0183 -0.304614,-6.2e-4 -0.541819,0.20246 -0.234523,0.20105 -0.370837,0.57993 l -0.423324,1.17649 -0.361236,-7.4e-4 0.803473,-2.23334 0.361237,7.5e-4 -0.124848,0.34694 q 0.186434,-0.20316 0.403183,-0.30051 0.217505,-0.0995 0.47719,-0.0989 0.0371,8e-5 0.07992,0.006 0.04318,0.005 0.09438,0.0146 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.37900135" + d="m 28.126914,293.2913 q -0.04162,-0.05 -0.103389,-0.0773 -0.05896,-0.0295 -0.141049,-0.0387 -0.290942,-0.0329 -0.539632,0.19734 -0.245901,0.22772 -0.417305,0.68886 l -0.532281,1.43196 -0.345034,-0.0384 1.010313,-2.71829 0.345034,0.0384 -0.156978,0.42227 q 0.200189,-0.2354 0.41784,-0.33487 0.218607,-0.10209 0.466633,-0.0742 0.03543,0.004 0.07571,0.0154 0.0407,0.0112 0.08858,0.0282 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.41692752" id="path1723" inkscape:connector-curvature="0" /> <path - d="m 29.712571,294.7854 -0.06094,0.16877 -1.603439,0.13193 c -0.07023,0.23754 -0.110719,0.28611 -0.02315,0.41121 0.08941,0.12391 0.253311,0.18583 0.491653,0.18595 0.138059,6e-5 0.277401,-0.016 0.418108,-0.0485 0.14201,-0.0325 0.508333,-0.14208 0.659478,-0.20707 l -0.117939,0.32633 c -0.147934,0.0525 -0.514377,0.15339 -0.659762,0.18081 -0.145379,0.0275 -0.287764,0.0411 -0.427099,0.041 -0.349049,-1.8e-4 -0.590562,-0.0978 -0.724584,-0.29298 -0.132697,-0.19514 -0.138963,-0.459 -0.01879,-0.79157 0.12432,-0.34382 0.319099,-0.61634 0.584612,-0.81755 0.267249,-0.20244 0.56498,-0.30358 0.893191,-0.30341 0.29435,1.4e-4 0.493835,0.0916 0.598514,0.27415 0.106411,0.18138 0.103144,0.42835 -0.0098,0.74092 z m -0.322894,-0.1014 c 0.06552,-0.18878 0.06466,-0.33947 -0.0028,-0.45204 -0.06612,-0.1126 -0.187772,-0.16891 -0.364898,-0.16901 -0.200575,-10e-5 -0.381115,0.0543 -0.541512,0.16293 -0.159132,0.1087 -0.116464,0.24257 -0.206093,0.4401 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.36754596" + d="m 29.861651,294.43588 -0.07656,0.20539 -1.546187,-0.002 c -0.09291,0.29071 -0.13687,0.34741 -0.0668,0.51355 0.07195,0.16485 0.221806,0.25971 0.449493,0.2848 0.131883,0.0148 0.266754,0.009 0.404711,-0.017 0.139202,-0.0259 0.501078,-0.12507 0.652538,-0.1908 l -0.148138,0.39714 c -0.147036,0.0504 -0.508081,0.13863 -0.649956,0.15781 -0.141876,0.0193 -0.279382,0.0214 -0.412486,0.007 -0.33344,-0.037 -0.553567,-0.18454 -0.660393,-0.44348 -0.105566,-0.25875 -0.08288,-0.5905 0.06807,-0.99522 0.156134,-0.41842 0.371833,-0.73999 0.647359,-0.96467 0.277318,-0.22604 0.572748,-0.32179 0.886286,-0.28722 0.281199,0.0307 0.461833,0.16663 0.541999,0.40665 0.08195,0.23874 0.05199,0.5483 -0.08989,0.92868 z m -0.297458,-0.16104 c 0.08311,-0.23003 0.09867,-0.4192 0.04645,-0.56751 -0.05093,-0.14821 -0.161032,-0.23161 -0.330238,-0.25027 -0.191612,-0.021 -0.370002,0.0283 -0.535043,0.14776 -0.16384,0.11974 -0.137625,0.29219 -0.244719,0.53066 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.40432581" id="path1725" inkscape:connector-curvature="0" sodipodi:nodetypes="ccccscccsscscscccccsccc" /> </g> <g id="g9547" - transform="matrix(0.44104141,-0.10884571,0.03918652,0.32688517,1.1120098,290.63287)"> + transform="matrix(0.44144057,0.04748421,0.00439757,0.15820627,1.527525,291.79214)"> <g style="display:inline" inkscape:label="Layer 1" @@ -295,10 +275,11 @@ inkscape:connector-curvature="0" /> </g> <path - style="fill:#272727;fill-opacity:1;stroke:#666666;stroke-width:0.31103274;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers" - d="M 0.11756066,196.46386 H 15.784975 v 21.93488 H 0.11756066 Z" + style="fill:#272727;fill-opacity:1;stroke:#d6d6d6;stroke-width:0.29768142;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers" + d="M 0.11091449,196.45721 H 15.651305 l 0.04677,19.5628 -15.58716251,0.70158 z" id="rect1087" - inkscape:connector-curvature="0" /> + inkscape:connector-curvature="0" + sodipodi:nodetypes="ccccc" /> <g aria-label="goly penerator" @@ -373,17 +354,17 @@ doo" id="path4882" inkscape:connector-curvature="0" /> <path - d="m -52.347174,285.06057 -0.970978,-8.30081 h 4.23615 l 2.49314,21.31364 h -4.23615 l -0.269181,-2.30121 q -1.175082,1.36976 -3.145577,2.04095 -1.949075,0.65749 -4.803872,0.65749 -4.673577,0 -7.880031,-2.21903 -3.183433,-2.21903 -3.606434,-5.83523 -0.423,-3.61619 2.241295,-5.83523 2.687317,-2.21902 7.360894,-2.21902 2.854797,0 4.959294,0.67119 2.125915,0.65749 3.62145,2.02726 z m -13.80865,5.3558 q 0.325263,2.78064 2.422,4.36958 2.118155,1.57524 5.479448,1.57524 3.361292,0 5.110923,-1.57524 1.748031,-1.58894 1.422768,-4.36958 -0.325262,-2.78064 -2.443417,-4.35586 -2.119757,-1.58894 -5.481049,-1.58894 -3.361293,0 -5.109322,1.58894 -1.726613,1.57522 -1.401351,4.35586 z" - style="fill:#f3f3f3;fill-opacity:1;stroke-width:0.24056539" + d="m -53.604197,279.74217 -1.18294,-7.94505 h 5.16089 l 3.037385,20.40017 h -5.160889 l -0.327943,-2.20258 q -1.431599,1.31105 -3.832247,1.95348 -2.374553,0.62931 -5.852544,0.62931 -5.693805,0 -9.600219,-2.12392 -3.878367,-2.12393 -4.393708,-5.58515 -0.51534,-3.4612 2.730563,-5.58514 3.273951,-2.12392 8.967756,-2.12392 3.477991,0 6.041894,0.64243 2.589996,0.62931 4.412002,1.94037 z m -16.823039,5.12626 q 0.396267,2.66146 2.950716,4.18231 2.580542,1.50773 6.675596,1.50773 4.095052,0 6.226623,-1.50773 2.129621,-1.52085 1.733354,-4.18231 -0.396266,-2.66146 -2.976808,-4.16918 -2.582494,-1.52083 -6.677547,-1.52083 -4.095053,0 -6.224672,1.52083 -2.103528,1.50772 -1.707262,4.16918 z" + style="fill:#f3f3f3;fill-opacity:1;stroke-width:0.25977531" id="path4884" inkscape:connector-curvature="0" /> <path - d="m -29.459384,284.49897 q -3.407339,0 -5.201414,1.58893 -1.795676,1.57524 -1.47362,4.32847 0.322059,2.75325 2.464837,4.34218 2.164201,1.57524 5.594562,1.57524 3.384314,0 5.178389,-1.58893 1.794076,-1.58894 1.47362,-4.32849 -0.318851,-2.72583 -2.484656,-4.31477 -2.167404,-1.60263 -5.551718,-1.60263 z m -0.249956,-2.13685 q 5.52541,0 8.929457,2.13685 3.404041,2.13683 3.846269,5.9174 0.440627,3.76688 -2.461904,5.91742 -2.904136,2.13684 -8.429546,2.13684 -5.548435,0 -8.952478,-2.13684 -3.382625,-2.15054 -3.823252,-5.91742 -0.442228,-3.78057 2.438887,-5.9174 2.904132,-2.13685 8.452567,-2.13685 z" + d="m -29.459384,277.48073 q -3.407339,0 -5.201414,1.58893 -1.795676,1.57524 -1.47362,4.32847 0.322059,2.75325 2.464837,4.34218 2.164201,1.57524 5.594562,1.57524 3.384314,0 5.178389,-1.58893 1.794076,-1.58894 1.47362,-4.32849 -0.318851,-2.72583 -2.484656,-4.31477 -2.167404,-1.60263 -5.551718,-1.60263 z m -0.249956,-2.13685 q 5.52541,0 8.929457,2.13685 3.404041,2.13683 3.846269,5.9174 0.440627,3.76688 -2.461904,5.91742 -2.904136,2.13684 -8.429546,2.13684 -5.548435,0 -8.952478,-2.13684 -3.382625,-2.15054 -3.823252,-5.91742 -0.442228,-3.78057 2.438887,-5.9174 2.904132,-2.13685 8.452567,-2.13685 z" style="fill:#f3f3f3;fill-opacity:1;stroke-width:0.24056539" id="path4886" inkscape:connector-curvature="0" /> <path - d="m -0.63515339,284.49897 q -3.40733861,0 -5.20141361,1.58893 -1.7956783,1.57524 -1.4736222,4.32847 0.3220584,2.75325 2.4648395,4.34218 2.1642004,1.57524 5.59456161,1.57524 3.38431409,0 5.17838899,-1.58893 1.7940758,-1.58894 1.4736199,-4.32849 -0.318851,-2.72583 -2.4846559,-4.31477 -2.1674042,-1.60263 -5.55171829,-1.60263 z m -0.24995573,-2.13685 q 5.52541052,0 8.92945642,2.13685 3.4040417,2.13683 3.8462697,5.9174 0.440627,3.76688 -2.4619044,5.91742 -2.9041356,2.13684 -8.42954613,2.13684 -5.54843507,0 -8.95247937,-2.13684 -3.3826231,-2.15054 -3.8232501,-5.91742 -0.442228,-3.78057 2.4388848,-5.9174 2.904134,-2.13685 8.45256908,-2.13685 z" + d="m -0.63515339,277.48073 q -3.40733861,0 -5.20141361,1.58893 -1.7956783,1.57524 -1.4736222,4.32847 0.3220584,2.75325 2.4648395,4.34218 2.1642004,1.57524 5.59456161,1.57524 3.38431409,0 5.17838899,-1.58893 1.7940758,-1.58894 1.4736199,-4.32849 -0.318851,-2.72583 -2.4846559,-4.31477 -2.1674042,-1.60263 -5.55171829,-1.60263 z m -0.24995573,-2.13685 q 5.52541052,0 8.92945642,2.13685 3.4040417,2.13683 3.8462697,5.9174 0.440627,3.76688 -2.4619044,5.91742 -2.9041356,2.13684 -8.42954613,2.13684 -5.54843507,0 -8.95247937,-2.13684 -3.3826231,-2.15054 -3.8232501,-5.91742 -0.442228,-3.78057 2.4388848,-5.9174 2.904134,-2.13685 8.45256908,-2.13685 z" style="fill:#f3f3f3;fill-opacity:1;stroke-width:0.24056539" id="path4888" inkscape:connector-curvature="0" /> diff --git a/res/tiny-jack.svg b/res/tiny-jack.svg @@ -0,0 +1,77 @@ +<?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="16" + height="16" + viewBox="0 0 4.2333334 4.2333334" + version="1.1" + id="svg4524" + inkscape:version="0.92.2 5c3e80d, 2017-08-06" + sodipodi:docname="tiny-jack.svg"> + <defs + id="defs4518"> + <inkscape:perspective + sodipodi:type="inkscape:persp3d" + inkscape:vp_x="0 : 100 : 1" + inkscape:vp_y="0 : 1000 : 0" + inkscape:vp_z="200 : 100 : 1" + inkscape:persp3d-origin="100 : 66.666669 : 1" + id="perspective5087" /> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="22.4" + inkscape:cx="13.294017" + inkscape:cy="8.9912468" + inkscape:document-units="mm" + inkscape:current-layer="layer1" + showgrid="false" + inkscape:window-width="1440" + inkscape:window-height="830" + inkscape:window-x="0" + inkscape:window-y="1" + inkscape:window-maximized="1" + units="px" /> + <metadata + id="metadata4521"> + <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(0,-292.76666)"> + <path + style="fill:#eaeaea;fill-opacity:1;stroke:#000000;stroke-width:0.08723263;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + inkscape:transform-center-y="-0.20230449" + d="m 2.1424996,292.95455 -2.01488796,1.46389 0.76961871,2.36866 H 3.387769 l 0.7696188,-2.36866 z" + id="path5105" + inkscape:connector-curvature="0" /> + <path + style="fill:#000000;fill-opacity:1;stroke:#198c73;stroke-width:0.26169786;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 3.3604072,295.19724 a 1.2179075,1.2179075 0 0 0 -1.2179076,-1.21791 1.2179075,1.2179075 0 0 0 -1.21790752,1.21791 1.2179075,1.2179075 0 0 0 1.21790752,1.21791 1.2179075,1.2179075 0 0 0 1.2179076,-1.21791 z" + id="path5129" + inkscape:connector-curvature="0" /> + </g> +</svg> diff --git a/src/Computerscare.hpp b/src/Computerscare.hpp @@ -101,6 +101,23 @@ struct BGPanel : Widget { } }; + +struct InputBlockBackground : TransparentWidget { + InputBlockBackground() { + + } + void draw(const DrawArgs &args) override { + nvgBeginPath(args.vg); + nvgRect(args.vg, box.pos.x, box.pos.y, box.size.x, box.size.y); + nvgStrokeColor(args.vg, COLOR_COMPUTERSCARE_BLUE); + nvgStrokeWidth(args.vg,2.5); + nvgFillColor(args.vg, COLOR_COMPUTERSCARE_LIGHT_GREEN); + nvgFill(args.vg); + Widget::draw(args); + } +}; + + struct IsoButton : SvgSwitch { IsoButton() { addFrame(APP->window->loadSvg(asset::plugin(pluginInstance, "res/computerscare-iso-button-down.svg"))); @@ -251,6 +268,13 @@ struct OutPort : ComputerscareSvgPort { } }; +struct TinyJack : ComputerscareSvgPort { + TinyJack() { + setSvg(APP->window->loadSvg(asset::plugin(pluginInstance, "res/tiny-jack.svg"))); + //background->wrap(); + } +}; + struct PointingUpPentagonPort : ComputerscareSvgPort { PointingUpPentagonPort() { setSvg(APP->window->loadSvg(asset::plugin(pluginInstance, "res/computerscare-pentagon-jack-pointing-up.svg"))); @@ -335,7 +359,7 @@ struct ComputerscareTextField : ui::TextField { NVGcolor color = COLOR_COMPUTERSCARE_LIGHT_GREEN; int fontSize = 16; bool inError = false; - int textColorState=0; + int textColorState = 0; ComputerscareTextField() { font = APP->window->loadFont(asset::system("res/fonts/ShareTechMono-Regular.ttf")); diff --git a/src/ComputerscareHorseADoodleDoo.cpp b/src/ComputerscareHorseADoodleDoo.cpp @@ -12,8 +12,8 @@ struct HorseSequencer { int primes[16] = {30011, 36877, 26627, 32833, 66797, 95153, 66553, 84857, 32377, 79589, 25609, 20113, 70991, 86533, 21499, 32491}; int otherPrimes[16] = {80651, 85237, 11813, 22343, 19543, 28027, 9203, 39521, 42853, 58411, 33811, 76771, 10939, 22721, 17851, 10163}; - 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<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; HorseSequencer(float patt, int steps, float dens) { numSteps = steps; @@ -26,19 +26,28 @@ struct HorseSequencer { std::vector<int> thisOct; newSeq.push_back(1); newSeq.resize(0); - DEBUG("valuu:%f",pattern); + DEBUG("valuu:%f", pattern); for (int i = 0; i < 16; i++) { int dex = ((int)std::floor(pattern * primes[i]) + otherPrimes[i]) % 16; //DEBUG("i:dex:%i",dex); - thisOct=octets[dex]; + thisOct = octets[dex]; //vector1.insert( vector1.end(), vector2.begin(), vector2.end() ); - newSeq.insert(newSeq.end(),thisOct.begin(),thisOct.end()); + newSeq.insert(newSeq.end(), thisOct.begin(), thisOct.end()); //absoluteSequence.push_back(dex < 8 ? 0 : 1); } printVector(newSeq); absoluteSequence = newSeq; } + void change(float patt,int steps,float dens) { + numSteps = steps; + density = dens; + pattern = patt; + currentStep=0; + makeAbsolute(); + DEBUG("changed to %f,%i,%f",pattern,numSteps,density); + printVector(absoluteSequence); + } void tick() { currentStep++; currentStep %= numSteps; @@ -63,8 +72,13 @@ struct ComputerscareHorseADoodleDoo : Module { bool atFirstStepPoly[16] = {false}; enum ParamIds { PATTERN_KNOB, + PATTERN_TRIM, STEPS_KNOB, + STEPS_TRIM, DENSITY_KNOB, + DENSITY_TRIM, + WEIRDNESS_KNOB, + WEIRDNESS_TRIM, NUM_PARAMS }; @@ -80,6 +94,7 @@ struct ComputerscareHorseADoodleDoo : Module { TRIGGER_OUTPUT, EOC_OUTPUT, REST_OUTPUT, + CV_OUTPUT, NUM_OUTPUTS }; enum LightIds { @@ -94,11 +109,17 @@ struct ComputerscareHorseADoodleDoo : Module { rack::dsp::SchmittTrigger resetManualTrigger; float lastPatternKnob = 0.f; - float lastStepsKnob = 0.f; + int lastStepsKnob = 2; float lastDensityKnob = 0.f; + float pendingPattern=0.f; + int pendingNumSteps=8; + float pendingDensity=0.f; + int seqVal = 0.f; + bool changePending=true; + HorseSequencer seq = HorseSequencer(0.f, 8, 0.f); ComputerscareHorseADoodleDoo() { @@ -107,29 +128,48 @@ struct ComputerscareHorseADoodleDoo : Module { configParam(PATTERN_KNOB, 0.f, 10.f, 0.f, "Pattern"); configParam(STEPS_KNOB, 2.f, 64.f, 8.f, "Number of Steps"); - configParam(DENSITY_KNOB, -2.f, 2.f, 0.f, "Density"); + configParam(DENSITY_KNOB, 0.f, 1.f, 0.5f, "Density","%", 0, 100); + + configParam(PATTERN_TRIM, -1.f, 1.f, 0.f, "Pattern CV Trim"); + configParam(STEPS_TRIM, -1.f, 1.f, 0.f, "Steps CV Trim"); + configParam(DENSITY_TRIM, -1.f, 1.f, 0.f, "Density CV Trim"); seq = HorseSequencer(0.f, 8, 0.f); } - void patternKnobChanged(float pattern, int numSteps, float density) { - seq = HorseSequencer(pattern, numSteps, density); + void patternKnobChanged(float newPattern, int newNumSteps, float newDensity) { + //seq = HorseSequencer(pattern, numSteps, density); + //DEBUG("TeeHee pattern:%f,steps:%i,density:%f",newPattern,newNumSteps,newDensity); + pendingPattern=newPattern; + pendingNumSteps=newNumSteps; + pendingDensity=newDensity; + changePending=true; + } + void applyChange() { + //DEBUG("Change time"); + seq.change(pendingPattern,fmax(2,pendingNumSteps),pendingDensity); + changePending=false; } + + void checkKnobChanges() { - float patternKnob = params[PATTERN_KNOB].getValue(); - float stepsKnob = params[STEPS_KNOB].getValue(); - float densityKnob = params[DENSITY_KNOB].getValue(); - if (patternKnob != lastPatternKnob || stepsKnob != lastStepsKnob || densityKnob != lastDensityKnob) { - patternKnobChanged(patternKnob, stepsKnob, densityKnob); - } - lastPatternKnob = patternKnob; - lastStepsKnob = stepsKnob; - lastDensityKnob = densityKnob; + float patternVal = params[PATTERN_KNOB].getValue() + params[PATTERN_TRIM].getValue()*inputs[PATTERN_CV].getVoltage(); + int stepsVal = std::floor(params[STEPS_KNOB].getValue() + params[STEPS_TRIM].getValue()*inputs[STEPS_CV].getVoltage()); + float densityVal = params[DENSITY_KNOB].getValue()+params[DENSITY_TRIM].getValue()*inputs[DENSITY_CV].getVoltage(); + + + if (patternVal != lastPatternKnob || stepsVal != lastStepsKnob || densityVal != lastDensityKnob) { + patternKnobChanged(patternVal, stepsVal, densityVal); + } + lastPatternKnob = patternVal; + lastStepsKnob = stepsVal; + lastDensityKnob = densityVal; } void process(const ProcessArgs &args) override { counter++; - if (counter > 1081) { + if (counter > 601) { + checkKnobChanges(); counter = 0; } @@ -138,14 +178,18 @@ struct ComputerscareHorseADoodleDoo : Module { if (clocked) { seqVal = seq.tickAndGet(); + DEBUG("step after tick:%i",seq.currentStep); for (int ch = 0; ch < numChannels; ch++) { atFirstStepPoly[ch] = (seq.currentStep == 0); } - checkKnobChanges(); + if(atFirstStepPoly[0] && changePending) { + applyChange(); + seqVal=seq.get(); + } } if (inputs[CLOCK_INPUT].isConnected()) { for (int ch = 0; ch < numChannels; ch++) { - outputs[TRIGGER_OUTPUT].setVoltage((clockInputHigh && seqVal == 1/*activePolyStep[i][ch]*/) ? 10.0f : 0.0f, ch); + outputs[TRIGGER_OUTPUT].setVoltage((clockInputHigh && seqVal == 1) ? 10.0f : 0.0f, ch); //outputs[EOC_OUTPUT].setVoltage((currentTriggerIsHigh && atFirstStepPoly[ch]) ? 10.f : 0.0f, ch); } } @@ -158,17 +202,17 @@ struct ComputerscareHorseADoodleDoo : Module { //if (outputs[EOC_OUTPUT].isConnected()) { - for (int ch = 0; ch < numChannels; ch++) { - - if(atFirstStepPoly[ch]) { - - outputs[EOC_OUTPUT].setVoltage((clockInputHigh && atFirstStepPoly[ch]) ? 10.f : 0.0f, ch); - - } - } - //outputs[EOC_OUTPUT].setVoltage((currentTriggerIsHigh && atFirstStepPoly[ch]) ? 10.f : 0.0f, ch); - //} - + for (int ch = 0; ch < numChannels; ch++) { + + if (atFirstStepPoly[ch]) { + + outputs[EOC_OUTPUT].setVoltage((clockInputHigh && atFirstStepPoly[ch]) ? 10.f : 0.0f, ch); + + } + } + //outputs[EOC_OUTPUT].setVoltage((currentTriggerIsHigh && atFirstStepPoly[ch]) ? 10.f : 0.0f, ch); + //} + } @@ -191,39 +235,60 @@ struct ComputerscareHorseADoodleDooWidget : ModuleWidget { addChild(panel); } - float xx; - float yy; -// ParamWidget* stepsKnob = createParam<LrgKnob>(Vec(108, 30), module, ComputerscarePatchSequencer::STEPS_PARAM); + + addInputBlock("Pattern", 0, 100, module, 0, ComputerscareHorseADoodleDoo::PATTERN_CV, 0); + addInputBlock("Length", 0, 150, module, 2, ComputerscareHorseADoodleDoo::STEPS_CV, 1); + addInputBlock("Density", 0, 200, module, 4, ComputerscareHorseADoodleDoo::DENSITY_CV,0); - addInput(createInput<InPort>(Vec(18, 184), module, ComputerscareHorseADoodleDoo::CLOCK_INPUT)); - addInput(createInput<InPort>(Vec(18, 204), module, ComputerscareHorseADoodleDoo::RESET_INPUT)); + int outputY = 254; + int dy = 30; - addLabeledKnob("Pattern", 5, 90, module, 0, -2, 0); - addLabeledKnob("Num Steps", 5, 140, module, 1, 0, 0); - addLabeledKnob("Density", 10, 250, module, 2, 0, 0); + int outputX = 32; + addInput(createInput<InPort>(Vec(2, outputY), module, ComputerscareHorseADoodleDoo::CLOCK_INPUT)); + addInput(createInput<InPort>(Vec(2, outputY + dy), module, ComputerscareHorseADoodleDoo::RESET_INPUT)); - addOutput(createOutput<PointingUpPentagonPort>(Vec(38, 194), module, ComputerscareHorseADoodleDoo::TRIGGER_OUTPUT)); - addOutput(createOutput<PointingUpPentagonPort>(Vec(38, 224), module, ComputerscareHorseADoodleDoo::EOC_OUTPUT)); - addOutput(createOutput<PointingUpPentagonPort>(Vec(38, 254), module, ComputerscareHorseADoodleDoo::REST_OUTPUT)); + + + addOutput(createOutput<PointingUpPentagonPort>(Vec(outputX, outputY), module, ComputerscareHorseADoodleDoo::TRIGGER_OUTPUT)); + addOutput(createOutput<PointingUpPentagonPort>(Vec(outputX, outputY + dy), module, ComputerscareHorseADoodleDoo::EOC_OUTPUT)); + addOutput(createOutput<PointingUpPentagonPort>(Vec(outputX, outputY + dy * 2), module, ComputerscareHorseADoodleDoo::REST_OUTPUT)); } - void addLabeledKnob(std::string label, int x, int y, ComputerscareHorseADoodleDoo *module, int index, float labelDx, float labelDy) { + + + void addInputBlock(std::string label, int x, int y, ComputerscareHorseADoodleDoo *module, int knobIndex, int inputIndex, int knobType) { + + background = new InputBlockBackground(); + background->box.pos = Vec(0, y / 2 - 9); + background->box.size = Vec(60, 45); + + addChild(background); smallLetterDisplay = new SmallLetterDisplay(); smallLetterDisplay->box.size = Vec(5, 10); smallLetterDisplay->fontSize = 21; smallLetterDisplay->value = label; smallLetterDisplay->textAlign = 1; + if (knobType == 0) { + addParam(createParam<SmoothKnob>(Vec(x, y), module, knobIndex)); + } + else if (knobType == 1) { + addParam(createParam<MediumDotSnapKnob>(Vec(x, y), module, knobIndex)); + } + + //trim knob + addParam(createParam<SmallKnob>(Vec(x+30, y), module, knobIndex+1)); + addInput(createInput<TinyJack>(Vec(x+40,y),module,inputIndex)); - addParam(createParam<SmoothKnob>(Vec(x, y), module, index)); - smallLetterDisplay->box.pos = Vec(x + labelDx, y - 12 + labelDy); + smallLetterDisplay->box.pos = Vec(x, y - 12); addChild(smallLetterDisplay); } + InputBlockBackground* background; SmallLetterDisplay* smallLetterDisplay; };