aboutsummaryrefslogtreecommitdiff
path: root/pd/extra/lrshift~
diff options
context:
space:
mode:
authorMiller Puckette <millerpuckette@users.sourceforge.net>2009-05-05 22:00:54 +0000
committerMiller Puckette <millerpuckette@users.sourceforge.net>2009-05-05 22:00:54 +0000
commit739722ebea4f44e25c51526311c7c248208b5702 (patch)
treec6b60b84fbd0dd91b6f62b2a5982840aadac9ad9 /pd/extra/lrshift~
parent35de802c640a4e171092b18e57cb1ac1fc49da12 (diff)
bug fixes for pd 0.42-5
svn path=/trunk/; revision=11236
Diffstat (limited to 'pd/extra/lrshift~')
-rw-r--r--pd/extra/lrshift~/lrshift~-help.pd20
-rw-r--r--pd/extra/lrshift~/lrshift~.c4
2 files changed, 15 insertions, 9 deletions
diff --git a/pd/extra/lrshift~/lrshift~-help.pd b/pd/extra/lrshift~/lrshift~-help.pd
index cdfd8830..fdf7b0c5 100644
--- a/pd/extra/lrshift~/lrshift~-help.pd
+++ b/pd/extra/lrshift~/lrshift~-help.pd
@@ -10,20 +10,24 @@
#X text 243 224 shift right;
#X obj 161 252 lrshift~ 1;
#X obj 244 251 lrshift~ -1;
-#X text 39 37 Acting at whatever vector size the window is running at \, lrshift~ shifts samples to the left (toward the beginning sample) or to the right. The argument gives the direction and the amount of the shift. The rightmost (or leftmost) samples are set to zero.;
-#X graph graph2 0 0 63 1 448 258 648 118;
-#X array shiftin 64 float;
-#X pop;
-#X obj 47 11 rlshift~;
+#X text 39 37 Acting at whatever vector size the window is running
+at \, lrshift~ shifts samples to the left (toward the beginning sample)
+or to the right. The argument gives the direction and the amount of
+the shift. The rightmost (or leftmost) samples are set to zero.;
+#N canvas 0 0 450 300 (subpatch) 0;
+#X array shiftin 64 float 0;
+#X coords 0 1 63 0 200 140 1;
+#X restore 448 118 graph;
#X text 115 11 -- shift signal vector elements left or right;
#X msg 54 138 \; pd dsp 1 \; shiftin 1 1;
#X obj 48 204 tabreceive~ shiftin;
#X text 525 308 Updated for Pd 0.31.;
+#X obj 47 11 lrshift~;
#X connect 0 0 1 0;
#X connect 2 0 3 0;
#X connect 5 0 6 0;
#X connect 9 0 3 0;
#X connect 10 0 1 0;
-#X connect 16 0 6 0;
-#X connect 16 0 9 0;
-#X connect 16 0 10 0;
+#X connect 15 0 6 0;
+#X connect 15 0 9 0;
+#X connect 15 0 10 0;
diff --git a/pd/extra/lrshift~/lrshift~.c b/pd/extra/lrshift~/lrshift~.c
index ba1d5eeb..166facc1 100644
--- a/pd/extra/lrshift~/lrshift~.c
+++ b/pd/extra/lrshift~/lrshift~.c
@@ -8,6 +8,7 @@ typedef struct _lrshift_tilde
{
t_object x_obj;
int x_n;
+ float x_f;
} t_lrshift_tilde;
static t_int *leftshift_perform(t_int *w)
@@ -59,6 +60,7 @@ static void *lrshift_tilde_new(t_floatarg f)
{
t_lrshift_tilde *x = (t_lrshift_tilde *)pd_new(lrshift_tilde_class);
x->x_n = f;
+ x->x_f = 0;
outlet_new(&x->x_obj, gensym("signal"));
return (x);
}
@@ -68,7 +70,7 @@ void lrshift_tilde_setup(void)
lrshift_tilde_class = class_new(gensym("lrshift~"),
(t_newmethod)lrshift_tilde_new, 0, sizeof(t_lrshift_tilde), 0,
A_DEFFLOAT, 0);
- class_addmethod(lrshift_tilde_class, nullfn, gensym("signal"), 0);
+ CLASS_MAINSIGNALIN(lrshift_tilde_class, t_lrshift_tilde, x_f);
class_addmethod(lrshift_tilde_class, (t_method)lrshift_tilde_dsp,
gensym("dsp"), 0);
}