diff options
author | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2011-07-31 03:59:16 +0000 |
---|---|---|
committer | IOhannes m zmölnig <zmoelnig@iem.at> | 2015-10-14 15:23:30 +0200 |
commit | d145fa6f792d6c44da2feec90507adb94e40323e (patch) | |
tree | ae3aaf213dbb4273331745802ef1259dce8e2986 /spigot~ | |
parent | 67af8f6b3f179d5b4ba0747ab971abbeecbedd45 (diff) |
got everything building using the template Makefile
svn path=/trunk/externals/unauthorized/; revision=15173
Diffstat (limited to 'spigot~')
-rw-r--r-- | spigot~/INSTALL | 15 | ||||
-rw-r--r-- | spigot~/spigot~-help.pd | 14 | ||||
-rw-r--r-- | spigot~/spigot~.c | 74 |
3 files changed, 0 insertions, 103 deletions
diff --git a/spigot~/INSTALL b/spigot~/INSTALL deleted file mode 100644 index d8c07c9..0000000 --- a/spigot~/INSTALL +++ /dev/null @@ -1,15 +0,0 @@ -untar in /my/pd/dir/externs - -cd /my/pd/dir/externs/spigot~ - -make clean - -make - -make install - -open help-spigot~.pd - -Thanx for getting here. -Yves/ -comments and bugs @ ydegoyon@free.fr diff --git a/spigot~/spigot~-help.pd b/spigot~/spigot~-help.pd deleted file mode 100644 index eb7f0eb..0000000 --- a/spigot~/spigot~-help.pd +++ /dev/null @@ -1,14 +0,0 @@ -#N canvas 172 55 627 444 10; -#X obj 151 163 dac~; -#X obj 150 127 spigot~; -#X text 232 50 spigot~ sends its signal to its right or left outlet -; -#X text 232 65 according to the state of the toggle; -#X obj 199 101 tgl 15 0 empty empty empty 20 8 0 8 -262144 -1 -1 0 -1; -#X obj 108 74 osc~ 233; -#X text 237 148 bugs and comments @ ydegoyon@free.fr; -#X connect 1 0 0 0; -#X connect 1 1 0 1; -#X connect 4 0 1 1; -#X connect 5 0 1 0; diff --git a/spigot~/spigot~.c b/spigot~/spigot~.c deleted file mode 100644 index fe54152..0000000 --- a/spigot~/spigot~.c +++ /dev/null @@ -1,74 +0,0 @@ -/* spigot~ -- route a signal to its right or left output */ - -/* Copyleft 2001 Yves Degoyon. -Permission is granted to use this software for any purpose provided you -keep this copyright notice intact. - -THE AUTHOR AND HIS EXPLOITERS MAKE NO WARRANTY, EXPRESS OR IMPLIED, -IN CONNECTION WITH THIS SOFTWARE. - -*/ - -#include "m_pd.h" - -typedef struct _spigot -{ - t_object x_obj; - t_int x_on; - t_float x_f; -} t_spigot; - -static t_class *spigot_class; - -static char *spigot_version = "spigot~: a signal router : version 0.1, written by Yves Degoyon (ydegoyon@free.fr)"; - -static void *spigot_new(void) -{ - t_spigot *x = (t_spigot *)pd_new(spigot_class); - x->x_on = 0; - inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("float"), gensym("seton") ); - outlet_new(&x->x_obj, &s_signal); - outlet_new(&x->x_obj, &s_signal); - return (x); -} - -static t_int *spigot_perform(t_int *w) -{ - t_float *in = (t_float *)(w[1]); - t_float *outr = (t_float *)(w[2]); - t_float *outl = (t_float *)(w[3]); - int n = (int)(w[4]); - t_spigot* x = (t_spigot*)(w[5]); - while (n--) { - if ( (x->x_on)==0.0 ) { - *(outl)=0.0; - *(outr)=*(in); - } else { - *(outl)=*(in); - *(outr)=0.0; - } - in++;outl++;outr++; - } - return (w+6); -} - -static void spigot_dsp(t_spigot *x, t_signal **sp) -{ - dsp_add(spigot_perform, 5, sp[0]->s_vec, sp[1]->s_vec, sp[2]->s_vec, - sp[0]->s_n, x); -} - -static void spigot_set(t_spigot *x, t_float f) -{ - x->x_on=f; -} - -void spigot_tilde_setup(void) -{ - post ( spigot_version ); - spigot_class = class_new(gensym("spigot~"), (t_newmethod)spigot_new, 0, - sizeof(t_spigot), 0, 0); - CLASS_MAINSIGNALIN( spigot_class, t_spigot, x_f ); - class_addmethod(spigot_class, (t_method)spigot_dsp, gensym("dsp"), 0); - class_addmethod(spigot_class, (t_method)spigot_set, gensym("seton"), A_FLOAT, 0); -} |