aboutsummaryrefslogtreecommitdiff
path: root/instruments/madsr.pd
diff options
context:
space:
mode:
Diffstat (limited to 'instruments/madsr.pd')
-rw-r--r--instruments/madsr.pd70
1 files changed, 70 insertions, 0 deletions
diff --git a/instruments/madsr.pd b/instruments/madsr.pd
new file mode 100644
index 0000000..919197e
--- /dev/null
+++ b/instruments/madsr.pd
@@ -0,0 +1,70 @@
+#N canvas 466 68 634 581 10;
+#X text 52 50 This patch is used as an abstraction in 25.envelope.pd
+;
+#X obj 95 108 inlet;
+#X obj 298 111 inlet;
+#X text 91 79 trigger;
+#X obj 95 138 sel 0;
+#X obj 144 138 t b;
+#X obj 362 112 inlet;
+#X obj 371 422 line~;
+#X obj 410 112 inlet;
+#X obj 459 111 inlet;
+#X obj 504 111 inlet;
+#X msg 95 191 stop;
+#X text 378 86 Traditional A \, D \, S \, R;
+#X text 296 88 level;
+#X text 32 302 ATTACK;
+#X obj 371 449 outlet~;
+#X text 7 325 recall level;
+#X text 7 345 and pack with;
+#X text 8 365 attack time;
+#X text 28 124 if zero;
+#X text 29 141 release;
+#X text 17 183 and cancel;
+#X text 17 199 decay;
+#X text 148 120 bang if attack;
+#X text 183 294 on attack \, set a;
+#X text 147 307 delay to go to sustain;
+#X text 189 324 recall sustain value;
+#X text 185 347 multiply by overall level;
+#X text 220 370 pack with decay time;
+#X text 510 386 on release ramp;
+#X text 511 403 back to zero;
+#X text 63 12 adsr - arguments: level \, attack time \, decay time
+\, sustain level \, release time;
+#X text 17 487 When you send this patch a nonzero trigger it schedules
+a line~ to do an attack and decay \, and if zero \, it starts the release
+ramp.;
+#X text 18 533 Objects such as f and pack can be given dollar sign
+arguments to initialize their contents from adsr's creation arguments.
+Inlets are supplied to update them on the fly.;
+#X obj 104 334 f;
+#X obj 309 301 del;
+#X obj 338 324 f;
+#X obj 364 346 *;
+#X obj 371 369 pack 0 0;
+#X obj 517 360 pack 0 0;
+#X obj 104 359 pack 0 0;
+#X connect 1 0 4 0;
+#X connect 2 0 34 1;
+#X connect 2 0 37 1;
+#X connect 4 0 11 0;
+#X connect 4 0 39 0;
+#X connect 4 1 5 0;
+#X connect 5 0 34 0;
+#X connect 5 0 35 0;
+#X connect 6 0 35 1;
+#X connect 6 0 40 1;
+#X connect 7 0 15 0;
+#X connect 8 0 38 1;
+#X connect 9 0 36 1;
+#X connect 10 0 39 1;
+#X connect 11 0 35 0;
+#X connect 34 0 40 0;
+#X connect 35 0 36 0;
+#X connect 36 0 37 0;
+#X connect 37 0 38 0;
+#X connect 38 0 7 0;
+#X connect 39 0 7 0;
+#X connect 40 0 7 0;