aboutsummaryrefslogtreecommitdiff
path: root/pwm.pd
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2006-01-17 05:06:52 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2006-01-17 05:06:52 +0000
commit111ef5570f28f282675da03c58c43bb89f7acbeb (patch)
tree9bdefdf1c3aa15b95dad5b874df9e4696963c31b /pwm.pd
parent39866a114de08ed8f42e67126d8699ac0d3e70c3 (diff)
some objects used for generating PWM signals within Pd. These were used with a MIDI->relay board to control the speed of a motor.
svn path=/trunk/externals/hcs/; revision=4431
Diffstat (limited to 'pwm.pd')
-rw-r--r--pwm.pd66
1 files changed, 66 insertions, 0 deletions
diff --git a/pwm.pd b/pwm.pd
new file mode 100644
index 0000000..98925a5
--- /dev/null
+++ b/pwm.pd
@@ -0,0 +1,66 @@
+#N canvas 28 81 655 590 10;
+#X msg 331 412 0;
+#X msg 280 413 1;
+#X text 404 362 duty cycle;
+#X obj 307 442 f;
+#X obj 179 31 inlet;
+#X obj 379 32 inlet;
+#X text 219 31 start/stop;
+#X text 422 33 speed (0-1);
+#X obj 349 385 delay;
+#X obj 280 147 select 1;
+#X obj 331 169 bang;
+#X obj 179 106 t f f;
+#X obj 280 233 oneshot;
+#X msg 288 210 clear;
+#X obj 172 333 spigot;
+#X obj 172 291 bang;
+#X obj 515 137 f \$1;
+#X obj 529 225 /;
+#X obj 515 180 t b f;
+#X msg 515 201 1000;
+#X obj 515 109 loadbang;
+#X obj 172 311 delay 100;
+#X obj 379 362 *;
+#X obj 379 89 max 0;
+#X obj 379 67 min 1;
+#X obj 395 337 r \$0-cycle_ms;
+#X obj 529 264 s \$0-cycle_ms;
+#X obj 230 290 r \$0-cycle_ms;
+#X text 27 8 argument = pwm rate in Hz;
+#X obj 515 156 abs;
+#X obj 307 494 outlet;
+#X text 126 533 TODO: needs to have default pwm rate if none is set
+;
+#X connect 0 0 3 0;
+#X connect 1 0 3 0;
+#X connect 1 0 15 0;
+#X connect 3 0 30 0;
+#X connect 4 0 11 0;
+#X connect 5 0 24 0;
+#X connect 8 0 0 0;
+#X connect 9 0 12 0;
+#X connect 9 1 10 0;
+#X connect 10 0 0 0;
+#X connect 10 0 13 0;
+#X connect 11 0 9 0;
+#X connect 11 1 14 1;
+#X connect 12 0 1 0;
+#X connect 12 0 8 0;
+#X connect 13 0 12 0;
+#X connect 14 0 8 0;
+#X connect 14 0 1 0;
+#X connect 15 0 21 0;
+#X connect 16 0 29 0;
+#X connect 17 0 26 0;
+#X connect 18 0 19 0;
+#X connect 18 1 17 1;
+#X connect 19 0 17 0;
+#X connect 20 0 16 0;
+#X connect 21 0 14 0;
+#X connect 22 0 8 1;
+#X connect 23 0 22 0;
+#X connect 24 0 23 0;
+#X connect 25 0 22 1;
+#X connect 27 0 21 1;
+#X connect 29 0 18 0;