diff --git a/examples/gain.pd b/examples/gain.pd index c767189..88567c1 100644 --- a/examples/gain.pd +++ b/examples/gain.pd @@ -1,52 +1,52 @@ -#N canvas 860 318 890 742 12; -#X obj 143 30 adc~ 1 2 3 4 5 6, f 47; -#X obj 144 261 dac~ 1 2 3 4 5 6, f 47; -#X obj 143 98 *~ 1; -#X obj 208 98 *~ 1; -#X obj 272 98 *~ 1; -#X obj 338 98 *~ 1; -#X obj 402 98 *~ 1; -#X obj 468 98 *~ 1; +#N canvas 837 209 813 659 12; +#X obj 104 30 adc~ 1 2 3 4 5 6, f 47; +#X obj 105 261 dac~ 1 2 3 4 5 6, f 47; +#X obj 104 98 *~ 1; +#X obj 169 98 *~ 1; +#X obj 233 98 *~ 1; +#X obj 299 98 *~ 1; +#X obj 363 98 *~ 1; +#X obj 429 98 *~ 1; #X msg 171 365 L3 \$1 0 0; #X msg 247 365 L4 \$1 0 0; #X msg 397 365 L6 \$1 0 0; #X msg 21 365 L1 \$1 0 0; #X msg 96 365 L2 \$1 0 0; #X msg 322 365 L5 \$1 0 0; -#X obj 144 229 *~ 1; -#X obj 209 228 *~ 1; -#X obj 273 228 *~ 1; -#X obj 339 228 *~ 1; -#X obj 403 228 *~ 1; -#X obj 469 228 *~ 1; +#X obj 105 229 *~ 1; +#X obj 170 228 *~ 1; +#X obj 234 228 *~ 1; +#X obj 300 228 *~ 1; +#X obj 364 228 *~ 1; +#X obj 430 228 *~ 1; #X msg 21 521 S1 \$1 0 0; #X msg 96 522 S2 \$1 0 0; #X msg 171 522 S3 \$1 0 0; #X msg 247 523 S4 \$1 0 0; #X msg 322 523 S5 \$1 0 0; #X msg 397 523 S6 \$1 0 0; -#X obj 168 70 route K1 K2 K3 K4 K5 K6, f 56; -#X obj 169 169 route S1 S2 S3 S4 S5 S6, f 56; -#X obj 169 198 == 0; -#X obj 234 198 == 0; -#X obj 298 198 == 0; -#X obj 364 198 == 0; -#X obj 428 198 == 0; -#X obj 494 198 == 0; +#X obj 129 70 route K1 K2 K3 K4 K5 K6, f 56; +#X obj 130 169 route S1 S2 S3 S4 S5 S6, f 56; +#X obj 130 198 == 0; +#X obj 195 198 == 0; +#X obj 259 198 == 0; +#X obj 325 198 == 0; +#X obj 389 198 == 0; +#X obj 455 198 == 0; #X obj 21 336 route K1 K2 K3 K4 K5 K6, f 65; #X obj 21 492 route S1 S2 S3 S4 S5 S6, f 65; -#X text 598 52 Usually we'd interpolate here with line~ but VCVRack -is already sending one message persample so there seems hardly a point -to complicate this example., f 38; -#X text 600 368 Just using the red channels in the RGB triplet for +#X text 541 368 Just using the red channels in the RGB triplet for the LED., f 35; -#X text 601 492 Same for the switch., f 35; -#X obj 20 30 r fromPrototype; -#X obj 19 134 r fromPrototype; -#X obj 20 307 r fromPrototype; -#X obj 21 463 r fromPrototype; -#X obj 21 569 print toPrototype; -#X obj 21 422 print toPrototype; +#X text 542 492 Same for the switch., f 35; +#X obj 21 569 print toRack; +#X obj 20 30 r fromRack; +#X obj 19 134 r fromRack; +#X obj 21 307 r fromRack; +#X obj 21 422 print toRack; +#X obj 21 463 r fromRack; +#X text 539 52 Usually we'd interpolate here with line~ but VCVRack +is already sending one message per sample so there seems hardly a point +to complicate this example., f 38; #X connect 0 0 2 0; #X connect 0 1 3 0; #X connect 0 2 4 0; @@ -59,24 +59,24 @@ the LED., f 35; #X connect 5 0 17 0; #X connect 6 0 18 0; #X connect 7 0 19 0; -#X connect 8 0 44 0; -#X connect 9 0 44 0; -#X connect 10 0 44 0; -#X connect 11 0 44 0; -#X connect 12 0 44 0; -#X connect 13 0 44 0; +#X connect 8 0 42 0; +#X connect 9 0 42 0; +#X connect 10 0 42 0; +#X connect 11 0 42 0; +#X connect 12 0 42 0; +#X connect 13 0 42 0; #X connect 14 0 1 0; #X connect 15 0 1 1; #X connect 16 0 1 2; #X connect 17 0 1 3; #X connect 18 0 1 4; #X connect 19 0 1 5; -#X connect 20 0 43 0; -#X connect 21 0 43 0; -#X connect 22 0 43 0; -#X connect 23 0 43 0; -#X connect 24 0 43 0; -#X connect 25 0 43 0; +#X connect 20 0 38 0; +#X connect 21 0 38 0; +#X connect 22 0 38 0; +#X connect 23 0 38 0; +#X connect 24 0 38 0; +#X connect 25 0 38 0; #X connect 26 0 2 1; #X connect 26 1 3 1; #X connect 26 2 4 1; @@ -110,4 +110,4 @@ the LED., f 35; #X connect 39 0 26 0; #X connect 40 0 27 0; #X connect 41 0 34 0; -#X connect 42 0 35 0; +#X connect 43 0 35 0; diff --git a/examples/rainbow.pd b/examples/rainbow.pd index 9f7c72a..a46f161 100644 --- a/examples/rainbow.pd +++ b/examples/rainbow.pd @@ -971,8 +971,6 @@ #X obj 316 559 +~ 1; #X obj 413 560 +~ 1; #X obj 508 560 +~ 1; -#X text 608 326 This should be an abstraction \, but to keep the example -directory tidy it here is duplicated code., f 28; #X msg 30 118 100 \, 0 2000; #X obj 30 590 *~ 5; #X obj 125 589 *~ 5; @@ -982,10 +980,12 @@ directory tidy it here is duplicated code., f 28; #X obj 508 588 *~ 5; #X obj 251 17 loadbang; #X msg 251 41 display Hello world!; -#X obj 251 66 print toPrototype; -#X obj 29 478 print toPrototype; +#X text 608 326 This should be an abstraction \, but to keep the example +directory tidy it is duplicated code here (subpatches)., f 28; +#X obj 29 478 print toRack; +#X obj 251 66 print toRack; #X connect 0 0 25 0; -#X connect 1 0 88 0; +#X connect 1 0 87 0; #X connect 2 0 3 0; #X connect 3 0 5 0; #X connect 4 0 0 0; @@ -996,18 +996,18 @@ directory tidy it here is duplicated code., f 28; #X connect 9 0 28 0; #X connect 10 0 29 0; #X connect 11 0 30 0; -#X connect 12 0 88 0; -#X connect 13 0 88 0; -#X connect 14 0 88 0; -#X connect 15 0 88 0; -#X connect 16 0 88 0; -#X connect 17 0 78 0; -#X connect 18 0 88 0; -#X connect 19 0 88 0; -#X connect 20 0 88 0; -#X connect 21 0 88 0; -#X connect 22 0 88 0; -#X connect 23 0 88 0; +#X connect 12 0 87 0; +#X connect 13 0 87 0; +#X connect 14 0 87 0; +#X connect 15 0 87 0; +#X connect 16 0 87 0; +#X connect 17 0 77 0; +#X connect 18 0 87 0; +#X connect 19 0 87 0; +#X connect 20 0 87 0; +#X connect 21 0 87 0; +#X connect 22 0 87 0; +#X connect 23 0 87 0; #X connect 25 0 1 0; #X connect 25 1 18 0; #X connect 26 0 12 0; @@ -1064,19 +1064,19 @@ directory tidy it here is duplicated code., f 28; #X connect 67 0 74 0; #X connect 68 0 75 0; #X connect 69 0 76 0; -#X connect 70 0 79 0; +#X connect 70 0 78 0; #X connect 71 0 70 0; -#X connect 72 0 80 0; -#X connect 73 0 81 0; -#X connect 74 0 82 0; -#X connect 75 0 83 0; -#X connect 76 0 84 0; -#X connect 78 0 6 0; -#X connect 79 0 24 0; -#X connect 80 0 24 1; -#X connect 81 0 24 2; -#X connect 82 0 24 3; -#X connect 83 0 24 4; -#X connect 84 0 24 5; -#X connect 85 0 86 0; -#X connect 86 0 87 0; +#X connect 72 0 79 0; +#X connect 73 0 80 0; +#X connect 74 0 81 0; +#X connect 75 0 82 0; +#X connect 76 0 83 0; +#X connect 77 0 6 0; +#X connect 78 0 24 0; +#X connect 79 0 24 1; +#X connect 80 0 24 2; +#X connect 81 0 24 3; +#X connect 82 0 24 4; +#X connect 83 0 24 5; +#X connect 84 0 85 0; +#X connect 85 0 88 0; diff --git a/examples/template.pd b/examples/template.pd index 321b67d..c749047 100644 --- a/examples/template.pd +++ b/examples/template.pd @@ -1,44 +1,37 @@ -#N canvas 2149 174 821 731 12; -#X obj 32 448 dac~ 1 2 3 4 5 6; +#N canvas 589 332 483 581 12; +#X obj 32 525 dac~ 1 2 3 4 5 6; #X obj 32 401 adc~ 1 2 3 4 5 6; #X obj 36 62 route K1 K2 K3 K4 K5 K6; #X obj 194 106 route S1 S2 S3 S4 S5 S6; #X text 214 60 knobs; #X text 369 104 buttons; -#X msg 134 333 display this text will print; -#X msg 32 227 K1 \$1; -#X obj 35 166 hsl 128 15 0 1 0 0 empty empty empty -2 -8 0 10 -262144 +#X msg 54 333 display this text will print; +#X msg 32 259 L1 \$1 \$2 \$3; +#X obj 32 230 pack f f f; +#X obj 47 202 t b f; +#X obj 89 203 t b f; +#X obj 32 123 vsl 15 50 0 1 0 0 empty empty empty 0 -9 0 10 -258113 -1 -1 0 1; -#X msg 102 226 S1 \$1; -#X obj 102 198 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 -1; -#X msg 132 297 L1 \$1 \$2 \$3; -#X obj 188 268 pack f f f; -#X obj 211 240 t b f; -#X obj 253 241 t b f; -#X obj 201 161 vsl 15 50 0 1 0 0 empty empty empty 0 -9 0 10 -258113 --1 -1 2450 1; -#X obj 216 161 vsl 15 50 0 1 0 0 empty empty empty 0 -9 0 10 -4034 --1 -1 0 1; -#X obj 231 161 vsl 15 50 0 1 0 0 empty empty empty 0 -9 0 10 -4160 --1 -1 4410 1; -#X obj 32 367 print toPrototype; -#X obj 36 25 r fromPrototype; -#X text 158 401 audio from VCV Prototype; -#X text 158 448 audio to VCV Prototype; +#X obj 47 123 vsl 15 50 0 1 0 0 empty empty empty 0 -9 0 10 -4034 -1 +-1 0 1; +#X obj 62 123 vsl 15 50 0 1 0 0 empty empty empty 0 -9 0 10 -4160 -1 +-1 0 1; +#X obj 36 25 r fromRack; +#X obj 32 367 print toRack; +#X text 263 332 to the display; +#X text 121 25 receiving control data from VCV Prototype module; +#X text 129 368 sending control data from VCV Prototype module; +#X text 158 401 receiving audio from VCV Prototype module; +#X text 158 525 sending audio to VCV Prototype module; #X connect 2 6 3 0; -#X connect 6 0 18 0; -#X connect 7 0 18 0; +#X connect 6 0 15 0; +#X connect 7 0 15 0; #X connect 8 0 7 0; -#X connect 9 0 18 0; -#X connect 10 0 9 0; -#X connect 11 0 18 0; -#X connect 12 0 11 0; -#X connect 13 0 12 0; -#X connect 13 1 12 1; -#X connect 14 0 12 0; -#X connect 14 1 12 2; -#X connect 15 0 12 0; -#X connect 16 0 13 0; -#X connect 17 0 14 0; -#X connect 19 0 2 0; +#X connect 9 0 8 0; +#X connect 9 1 8 1; +#X connect 10 0 8 0; +#X connect 10 1 8 2; +#X connect 11 0 8 0; +#X connect 12 0 9 0; +#X connect 13 0 10 0; +#X connect 14 0 2 0; diff --git a/examples/vco.pd b/examples/vco.pd index 3321828..cfb08b3 100644 --- a/examples/vco.pd +++ b/examples/vco.pd @@ -1,5 +1,5 @@ -#N canvas 715 324 439 466 12; -#X obj 69 32 route K1; +#N canvas 150 332 439 466 12; +#X obj 69 34 route K1; #X obj 16 321 osc~; #X msg 101 346 display Freq: \$1 Hz; #X obj 115 112 adc~ 1; @@ -19,9 +19,9 @@ #X obj 16 137 sig~ 2; #X obj 16 370 dac~ 1; #X text 145 162 <--- FM with CV signal from IN1; -#X obj 15 346 *~ 5; -#X obj 69 8 r fromPrototype; -#X obj 101 370 print toPrototype; +#X obj 16 346 *~ 5; +#X obj 69 8 r fromRack; +#X obj 101 370 print toRack; #X connect 0 0 12 0; #X connect 1 0 19 0; #X connect 2 0 21 0; diff --git a/src/LibPDEngine.cpp b/src/LibPDEngine.cpp index 6c23a74..4c838e3 100644 --- a/src/LibPDEngine.cpp +++ b/src/LibPDEngine.cpp @@ -163,7 +163,7 @@ void LibPDEngine::receiveLights(const char* s) { std::string str = std::string(s); std::vector atoms = split(str, ' '); - if (atoms[0] == "toPrototype:") { + if (atoms[0] == "toRack:") { // parse lights list bool light_is_valid = true; int light_idx = -1; @@ -277,14 +277,14 @@ void LibPDEngine::sendKnob(const int idx, const float value) { std::string knob = "K" + std::to_string(idx + 1); libpd_start_message(1); libpd_add_float(value); - libpd_finish_message("fromPrototype", knob.c_str()); + libpd_finish_message("fromRack", knob.c_str()); } void LibPDEngine::sendSwitch(const int idx, const bool value) { std::string sw = "S" + std::to_string(idx + 1); libpd_start_message(1); libpd_add_float(value); - libpd_finish_message("fromPrototype", sw.c_str()); + libpd_finish_message("fromRack", sw.c_str()); } void LibPDEngine::sendInitialStates(const ProcessBlock* block) {