Update of /cvsroot/pure-data/externals/unauthorized/audience~ In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10362/audience~
Added Files: audience~.tk2c help-audience~.pd Log Message: fixed coordinates for GOP
--- NEW FILE: help-audience~.pd --- #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 <right mouse>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~ <width> <height> <nbinputs> <nblisteners> <attenuation> <apply delay flag> | 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;
--- NEW FILE: audience~.tk2c --- // ########### 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 <KeyPress-Return> [concat audience_ok $id]\n"); sys_gui("bind $id.2rangef.height <KeyPress-Return> [concat audience_ok $id]\n"); sys_gui("bind $id.3rangef.nboutputs <KeyPress-Return> [concat audience_ok $id]\n"); sys_gui("focus $id.1rangef.width\n"); sys_gui("}\n"); // ########### audience procedures END -- ydegoyon@free.fr #########