Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • jwilkes/purr-data
  • aggraef/purr-data
  • samthursfield/purr-data
  • prakhar/purr-data
  • yadu05/purr-data
  • NegiAkash890/purr-data
  • prateekpardeshi/purr-data
  • Shruti3004/purr-data
  • hidimpu/purr-data
  • Atseosi/purr-data
  • piyushjasaiwal/purr-data
  • deveshprasad/purr-data
  • skm_7/purr-data
  • sankt/purr-data
  • ashim_tom/purr-data
  • dineshsoni02/purr-data
  • chaitanya1-coder/purr-data
  • Nitish0007/purr-data
  • nitin/purr-data
  • shuvam09/purr-data
  • gabrielabittencourt/purr-data
  • sivasai/purr-data
  • flachyjoe/purr-data
  • ishankaler/purr-data
  • prateek/purr-data
  • RukshanJS/purr-data
  • rajatshrm648/purr-data
  • Srashti/purr-data
  • Paarth/purr-data
  • AniruddhaGawali/purr-data
  • brittneyjuliet/purr-data
  • prakharagarwal1/purr-data
  • Shreyanshpaliwalcmsmn/purr-data
  • k_amrut/purr-data
  • AyushAnand/purr-data
  • Va16hav07/purr-data
36 results
Show changes
Showing
with 74 additions and 46 deletions
......@@ -145,9 +145,9 @@ static void junction_dsp(t_junction *x, t_signal **sp)
x->x_ctl.c_norm = norm;
dsp_add(junction_perform, 2, &x->x_ctl, sp[0]->s_n);
dsp_add(junction_perform, 2, &x->x_ctl, (t_int)sp[0]->s_n);
/* dsp_add(junction_perform, 4, &x->x_ctl, sp[0]->s_n, sp[0]->s_vec, sp[1]->s_vec);*/
/* dsp_add(junction_perform, 4, &x->x_ctl, (t_int)sp[0]->s_n, sp[0]->s_vec, sp[1]->s_vec);*/
}
......
......@@ -85,7 +85,7 @@ static t_int *lattice_perform(t_int *w)
static void lattice_dsp(t_lattice *x, t_signal **sp)
{
dsp_add(lattice_perform, 4, &x->x_ctl, sp[0]->s_n,
dsp_add(lattice_perform, 4, &x->x_ctl, (t_int)sp[0]->s_n,
sp[0]->s_vec, sp[1]->s_vec);
}
......
......@@ -149,7 +149,7 @@ static t_int *permut_perform(t_int *w)
static void permut_dsp(t_permut *x, t_signal **sp)
{
permut_resize_table(x, sp[0]->s_n);
dsp_add(permut_perform, 4, &x->x_ctl, sp[0]->s_n, sp[0]->s_vec, sp[1]->s_vec);
dsp_add(permut_perform, 4, &x->x_ctl, (t_int)sp[0]->s_n, sp[0]->s_vec, sp[1]->s_vec);
}
......
......@@ -129,7 +129,7 @@ static void qmult_dsp(t_qmult *x, t_signal **sp)
x->x_ctl.c_output[i] = sp[i+8]->s_vec;
}
dsp_add(qmult_perform, 2, &x->x_ctl, sp[0]->s_n);
dsp_add(qmult_perform, 2, &x->x_ctl, (t_int)sp[0]->s_n);
}
......
......@@ -101,7 +101,7 @@ static void qnorm_dsp(t_qnorm *x, t_signal **sp)
x->x_ctl.c_output[i] = sp[i+4]->s_vec;
}
dsp_add(qnorm_perform, 2, &x->x_ctl, sp[0]->s_n);
dsp_add(qnorm_perform, 2, &x->x_ctl, (t_int)sp[0]->s_n);
}
......
......@@ -75,7 +75,7 @@ static t_int *ramp_perform(t_int *w)
static void ramp_dsp(t_ramp *x, t_signal **sp)
{
dsp_add(ramp_perform, 3, &x->x_ctl, sp[0]->s_n, sp[0]->s_vec);
dsp_add(ramp_perform, 3, &x->x_ctl, (t_int)sp[0]->s_n, sp[0]->s_vec);
}
void ramp_free(void)
......
......@@ -357,7 +357,7 @@ static void resofilt_dsp(t_resofilt *x, t_signal **sp)
dsp_add(x->x_dsp,
6,
&x->x_ctl,
sp[0]->s_n,
(t_int)sp[0]->s_n,
sp[0]->s_vec,
sp[1]->s_vec,
sp[2]->s_vec,
......
......@@ -139,7 +139,8 @@ static t_int *sbosc_tilde_perform(t_int *w)
static void sbosc_tilde_dsp(t_sbosc_tilde *x, t_signal **sp)
{
dsp_add(sbosc_tilde_perform, 6, x,
sp[0]->s_vec, sp[1]->s_vec, sp[2]->s_vec, sp[3]->s_vec, sp[0]->s_n);
sp[0]->s_vec, sp[1]->s_vec, sp[2]->s_vec, sp[3]->s_vec,
(t_int)sp[0]->s_n);
}
......
......@@ -159,7 +159,7 @@ static void scrollgrid1D_dsp(t_scrollgrid1D *x, t_signal **sp)
dsp_add(scrollgrid1D_perform,
9,
&x->x_ctl,
sp[0]->s_n,
(t_int)sp[0]->s_n,
sp[0]->s_vec,
sp[1]->s_vec,
sp[2]->s_vec,
......
......@@ -129,7 +129,7 @@ static void statwav_tilde_dsp(t_statwav_tilde *x, t_signal **sp)
statwav_tilde_set(x, x->x_arrayname);
dsp_add(statwav_tilde_perform, 4, x,
sp[0]->s_vec, sp[1]->s_vec, sp[0]->s_n);
sp[0]->s_vec, sp[1]->s_vec, (t_int)sp[0]->s_n);
}
......
......@@ -276,7 +276,7 @@ static void tabreadmix_tilde_dsp(t_tabreadmix_tilde *x, t_signal **sp)
tabreadmix_tilde_set(x, x->x_arrayname);
dsp_add(tabreadmix_tilde_perform, 4, x,
sp[0]->s_vec, sp[1]->s_vec, sp[0]->s_n);
sp[0]->s_vec, sp[1]->s_vec, (t_int)sp[0]->s_n);
}
......
......@@ -203,7 +203,7 @@ static void xfm_dsp(t_xfm *x, t_signal **sp)
dsp_add(xfm_perform,
8,
&x->x_ctl,
sp[0]->s_n,
(t_int)sp[0]->s_n,
sp[0]->s_vec,
sp[1]->s_vec,
sp[2]->s_vec,
......
......@@ -81,8 +81,8 @@ void ENV_setup(void)
ENV_class = class_new(gensym("ENV"), (t_newmethod)ENV_new, 0,
sizeof(t_ENV), 0, 0);
class_addmethod(ENV_class, (t_method)ENV_RAND_MAX, gensym("RAND_MAX"), 0);
class_addmethod(ENV_class, (t_method)ENV_getenv, gensym("getenv"), A_SYMBOL);
class_addmethod(ENV_class, (t_method)ENV_setenv, gensym("setenv"), A_SYMBOL, A_SYMBOL);
class_addmethod(ENV_class, (t_method)ENV_getenv, gensym("getenv"), A_SYMBOL, 0);
class_addmethod(ENV_class, (t_method)ENV_setenv, gensym("setenv"), A_SYMBOL, A_SYMBOL, 0);
class_addfloat(ENV_class, ENV_float);
}
......@@ -45,6 +45,10 @@ LIBS =
#
#------------------------------------------------------------------------------#
ifeq ($(macos_target),)
macos_target = 10.9
endif
# get library version from meta file
LIBRARY_VERSION = $(shell sed -n 's|^\#X text [0-9][0-9]* [0-9][0-9]* VERSION \(.*\);|\1|p' $(LIBRARY_NAME)-meta.pd)
......@@ -71,7 +75,7 @@ ORIGDIR=pd-$(LIBRARY_NAME)_$(LIBRARY_VERSION)
UNAME := $(shell uname -s)
ifeq ($(UNAME),Darwin)
CPU := $(shell uname -p)
ifeq ($(CPU),arm) # iPhone/iPod Touch
ifeq ($(CPU),arm-iphone) # iPhone/iPod Touch
SOURCES += $(SOURCES_iphoneos)
EXTENSION = pd_darwin
OS = iphoneos
......@@ -96,13 +100,13 @@ ifeq ($(UNAME),Darwin)
OPT_CFLAGS = -ftree-vectorize -ftree-vectorizer-verbose=2 -fast
# build universal 32-bit on 10.4 and 32/64 on newer
ifeq ($(shell uname -r | sed 's|\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*|\1|'), 8)
FAT_FLAGS = -arch ppc -arch i386 -mmacosx-version-min=10.4
FAT_FLAGS = -arch ppc -arch i386 -mmacosx-version-min=$(macos_target)
else
FAT_FLAGS = -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=10.4
FAT_FLAGS = -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=$(macos_target)
SOURCES += $(SOURCES_iphoneos)
endif
CFLAGS += $(FAT_FLAGS) -fPIC -I/sw/include
LDFLAGS += $(FAT_FLAGS) -bundle -undefined dynamic_lookup -L/sw/lib
CFLAGS += $(FAT_FLAGS) -fPIC
LDFLAGS += $(FAT_FLAGS) -bundle -undefined dynamic_lookup
# if the 'pd' binary exists, check the linking against it to aid with stripping
LDFLAGS += $(shell test -e $(PD_PATH)/bin/pd && echo -bundle_loader $(PD_PATH)/bin/pd)
LIBS += -lc
......
......@@ -49,7 +49,7 @@ static void ascwave_open(t_ascwave *x, t_symbol *filename)
post("ascwave: open");
x->filename = filename;
post("ascwave: filename = %s",x->filename->s_name);
if ((x->x_file = fopen(x->filename->s_name,"w")) < 0)
if ((x->x_file = sys_fopen(x->filename->s_name,"w")) < 0)
{
error("can't create %s",filename->s_name);
return;
......
......@@ -23,7 +23,7 @@ typedef struct _counter
t_outlet *t_out2; /* the outlet */
} t_counter;
void counter_bang(t_counter *x)
static void counter_bang(t_counter *x)
{
int sendBang = 0;
switch(x->c_dir)
......@@ -93,23 +93,23 @@ void counter_bang(t_counter *x)
outlet_bang(x->t_out2);
}
void counter_dir(t_counter *x, t_floatarg n)
static void counter_dir(t_counter *x, t_floatarg n)
{
if (n == 1 || n == 2 || n == 3) x->c_dir = (int)n;
else error("bad dir");
}
void counter_high(t_counter *x, t_floatarg n)
static void counter_high(t_counter *x, t_floatarg n)
{
x->c_high = (int)n;
}
void counter_low(t_counter *x, t_floatarg n)
static void counter_low(t_counter *x, t_floatarg n)
{
x->c_low = (int)n;
}
void counter_reset(t_counter *x, t_symbol *s, int argc, t_atom *argv)
static void counter_reset(t_counter *x, t_symbol *s, int argc, t_atom *argv)
{
if (!argc)
{
......@@ -144,7 +144,7 @@ void counter_reset(t_counter *x, t_symbol *s, int argc, t_atom *argv)
outlet_float(x->t_out1, (float)x->c_current);
}
void counter_clear(t_counter *x, t_symbol *s, int argc, t_atom *argv)
static void counter_clear(t_counter *x, t_symbol *s, int argc, t_atom *argv)
{
if (!argc)
{
......@@ -178,7 +178,7 @@ void counter_clear(t_counter *x, t_symbol *s, int argc, t_atom *argv)
}
}
void *counter_new(t_floatarg f, t_floatarg g, t_floatarg h) /* init vals in struc */
static void *counter_new(t_floatarg f, t_floatarg g, t_floatarg h) /* init vals in struc */
{
t_counter *x = (t_counter *)pd_new(counter_class);
x->t_out1 = outlet_new(&x->x_obj, 0);
......
......@@ -30,8 +30,8 @@ typedef struct _split
void split_symbol(t_split *x, t_symbol *s)
{
t_atom* a;
split_anything(x, s, 0, a);
t_atom a;
split_anything(x, s, 0, &a);
}
......
......@@ -35,7 +35,7 @@ static t_int *delta_perform(t_int *w)
static void delta_dsp(t_delta *x, t_signal **sp)
{
dsp_add(delta_perform, 4, x, sp[0]->s_vec, sp[1]->s_vec, sp[0]->s_n);
dsp_add(delta_perform, 4, x, sp[0]->s_vec, sp[1]->s_vec, (t_int)sp[0]->s_n);
}
static void *delta_new(void)
......
......@@ -22,7 +22,7 @@ static int makeseed(void)
return (random1_nextseed & 0x7fffffff);
}
static int rand_random_fl(seed) {
static int rand_random_fl(unsigned int seed) {
int q;
double state;
......
#N canvas 0 31 450 300 10;
#X obj 138 153 hex2dec;
#X floatatom 137 189 5 0 0 0 - - -;
#X msg 139 105 symbol fff;
#X msg 237 123 123;
#X obj 257 194 print;
#X text 136 51 doesn't seem to work;
#N canvas 397 200 494 344 META 0;
#N canvas 3 60 560 479 10;
#X obj 29 413 hex2dec;
#N canvas 334 170 494 344 META 0;
#X text 12 135 HELP_PATCH_AUTHORS Jonathan Wilkes revised the patch
to conform to the PDDP template for Pd version 0.42.;
#X text 12 55 DESCIPTION hexadecimal to decimal conversion;
#X text 12 75 INLET_0 symbol float;
#X text 12 95 OUTLET_0 float symbol;
#X text 12 5 KEYWORDS control conversion symbol_op needs_work (object
doesn't work);
#X text 12 35 LICENSE GPL v2;
#X text 12 115 AUTHOR jdl@xdv.org;
#X restore 394 274 pd META;
#X connect 0 0 1 0;
#X connect 0 0 4 0;
#X connect 2 0 0 0;
#X text 12 5 KEYWORDS control conversion symbol_op;
#X restore 504 454 pd META;
#X text 22 11 treat input as a hex string and convert to float;
#X msg 39 181 symbol ff;
#X msg 65 237 symbol 255;
#X msg 29 145 symbol 0xff \, symbol 0x02;
#X text 28 104 To minimize errors due to Pd's type limitations \, prepend
a "0x" to each hex string like so:;
#X obj 29 448 print;
#X text 187 145 <- "0x" makes everything a symbol atom;
#X msg 57 209 3 \, 3.14;
#X msg 73 279 symbol 0xffffff;
#X floatatom 89 448 14 0 0 0 - - -, f 14;
#X text 107 181 <- Unprefixed hex strings will work...;
#X text 117 209 ... as will floats (truncated to ints)...;
#X text 178 279 <- Also \, try to limit your input to byte-sized hex
strings. Even 32-bit ints won't fit losslessly into single-precision
floating point numbers. (Although they will fit into double-precision
floats.);
#X text 59 39 An incoming symbol message with a valid hex string is
output in decimal notation as a float.;
#X text 137 237 ... but without the "0x" prefix it's too easy to introduce
subtle bugs like this one. So always use the "0x" prefix.;
#X msg 73 361 list ff aa cc;
#X text 165 360 lists may be sent \, too. But be careful-- more than
10 elements will cause memory allocation that is not realtime safe.
;
#X connect 0 0 7 0;
#X connect 0 0 11 0;
#X connect 3 0 0 0;
#X connect 4 0 0 0;
#X connect 5 0 0 0;
#X connect 9 0 0 0;
#X connect 10 0 0 0;
#X connect 17 0 0 0;