Skip to content

Commit

Permalink
more work on slop~ doc
Browse files Browse the repository at this point in the history
  • Loading branch information
millerpuckette committed Jul 17, 2019
1 parent b0f3da1 commit d8b5069
Show file tree
Hide file tree
Showing 18 changed files with 5,547 additions and 100 deletions.
257 changes: 181 additions & 76 deletions doc/5.reference/slop~-help.pd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#N canvas 124 96 1020 642 12;
#N canvas 322 102 1020 642 12;
#X obj 64 91 osc~;
#N canvas 0 50 450 250 (subpatch) 0;
#X array \$0-graph 1000 float 3;
Expand Down Expand Up @@ -143,7 +143,7 @@
#X floatatom 64 65 5 0 0 0 - - -;
#X obj 63 428 tabwrite~ \$0-graph;
#X obj 89 397 metro 500;
#X obj 89 371 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
#X obj 89 371 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X floatatom 100 139 5 0 10000 0 - - -;
#X floatatom 134 165 5 0 10000 0 - - -;
Expand All @@ -159,7 +159,7 @@
#X obj 73 52 osc~;
#X floatatom 73 26 5 0 0 0 - - -;
#X obj 95 317 metro 500;
#X obj 95 291 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
#X obj 95 291 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X floatatom 344 59 5 0 10000 0 - - -;
#X floatatom 435 62 5 0 0 0 - - -;
Expand Down Expand Up @@ -217,7 +217,7 @@
#X connect 22 0 26 1;
#X connect 26 0 23 0;
#X connect 26 0 24 0;
#X restore 712 325 pd soft-one-sided-clipping;
#X restore 665 273 pd soft-one-sided-clipping;
#X floatatom 170 215 5 0 10000 0 - - -;
#X text 180 165 maximum downward slew of linear region;
#X text 213 205 asymptotic downward cutoff frequency (for downward
Expand All @@ -227,12 +227,11 @@ slews greater than maximum), f 41;
greater than maximum), f 41;
#X floatatom 242 299 5 0 10000 0 - - -;
#X text 105 65 frequency of test oscillator;
#X text 118 114 set state (previous output);
#N canvas 318 167 870 830 soft-two-sided-clipping 0;
#X obj 160 103 osc~;
#X floatatom 160 77 5 0 0 0 - - -;
#X obj 167 513 metro 500;
#X obj 167 487 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
#X obj 167 487 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X floatatom 69 207 5 0 10000 0 - - -;
#X floatatom 411 95 5 0 0 0 - - -;
Expand Down Expand Up @@ -326,10 +325,10 @@ greater than maximum), f 41;
#X connect 36 0 22 0;
#X connect 40 0 15 1;
#X connect 41 0 29 1;
#X restore 713 355 pd soft-two-sided-clipping;
#X restore 666 303 pd soft-two-sided-clipping;
#X obj 493 9 bng 15 250 50 0 \$0-mainlink empty empty 17 7 0 10 -262144
-1 -1;
#N canvas 503 120 524 258 works 1;
#N canvas 503 120 524 258 works 0;
#X text 14 20 this window implements the link button in the main window.
;
#X obj 107 62 r \$0-mainlink;
Expand All @@ -345,11 +344,10 @@ greater than maximum), f 41;
#X connect 6 0 2 0;
#X connect 6 0 3 0;
#X restore 718 417 pd works;
#N canvas 562 99 1114 912 compander-limiter 0;
#N canvas 702 478 1114 912 compander-limiter 0;
#X obj 467 16 bng 15 250 50 0 \$0-compander empty empty 17 7 0 10 -262144
-1 -1;
#X text 491 13 <- open details in web browser;
#X text 32 10 Using slop~ to make a comporessor/limiter/compander;
#N canvas 622 189 450 300 generate-test 0;
#X obj 84 121 osc~ 440;
#X obj 204 124 line~;
Expand All @@ -372,7 +370,7 @@ greater than maximum), f 41;
#X connect 7 0 3 0;
#X connect 7 0 8 0;
#X restore 61 129 pd generate-test;
#X obj 60 154 out1~;
#X obj 60 160 out1~;
#X obj 345 44 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X obj 345 64 metro 500;
Expand Down Expand Up @@ -404,13 +402,11 @@ greater than maximum), f 41;
#X restore 58 723 graph;
#N canvas 0 50 450 250 (subpatch) 0;
#X array \$0-dynamic-curve 102 float 3;
#A 0 50 50.5 51 51.5 52 52.5 53 53.5 54 54.5 55 55.5 56 56.5 57 57.5
58 58.5 59 59.5 60 60.5 61 61.5 62 62.5 63 63.5 64 64.5 65 65.5 66
66.5 67 67.5 68 68.5 69 69.5 70 70.5 71 71.5 72 72.5 73 73.5 74 74.5
75 75.5 76 76.5 77 77.5 78 78.5 79 79.5 80 80.5 81 81.5 82 82.5 83
83.5 84 84.5 85 85.5 86 86.5 87 87.5 88 88.5 89 89.5 90 90.5 91 91.5
92 92.5 93 93.5 94 94.5 95 95.5 96 96.5 97 97.5 98 98.5 99 99.5 100
100;
#A 0 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 85.95 86.8 87.55 88.2
88.75 89.2 89.55 89.8 89.95 90 90 90 90 90 90 90;
#X coords 0 100 102 0 202 200 1 0 0;
#X restore 842 37 graph;
#N canvas 268 10 600 997 parameters 0;
Expand Down Expand Up @@ -540,105 +536,108 @@ greater than maximum), f 41;
#X floatatom 680 358 3 0 200 0 ratio #0-ratio-set #0-ratio;
#X floatatom 680 380 3 0 100 0 thresh #0-thresh-set #0-thresh;
#X floatatom 680 401 3 0 200 0 speed #0-speed-set #0-speed;
#N canvas 16 150 607 690 run-compander 0;
#N canvas 33 150 617 518 run-compander 0;
#X obj 47 56 inlet~;
#X obj 76 124 slop~ 0 0 0 0 1e+09;
#X obj 159 31 r \$0-speed;
#X obj 159 56 f;
#X obj 159 81 / 10;
#X obj 305 150 r \$0-testpulse;
#X obj 261 191 tabwrite~ \$0-slop-out;
#X floatatom 233 107 5 0 0 0 - - -;
#X obj 77 98 abs~;
#X obj 82 124 slop~ 0 0 0 0 1e+09;
#X obj 160 32 r \$0-speed;
#X obj 160 57 f;
#X obj 160 82 / 10;
#X obj 366 145 r \$0-testpulse;
#X obj 380 203 tabwrite~ \$0-slop-out;
#X obj 83 98 abs~;
#X obj 111 252 tabread4~ \$0-dynamic-curve;
#X obj 80 294 -~;
#X obj 80 319 +~ 100;
#X obj 80 344 dbtorms~;
#X obj 75 221 rmstodb~;
#X obj 81 222 rmstodb~;
#X obj 45 384 *~;
#X obj 45 409 outlet~;
#X obj 199 427 tabwrite~ \$0-compander-out;
#X connect 0 0 8 0;
#X connect 0 0 14 0;
#X obj 364 416 tabwrite~ \$0-compander-out;
#X text 227 90 same envelope follower as in the peak meter example
;
#X text 145 288 "correct" the level by applying a gain calculated from
the difference between the measured and desired level, f 27;
#X connect 0 0 7 0;
#X connect 0 0 13 0;
#X connect 1 0 6 0;
#X connect 1 0 13 0;
#X connect 1 0 12 0;
#X connect 2 0 3 0;
#X connect 3 0 4 0;
#X connect 4 0 1 3;
#X connect 4 0 7 0;
#X connect 5 0 6 0;
#X connect 5 0 16 0;
#X connect 8 0 1 0;
#X connect 5 0 15 0;
#X connect 7 0 1 0;
#X connect 8 0 9 0;
#X connect 9 0 10 0;
#X connect 10 0 11 0;
#X connect 11 0 12 0;
#X connect 12 0 14 1;
#X connect 13 0 10 1;
#X connect 13 0 9 0;
#X connect 14 0 15 0;
#X connect 14 0 16 0;
#X connect 11 0 13 1;
#X connect 12 0 9 1;
#X connect 12 0 8 0;
#X connect 13 0 14 0;
#X connect 13 0 15 0;
#X restore 152 156 pd run-compander;
#X msg 607 712 2000;
#X msg 606 686 300;
#X obj 148 204 out1~;
#X msg 854 331 100 0 0 200 100 100;
#X obj 152 200 out1~;
#X msg 856 331 100 0 0 200 100 100;
#X msg 856 304 90 5 0 100 0 50;
#X msg 856 275 100 0 0 100 0 50;
#X text 781 275 no change;
#X text 795 300 limit;
#X text 795 332 expand;
#X text 780 362 compress;
#X text 775 399 noise gate;
#X msg 855 400 100 0 0 200 60 30;
#X text 778 275 no change;
#X text 801 304 limit;
#X text 796 332 expand;
#X text 781 362 compress;
#X text 772 399 noise gate;
#X msg 856 400 100 0 0 200 60 30;
#X msg 856 362 100 0 0 50 100 100;
#X connect 3 0 4 0;
#X connect 3 0 22 0;
#X text 29 10 Using slop~ to make a compressor/expander/limiter;
#X connect 2 0 3 0;
#X connect 2 0 21 0;
#X connect 4 0 5 0;
#X connect 5 0 6 0;
#X connect 6 0 7 0;
#X connect 11 0 10 0;
#X connect 22 0 25 0;
#X connect 23 0 10 0;
#X connect 24 0 10 0;
#X connect 26 0 15 0;
#X connect 27 0 15 0;
#X connect 28 0 15 0;
#X connect 34 0 15 0;
#X connect 35 0 15 0;
#X restore 712 296 pd compander-limiter;
#X connect 10 0 9 0;
#X connect 21 0 24 0;
#X connect 22 0 9 0;
#X connect 23 0 9 0;
#X connect 25 0 14 0;
#X connect 26 0 14 0;
#X connect 27 0 14 0;
#X connect 33 0 14 0;
#X connect 34 0 14 0;
#X restore 665 244 pd compander-limiter;
#X text 553 78 The slop~ object is a low-pass filter whose frequency
response (i.e. \, reaction speed) can vary according to the filter's
state. It can be useful for slew limiting \, dynamics processing (companders/limiters/noise
gates) \, and soft saturation. Examples below are explained in the
HTML documentation (linked above).;
#N canvas 755 56 848 759 slew-limiter 0;
#N canvas 550 104 848 759 slew-limiter 0;
#X floatatom 114 148 5 0 1000 0 - - -;
#X obj 114 172 t f b;
#X obj 165 171 samplerate~;
#X obj 146 201 samplerate~;
#X obj 114 201 /;
#X obj 110 420 metro 500;
#X obj 110 394 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
#X obj 89 406 metro 500;
#X obj 89 380 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X text 135 392 <- start metronome to graph output;
#X obj 84 451 tabwrite~ \$0-slew-graph;
#X text 114 378 <- start metronome to graph output;
#X obj 63 437 tabwrite~ \$0-slew-graph;
#N canvas 0 50 450 250 (subpatch) 0;
#X array \$0-slew-graph 1000 float 2;
#X coords 0 1 1000 -1 500 140 1 0 0;
#X restore 44 558 graph;
#X text 42 7 Using slop~ to make a slew limiter;
#X floatatom 165 236 5 0 1000 0 - - -;
#X obj 165 260 t f b;
#X obj 216 259 samplerate~;
#X obj 165 289 /;
#X obj 61 335 slop~ 1e+09 0 0 0 0;
#X obj 61 98 osc~ 100;
#X floatatom 166 236 5 0 1000 0 - - -;
#X obj 166 260 t f b;
#X obj 198 288 samplerate~;
#X obj 166 289 /;
#X obj 62 327 slop~ 1e+09 0 0 0 0;
#X obj 62 106 osc~ 100;
#X text 386 288 See the HTML documentation (link on main page of this
patch) for details.;
#X text 385 205 Here the maximum slope of the 100-Hz. sinusoid is 200pi
\, about 628.3. Setting upward or downward slew limits below that will
replace the waveform with straight line segments on the way up and/or
down.;
#X text 162 147 max downward slope;
#X text 213 235 max upward slope;
#X text 214 235 max upward slope;
#X text 387 56 The slew limiter is a filter whose cutoff frequency
is infinite (so that the output folows teh input exactly) unless the
input varies from the previous output by more than the highest slope
Expand All @@ -661,11 +660,117 @@ to the units needed by slop~.;
#X connect 13 0 14 4;
#X connect 14 0 7 0;
#X connect 15 0 14 0;
#X restore 713 267 pd slew-limiter;
#X restore 665 192 pd slew-limiter;
#X text 518 6 <- open HTML documentation in web browser;
#X text 725 599 updated for Pd version 0.50.;
#X text 114 369 <- start metronome to graph output;
#X text 530 22 (pd/doc/8.topics/slop-tilde.htm);
#N canvas 204 69 843 697 peak-meter 0;
#X floatatom 189 252 5 0 50 0 - #0-decay-speed-init -;
#N canvas 423 189 450 300 generate-test 0;
#X obj 84 121 osc~ 440;
#X msg 124 86 -0.25;
#X obj 204 149 *~;
#X obj 84 146 *~;
#X obj 84 171 outlet~;
#X obj 101 41 r \$0-meter-testpulse;
#X obj 282 172 setctl \$0-pulse-length;
#X obj 204 124 vline~;
#X obj 204 73 f;
#X obj 268 37 r \$0-pulse-length;
#X msg 205 98 1 \, 0 \$1;
#X obj 318 70 loadbang;
#X obj 300 123 s \$0-pulse-length;
#X msg 294 227 20;
#X obj 294 252 s \$0-decay-speed-init;
#X msg 318 98 30;
#X connect 0 0 3 0;
#X connect 1 0 0 1;
#X connect 2 0 3 1;
#X connect 3 0 4 0;
#X connect 5 0 1 0;
#X connect 5 0 8 0;
#X connect 7 0 2 0;
#X connect 7 0 2 1;
#X connect 8 0 10 0;
#X connect 9 0 8 1;
#X connect 10 0 7 0;
#X connect 11 0 15 0;
#X connect 11 0 13 0;
#X connect 13 0 14 0;
#X connect 15 0 12 0;
#X restore 63 115 pd generate-test;
#X text 42 7 Envelope follower for use in peak metering;
#X text 391 433 See the HTML documentation (link on main page of this
patch) for more details.;
#X obj 193 41 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X obj 193 61 metro 500;
#X obj 193 86 s \$0-meter-testpulse;
#X obj 189 277 / 10;
#X text 232 249 decay speed (10ths of a Hz.), f 16;
#X obj 104 147 out1~;
#X floatatom 121 54 5 1 100 0 pulse-length #0-pulse-length_set #0-pulse-length
;
#X obj 19 354 env~ 1024;
#X obj 63 484 - 88;
#X obj 23 457 moses 1;
#X msg 23 482 -100;
#X obj 24 520 vu 15 120 empty empty -1 -8 0 10 -66577 -1 0 0;
#X obj 110 280 abs~;
#X obj 123 383 metro 22;
#X obj 123 331 loadbang;
#X msg 123 356 1;
#X obj 111 406 snapshot~;
#X obj 111 431 rmstodb;
#X obj 152 485 - 88;
#X obj 112 458 moses 1;
#X msg 112 483 -100;
#X obj 113 521 vu 15 120 empty empty -1 -8 0 10 -66577 -1 0 0;
#X obj 111 306 slop~ 0 0 0 0 1e+09;
#X text 218 37 <- turn on test pulse;
#X text 178 163 <- raise "lvl" to hear;
#X text 398 273 The output is sampled using a snapshot~ object. Both
envelope followers are converted to uits useful for the IEM VU meter
(+12 dB tops \, but zero mapped to -100 so that the bottom "LED" turns
off when the signal hits 0 (100-normed \, Pd-style) dB.;
#X text 398 368 When the pulse is very short (1 msec \, for instance)
the RMS meter acts badly but the slop~-driven one still shows the peak.
;
#X text 401 102 A slew limiter can be used as a fast-rising envelope
follower \, useful for example in peak metering. In this example a
short burst of sound is metered using both the "env" follower (which
measures an average over a time window) and a fast-rising envelope
follower cosisting of an abs~ object (to rectify the signal) followed
by a slop~ object set to rise quickly (1e9 asymptotic rise speed \,
0 up-slew needed to engage it) and with controllable decay (asymptotic
downward speed controlled by a number box). There is no linear region
at all so the linear cutoff frequency has no effect.;
#X connect 0 0 7 0;
#X connect 1 0 9 0;
#X connect 1 0 11 0;
#X connect 1 0 16 0;
#X connect 4 0 5 0;
#X connect 5 0 6 0;
#X connect 7 0 26 3;
#X connect 11 0 13 0;
#X connect 12 0 15 0;
#X connect 13 0 14 0;
#X connect 13 1 12 0;
#X connect 14 0 15 0;
#X connect 16 0 26 0;
#X connect 17 0 20 0;
#X connect 18 0 19 0;
#X connect 19 0 17 0;
#X connect 20 0 21 0;
#X connect 21 0 23 0;
#X connect 22 0 25 0;
#X connect 23 0 24 0;
#X connect 23 1 22 0;
#X connect 24 0 25 0;
#X connect 26 0 20 0;
#X restore 665 217 pd peak-meter;
#X text 118 114 set state (previously stored output);
#X connect 0 0 12 0;
#X connect 2 0 0 0;
#X connect 4 0 3 0;
Expand Down
Binary file added doc/8.topics/slop-compander-patch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/8.topics/slop-peak-meter-graph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/8.topics/slop-peak-meter-patch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/8.topics/slop-slew-limit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/8.topics/slop-slew-limiting-patch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit d8b5069

Please sign in to comment.