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 +++++++++++++++++++++++++++++++++++++++ 5 files changed, 134 insertions(+), 3 deletions(-) create mode 100644 audience~/audience~.tk2c create mode 100644 audience~/help-audience~.pd (limited to 'audience~') 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; -- cgit v1.2.1