From 2005cba607270a0e176d739361cb6327fab061f7 Mon Sep 17 00:00:00 2001 From: "N.N." Date: Wed, 26 Jul 2006 17:01:23 +0000 Subject: fixed coordinates for GOP svn path=/trunk/externals/unauthorized/; revision=5416 --- audience~/CHANGES.LOG | 2 + audience~/Makefile | 2 +- audience~/audience~.c | 4 +- audience~/audience~.tk2c | 69 ++++++++++++++ audience~/help-audience~.pd | 60 ++++++++++++ cooled~/CHANGES.LOG | 2 + cooled~/cooled~.c | 120 +++++++++++------------- exciter/CHANGE.LOG | 5 - exciter/CHANGES.LOG | 11 +++ exciter/exciter.c | 10 +- exciter/exciter.tk2c | 94 +++++++++++++++++++ exciter/help-exciter.pd | 71 ++++++++++++++ exciter/tk2c.bash | 24 +++++ filterbank~/CHANGES.LOG | 2 + filterbank~/Makefile | 2 +- filterbank~/filterbank~.c | 9 +- filterbank~/filterbank~.tk2c | 58 ++++++++++++ filterbank~/help-filterbank~.pd | 199 ++++++++++++++++++++++++++++++++++++++++ filterbank~/tk2c.bash | 24 +++++ grid/CHANGES.LOG | 2 + grid/grid.c | 4 +- pianoroll/CHANGES.LOG | 2 + pianoroll/help-pianoroll.pd | 80 ++++++++++++++++ pianoroll/pianoroll.c | 4 +- pianoroll/pianoroll.tk2c | 131 ++++++++++++++++++++++++++ pianoroll/tk2c.bash | 24 +++++ playlist/CHANGES.LOG | 2 + playlist/playlist.c | 4 +- probalizer/CHANGES.LOG | 2 + probalizer/help-probalizer.pd | 53 +++++++++++ probalizer/probalizer.c | 9 +- probalizer/probalizer.tk2c | 87 ++++++++++++++++++ probalizer/tk2c.bash | 24 +++++ scratcher~/CHANGES.LOG | 2 + scratcher~/help-scratcher~.pd | 7 ++ scratcher~/scratcher~.c | 24 ++--- scratcher~/scratcher~.tk2c | 58 ++++++++++++ scratcher~/tk2c.bash | 24 +++++ scrolllist/CHANGES.LOG | 2 + scrolllist/Makefile | 2 +- scrolllist/help-scrolllist.pd | 6 +- scrolllist/scrolllist.c | 7 +- sonogram~/CHANGES.LOG | 2 + sonogram~/sonogram~.c | 46 +++------- 44 files changed, 1224 insertions(+), 152 deletions(-) create mode 100644 audience~/audience~.tk2c create mode 100644 audience~/help-audience~.pd delete mode 100644 exciter/CHANGE.LOG create mode 100755 exciter/CHANGES.LOG create mode 100755 exciter/exciter.tk2c create mode 100644 exciter/help-exciter.pd create mode 100755 exciter/tk2c.bash create mode 100755 filterbank~/filterbank~.tk2c create mode 100644 filterbank~/help-filterbank~.pd create mode 100755 filterbank~/tk2c.bash create mode 100644 pianoroll/help-pianoroll.pd create mode 100755 pianoroll/pianoroll.tk2c create mode 100755 pianoroll/tk2c.bash create mode 100644 probalizer/help-probalizer.pd create mode 100755 probalizer/probalizer.tk2c create mode 100755 probalizer/tk2c.bash create mode 100644 scratcher~/help-scratcher~.pd create mode 100755 scratcher~/scratcher~.tk2c create mode 100755 scratcher~/tk2c.bash diff --git a/audience~/CHANGES.LOG b/audience~/CHANGES.LOG index 656ec5e..8b7586b 100644 --- a/audience~/CHANGES.LOG +++ b/audience~/CHANGES.LOG @@ -1,3 +1,5 @@ +0.7 + added GOP support 0.6 Adaptattions for pd 0.37 0.5 diff --git a/audience~/Makefile b/audience~/Makefile index d60890d..1a4f9ff 100644 --- a/audience~/Makefile +++ b/audience~/Makefile @@ -62,7 +62,7 @@ pd_linux: $(NAME).pd_linux LINUXCFLAGS = -DPD -DUNIX -DICECAST -O2 -funroll-loops -fomit-frame-pointer \ -Wall -W -Wno-shadow -Wstrict-prototypes -g \ - -Wno-unused -Wno-parentheses -Wno-switch -Werror + -Wno-unused -Wno-parentheses -Wno-switch LINUXINCLUDE = -I../../src diff --git a/audience~/audience~.c b/audience~/audience~.c index 0d17f03..a2ced47 100644 --- a/audience~/audience~.c +++ b/audience~/audience~.c @@ -65,7 +65,7 @@ // a pixel is 0.1 meter #define PIXELSIZE 0.1 -static char *audience_version = "audience : 2d audience simulation, version 0.6 (ydegoyon@free.fr)"; +static char *audience_version = "audience : 2d audience simulation, version 0.7 (ydegoyon@free.fr)"; t_widgetbehavior audience_widgetbehavior; static t_class *audience_class_tilde; @@ -366,7 +366,7 @@ static void audience_save(t_gobj *z, t_binbuf *b) t_int ii; binbuf_addv(b, "ssiisiiiifi", gensym("#X"),gensym("obj"), - (t_int)text_xpix(&x->x_obj, x->x_glist), (t_int)text_ypix(&x->x_obj, x->x_glist), + (t_int)x->x_obj.te_xpix, (t_int)x->x_obj.te_ypix, gensym("audience~"), x->x_width, x->x_height, x->x_nbinputs, x->x_nboutputs, x->x_attenuation, x->x_applydelay ); for ( ii=0; iix_nbinputs; ii++ ) diff --git a/audience~/audience~.tk2c b/audience~/audience~.tk2c new file mode 100644 index 0000000..ea3a7a3 --- /dev/null +++ b/audience~/audience~.tk2c @@ -0,0 +1,69 @@ +// ########### audience procedures -- ydegoyon@free.fr ######### +sys_gui("proc audience_apply {id} {\n"); +// strip "." from the TK id to make a variable name suffix +sys_gui("set vid [string trimleft $id .]\n"); +// for each variable, make a local variable to hold its name... +sys_gui("set var_graph_width [concat graph_width_$vid]\n"); +sys_gui("global $var_graph_width\n"); +sys_gui("set var_graph_height [concat graph_height_$vid]\n"); +sys_gui("global $var_graph_height\n"); +sys_gui("set var_graph_nboutputs [concat graph_nboutputs_$vid]\n"); +sys_gui("global $var_graph_nboutputs\n"); +sys_gui("set cmd [concat $id dialog [eval concat $$var_graph_width] [eval concat $$var_graph_height] [eval concat $$var_graph_nboutputs] \\;]\n"); +// puts stderr $cmd +sys_gui("pd $cmd\n"); +sys_gui("}\n"); +sys_gui("proc audience_cancel {id} {\n"); +sys_gui("set cmd [concat $id cancel \\;]\n"); +// puts stderr $cmd +sys_gui("pd $cmd\n"); +sys_gui("}\n"); +sys_gui("proc audience_ok {id} {\n"); +sys_gui("audience_apply $id\n"); +sys_gui("audience_cancel $id\n"); +sys_gui("}\n"); +sys_gui("proc pdtk_audience_dialog {id width height nboutputs} {\n"); +sys_gui("set vid [string trimleft $id .]\n"); +sys_gui("set var_graph_width [concat graph_width_$vid]\n"); +sys_gui("global $var_graph_width\n"); +sys_gui("set var_graph_height [concat graph_height_$vid]\n"); +sys_gui("global $var_graph_height\n"); +sys_gui("set var_graph_nboutputs [concat graph_nboutputs_$vid]\n"); +sys_gui("global $var_graph_nboutputs\n"); +sys_gui("set $var_graph_width $width\n"); +sys_gui("set $var_graph_height $height\n"); +sys_gui("set $var_graph_nboutputs $nboutputs\n"); +sys_gui("toplevel $id\n"); +sys_gui("wm title $id {audience}\n"); +sys_gui("wm protocol $id WM_DELETE_WINDOW [concat audience_cancel $id]\n"); +sys_gui("label $id.label -text {2$ SPACE PROPERTIES}\n"); +sys_gui("pack $id.label -side top\n"); +sys_gui("frame $id.buttonframe\n"); +sys_gui("pack $id.buttonframe -side bottom -fill x -pady 2m\n"); +sys_gui("button $id.buttonframe.cancel -text {Cancel} -command \"audience_cancel $id\"\n"); +sys_gui("button $id.buttonframe.apply -text {Apply} -command \"audience_apply $id\"\n"); +sys_gui("button $id.buttonframe.ok -text {OK} -command \"audience_ok $id\"\n"); +sys_gui("pack $id.buttonframe.cancel -side left -expand 1\n"); +sys_gui("pack $id.buttonframe.apply -side left -expand 1\n"); +sys_gui("pack $id.buttonframe.ok -side left -expand 1\n"); +sys_gui("frame $id.1rangef\n"); +sys_gui("pack $id.1rangef -side top\n"); +sys_gui("label $id.1rangef.lwidth -text \"Width :\"\n"); +sys_gui("entry $id.1rangef.width -textvariable $var_graph_width -width 7\n"); +sys_gui("pack $id.1rangef.lwidth $id.1rangef.width -side left\n"); +sys_gui("frame $id.2rangef\n"); +sys_gui("pack $id.2rangef -side top\n"); +sys_gui("label $id.2rangef.lheight -text \"Height :\"\n"); +sys_gui("entry $id.2rangef.height -textvariable $var_graph_height -width 7\n"); +sys_gui("pack $id.2rangef.lheight $id.2rangef.height -side left\n"); +sys_gui("frame $id.3rangef\n"); +sys_gui("pack $id.3rangef -side top\n"); +sys_gui("label $id.3rangef.lnboutputs -text \"Nb Listeners :\"\n"); +sys_gui("entry $id.3rangef.nboutputs -textvariable $var_graph_nboutputs -width 7\n"); +sys_gui("pack $id.3rangef.lnboutputs $id.3rangef.nboutputs -side left\n"); +sys_gui("bind $id.1rangef.width [concat audience_ok $id]\n"); +sys_gui("bind $id.2rangef.height [concat audience_ok $id]\n"); +sys_gui("bind $id.3rangef.nboutputs [concat audience_ok $id]\n"); +sys_gui("focus $id.1rangef.width\n"); +sys_gui("}\n"); +// ########### audience procedures END -- ydegoyon@free.fr ######### diff --git a/audience~/help-audience~.pd b/audience~/help-audience~.pd new file mode 100644 index 0000000..ee90caf --- /dev/null +++ b/audience~/help-audience~.pd @@ -0,0 +1,60 @@ +#N canvas 207 7 763 647 10; +#X text 370 378 * Width : graphical x size; +#X text 371 393 * Height : graphical y size; +#X text 358 456 bugs and comments @ ydegoyon@free.fr [-_-]; +#X obj 91 492 *~ 1; +#X obj 177 491 *~ 1; +#X obj 134 458 / 100; +#X floatatom 134 428 5 0 0; +#X floatatom 174 129 5 0 0; +#X floatatom 254 128 5 0 0; +#X floatatom 332 128 5 0 0; +#X floatatom 405 128 5 0 0; +#X text 332 210 audience~ is a moving audience simulation; +#X text 334 236 within a 2d space; +#X text 332 223 Each sound input and each listener can be moved; +#X text 371 407 * Nb Listeners : number of listeners; +#X obj 129 523 dac~; +#X msg 42 89 attenuation 0; +#X msg 42 64 attenuation 0.1; +#X msg 42 40 attenuation 1; +#X obj 406 153 osc~ 10000; +#X text 8 14 Sound attenuation per meter ( default = 0.01 ); +#X text 338 306 Example : audience~ 200 200 4 1 0.01 0; +#X text 339 349 (invoke with Properties ); +#X text 342 339 You can set the following properties :; +#X text 341 527 Note : the number of inputs + outputs is limited to +10; +#X text 341 540 ( can be easily changed in the code ); +#X obj 254 154 osc~ 500; +#X obj 331 154 osc~ 3000; +#X text 337 278 Constructor : audience~ + | audience~; +#X obj 175 155 osc~ 50; +#X obj 70 196 audience~ 200 200 4 2 0.01 0 0 0 193 188 126 118 145 +72 20 182 10 0; +#X msg 165 66 delay 0; +#X msg 165 91 delay 1; +#X text 296 41 ( due to the distance between speaker and listener ) +; +#X text 163 40 Apply delay option; +#X connect 3 0 15 0; +#X connect 4 0 15 1; +#X connect 5 0 3 1; +#X connect 5 0 4 1; +#X connect 6 0 5 0; +#X connect 7 0 29 0; +#X connect 8 0 26 0; +#X connect 9 0 27 0; +#X connect 10 0 19 0; +#X connect 16 0 30 0; +#X connect 17 0 30 0; +#X connect 18 0 30 0; +#X connect 19 0 30 4; +#X connect 26 0 30 2; +#X connect 27 0 30 3; +#X connect 29 0 30 1; +#X connect 30 0 3 0; +#X connect 30 1 4 0; +#X connect 31 0 30 0; +#X connect 32 0 30 0; diff --git a/cooled~/CHANGES.LOG b/cooled~/CHANGES.LOG index d57da95..ce71df0 100644 --- a/cooled~/CHANGES.LOG +++ b/cooled~/CHANGES.LOG @@ -1,3 +1,5 @@ +0.14 + remove GOP support 0.13 added GOP support 0.12 diff --git a/cooled~/cooled~.c b/cooled~/cooled~.c index f0d966b..c79ee1c 100644 --- a/cooled~/cooled~.c +++ b/cooled~/cooled~.c @@ -36,26 +36,16 @@ #include #include #include - -#ifdef __APPLE__ -#include -#else #include -#endif - #include #include -#ifdef _WIN32 -#include -#define usleep(a) _sleep(a/1000) -#else +#ifdef UNIX #include #endif - -#include -#ifndef M_PI +#ifdef NT #define M_PI 3.14159265358979323846 #endif +#include #include "m_pd.h" #include "m_imp.h" @@ -125,12 +115,12 @@ typedef struct _cooled { t_object x_obj; - t_int x_size; /* size of the stored sound */ + int x_size; /* size of the stored sound */ t_float x_readpos; /* data's playing position */ - t_int x_writepos; /* data's recording position */ + int x_writepos; /* data's recording position */ t_float x_readstart; /* data's starting position for reading */ t_float x_readend; /* data's ending position for reading */ - t_int x_play; /* playing on/off flag */ + int x_play; /* playing on/off flag */ t_float x_readspeed; /* speed increment */ t_float x_record; /* flag to start recording process */ t_float x_allocate; /* flag to indicate pending allocation */ @@ -145,25 +135,25 @@ typedef struct _cooled t_float *x_lsemp; /* temporary sample buffer ( left ) */ char* x_gifdata; /* buffer to store graphic data */ char* x_guicommand; /* buffer to store gui command */ - t_int x_draw; /* drawing option */ + int x_draw; /* drawing option */ /* graphical data block */ - t_int x_width; /* graphical width */ - t_int x_height; /* graphical height */ - t_int x_selected; /* flag to remember if we are seleted or not */ - t_int x_erase; /* flag used when an erase is needed */ - t_int x_redraw; /* flag used when drawing is needed */ + int x_width; /* graphical width */ + int x_height; /* graphical height */ + int x_selected; /* flag to remember if we are seleted or not */ + int x_erase; /* flag used when an erase is needed */ + int x_redraw; /* flag used when drawing is needed */ t_glist *x_glist; /* keep graphic context for various operations */ - t_int x_zoom; /* zoom factor */ + int x_zoom; /* zoom factor */ pthread_t x_updatechild; /* thread id for the update child */ - t_int x_updatestart; /* starting position for update */ - t_int x_updateend; /* ending position for update */ - t_int x_xpos; /* stuck x position */ - t_int x_ypos; /* stuck y position */ - t_int x_shifted; /* remember shift state from last click */ - t_int x_alted; /* remember alt state from last click */ - t_int x_xdraw; /* x drawing position */ - t_int x_edraw; /* end of drawing */ + int x_updatestart; /* starting position for update */ + int x_updateend; /* ending position for update */ + int x_xpos; /* stuck x position */ + int x_ypos; /* stuck y position */ + int x_shifted; /* remember shift state from last click */ + int x_alted; /* remember alt state from last click */ + int x_xdraw; /* x drawing position */ + int x_edraw; /* end of drawing */ t_float x_f; /* float needed for signal input */ @@ -171,11 +161,11 @@ typedef struct _cooled /* ------------------------ drawing functions ---------------------------- */ -static void cooled_update_block(t_cooled *x, t_glist *glist, t_int bnumber) +static void cooled_update_block(t_cooled *x, t_glist *glist, int bnumber) { - t_int hi, i=0; + int hi, i=0; t_float fspectrum=0.0; - t_int phase=0; + int phase=0; char color[8]; memset( x->x_gifdata, 0x0, x->x_height*x->x_zoom*sizeof("#FFFFFF ") ); @@ -203,9 +193,9 @@ static void cooled_update_block(t_cooled *x, t_glist *glist, t_int bnumber) // set all points { - t_int fsamp = ( bnumber * x->x_size ) / x->x_width; - t_int lsamp = ( ( bnumber+1) * x->x_size ) / x->x_width; - t_int si; + int fsamp = ( bnumber * x->x_size ) / x->x_width; + int lsamp = ( ( bnumber+1) * x->x_size ) / x->x_width; + int si; // post ( "cooled~ : updating samples [%d,%d]", fsamp, lsamp ); @@ -213,7 +203,7 @@ static void cooled_update_block(t_cooled *x, t_glist *glist, t_int bnumber) { // calculate right channel index { - t_int rind = 3*x->x_height/4 + ( *(x->x_rdata+si) * (x->x_height/4) ) - 1; + int rind = 3*x->x_height/4 + ( *(x->x_rdata+si) * (x->x_height/4) ) - 1; if ( rind > x->x_height - 1 ) rind = x->x_height - 1; if ( rind < x->x_height/2 ) rind = x->x_height/2; @@ -227,7 +217,7 @@ static void cooled_update_block(t_cooled *x, t_glist *glist, t_int bnumber) // calculate left channel index { - t_int lind = x->x_height/4 + ( *(x->x_ldata+si) * (x->x_height/4) ) - 1; + int lind = x->x_height/4 + ( *(x->x_ldata+si) * (x->x_height/4) ) - 1; if ( lind > x->x_height/2 - 1 ) lind = x->x_height/2 - 1; if ( lind < 0 ) lind = 0; @@ -250,10 +240,10 @@ static void cooled_update_block(t_cooled *x, t_glist *glist, t_int bnumber) } -static void cooled_erase_block(t_cooled *x, t_glist *glist, t_int sample ) +static void cooled_erase_block(t_cooled *x, t_glist *glist, int sample ) { t_canvas *canvas=glist_getcanvas(glist); - t_int hi; + int hi; t_float fspectrum=0.0; char fillColor[ 16 ]; @@ -277,8 +267,8 @@ static void *cooled_do_update_part(void *tdata) { t_cooled *x = (t_cooled*) tdata; t_canvas *canvas=glist_getcanvas(x->x_glist); - t_int si; - t_int nbpoints = 0; + int si; + int nbpoints = 0; t_float percentage = 0, opercentage = 0; // loose synchro @@ -342,8 +332,8 @@ static void *cooled_do_update_part(void *tdata) return NULL; } -static void cooled_update_part(t_cooled *x, t_glist *glist, t_int bstart, t_int bend, - t_int erase, t_int redraw, t_int keepframe) +static void cooled_update_part(t_cooled *x, t_glist *glist, int bstart, int bend, + int erase, int redraw, int keepframe) { pthread_attr_t update_child_attr; t_canvas *canvas=glist_getcanvas(x->x_glist); @@ -601,7 +591,7 @@ static void cooled_save(t_gobj *z, t_binbuf *b) t_cooled *x = (t_cooled *)z; binbuf_addv(b, "ssiisiiii", gensym("#X"),gensym("obj"), - (t_int)x->x_xpos, (t_int)x->x_ypos, + (int)x->x_obj.te_xpix, (int)x->x_obj.te_ypix, gensym("cooled~"), x->x_size, x->x_width, x->x_height, x->x_draw ); binbuf_addv(b, ";"); } @@ -638,8 +628,8 @@ static void cooled_delete(t_gobj *z, t_glist *glist) static void cooled_displace(t_gobj *z, t_glist *glist, int dx, int dy) { t_cooled *x = (t_cooled *)z; - t_int xold = x->x_xpos; - t_int yold = x->x_ypos; + int xold = x->x_xpos; + int yold = x->x_ypos; x->x_xpos += dx; x->x_ypos += dy; @@ -665,8 +655,8 @@ static void cooled_motion(t_cooled *x, t_floatarg dx, t_floatarg dy) /* erase data form readstart to readend */ static void cooled_erase( t_cooled *x ) { - t_int startsamp, endsamp, si; - t_int lreadstart = x->x_readstart, lreadend = x->x_readend; + int startsamp, endsamp, si; + int lreadstart = x->x_readstart, lreadend = x->x_readend; if (x->x_allocate) { post( "cooled~ : error : cannot erase while re-allocation" ); @@ -694,8 +684,8 @@ static void cooled_erase( t_cooled *x ) /* paste data form readstart to readend */ static void cooled_paste( t_cooled *x ) { - t_int startsamp, endsamp, si, inssamp, hlimit, csize; - t_int lreadstart = x->x_readstart, lreadend = x->x_readend; + int startsamp, endsamp, si, inssamp, hlimit, csize; + int lreadstart = x->x_readstart, lreadend = x->x_readend; if (x->x_allocate) { post( "cooled~ : error : cannot paste while re-allocation" ); @@ -735,8 +725,8 @@ static void cooled_paste( t_cooled *x ) /* replace data form readstart to readend */ static void cooled_replace( t_cooled *x ) { - t_int startsamp, endsamp, si, inssamp, hlimit, csize; - t_int lreadstart = x->x_readstart, lreadend = x->x_readend; + int startsamp, endsamp, si, inssamp, hlimit, csize; + int lreadstart = x->x_readstart, lreadend = x->x_readend; if (x->x_allocate) { post( "cooled~ : error : cannot replace while re-allocation" ); @@ -838,7 +828,7 @@ static int cooled_click(t_gobj *z, struct _glist *glist, int xpix, int ypix, int shift, int alt, int dbl, int doit) { t_cooled* x = (t_cooled *)z; - t_int pipos; + int pipos; t_canvas *canvas=glist_getcanvas(x->x_glist); // post( "cooled_click : x=%d y=%d doit=%d alt=%d, shift=%d", xpix, ypix, doit, alt, shift ); @@ -924,9 +914,9 @@ static void cooled_free(t_cooled *x) } /* allocate tables for storing sound and temporary copy */ -static t_int cooled_allocate(t_cooled *x) +static int cooled_allocate(t_cooled *x) { - t_int fi; + int fi; if ( !(x->x_rdata = getbytes( x->x_size*sizeof(float) ) ) ) { post( "cooled~ : error : could not allocate buffers" ); @@ -969,9 +959,9 @@ static t_int cooled_allocate(t_cooled *x) } /* allocate tables for storing sound and temporary copy */ -static t_int cooled_reallocate(t_cooled *x, t_int ioldsize, t_int inewsize) +static int cooled_reallocate(t_cooled *x, int ioldsize, int inewsize) { - t_int fi, csize; + int fi, csize; t_float *prdata=x->x_rdata, *pldata=x->x_ldata, *prsemp=x->x_rsemp, *plsemp=x->x_lsemp; if ( !(x->x_rdata = getbytes( inewsize*sizeof(float) ) ) ) { @@ -1039,11 +1029,11 @@ static t_int *cooled_perform(t_int *w) t_float *rin = (t_float *)(w[2]); t_float *rout = (t_float *)(w[3]); t_float *lout = (t_float *)(w[4]); - t_int is; - t_int n = (int)(w[5]); /* number of samples */ - t_int startsamp, endsamp; + int is; + int n = (int)(w[5]); /* number of samples */ + int startsamp, endsamp; t_cooled *x = (t_cooled *)(w[6]); - t_int lreadstart = x->x_readstart, lreadend = x->x_readend; + int lreadstart = x->x_readstart, lreadend = x->x_readend; if ( lreadstart <= lreadend ) { @@ -1121,7 +1111,7 @@ static void cooled_record(t_cooled *x) /* map to stereo */ static void cooled_stereo(t_cooled *x) { - t_int si; + int si; if (x->x_allocate) { post( "cooled~ : error : cannot map to stereo while re-allocation" ); @@ -1226,7 +1216,7 @@ static void cooled_zoom(t_cooled *x, t_floatarg fzoom ) static void cooled_loop(t_cooled *x, t_symbol *soperator ) { char *operator = soperator->s_name; - t_int ci; + int ci; t_float fvalue, freadstart = x->x_readstart, freadend = x->x_readend; if ( (soperator->s_name[0] != '*') && diff --git a/exciter/CHANGE.LOG b/exciter/CHANGE.LOG deleted file mode 100644 index 358d509..0000000 --- a/exciter/CHANGE.LOG +++ /dev/null @@ -1,5 +0,0 @@ -0.2 - fixed : could set event nnumber to one - do not set "started" at initialization -0.1 - basic bang-events sequencer diff --git a/exciter/CHANGES.LOG b/exciter/CHANGES.LOG new file mode 100755 index 0000000..676922d --- /dev/null +++ b/exciter/CHANGES.LOG @@ -0,0 +1,11 @@ +0.5 + fixed coordinates for GOP support +0.4 + added GOP support +0.3 + adapted for pd 0.37 +0.2 + fixed : could set event nnumber to one + do not set "started" at initialization +0.1 + basic bang-events sequencer diff --git a/exciter/exciter.c b/exciter/exciter.c index a8fdeda..798f372 100644 --- a/exciter/exciter.c +++ b/exciter/exciter.c @@ -44,9 +44,8 @@ #include "t_tk.h" #include "exciter.h" -#ifdef _WIN32 +#ifdef NT #include -#include "timeval.h" #else #include #endif @@ -63,7 +62,7 @@ void canvas_startmotion(t_canvas *x); #define EXCITER_PIXEL_GRAIN 5 -static char *exciter_version = "exciter: a bang-events sequencer, version 0.4 (ydegoyon@free.fr)"; +static char *exciter_version = "exciter: a bang-events sequencer, version 0.5 (ydegoyon@free.fr)"; t_widgetbehavior exciter_widgetbehavior; static t_class *exciter_class; @@ -322,7 +321,7 @@ static void exciter_save(t_gobj *z, t_binbuf *b) int ei,gi; binbuf_addv(b, "ssiisiiifii", gensym("#X"),gensym("obj"), - (t_int)text_xpix(&x->x_obj, x->x_glist), (t_int)text_ypix(&x->x_obj, x->x_glist), + (t_int)x->x_obj.te_xpix, (t_int)x->x_obj.te_ypix, gensym("exciter"), x->x_width, x->x_height, x->x_nbevents, x->x_timegrain, x->x_loop, x->x_save @@ -350,8 +349,7 @@ static void exciter_properties(t_gobj *z, t_glist *owner) t_exciter *x=(t_exciter *)z; sprintf(buf, "pdtk_exciter_dialog %%s %d %d %d %.2f %d %d\n", - (int)x->x_width, (int)x->x_height, (int)x->x_nbevents, - x->x_timegrain, x->x_loop, x->x_save ); + x->x_width, x->x_height, x->x_nbevents, x->x_timegrain, x->x_loop, x->x_save ); // post("exciter_properties : %s", buf ); gfxstub_new(&x->x_obj.ob_pd, x, buf); } diff --git a/exciter/exciter.tk2c b/exciter/exciter.tk2c new file mode 100755 index 0000000..e201737 --- /dev/null +++ b/exciter/exciter.tk2c @@ -0,0 +1,94 @@ +// ########### exciter procedures -- ydegoyon@free.fr ######### +sys_gui("proc exciter_apply {id} {\n"); +// strip "." from the TK id to make a variable name suffix +sys_gui("set vid [string trimleft $id .]\n"); +// for each variable, make a local variable to hold its name... +sys_gui("set var_graph_width [concat graph_width_$vid]\n"); +sys_gui("global $var_graph_width\n"); +sys_gui("set var_graph_height [concat graph_height_$vid]\n"); +sys_gui("global $var_graph_height\n"); +sys_gui("set var_graph_nbevents [concat graph_nbevents_$vid]\n"); +sys_gui("global $var_graph_nbevents\n"); +sys_gui("set var_graph_timegrain [concat graph_timegrain_$vid]\n"); +sys_gui("global $var_graph_timegrain\n"); +sys_gui("set var_graph_loop [concat graph_loop_$vid]\n"); +sys_gui("global $var_graph_loop\n"); +sys_gui("set var_graph_save [concat graph_save_$vid]\n"); +sys_gui("global $var_graph_save\n"); +sys_gui("set cmd [concat $id dialog [eval concat $$var_graph_width] [eval concat $$var_graph_height] [eval concat $$var_graph_nbevents] [eval concat $$var_graph_timegrain] [eval concat $$var_graph_loop] [eval concat $$var_graph_save] \\;]\n"); +// puts stderr $cmd +sys_gui("pd $cmd\n"); +sys_gui("}\n"); +sys_gui("proc exciter_cancel {id} {\n"); +sys_gui("set cmd [concat $id cancel \\;]\n"); +// puts stderr $cmd +sys_gui("pd $cmd\n"); +sys_gui("}\n"); +sys_gui("proc exciter_ok {id} {\n"); +sys_gui("exciter_apply $id\n"); +sys_gui("exciter_cancel $id\n"); +sys_gui("}\n"); +sys_gui("proc pdtk_exciter_dialog {id width height nbevents timegrain loop save } {\n"); +sys_gui("set vid [string trimleft $id .]\n"); +sys_gui("set var_graph_width [concat graph_width_$vid]\n"); +sys_gui("global $var_graph_width\n"); +sys_gui("set var_graph_height [concat graph_height_$vid]\n"); +sys_gui("global $var_graph_height\n"); +sys_gui("set var_graph_nbevents [concat graph_nbevents_$vid]\n"); +sys_gui("global $var_graph_nbevents\n"); +sys_gui("set var_graph_timegrain [concat graph_timegrain_$vid]\n"); +sys_gui("global $var_graph_timegrain\n"); +sys_gui("set var_graph_loop [concat graph_loop_$vid]\n"); +sys_gui("global $var_graph_loop\n"); +sys_gui("set var_graph_save [concat graph_save_$vid]\n"); +sys_gui("global $var_graph_save\n"); +sys_gui("set $var_graph_width $width\n"); +sys_gui("set $var_graph_height $height\n"); +sys_gui("set $var_graph_nbevents $nbevents\n"); +sys_gui("set $var_graph_timegrain $timegrain\n"); +sys_gui("set $var_graph_loop $loop\n"); +sys_gui("set $var_graph_save $save\n"); +sys_gui("toplevel $id\n"); +sys_gui("wm title $id {exciter}\n"); +sys_gui("wm protocol $id WM_DELETE_WINDOW [concat exciter_cancel $id]\n"); +sys_gui("label $id.label -text {EXCITER PROPERTIES}\n"); +sys_gui("pack $id.label -side top\n"); +sys_gui("frame $id.buttonframe\n"); +sys_gui("pack $id.buttonframe -side bottom -fill x -pady 2m\n"); +sys_gui("button $id.buttonframe.cancel -text {Cancel} -command \"exciter_cancel $id\"\n"); +sys_gui("button $id.buttonframe.apply -text {Apply} -command \"exciter_apply $id\"\n"); +sys_gui("button $id.buttonframe.ok -text {OK} -command \"exciter_ok $id\"\n"); +sys_gui("pack $id.buttonframe.cancel -side left -expand 1\n"); +sys_gui("pack $id.buttonframe.apply -side left -expand 1\n"); +sys_gui("pack $id.buttonframe.ok -side left -expand 1\n"); +sys_gui("frame $id.1rangef\n"); +sys_gui("pack $id.1rangef -side top\n"); +sys_gui("label $id.1rangef.lwidth -text \"Width :\"\n"); +sys_gui("entry $id.1rangef.width -textvariable $var_graph_width -width 7\n"); +sys_gui("pack $id.1rangef.lwidth $id.1rangef.width -side left\n"); +sys_gui("frame $id.2rangef\n"); +sys_gui("pack $id.2rangef -side top\n"); +sys_gui("label $id.2rangef.lheight -text \"Height :\"\n"); +sys_gui("entry $id.2rangef.height -textvariable $var_graph_height -width 7\n"); +sys_gui("pack $id.2rangef.lheight $id.2rangef.height -side left\n"); +sys_gui("frame $id.3rangef\n"); +sys_gui("pack $id.3rangef -side top\n"); +sys_gui("label $id.3rangef.lnbevents -text \"Nb Events :\"\n"); +sys_gui("entry $id.3rangef.nbevents -textvariable $var_graph_nbevents -width 7\n"); +sys_gui("pack $id.3rangef.lnbevents $id.3rangef.nbevents -side left\n"); +sys_gui("frame $id.4rangef\n"); +sys_gui("pack $id.4rangef -side top\n"); +sys_gui("label $id.4rangef.ltimegrain -text \"Time Grain (seconds) :\"\n"); +sys_gui("entry $id.4rangef.timegrain -textvariable $var_graph_timegrain -width 7\n"); +sys_gui("pack $id.4rangef.ltimegrain $id.4rangef.timegrain -side left\n"); +sys_gui("checkbutton $id.loop -text {Loop} -variable $var_graph_loop -anchor w\n"); +sys_gui("pack $id.loop -side top\n"); +sys_gui("checkbutton $id.save -text {Save contents} -variable $var_graph_save -anchor w\n"); +sys_gui("pack $id.save -side top\n"); +sys_gui("bind $id.1rangef.width [concat exciter_ok $id]\n"); +sys_gui("bind $id.2rangef.height [concat exciter_ok $id]\n"); +sys_gui("bind $id.3rangef.nbevents [concat exciter_ok $id]\n"); +sys_gui("bind $id.4rangef.timegrain [concat exciter_ok $id]\n"); +sys_gui("focus $id.1rangef.width\n"); +sys_gui("}\n"); +// ########### exciter procedures END -- ydegoyon@free.fr ######### diff --git a/exciter/help-exciter.pd b/exciter/help-exciter.pd new file mode 100644 index 0000000..ab60831 --- /dev/null +++ b/exciter/help-exciter.pd @@ -0,0 +1,71 @@ +#N canvas 103 12 970 685 10; +#X text 457 89 (invoke with Properties ); +#X text 458 78 You can set the following properties :; +#X text 478 110 * Width : graphical x size; +#X text 478 121 * Height : graphical y size; +#X text 612 498 bugs and comments @ ydegoyon@free.fr; +#X msg 587 271 \; pd dsp 0; +#X msg 653 271 \; pd dsp 1; +#X obj 32 56 exciter 400 200 16 0.1 1 1 1 14 1 15 3 52 5 30 5 69 6 +8 8 20 9 32 9 74 10 79 11 14 11 74 12 79 13 40 13 79 15 78; +#X text 456 50 Exciter controls a list of bang-events scheduled in +time; +#X obj 22 282 print e1; +#X text 478 132 * Number of events : number of simultaneous events +; +#X text 477 155 * Loop : looping flag; +#X msg 193 29 reset; +#X msg 103 29 pause; +#X msg 31 29 start; +#X msg 145 29 resume; +#X msg 70 29 stop; +#X text 44 363 so that events are triggered; +#X obj 653 249 loadbang; +#X msg 239 30 clear; +#X text 102 389 Note 2 : the event happens in the center (?) of the +polygon; +#X msg 286 30 dump; +#X text 478 144 * Time Grain : time grain betweeen each event; +#X obj 80 283 print e3; +#X obj 137 284 print e5; +#X obj 194 283 print e7; +#X obj 252 284 print e9; +#X obj 308 284 print e11; +#X obj 366 284 print e13; +#X obj 429 285 print e15; +#X obj 45 307 print e2; +#X obj 103 308 print e4; +#X obj 217 308 print e8; +#X obj 275 309 print e10; +#X obj 335 310 print e12; +#X obj 396 309 print e14; +#X obj 457 309 print e16; +#X obj 160 309 print e6; +#X text 523 411 ( 10 ms ) \, it won't be processed properly; +#X text 523 399 WARNING : you can't set time grain below 1 clock tick +; +#X text 46 352 Note 1 : the dsp has to be on; +#X connect 7 0 9 0; +#X connect 7 1 30 0; +#X connect 7 2 23 0; +#X connect 7 3 31 0; +#X connect 7 4 24 0; +#X connect 7 5 37 0; +#X connect 7 6 25 0; +#X connect 7 7 32 0; +#X connect 7 8 26 0; +#X connect 7 9 33 0; +#X connect 7 10 27 0; +#X connect 7 11 34 0; +#X connect 7 12 28 0; +#X connect 7 13 35 0; +#X connect 7 14 29 0; +#X connect 7 15 36 0; +#X connect 12 0 7 0; +#X connect 13 0 7 0; +#X connect 14 0 7 0; +#X connect 15 0 7 0; +#X connect 16 0 7 0; +#X connect 18 0 6 0; +#X connect 19 0 7 0; +#X connect 21 0 7 0; diff --git a/exciter/tk2c.bash b/exciter/tk2c.bash new file mode 100755 index 0000000..9dfeb03 --- /dev/null +++ b/exciter/tk2c.bash @@ -0,0 +1,24 @@ +#!/bin/bash + +#set -x + +while read line +do + for word in $line + do + if [ "X"$word != "X"${word#\#} ] + then + echo // ${line#\#} + break + else + line=${line//\'/\\\'} +#useless, slashes never gets in + line=${line//\\/\\\\} +#this one's dirty, i know + line=${line//;/\\\\;} + line=${line//\"/\\\"} + echo 'sys_gui("'$line'\n");' + break + fi + done +done diff --git a/filterbank~/CHANGES.LOG b/filterbank~/CHANGES.LOG index a0b4205..b294e8b 100644 --- a/filterbank~/CHANGES.LOG +++ b/filterbank~/CHANGES.LOG @@ -1,3 +1,5 @@ +0.4 + fixed coordinates for GOP support 0.3 Added GOP support 0.2 diff --git a/filterbank~/Makefile b/filterbank~/Makefile index 121a5c8..731500e 100644 --- a/filterbank~/Makefile +++ b/filterbank~/Makefile @@ -71,7 +71,7 @@ pd_linux: $(NAME).pd_linux LINUXCFLAGS = -DPD -DUNIX -DICECAST -O2 -funroll-loops -fomit-frame-pointer \ -Wall -W -Wno-shadow -Wstrict-prototypes -g \ - -Wno-unused -Wno-parentheses -Wno-switch -Werror + -Wno-unused -Wno-parentheses -Wno-switch LINUXINCLUDE = -I../../src diff --git a/filterbank~/filterbank~.c b/filterbank~/filterbank~.c index 86bf5b9..64cf55c 100644 --- a/filterbank~/filterbank~.c +++ b/filterbank~/filterbank~.c @@ -33,12 +33,11 @@ #include "filterbank~.h" -#ifdef _WIN32 +#ifdef NT #include -#define random rand #else #include -#endif /* _WIN32 */ +#endif #define DEFAULT_FILTERBANK_LOWFREQ 0 #define DEFAULT_FILTERBANK_HIGHFREQ 1600 @@ -46,7 +45,7 @@ #define FILTERBANK_OUTLET_WIDTH 5 #define FILTERBANK_HEIGHT 16 -static char *filterbank_version = "filterbank : responses from a set of band-pass filters, version 0.3 (ydegoyon@free.fr)"; +static char *filterbank_version = "filterbank : responses from a set of band-pass filters, version 0.4 (ydegoyon@free.fr)"; t_widgetbehavior filterbank_widgetbehavior; static t_class *filterbank_class_tilde; @@ -253,7 +252,7 @@ static void filterbank_save(t_gobj *z, t_binbuf *b) t_int ii; binbuf_addv(b, "ssiisiii", gensym("#X"),gensym("obj"), - (t_int)text_xpix(&x->x_obj, x->x_glist), (t_int)text_ypix(&x->x_obj, x->x_glist), + (t_int)x->x_obj.te_xpix, (t_int)x->x_obj.te_ypix, gensym("filterbank~"), x->x_lowfreq, x->x_highfreq, x->x_nbfilters ); binbuf_addv(b, ";"); diff --git a/filterbank~/filterbank~.tk2c b/filterbank~/filterbank~.tk2c new file mode 100755 index 0000000..13d8482 --- /dev/null +++ b/filterbank~/filterbank~.tk2c @@ -0,0 +1,58 @@ +// ########### filterbank procedures -- ydegoyon@free.fr ######### +sys_gui("proc filterbank_apply {id} {\n"); +// strip "." from the TK id to make a variable name suffix +sys_gui("set vid [string trimleft $id .]\n"); +// for each variable, make a local variable to hold its name... +sys_gui("set var_graph_lowfreq [concat graph_lowfreq_$vid]\n"); +sys_gui("global $var_graph_lowfreq\n"); +sys_gui("set var_graph_highfreq [concat graph_highfreq_$vid]\n"); +sys_gui("global $var_graph_highfreq\n"); +sys_gui("set cmd [concat $id dialog [eval concat $$var_graph_lowfreq] [eval concat $$var_graph_highfreq] \\;]\n"); +// puts stderr $cmd +sys_gui("pd $cmd\n"); +sys_gui("}\n"); +sys_gui("proc filterbank_cancel {id} {\n"); +sys_gui("set cmd [concat $id cancel \\;]\n"); +// puts stderr $cmd +sys_gui("pd $cmd\n"); +sys_gui("}\n"); +sys_gui("proc filterbank_ok {id} {\n"); +sys_gui("filterbank_apply $id\n"); +sys_gui("filterbank_cancel $id\n"); +sys_gui("}\n"); +sys_gui("proc pdtk_filterbank_dialog {id lowfreq highfreq} {\n"); +sys_gui("set vid [string trimleft $id .]\n"); +sys_gui("set var_graph_lowfreq [concat graph_lowfreq_$vid]\n"); +sys_gui("global $var_graph_lowfreq\n"); +sys_gui("set var_graph_highfreq [concat graph_highfreq_$vid]\n"); +sys_gui("global $var_graph_highfreq\n"); +sys_gui("set $var_graph_lowfreq $lowfreq\n"); +sys_gui("set $var_graph_highfreq $highfreq\n"); +sys_gui("toplevel $id\n"); +sys_gui("wm title $id {filterbank}\n"); +sys_gui("wm protocol $id WM_DELETE_WINDOW [concat filterbank_cancel $id]\n"); +sys_gui("label $id.label -text {FILTERBANK PROPERTIES}\n"); +sys_gui("pack $id.label -side top\n"); +sys_gui("frame $id.buttonframe\n"); +sys_gui("pack $id.buttonframe -side bottom -fill x -pady 2m\n"); +sys_gui("button $id.buttonframe.cancel -text {Cancel} -command \"filterbank_cancel $id\"\n"); +sys_gui("button $id.buttonframe.apply -text {Apply} -command \"filterbank_apply $id\"\n"); +sys_gui("button $id.buttonframe.ok -text {OK} -command \"filterbank_ok $id\"\n"); +sys_gui("pack $id.buttonframe.cancel -side left -expand 1\n"); +sys_gui("pack $id.buttonframe.apply -side left -expand 1\n"); +sys_gui("pack $id.buttonframe.ok -side left -expand 1\n"); +sys_gui("frame $id.1rangef\n"); +sys_gui("pack $id.1rangef -side top\n"); +sys_gui("label $id.1rangef.llowfreq -text \"Lower Frequency :\"\n"); +sys_gui("entry $id.1rangef.lowfreq -textvariable $var_graph_lowfreq -width 7\n"); +sys_gui("pack $id.1rangef.llowfreq $id.1rangef.lowfreq -side left\n"); +sys_gui("frame $id.2rangef\n"); +sys_gui("pack $id.2rangef -side top\n"); +sys_gui("label $id.2rangef.lhighfreq -text \"Higher Frequency :\"\n"); +sys_gui("entry $id.2rangef.highfreq -textvariable $var_graph_highfreq -width 7\n"); +sys_gui("pack $id.2rangef.lhighfreq $id.2rangef.highfreq -side left\n"); +sys_gui("bind $id.1rangef.lowfreq [concat filterbank_ok $id]\n"); +sys_gui("bind $id.2rangef.highfreq [concat filterbank_ok $id]\n"); +sys_gui("focus $id.1rangef.lowfreq\n"); +sys_gui("}\n"); +// ########### filterbank procedures END -- ydegoyon@free.fr ######### diff --git a/filterbank~/help-filterbank~.pd b/filterbank~/help-filterbank~.pd new file mode 100644 index 0000000..855e833 --- /dev/null +++ b/filterbank~/help-filterbank~.pd @@ -0,0 +1,199 @@ +#N canvas 122 3 868 640 10; +#X text 387 606 bugs and comments @ ydegoyon@free.fr [-_-]; +#X text 256 524 (invoke with Properties ); +#X text 256 506 You can set the following properties :; +#X text 321 108 Constructor : filterbank~ + | filterbank~; +#X text 264 543 * Lower Frequency : lower frequency of all filters +; +#X text 264 556 * Higher Frequency : higher frequency of all filters +; +#X text 321 77 filterbank~ outputs the frequency response against a +set of band-pass filters; +#X obj 127 279 filterbank~ 0 2000 30; +#X text 387 588 part of unauthorized PD ( http://ydegoyon.free.fr ) +; +#X msg 31 20 bang; +#X obj 31 41 openpanel; +#X obj 31 62 t s b; +#X obj 77 62 float \$0; +#X text 31 1 Step 1 : Load a sound file; +#X obj 31 83 route float; +#X msg 336 250 bang; +#X obj 32 179 soundfiler; +#X obj 125 250 tabplay~ \$0-filterbank-sample; +#X obj 31 104 makefilename %d-filterbank-sample; +#X obj 32 137 pack s s; +#X msg 32 158 read -resize \$1 \$2; +#X obj 72 599 table \$0-filterbank-sample; +#X text 321 139 Example : filterbank~ 0 3000 30; +#X obj 86 330 env~; +#X obj 122 307 env~; +#X obj 121 329 env~; +#X obj 87 306 env~; +#X obj 101 359 vsl 8 128 0 127 0 0 empty empty empty 20 8 0 8 -262144 +-1 -1 0 1; +#X obj 113 359 vsl 8 128 0 127 0 0 empty empty empty 20 8 0 8 -262144 +-1 -1 0 1; +#X obj 125 360 vsl 8 128 0 127 0 0 empty empty empty 20 8 0 8 -262144 +-1 -1 0 1; +#X obj 138 360 vsl 8 128 0 127 0 0 empty empty empty 20 8 0 8 -262144 +-1 -1 0 1; +#X obj 91 250 dac~; +#X obj 156 331 env~; +#X obj 191 307 env~; +#X obj 191 330 env~; +#X obj 158 307 env~; +#X obj 171 360 vsl 8 128 0 127 0 0 empty empty empty 20 8 0 8 -262144 +-1 -1 0 1; +#X obj 183 360 vsl 8 128 0 127 0 0 empty empty empty 20 8 0 8 -262144 +-1 -1 0 1; +#X obj 195 360 vsl 8 128 0 127 0 0 empty empty empty 20 8 0 8 -262144 +-1 -1 0 1; +#X obj 208 361 vsl 8 128 0 127 0 0 empty empty empty 20 8 0 8 -262144 +-1 -1 0 1; +#X obj 227 331 env~; +#X obj 262 307 env~; +#X obj 262 330 env~; +#X obj 228 307 env~; +#X obj 242 360 vsl 8 128 0 127 0 0 empty empty empty 20 8 0 8 -262144 +-1 -1 0 1; +#X obj 254 360 vsl 8 128 0 127 0 0 empty empty empty 20 8 0 8 -262144 +-1 -1 0 1; +#X obj 266 360 vsl 8 128 0 127 0 0 empty empty empty 20 8 0 8 -262144 +-1 -1 0 1; +#X obj 279 361 vsl 8 128 0 127 0 0 empty empty empty 20 8 0 8 -262144 +-1 -1 0 1; +#X obj 297 331 env~; +#X obj 332 307 env~; +#X obj 332 330 env~; +#X obj 298 307 env~; +#X obj 312 360 vsl 8 128 0 127 0 0 empty empty empty 20 8 0 8 -262144 +-1 -1 0 1; +#X obj 324 360 vsl 8 128 0 127 0 0 empty empty empty 20 8 0 8 -262144 +-1 -1 0 1; +#X obj 336 360 vsl 8 128 0 127 0 0 empty empty empty 20 8 0 8 -262144 +-1 -1 0 1; +#X obj 349 361 vsl 8 128 0 127 0 0 empty empty empty 20 8 0 8 -262144 +-1 -1 0 1; +#X obj 367 331 env~; +#X obj 403 308 env~; +#X obj 402 330 env~; +#X obj 368 307 env~; +#X obj 382 360 vsl 8 128 0 127 0 0 empty empty empty 20 8 0 8 -262144 +-1 -1 0 1; +#X obj 394 360 vsl 8 128 0 127 0 0 empty empty empty 20 8 0 8 -262144 +-1 -1 0 1; +#X obj 406 360 vsl 8 128 0 127 0 0 empty empty empty 20 8 0 8 -262144 +-1 -1 0 1; +#X obj 419 361 vsl 8 128 0 127 0 0 empty empty empty 20 8 0 8 -262144 +-1 -1 0 1; +#X obj 438 330 env~; +#X obj 473 306 env~; +#X obj 473 329 env~; +#X obj 439 306 env~; +#X obj 453 359 vsl 8 128 0 127 0 0 empty empty empty 20 8 0 8 -262144 +-1 -1 0 1; +#X obj 465 359 vsl 8 128 0 127 0 0 empty empty empty 20 8 0 8 -262144 +-1 -1 0 1; +#X obj 477 359 vsl 8 128 0 127 0 0 empty empty empty 20 8 0 8 -262144 +-1 -1 0 1; +#X obj 490 360 vsl 8 128 0 127 0 0 empty empty empty 20 8 0 8 -262144 +-1 -1 0 1; +#X obj 513 328 env~; +#X obj 548 304 env~; +#X obj 548 327 env~; +#X obj 514 304 env~; +#X obj 528 357 vsl 8 128 0 127 0 0 empty empty empty 20 8 0 8 -262144 +-1 -1 0 1; +#X obj 540 357 vsl 8 128 0 127 0 0 empty empty empty 20 8 0 8 -262144 +-1 -1 0 1; +#X obj 552 357 vsl 8 128 0 127 0 0 empty empty empty 20 8 0 8 -262144 +-1 -1 0 1; +#X obj 565 358 vsl 8 128 0 127 0 0 empty empty empty 20 8 0 8 -262144 +-1 -1 0 1; +#X obj 580 328 env~; +#X obj 581 304 env~; +#X obj 595 357 vsl 8 128 0 127 0 0 empty empty empty 20 8 0 8 -262144 +-1 -1 0 1; +#X obj 607 357 vsl 8 128 0 127 0 0 empty empty empty 20 8 0 8 -262144 +-1 -1 0 1; +#X text 203 228 Step 2 : See the filterbank~ output; +#X text 451 252 Step 3 : shift all the outputs randomly; +#X msg 458 274 randomize 1; +#X msg 547 274 randomize 0; +#X connect 7 0 26 0; +#X connect 7 1 23 0; +#X connect 7 2 24 0; +#X connect 7 3 25 0; +#X connect 7 4 35 0; +#X connect 7 5 32 0; +#X connect 7 6 33 0; +#X connect 7 7 34 0; +#X connect 7 8 43 0; +#X connect 7 9 40 0; +#X connect 7 10 41 0; +#X connect 7 11 42 0; +#X connect 7 12 51 0; +#X connect 7 13 48 0; +#X connect 7 14 49 0; +#X connect 7 15 50 0; +#X connect 7 16 59 0; +#X connect 7 17 56 0; +#X connect 7 18 57 0; +#X connect 7 18 58 0; +#X connect 7 20 67 0; +#X connect 7 21 64 0; +#X connect 7 22 65 0; +#X connect 7 23 66 0; +#X connect 7 24 75 0; +#X connect 7 25 72 0; +#X connect 7 26 73 0; +#X connect 7 27 74 0; +#X connect 7 28 81 0; +#X connect 7 29 80 0; +#X connect 9 0 10 0; +#X connect 10 0 11 0; +#X connect 11 0 19 0; +#X connect 11 1 12 0; +#X connect 12 0 14 0; +#X connect 14 0 18 0; +#X connect 15 0 17 0; +#X connect 17 0 31 0; +#X connect 17 0 7 0; +#X connect 17 0 31 1; +#X connect 18 0 19 1; +#X connect 19 0 20 0; +#X connect 20 0 16 0; +#X connect 23 0 28 0; +#X connect 24 0 29 0; +#X connect 25 0 30 0; +#X connect 26 0 27 0; +#X connect 32 0 37 0; +#X connect 33 0 38 0; +#X connect 34 0 39 0; +#X connect 35 0 36 0; +#X connect 40 0 45 0; +#X connect 41 0 46 0; +#X connect 42 0 47 0; +#X connect 43 0 44 0; +#X connect 48 0 53 0; +#X connect 49 0 54 0; +#X connect 50 0 55 0; +#X connect 51 0 52 0; +#X connect 56 0 61 0; +#X connect 57 0 62 0; +#X connect 58 0 63 0; +#X connect 59 0 60 0; +#X connect 64 0 69 0; +#X connect 65 0 70 0; +#X connect 66 0 71 0; +#X connect 67 0 68 0; +#X connect 72 0 77 0; +#X connect 73 0 78 0; +#X connect 74 0 79 0; +#X connect 75 0 76 0; +#X connect 80 0 83 0; +#X connect 81 0 82 0; +#X connect 86 0 7 0; +#X connect 87 0 7 0; diff --git a/filterbank~/tk2c.bash b/filterbank~/tk2c.bash new file mode 100755 index 0000000..9dfeb03 --- /dev/null +++ b/filterbank~/tk2c.bash @@ -0,0 +1,24 @@ +#!/bin/bash + +#set -x + +while read line +do + for word in $line + do + if [ "X"$word != "X"${word#\#} ] + then + echo // ${line#\#} + break + else + line=${line//\'/\\\'} +#useless, slashes never gets in + line=${line//\\/\\\\} +#this one's dirty, i know + line=${line//;/\\\\;} + line=${line//\"/\\\"} + echo 'sys_gui("'$line'\n");' + break + fi + done +done diff --git a/grid/CHANGES.LOG b/grid/CHANGES.LOG index 7706b29..e548bc5 100644 --- a/grid/CHANGES.LOG +++ b/grid/CHANGES.LOG @@ -1,3 +1,5 @@ +0.7 + fixed coordinates for GOP support 0.6 added GOP support 0.5 diff --git a/grid/grid.c b/grid/grid.c index 3e1bfd9..416960f 100644 --- a/grid/grid.c +++ b/grid/grid.c @@ -35,7 +35,7 @@ static int gridcount=0; static int guidebug=0; static int pointsize = 5; -static char *grid_version = "grid: version 0.6, written by Yves Degoyon (ydegoyon@free.fr)"; +static char *grid_version = "grid: version 0.7, written by Yves Degoyon (ydegoyon@free.fr)"; #define GRID_SYS_VGUI2(a,b) if (guidebug) \ post(a,b);\ @@ -271,7 +271,7 @@ static void grid_save(t_gobj *z, t_binbuf *b) // post( "saving grid : %s", x->x_name->s_name ); binbuf_addv(b, "ssiissiffiffiffiiff", gensym("#X"),gensym("obj"), - (t_int)text_xpix(&x->x_obj, x->x_glist), (t_int)text_ypix(&x->x_obj, x->x_glist), + (t_int)x->x_obj.te_xpix, (t_int)x->x_obj.te_ypix, gensym("grid"), x->x_name, x->x_width, x->x_min, x->x_max, x->x_height, x->y_min, x->y_max, diff --git a/pianoroll/CHANGES.LOG b/pianoroll/CHANGES.LOG index bb8e709..72f4901 100644 --- a/pianoroll/CHANGES.LOG +++ b/pianoroll/CHANGES.LOG @@ -1,3 +1,5 @@ +0.10 + fixed coordinates for GOP support 0.9 added GOP support 0.8 diff --git a/pianoroll/help-pianoroll.pd b/pianoroll/help-pianoroll.pd new file mode 100644 index 0000000..809fec9 --- /dev/null +++ b/pianoroll/help-pianoroll.pd @@ -0,0 +1,80 @@ +#N canvas 90 41 827 643 10; +#X floatatom 71 402 5 0 0; +#X floatatom 258 400 5 0 0; +#X text 523 112 (invoke with Properties ); +#X text 524 101 You can set the following properties :; +#X text 548 141 * Width : graphical x size; +#X text 548 152 * Height : graphical y size; +#X text 488 548 bugs and comments @ ydegoyon@free.fr; +#X msg 587 271 \; pd dsp 0; +#X msg 653 271 \; pd dsp 1; +#X text 548 129 * Name; +#X text 119 401 Pitch; +#X text 304 399 Volume ( scaled to [0 \, 1] ); +#X text 547 164 * Pitch min : minimum value delivered by left outlet +; +#X text 547 176 * Pitch max : maximum value delivered by left outlet +; +#X text 547 200 * Step number : number of steps; +#X text 524 79 ( pitch & volume originally but \, really \, anything +you like ); +#X msg 238 87 transpose \$1; +#X floatatom 334 89 5 0 0; +#X text 240 104 You can transpose the melody ( ?? ); +#X text 241 115 with a float value; +#X text 548 211 * Default value : must be in [min \, max]; +#X obj 65 165 pianoroll pianoroll1 400 192 -15 15 32 16 0 0 1 -12.0968 +0.741935 -3.3871 0.16129 5.32258 0.16129 -4.35484 0.354839 6.29032 +0.322581 6.29032 1 5.32258 1 -12.0968 0.290323 -10.1613 0.290323 -8.22581 +0.580645 -5.32258 1 7.25807 1 -10.1613 0.580645 -15 0.612903 -15 0.580645 +-15 1; +#X msg 47 18 bang; +#X obj 46 80 f; +#X obj 76 80 + 1; +#X floatatom 9 104 5 0 0; +#X obj 47 44 metro 500; +#X text 527 65 Pianoroll controls two parameters for a sequencer; +#X text 548 188 * Pitch grades : number of grades for the pitch; +#X msg 82 18 stop; +#X floatatom 13 140 5 0 0; +#X text 57 1 forward; +#X text 144 0 backward; +#X msg 136 15 bang; +#X obj 135 77 f; +#X obj 136 41 metro 500; +#X msg 171 16 stop; +#X obj 165 77 - 1; +#X msg 239 59 init; +#X text 279 60 init to default values; +#X msg 241 33 load pattern#1; +#X text 352 19 load and save the patterns; +#X text 352 31 ( values as well as steps number .... ); +#X msg 241 10 save pattern#1; +#X text 544 383 you can set the pitch and; +#X text 544 397 the volume with messages; +#X text 544 409 ( positions start at zero ); +#X msg 541 358 volume 3 0.345; +#X msg 542 334 pitch 3 -5; +#X connect 16 0 21 0; +#X connect 17 0 16 0; +#X connect 21 0 0 0; +#X connect 21 1 1 0; +#X connect 22 0 26 0; +#X connect 23 0 21 0; +#X connect 23 0 24 0; +#X connect 23 0 25 0; +#X connect 24 0 23 1; +#X connect 26 0 23 0; +#X connect 29 0 26 0; +#X connect 30 0 21 0; +#X connect 33 0 35 0; +#X connect 34 0 37 0; +#X connect 34 0 21 0; +#X connect 35 0 34 0; +#X connect 36 0 35 0; +#X connect 37 0 34 1; +#X connect 38 0 21 0; +#X connect 40 0 21 0; +#X connect 43 0 21 0; +#X connect 47 0 21 0; +#X connect 48 0 21 0; diff --git a/pianoroll/pianoroll.c b/pianoroll/pianoroll.c index da23357..8bb0c2f 100644 --- a/pianoroll/pianoroll.c +++ b/pianoroll/pianoroll.c @@ -60,7 +60,7 @@ void canvas_startmotion(t_canvas *x); #define DEFAULT_SEQUENCER_PITCH_MIN -15 #define DEFAULT_SEQUENCER_PITCH_MAX 15 -static char *pianoroll_version = "pianoroll: a graphical sequencer controller, version 0.9 (ydegoyon@free.fr)"; +static char *pianoroll_version = "pianoroll: a graphical sequencer controller, version 0.10 (ydegoyon@free.fr)"; t_widgetbehavior pianoroll_widgetbehavior; static t_class *pianoroll_class; @@ -263,7 +263,7 @@ static void pianoroll_save(t_gobj *z, t_binbuf *b) // post( "saving pianoroll : %s", x->x_name->s_name ); binbuf_addv(b, "ssiissiiffiiifi", gensym("#X"),gensym("obj"), - (t_int)text_xpix(&x->x_obj, x->x_glist), (t_int)text_ypix(&x->x_obj, x->x_glist), + (t_int)x->x_obj.te_xpix, (t_int)x->x_obj.te_ypix, gensym("pianoroll"), x->x_name, x->x_width, x->x_height, x->x_pmin, x->x_pmax, x->x_nbgrades, x->x_nbsteps, diff --git a/pianoroll/pianoroll.tk2c b/pianoroll/pianoroll.tk2c new file mode 100755 index 0000000..10f5645 --- /dev/null +++ b/pianoroll/pianoroll.tk2c @@ -0,0 +1,131 @@ +// ########### pianoroll procedures -- ydegoyon@free.fr ######### +sys_gui("proc pianoroll_apply {id} {\n"); +// strip "." from the TK id to make a variable name suffix +sys_gui("set vid [string trimleft $id .]\n"); +// for each variable, make a local variable to hold its name... +sys_gui("set var_graph_name [concat graph_name_$vid]\n"); +sys_gui("global $var_graph_name\n"); +sys_gui("set var_graph_width [concat graph_width_$vid]\n"); +sys_gui("global $var_graph_width\n"); +sys_gui("set var_graph_height [concat graph_height_$vid]\n"); +sys_gui("global $var_graph_height\n"); +sys_gui("set var_graph_pmin [concat graph_pmin_$vid]\n"); +sys_gui("global $var_graph_pmin\n"); +sys_gui("set var_graph_pmax [concat graph_pmax_$vid]\n"); +sys_gui("global $var_graph_pmax\n"); +sys_gui("set var_graph_nbgrades [concat graph_nbgrades_$vid]\n"); +sys_gui("global $var_graph_nbgrades\n"); +sys_gui("set var_graph_nbsteps [concat graph_nbsteps_$vid]\n"); +sys_gui("global $var_graph_nbsteps\n"); +sys_gui("set var_graph_defvalue [concat graph_defvalue_$vid]\n"); +sys_gui("global $var_graph_defvalue\n"); +sys_gui("set var_graph_save [concat graph_save_$vid]\n"); +sys_gui("global $var_graph_save\n"); +sys_gui("set cmd [concat $id dialog [eval concat $$var_graph_name] [eval concat $$var_graph_width] [eval concat $$var_graph_height] [eval concat $$var_graph_pmin] [eval concat $$var_graph_pmax] [eval concat $$var_graph_nbgrades] [eval concat $$var_graph_nbsteps] [eval concat $$var_graph_defvalue] [eval concat $$var_graph_save] \\;]\n"); +// puts stderr $cmd +sys_gui("pd $cmd\n"); +sys_gui("}\n"); +sys_gui("proc pianoroll_cancel {id} {\n"); +sys_gui("set cmd [concat $id cancel \\;]\n"); +// puts stderr $cmd +sys_gui("pd $cmd\n"); +sys_gui("}\n"); +sys_gui("proc pianoroll_ok {id} {\n"); +sys_gui("pianoroll_apply $id\n"); +sys_gui("pianoroll_cancel $id\n"); +sys_gui("}\n"); +sys_gui("proc pdtk_pianoroll_dialog {id name width height pmin pmax nbgrades nbsteps defvalue save } {\n"); +sys_gui("set vid [string trimleft $id .]\n"); +sys_gui("set var_graph_name [concat graph_name_$vid]\n"); +sys_gui("global $var_graph_name\n"); +sys_gui("set var_graph_width [concat graph_width_$vid]\n"); +sys_gui("global $var_graph_width\n"); +sys_gui("set var_graph_height [concat graph_height_$vid]\n"); +sys_gui("global $var_graph_height\n"); +sys_gui("set var_graph_pmin [concat graph_pmin_$vid]\n"); +sys_gui("global $var_graph_pmin\n"); +sys_gui("set var_graph_pmax [concat graph_pmax_$vid]\n"); +sys_gui("global $var_graph_pmax\n"); +sys_gui("set var_graph_nbgrades [concat graph_nbgrades_$vid]\n"); +sys_gui("global $var_graph_nbgrades\n"); +sys_gui("set var_graph_nbsteps [concat graph_nbsteps_$vid]\n"); +sys_gui("global $var_graph_nbsteps\n"); +sys_gui("set var_graph_defvalue [concat graph_defvalue_$vid]\n"); +sys_gui("global $var_graph_defvalue\n"); +sys_gui("set var_graph_save [concat graph_save_$vid]\n"); +sys_gui("global $var_graph_save\n"); +sys_gui("set $var_graph_name $name\n"); +sys_gui("set $var_graph_width $width\n"); +sys_gui("set $var_graph_height $height\n"); +sys_gui("set $var_graph_pmin $pmin\n"); +sys_gui("set $var_graph_pmax $pmax\n"); +sys_gui("set $var_graph_nbgrades $nbgrades\n"); +sys_gui("set $var_graph_nbsteps $nbsteps\n"); +sys_gui("set $var_graph_defvalue $defvalue\n"); +sys_gui("set $var_graph_save $save\n"); +sys_gui("toplevel $id\n"); +sys_gui("wm title $id {pianoroll}\n"); +sys_gui("wm protocol $id WM_DELETE_WINDOW [concat pianoroll_cancel $id]\n"); +sys_gui("label $id.label -text {PIANOROLL PROPERTIES}\n"); +sys_gui("pack $id.label -side top\n"); +sys_gui("frame $id.buttonframe\n"); +sys_gui("pack $id.buttonframe -side bottom -fill x -pady 2m\n"); +sys_gui("button $id.buttonframe.cancel -text {Cancel} -command \"pianoroll_cancel $id\"\n"); +sys_gui("button $id.buttonframe.apply -text {Apply} -command \"pianoroll_apply $id\"\n"); +sys_gui("button $id.buttonframe.ok -text {OK} -command \"pianoroll_ok $id\"\n"); +sys_gui("pack $id.buttonframe.cancel -side left -expand 1\n"); +sys_gui("pack $id.buttonframe.apply -side left -expand 1\n"); +sys_gui("pack $id.buttonframe.ok -side left -expand 1\n"); +sys_gui("frame $id.1rangef\n"); +sys_gui("pack $id.1rangef -side top\n"); +sys_gui("label $id.1rangef.lname -text \"Name :\"\n"); +sys_gui("entry $id.1rangef.name -textvariable $var_graph_name -width 15\n"); +sys_gui("pack $id.1rangef.lname $id.1rangef.name -side left\n"); +sys_gui("frame $id.2rangef\n"); +sys_gui("pack $id.2rangef -side top\n"); +sys_gui("label $id.2rangef.lwidth -text \"Width :\"\n"); +sys_gui("entry $id.2rangef.width -textvariable $var_graph_width -width 7\n"); +sys_gui("pack $id.2rangef.lwidth $id.2rangef.width -side left\n"); +sys_gui("frame $id.3rangef\n"); +sys_gui("pack $id.3rangef -side top\n"); +sys_gui("label $id.3rangef.lheight -text \"Height :\"\n"); +sys_gui("entry $id.3rangef.height -textvariable $var_graph_height -width 7\n"); +sys_gui("pack $id.3rangef.lheight $id.3rangef.height -side left\n"); +sys_gui("frame $id.4rangef\n"); +sys_gui("pack $id.4rangef -side top\n"); +sys_gui("label $id.4rangef.lpmin -text \"Pitch low :\"\n"); +sys_gui("entry $id.4rangef.pmin -textvariable $var_graph_pmin -width 7\n"); +sys_gui("pack $id.4rangef.lpmin $id.4rangef.pmin -side left\n"); +sys_gui("frame $id.5rangef\n"); +sys_gui("pack $id.5rangef -side top\n"); +sys_gui("label $id.5rangef.lpmax -text \"Pitch high :\"\n"); +sys_gui("entry $id.5rangef.pmax -textvariable $var_graph_pmax -width 7\n"); +sys_gui("pack $id.5rangef.lpmax $id.5rangef.pmax -side left\n"); +sys_gui("frame $id.6rangef\n"); +sys_gui("pack $id.6rangef -side top\n"); +sys_gui("label $id.6rangef.lnbgrades -text \"Grades :\"\n"); +sys_gui("entry $id.6rangef.nbgrades -textvariable $var_graph_nbgrades -width 7\n"); +sys_gui("pack $id.6rangef.lnbgrades $id.6rangef.nbgrades -side left\n"); +sys_gui("frame $id.7rangef\n"); +sys_gui("pack $id.7rangef -side top\n"); +sys_gui("label $id.7rangef.lnbsteps -text \"Steps :\"\n"); +sys_gui("entry $id.7rangef.nbsteps -textvariable $var_graph_nbsteps -width 7\n"); +sys_gui("pack $id.7rangef.lnbsteps $id.7rangef.nbsteps -side left\n"); +sys_gui("frame $id.8rangef\n"); +sys_gui("pack $id.8rangef -side top\n"); +sys_gui("label $id.8rangef.ldefvalue -text \"Default Value :\"\n"); +sys_gui("entry $id.8rangef.defvalue -textvariable $var_graph_defvalue -width 7\n"); +sys_gui("pack $id.8rangef.ldefvalue $id.8rangef.defvalue -side left\n"); +sys_gui("checkbutton $id.save -text {Save contents} -variable $var_graph_save -anchor w\n"); +sys_gui("pack $id.save -side top\n"); +sys_gui("bind $id.1rangef.name [concat pianoroll_ok $id]\n"); +sys_gui("bind $id.2rangef.width [concat pianoroll_ok $id]\n"); +sys_gui("bind $id.3rangef.height [concat pianoroll_ok $id]\n"); +sys_gui("bind $id.4rangef.pmin [concat pianoroll_ok $id]\n"); +sys_gui("bind $id.5rangef.pmax [concat pianoroll_ok $id]\n"); +sys_gui("bind $id.6rangef.nbgrades [concat pianoroll_ok $id]\n"); +sys_gui("bind $id.7rangef.nbsteps [concat pianoroll_ok $id]\n"); +sys_gui("bind $id.8rangef.defvalue [concat pianoroll_ok $id]\n"); +sys_gui("focus $id.1rangef.name\n"); +sys_gui("}\n"); +// ########### pianoroll procedures END -- ydegoyon@free.fr ######### diff --git a/pianoroll/tk2c.bash b/pianoroll/tk2c.bash new file mode 100755 index 0000000..9dfeb03 --- /dev/null +++ b/pianoroll/tk2c.bash @@ -0,0 +1,24 @@ +#!/bin/bash + +#set -x + +while read line +do + for word in $line + do + if [ "X"$word != "X"${word#\#} ] + then + echo // ${line#\#} + break + else + line=${line//\'/\\\'} +#useless, slashes never gets in + line=${line//\\/\\\\} +#this one's dirty, i know + line=${line//;/\\\\;} + line=${line//\"/\\\"} + echo 'sys_gui("'$line'\n");' + break + fi + done +done diff --git a/playlist/CHANGES.LOG b/playlist/CHANGES.LOG index 3c302eb..19e7548 100644 --- a/playlist/CHANGES.LOG +++ b/playlist/CHANGES.LOG @@ -1,3 +1,5 @@ +0.12 + fixed coordinates for GOP support 0.11 added option to hide the graphic parts ( embedded list ) scroll by numbers diff --git a/playlist/playlist.c b/playlist/playlist.c index 4f80e98..0627090 100644 --- a/playlist/playlist.c +++ b/playlist/playlist.c @@ -55,7 +55,7 @@ static t_class *playlist_class; static int guidebug=0; -static char *playlist_version = "playlist: 1 click file chooser : version 0.11, written by Yves Degoyon (ydegoyon@free.fr)"; +static char *playlist_version = "playlist: 1 click file chooser : version 0.12, written by Yves Degoyon (ydegoyon@free.fr)"; #define MAX_DIR_LENGTH 2048 // maximum length for a directory name @@ -403,7 +403,7 @@ static void playlist_save(t_gobj *z, t_binbuf *b) // post( "saving playlist : %s", x->x_extension ); binbuf_addv(b, "ssiissiisssss", gensym("#X"), gensym("obj"), - (t_int)text_xpix(&x->x_obj, x->x_glist), (t_int)text_ypix(&x->x_obj, x->x_glist), + (t_int)x->x_obj.te_xpix, (t_int)x->x_obj.te_ypix, gensym("playlist"), gensym(x->x_extension), x->x_width, x->x_height, gensym(x->x_font), gensym(x->x_bgcolor), gensym(x->x_sbcolor), gensym(x->x_fgcolor), gensym(x->x_secolor) ); diff --git a/probalizer/CHANGES.LOG b/probalizer/CHANGES.LOG index 497eaaa..e6b7307 100644 --- a/probalizer/CHANGES.LOG +++ b/probalizer/CHANGES.LOG @@ -1,3 +1,5 @@ +0.4 + fixed coordinates for GOP support 0.3 added GOP support 0.2 diff --git a/probalizer/help-probalizer.pd b/probalizer/help-probalizer.pd new file mode 100644 index 0000000..1b3a0f0 --- /dev/null +++ b/probalizer/help-probalizer.pd @@ -0,0 +1,53 @@ +#N canvas 191 -6 970 685 10; +#X text 374 167 (invoke with Properties ); +#X text 375 156 You can set the following properties :; +#X text 395 188 * Width : graphical x size; +#X text 395 200 * Height : graphical y size; +#X text 442 506 bugs and comments @ ydegoyon@free.fr; +#X msg 404 603 \; pd dsp 0; +#X msg 470 603 \; pd dsp 1; +#X text 376 110 Probalizer output serial of integers according to the +probability curve; +#X obj 470 581 loadbang; +#X obj 64 92 probalizer 200 200 10 100 1 0 53 1 61 2 8 3 39 4 9 5 40 +6 6 7 6 8 14 9 24; +#X text 395 213 * Values : number of values ( range is [ 1 \, nvalues +] ); +#X msg 93 54 bang; +#X msg 93 4 bang; +#X text 389 458 but without repetitions; +#X msg 295 16 zero; +#X msg 294 40 equi; +#X text 389 433 Note = If the probabilities are all equal to 1 \,; +#X msg 293 64 reset; +#X text 338 63 Reset output; +#X text 396 227 * Max Occurrences : max number of occurences in a serial +; +#X obj 68 358 probalizer 200 200 10 100 1 0 19 1 15 2 4 3 17 4 5 5 +14 6 1 7 0 8 4 9 7; +#X obj 193 331 loadbang; +#X msg 145 331 zero; +#X text 306 345 The output of first probalizer; +#X text 306 357 is stored in the second one; +#X floatatom 187 30 5 0 0; +#X msg 187 5 bang; +#X text 276 281 End of the serial; +#X text 390 445 probalizer behaves as a random object; +#X obj 276 308 print probalizer::end; +#X text 47 6 Start; +#X text 332 42 Set equal probabilities; +#X obj 93 29 metro 10; +#X connect 8 0 6 0; +#X connect 9 0 20 0; +#X connect 9 1 22 0; +#X connect 9 1 29 0; +#X connect 11 0 9 0; +#X connect 12 0 32 0; +#X connect 14 0 9 0; +#X connect 15 0 9 0; +#X connect 17 0 9 0; +#X connect 21 0 22 0; +#X connect 22 0 20 0; +#X connect 25 0 9 0; +#X connect 26 0 25 0; +#X connect 32 0 11 0; diff --git a/probalizer/probalizer.c b/probalizer/probalizer.c index 96a225b..0169285 100644 --- a/probalizer/probalizer.c +++ b/probalizer/probalizer.c @@ -42,12 +42,11 @@ #include "t_tk.h" #include "probalizer.h" -#ifdef _WIN32 +#ifdef NT #include -#define random rand #else #include -#endif /* _WIN32 */ +#endif #define DEFAULT_PROBALIZER_WIDTH 200 #define DEFAULT_PROBALIZER_HEIGHT 200 @@ -55,7 +54,7 @@ #define DEFAULT_PROBALIZER_NBOCCURRENCES 100 #define DEFAULT_PROB_VALUE 10 -static char *probalizer_version = "probalizer : outputs integer values according to a drawn probability curve , version 0.3 (ydegoyon@free.fr)"; +static char *probalizer_version = "probalizer : outputs integer values according to a drawn probability curve , version 0.4 (ydegoyon@free.fr)"; t_widgetbehavior probalizer_widgetbehavior; static t_class *probalizer_class; @@ -276,7 +275,7 @@ static void probalizer_save(t_gobj *z, t_binbuf *b) int ei,gi; binbuf_addv(b, "ssiisiiiii", gensym("#X"),gensym("obj"), - (t_int)text_xpix(&x->x_obj, x->x_glist), (t_int)text_ypix(&x->x_obj, x->x_glist), + (t_int)x->x_obj.te_xpix, (t_int)x->x_obj.te_ypix, gensym("probalizer"), x->x_width, x->x_height, x->x_nvalues, x->x_noccurrences, x->x_save ); if ( x->x_save ) diff --git a/probalizer/probalizer.tk2c b/probalizer/probalizer.tk2c new file mode 100755 index 0000000..b4a608c --- /dev/null +++ b/probalizer/probalizer.tk2c @@ -0,0 +1,87 @@ +// ########### probalizer procedures -- ydegoyon@free.fr ######### +sys_gui("proc probalizer_apply {id} {\n"); +// strip "." from the TK id to make a variable name suffix +sys_gui("set vid [string trimleft $id .]\n"); +// for each variable, make a local variable to hold its name... +sys_gui("set var_graph_width [concat graph_width_$vid]\n"); +sys_gui("global $var_graph_width\n"); +sys_gui("set var_graph_height [concat graph_height_$vid]\n"); +sys_gui("global $var_graph_height\n"); +sys_gui("set var_graph_nvalues [concat graph_nvalues_$vid]\n"); +sys_gui("global $var_graph_nvalues\n"); +sys_gui("set var_graph_noccurrences [concat graph_noccurrences_$vid]\n"); +sys_gui("global $var_graph_noccurrences\n"); +sys_gui("set var_graph_save [concat graph_save_$vid]\n"); +sys_gui("global $var_graph_save\n"); +sys_gui("set cmd [concat $id dialog [eval concat $$var_graph_width] [eval concat $$var_graph_height] [eval concat $$var_graph_nvalues] [eval concat $$var_graph_noccurrences] [eval concat $$var_graph_save] \\;]\n"); +// puts stderr $cmd +sys_gui("pd $cmd\n"); +sys_gui("}\n"); +sys_gui("proc probalizer_cancel {id} {\n"); +sys_gui("set cmd [concat $id cancel \\;]\n"); +// puts stderr $cmd +sys_gui("pd $cmd\n"); +sys_gui("}\n"); +sys_gui("proc probalizer_ok {id} {\n"); +sys_gui("probalizer_apply $id\n"); +sys_gui("probalizer_cancel $id\n"); +sys_gui("}\n"); +sys_gui("proc pdtk_probalizer_dialog {id width height nvalues noccurrences save } {\n"); +sys_gui("set vid [string trimleft $id .]\n"); +sys_gui("set var_graph_width [concat graph_width_$vid]\n"); +sys_gui("global $var_graph_width\n"); +sys_gui("set var_graph_height [concat graph_height_$vid]\n"); +sys_gui("global $var_graph_height\n"); +sys_gui("set var_graph_nvalues [concat graph_nvalues_$vid]\n"); +sys_gui("global $var_graph_nvalues\n"); +sys_gui("set var_graph_noccurrences [concat graph_noccurrences_$vid]\n"); +sys_gui("global $var_graph_noccurrences\n"); +sys_gui("set var_graph_save [concat graph_save_$vid]\n"); +sys_gui("global $var_graph_save\n"); +sys_gui("set $var_graph_width $width\n"); +sys_gui("set $var_graph_height $height\n"); +sys_gui("set $var_graph_nvalues $nvalues\n"); +sys_gui("set $var_graph_noccurrences $noccurrences\n"); +sys_gui("set $var_graph_save $save\n"); +sys_gui("toplevel $id\n"); +sys_gui("wm title $id {probalizer}\n"); +sys_gui("wm protocol $id WM_DELETE_WINDOW [concat probalizer_cancel $id]\n"); +sys_gui("label $id.label -text {PROBALIZER PROPERTIES}\n"); +sys_gui("pack $id.label -side top\n"); +sys_gui("frame $id.buttonframe\n"); +sys_gui("pack $id.buttonframe -side bottom -fill x -pady 2m\n"); +sys_gui("button $id.buttonframe.cancel -text {Cancel} -command \"probalizer_cancel $id\"\n"); +sys_gui("button $id.buttonframe.apply -text {Apply} -command \"probalizer_apply $id\"\n"); +sys_gui("button $id.buttonframe.ok -text {OK} -command \"probalizer_ok $id\"\n"); +sys_gui("pack $id.buttonframe.cancel -side left -expand 1\n"); +sys_gui("pack $id.buttonframe.apply -side left -expand 1\n"); +sys_gui("pack $id.buttonframe.ok -side left -expand 1\n"); +sys_gui("frame $id.1rangef\n"); +sys_gui("pack $id.1rangef -side top\n"); +sys_gui("label $id.1rangef.lwidth -text \"Width :\"\n"); +sys_gui("entry $id.1rangef.width -textvariable $var_graph_width -width 7\n"); +sys_gui("pack $id.1rangef.lwidth $id.1rangef.width -side left\n"); +sys_gui("frame $id.2rangef\n"); +sys_gui("pack $id.2rangef -side top\n"); +sys_gui("label $id.2rangef.lheight -text \"Height :\"\n"); +sys_gui("entry $id.2rangef.height -textvariable $var_graph_height -width 7\n"); +sys_gui("pack $id.2rangef.lheight $id.2rangef.height -side left\n"); +sys_gui("frame $id.3rangef\n"); +sys_gui("pack $id.3rangef -side top\n"); +sys_gui("label $id.3rangef.lnvalues -text \"Values :\"\n"); +sys_gui("entry $id.3rangef.nvalues -textvariable $var_graph_nvalues -width 7\n"); +sys_gui("pack $id.3rangef.lnvalues $id.3rangef.nvalues -side left\n"); +sys_gui("frame $id.4rangef\n"); +sys_gui("pack $id.4rangef -side top\n"); +sys_gui("label $id.4rangef.lnoccurrences -text \"Max Occurrences :\"\n"); +sys_gui("entry $id.4rangef.noccurrences -textvariable $var_graph_noccurrences -width 7\n"); +sys_gui("pack $id.4rangef.lnoccurrences $id.4rangef.noccurrences -side left\n"); +sys_gui("checkbutton $id.save -text {Save contents} -variable $var_graph_save -anchor w\n"); +sys_gui("pack $id.save -side top\n"); +sys_gui("bind $id.1rangef.width [concat probalizer_ok $id]\n"); +sys_gui("bind $id.2rangef.height [concat probalizer_ok $id]\n"); +sys_gui("bind $id.3rangef.nvalues [concat probalizer_ok $id]\n"); +sys_gui("bind $id.4rangef.noccurrences [concat probalizer_ok $id]\n"); +sys_gui("focus $id.1rangef.width\n"); +sys_gui("}\n"); +// ########### probalizer procedures END -- ydegoyon@free.fr ######### diff --git a/probalizer/tk2c.bash b/probalizer/tk2c.bash new file mode 100755 index 0000000..9dfeb03 --- /dev/null +++ b/probalizer/tk2c.bash @@ -0,0 +1,24 @@ +#!/bin/bash + +#set -x + +while read line +do + for word in $line + do + if [ "X"$word != "X"${word#\#} ] + then + echo // ${line#\#} + break + else + line=${line//\'/\\\'} +#useless, slashes never gets in + line=${line//\\/\\\\} +#this one's dirty, i know + line=${line//;/\\\\;} + line=${line//\"/\\\"} + echo 'sys_gui("'$line'\n");' + break + fi + done +done diff --git a/scratcher~/CHANGES.LOG b/scratcher~/CHANGES.LOG index 31e90d9..f53e163 100644 --- a/scratcher~/CHANGES.LOG +++ b/scratcher~/CHANGES.LOG @@ -1,3 +1,5 @@ +0.10 + fixed coordinates for GOP support 0.9 added GOP support 0.8 diff --git a/scratcher~/help-scratcher~.pd b/scratcher~/help-scratcher~.pd new file mode 100644 index 0000000..4a9149c --- /dev/null +++ b/scratcher~/help-scratcher~.pd @@ -0,0 +1,7 @@ +#N canvas 0 0 450 300 10; +#X obj 174 121 rs-scratcher~; +#X text 201 77 Playing with the block size \,; +#X text 201 87 so everything's in the subpatch; +#X obj 171 160 dac~; +#X connect 0 0 3 0; +#X connect 0 0 3 1; diff --git a/scratcher~/scratcher~.c b/scratcher~/scratcher~.c index bd970a7..d5a950e 100644 --- a/scratcher~/scratcher~.c +++ b/scratcher~/scratcher~.c @@ -37,28 +37,18 @@ #include #include #include - -#ifdef __APPLE__ -#include -#else #include -#endif - #include #include #include #include -#ifdef _WIN32 -#include -#include "timeval.h" -#else +#ifdef UNIX #include -#endif /* _WIN32 */ -#include - -#ifndef M_PI +#endif +#ifdef NT #define M_PI 3.14159265358979323846 -#endif /* not M_PI */ +#endif +#include #include "m_pd.h" #include "m_imp.h" @@ -120,7 +110,7 @@ static int ignorevisible=1; // ignore visible test #define SCRATCHER_NB_GROOVES 20 #define SCRATCHER_MOVE_TIMEOUT 20 -static char *scratcher_version = "scratcher~: version 0.9, written by Yves Degoyon (ydegoyon@free.fr)"; +static char *scratcher_version = "scratcher~: version 0.10, written by Yves Degoyon (ydegoyon@free.fr)"; static t_class *scratcher_class; t_widgetbehavior scratcher_widgetbehavior; @@ -288,7 +278,7 @@ static void scratcher_save(t_gobj *z, t_binbuf *b) t_scratcher *x = (t_scratcher *)z; binbuf_addv(b, "ssiisiiiiff", gensym("#X"),gensym("obj"), - (t_int)text_xpix(&x->x_obj, x->x_glist), (t_int)text_ypix(&x->x_obj, x->x_glist), + (t_int)x->x_obj.te_xpix, (t_int)x->x_obj.te_ypix, gensym("scratcher~"), x->x_size, x->x_width, x->x_height, x->x_sensibility, x->x_maxspeed, x->x_inertia ); binbuf_addv(b, ";"); diff --git a/scratcher~/scratcher~.tk2c b/scratcher~/scratcher~.tk2c new file mode 100755 index 0000000..8c07523 --- /dev/null +++ b/scratcher~/scratcher~.tk2c @@ -0,0 +1,58 @@ +// ########### scratcher procedures -- ydegoyon@free.fr ######### +sys_gui("proc scratcher_apply {id} {\n"); +// strip "." from the TK id to make a variable name suffix +sys_gui("set vid [string trimleft $id .]\n"); +// for each variable, make a local variable to hold its name... +sys_gui("set var_graph_width [concat graph_width_$vid]\n"); +sys_gui("global $var_graph_width\n"); +sys_gui("set var_graph_height [concat graph_height_$vid]\n"); +sys_gui("global $var_graph_height\n"); +sys_gui("set cmd [concat $id dialog [eval concat $$var_graph_width] [eval concat $$var_graph_height] \\;]\n"); +// puts stderr $cmd +sys_gui("pd $cmd\n"); +sys_gui("}\n"); +sys_gui("proc scratcher_cancel {id} {\n"); +sys_gui("set cmd [concat $id cancel \\;]\n"); +// puts stderr $cmd +sys_gui("pd $cmd\n"); +sys_gui("}\n"); +sys_gui("proc scratcher_ok {id} {\n"); +sys_gui("scratcher_apply $id\n"); +sys_gui("scratcher_cancel $id\n"); +sys_gui("}\n"); +sys_gui("proc pdtk_scratcher_dialog {id width height} {\n"); +sys_gui("set vid [string trimleft $id .]\n"); +sys_gui("set var_graph_width [concat graph_width_$vid]\n"); +sys_gui("global $var_graph_width\n"); +sys_gui("set var_graph_height [concat graph_height_$vid]\n"); +sys_gui("global $var_graph_height\n"); +sys_gui("set $var_graph_width $width\n"); +sys_gui("set $var_graph_height $height\n"); +sys_gui("toplevel $id\n"); +sys_gui("wm title $id {scratcher}\n"); +sys_gui("wm protocol $id WM_DELETE_WINDOW [concat scratcher_cancel $id]\n"); +sys_gui("label $id.label -text {SCRATCHER PROPERTIES}\n"); +sys_gui("pack $id.label -side top\n"); +sys_gui("frame $id.buttonframe\n"); +sys_gui("pack $id.buttonframe -side bottom -fill x -pady 2m\n"); +sys_gui("button $id.buttonframe.cancel -text {Cancel} -command \"scratcher_cancel $id\"\n"); +sys_gui("button $id.buttonframe.apply -text {Apply} -command \"scratcher_apply $id\"\n"); +sys_gui("button $id.buttonframe.ok -text {OK} -command \"scratcher_ok $id\"\n"); +sys_gui("pack $id.buttonframe.cancel -side left -expand 1\n"); +sys_gui("pack $id.buttonframe.apply -side left -expand 1\n"); +sys_gui("pack $id.buttonframe.ok -side left -expand 1\n"); +sys_gui("frame $id.1rangef\n"); +sys_gui("pack $id.1rangef -side top\n"); +sys_gui("label $id.1rangef.lwidth -text \"Width :\"\n"); +sys_gui("entry $id.1rangef.width -textvariable $var_graph_width -width 7\n"); +sys_gui("pack $id.1rangef.lwidth $id.1rangef.width -side left\n"); +sys_gui("frame $id.2rangef\n"); +sys_gui("pack $id.2rangef -side top\n"); +sys_gui("label $id.2rangef.lheight -text \"Height :\"\n"); +sys_gui("entry $id.2rangef.height -textvariable $var_graph_height -width 7\n"); +sys_gui("pack $id.2rangef.lheight $id.2rangef.height -side left\n"); +sys_gui("bind $id.1rangef.name [concat scratcher_ok $id]\n"); +sys_gui("bind $id.2rangef.height [concat scratcher_ok $id]\n"); +sys_gui("focus $id.1rangef.name\n"); +sys_gui("}\n"); +// ########### scratcher procedures END -- ydegoyon@free.fr ######### diff --git a/scratcher~/tk2c.bash b/scratcher~/tk2c.bash new file mode 100755 index 0000000..9dfeb03 --- /dev/null +++ b/scratcher~/tk2c.bash @@ -0,0 +1,24 @@ +#!/bin/bash + +#set -x + +while read line +do + for word in $line + do + if [ "X"$word != "X"${word#\#} ] + then + echo // ${line#\#} + break + else + line=${line//\'/\\\'} +#useless, slashes never gets in + line=${line//\\/\\\\} +#this one's dirty, i know + line=${line//;/\\\\;} + line=${line//\"/\\\"} + echo 'sys_gui("'$line'\n");' + break + fi + done +done diff --git a/scrolllist/CHANGES.LOG b/scrolllist/CHANGES.LOG index f374175..ceb5041 100755 --- a/scrolllist/CHANGES.LOG +++ b/scrolllist/CHANGES.LOG @@ -1,2 +1,4 @@ +0.2 + fixed coordinates for GOP support 0.1 initial version diff --git a/scrolllist/Makefile b/scrolllist/Makefile index a8624eb..cd6ae28 100755 --- a/scrolllist/Makefile +++ b/scrolllist/Makefile @@ -29,7 +29,7 @@ pd_linux: $(NAME).pd_linux LINUXCFLAGS = -DPD -DUNIX -O2 -funroll-loops -fomit-frame-pointer \ -Wall -W -Wno-shadow -Wstrict-prototypes \ - -Wno-unused -Wno-parentheses -Wno-switch -Werror -g + -Wno-unused -Wno-parentheses -Wno-switch -g .c.pd_linux: ./tk2c.bash < $*.tk > $*.tk2c diff --git a/scrolllist/help-scrolllist.pd b/scrolllist/help-scrolllist.pd index 6563f16..160370d 100755 --- a/scrolllist/help-scrolllist.pd +++ b/scrolllist/help-scrolllist.pd @@ -50,11 +50,11 @@ #X msg 620 270 rewind; #X obj 527 269 l2s; #X msg 525 236 add \$1; -#X obj 748 216 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 +#X obj 748 216 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1; #X obj 747 237 metro 1000; -#X obj 35 222 scrolllist 25 400 200 {Helvetica 12 normal} black green -#904562; +#X obj 35 222 scrolllist 25 400 200 {Courier 12 bold} black green #904562 +; #X text 470 343 the mouse in the text area; #X msg 33 57 clear; #X text 79 57 clear all; diff --git a/scrolllist/scrolllist.c b/scrolllist/scrolllist.c index f1ccc84..deed3cd 100755 --- a/scrolllist/scrolllist.c +++ b/scrolllist/scrolllist.c @@ -41,9 +41,8 @@ #include "g_canvas.h" #include "t_tk.h" -#ifdef _WIN32 +#ifdef NT #include -#include #else #include #include @@ -55,7 +54,7 @@ static t_class *scrolllist_class; static int guidebug=0; -static char *scrolllist_version = "scrolllist: scrolling list of text items : version 0.1, written by Yves Degoyon (ydegoyon@free.fr)"; +static char *scrolllist_version = "scrolllist: scrolling list of text items : version 0.2, written by Yves Degoyon (ydegoyon@free.fr)"; #define MIN(a,b) (a>b?b:a) @@ -280,7 +279,7 @@ static void scrolllist_save(t_gobj *z, t_binbuf *b) // post( "saving scrolllist : %d", x->x_capacity ); binbuf_addv(b, "ssiisiiissss", gensym("#X"), gensym("obj"), - (t_int)text_xpix(&x->x_obj, x->x_glist), (t_int)text_ypix(&x->x_obj, x->x_glist), + (t_int)x->x_obj.te_xpix, (t_int)x->x_obj.te_ypix, gensym("scrolllist"), x->x_capacity, x->x_width, x->x_height, gensym(x->x_font), gensym(x->x_bgcolor), gensym(x->x_fgcolor), gensym(x->x_secolor) ); diff --git a/sonogram~/CHANGES.LOG b/sonogram~/CHANGES.LOG index 77b7234..d00ef2e 100644 --- a/sonogram~/CHANGES.LOG +++ b/sonogram~/CHANGES.LOG @@ -1,3 +1,5 @@ +0.14 + remove GOP support 0.13 added GOP support 0.12 diff --git a/sonogram~/sonogram~.c b/sonogram~/sonogram~.c index d19b4a9..b43405a 100644 --- a/sonogram~/sonogram~.c +++ b/sonogram~/sonogram~.c @@ -29,9 +29,6 @@ /* ---------------------------------------------------------------------------- */ -/* this doesn't compile on MinGW */ -#ifndef _WIN32 - #include #include @@ -40,27 +37,16 @@ #include #include #include - -#ifdef __APPLE__ -#include -#else #include -#endif - #include #include -#ifdef _WIN32 -#include -#define random rand -#define usleep(a) _sleep(a/1000) -#else +#ifdef UNIX #include #endif -#include - -#ifndef M_PI +#ifdef NT #define M_PI 3.14159265358979323846 #endif +#include #include "m_pd.h" #include "m_imp.h" @@ -110,7 +96,7 @@ static int ignorevisible=1; // ignore visible test #define THREAD_SLEEP_TIME 100000 // 100000 us = 100 ms -static char *sonogram_version = "sonogram~: version 0.12, written by Yves Degoyon (ydegoyon@free.fr)"; +static char *sonogram_version = "sonogram~: version 0.14, written by Yves Degoyon (ydegoyon@free.fr)"; static t_class *sonogram_class; t_widgetbehavior sonogram_widgetbehavior; @@ -334,7 +320,7 @@ static void sonogram_update_block(t_sonogram *x, t_glist *glist, t_int bnumber) } for ( i=0; ix_zoom; i++ ) { - sprintf( x->x_guicommand, "SONIMAGE%x put {%s} -to %d 0\n", (unsigned int)x, x->x_gifdata, (int) ((bnumber*x->x_zoom)+i) ); + sprintf( x->x_guicommand, "SONIMAGE%x put {%s} -to %d 0\n", (unsigned int)x, x->x_gifdata, (bnumber*x->x_zoom)+i ); sys_gui( x->x_guicommand ); } @@ -354,7 +340,7 @@ static void sonogram_update_block(t_sonogram *x, t_glist *glist, t_int bnumber) } for ( i=0; ix_zoom; i++ ) { - sprintf( x->x_guicommand, "FAZIMAGE%x put {%s} -to %d 0\n", (unsigned int)x, x->x_gifdata, (int) ((bnumber*x->x_zoom)+i) ); + sprintf( x->x_guicommand, "FAZIMAGE%x put {%s} -to %d 0\n", (unsigned int)x, x->x_gifdata, (bnumber*x->x_zoom)+i ); sys_gui( x->x_guicommand ); } } @@ -385,15 +371,15 @@ static void sonogram_erase_block(t_sonogram *x, t_glist *glist, t_int bnumber ) static void *sonogram_do_update_part(void *tdata) { - t_sonogram *x = (t_sonogram*) tdata; - t_int si; - t_int nbpoints = 0; - t_float percentage = 0, opercentage = 0; - t_canvas *canvas=glist_getcanvas(x->x_glist); - - + t_sonogram *x = (t_sonogram*) tdata; + t_int si; + t_int nbpoints = 0; + t_float percentage = 0, opercentage = 0; + t_canvas *canvas=glist_getcanvas(x->x_glist); + + // loose synchro - usleep( THREAD_SLEEP_TIME ); + usleep( THREAD_SLEEP_TIME ); // check boundaries if ( x->x_updateend > x->x_size-1 ) x->x_updateend = x->x_size-1; @@ -860,7 +846,7 @@ static void sonogram_save(t_gobj *z, t_binbuf *b) t_sonogram *x = (t_sonogram *)z; binbuf_addv(b, "ssiisiii", gensym("#X"),gensym("obj"), - (t_int)x->x_xpos, (t_int)x->x_ypos, + (t_int)x->x_obj.te_xpix, (t_int)x->x_obj.te_ypix, gensym("sonogram~"), x->x_size, x->x_graphic, x->x_phaso ); binbuf_addv(b, ";"); } @@ -2090,5 +2076,3 @@ void sonogram_tilde_setup(void) class_addmethod(sonogram_class, (t_method)sonogram_readspeed, gensym("readspeed"), A_FLOAT, A_NULL); class_addmethod(sonogram_class, (t_method)sonogram_undo, gensym("undo"), A_NULL); } - -#endif /* not _WIN32 */ -- cgit v1.2.1