pddp-0.2.1/0000755000076500007650000000000012076107341011120 5ustar hanshanspddp-0.2.1/pddplink.tcl0000644000076500007650000000112312076104535013430 0ustar hanshans proc pddplink_open {filename dir} { if {[string first "://" $filename] > -1} { menu_openfile $filename } elseif {[file pathtype $filename] eq "absolute"} { menu_openfile $filename } elseif {[file exists [file join $dir $filename]]} { set fullpath [file normalize [file join $dir $filename]] set dir [file dirname $fullpath] set filename [file tail $fullpath] menu_doc_open $dir $filename } else { bell ;# beep on error to provide instant feedback pdtk_post "\[pddplink\] ERROR file not found: $filename\n" } } pddp-0.2.1/helplink.c0000644000076500007650000001305512076104535013100 0ustar hanshans/* Copyright (c) 2005 krzYszcz and others. * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. */ /* This is a prototype of an active comment. It might be replaced with a new core object type, T_LINK (te_type bitfield would have to be extended then). */ #include #include #ifdef _WIN32 # include #else # include #endif #include "m_pd.h" #include "m_imp.h" #include "g_canvas.h" /* this isn't in any header, but its declared in s_path.c */ void open_via_helppath(const char *name, const char *dir); typedef struct _helplink { t_object x_ob; t_glist *x_glist; int x_isgopvisible; char *x_vistext; int x_vissize; int x_vislength; int x_rtextactive; t_symbol *x_ulink; } t_helplink; static t_class *helplink_class; static void helplink_getrect(t_gobj *z, t_glist *glist, int *xp1, int *yp1, int *xp2, int *yp2) { t_helplink *x = (t_helplink *)z; int width, height; float x1, y1, x2, y2; if (glist->gl_editor && glist->gl_editor->e_rtext) { if (x->x_rtextactive) { t_rtext *y = glist_findrtext(glist, (t_text *)x); width = rtext_width(y); height = rtext_height(y) - 2; } else { int font = glist_getfont(glist); width = x->x_vislength * sys_fontwidth(font) + 2; height = sys_fontheight(font) + 2; } } else width = height = 10; x1 = text_xpix((t_text *)x, glist); y1 = text_ypix((t_text *)x, glist) + 1; x2 = x1 + width; y2 = y1 + height + 1; *xp1 = x1; *yp1 = y1; *xp2 = x2; *yp2 = y2; } static void helplink_displace(t_gobj *z, t_glist *glist, int dx, int dy) { t_text *t = (t_text *)z; t->te_xpix += dx; t->te_ypix += dy; if (glist_isvisible(glist)) { t_rtext *y = glist_findrtext(glist, t); rtext_displace(y, dx, dy); } } static void helplink_select(t_gobj *z, t_glist *glist, int state) { t_helplink *x = (t_helplink *)z; t_rtext *y = glist_findrtext(glist, (t_text *)x); rtext_select(y, state); if (glist_isvisible(glist) && glist->gl_havewindow) { if (state) sys_vgui(".x%lx.c itemconfigure %s -fill blue\n", glist, rtext_gettag(y)); else sys_vgui(".x%lx.c itemconfigure %s -text {%s} -fill #0000dd -activefill #e70000\n", glist, rtext_gettag(y), x->x_vistext); } } static void helplink_activate(t_gobj *z, t_glist *glist, int state) { t_helplink *x = (t_helplink *)z; t_rtext *y = glist_findrtext(glist, (t_text *)x); rtext_activate(y, state); x->x_rtextactive = state; } static void helplink_vis(t_gobj *z, t_glist *glist, int vis) { t_helplink *x = (t_helplink *)z; t_rtext *y; if (vis) { if ((glist->gl_havewindow || x->x_isgopvisible) && (y = glist_findrtext(glist, (t_text *)x))) { rtext_draw(y); sys_vgui(".x%lx.c itemconfigure %s -text {%s} -fill #0000dd -activefill #e70000\n", glist_getcanvas(glist), rtext_gettag(y), x->x_vistext); } } else { if ((glist->gl_havewindow || x->x_isgopvisible) && (y = glist_findrtext(glist, (t_text *)x))) rtext_erase(y); } } static void helplink_doclick(t_helplink *x) { char* objectname = x->x_ulink->s_name; char dirbuf[MAXPDSTRING], *nameptr; int fd = canvas_open(x->x_glist, objectname, "-help.pd", dirbuf, &nameptr, MAXPDSTRING, 0); if (fd < 0) { /* if canvas_open() failed try open_via_helppath() */ open_via_helppath(objectname, canvas_getdir(x->x_glist)->s_name); } else { /* if canvas_open() gave us a filehandle, then we have a helppatch to * open in dirbuf and nameptr, but we don't need the filehandle */ close(fd); glob_evalfile(NULL, gensym(nameptr), gensym(dirbuf)); } } static int helplink_click(t_gobj *z, t_glist *glist, int xpix, int ypix, int shift, int alt, int dbl, int doit) { t_helplink *x = (t_helplink *)z; if (glist->gl_havewindow || x->x_isgopvisible) { if (doit) helplink_doclick(x); return (1); } else return (0); } static void helplink_free(t_helplink *x) { if (x->x_vistext) freebytes(x->x_vistext, x->x_vissize); } static void *helplink_new(t_symbol *s) { t_helplink *x = (t_helplink *) pd_new(helplink_class); x->x_isgopvisible = 0; x->x_vistext = 0; x->x_vissize = 0; x->x_vislength = (x->x_vistext ? strlen(x->x_vistext) : 0); x->x_rtextactive = 0; x->x_glist = canvas_getcurrent(); if (s == &s_) x->x_ulink = gensym("helplink"); /* default to helplink help patch */ else x->x_ulink = s; /* do we need to set ((t_text *)x)->te_type = T_TEXT; ? */ if (!x->x_vistext) { x->x_vislength = strlen(x->x_ulink->s_name); x->x_vissize = x->x_vislength + 1; x->x_vistext = getbytes(x->x_vissize); strcpy(x->x_vistext, x->x_ulink->s_name); } return (x); } static t_widgetbehavior helplink_widgetbehavior = { helplink_getrect, helplink_displace, helplink_select, helplink_activate, 0, helplink_vis, helplink_click, }; void helplink_setup(void) { helplink_class = class_new(gensym("helplink"), (t_newmethod)helplink_new, (t_method)helplink_free, sizeof(t_helplink), CLASS_PATCHABLE, A_DEFSYMBOL, 0); class_addbang(helplink_class, helplink_doclick); class_setwidget(helplink_class, &helplink_widgetbehavior); } pddp-0.2.1/pddplink-help.pd0000644000076500007650000000176512076104535014213 0ustar hanshans#N canvas 319 94 424 397 12; #X text 20 10 first entry; #X text 50 50 three ways of linking to a; #X text 50 170 three ways of linking to a; #X obj 50 195 pddplink http://puredata.info; #X obj 50 239 pddplink http://puredata.info -box; #X text 50 290 three ways of linking to; #X obj 260 290 pddplink dsp-help.pd -text another local patch; #X obj 50 315 pddplink dsp-help.pd; #X obj 52 359 pddplink dsp-help.pd -box; #X obj 270 170 pddplink http://puredata.info -text remote URL; #X obj 270 50 pddplink README.txt -text local file; #X obj 50 75 pddplink README.txt; #X obj 50 120 pddplink README.txt -box; #X obj 52 339 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X text 73 336 <-- bang to open the link; #X obj 50 219 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X text 71 216 <-- bang to open the link; #X obj 50 99 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X text 71 96 <-- bang to open the link; #X connect 13 0 8 0; #X connect 15 0 4 0; #X connect 17 0 12 0; pddp-0.2.1/ezoutput~-help.pd0000644000076500007650000000047612076104535014501 0ustar hanshans#N canvas 103 48 450 300 10; #X obj 104 118 osc~ 480; #X obj 241 122 noise~; #X text 38 28 a GUI replacement for [dac~] with controls for "compute audio" \, volume \, and a mute button.; #X obj 91 166 ezoutput~; #X obj 220 165 ezoutput~; #X connect 0 0 3 0; #X connect 0 0 3 1; #X connect 1 0 4 1; #X connect 1 0 4 0; pddp-0.2.1/parse_meta.pd0000644000076500007650000000277612076104535013603 0ustar hanshans#N canvas 408 104 665 545 10; #X obj 100 122 textfile; #X obj 153 143 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X msg 30 80 bang; #X msg 111 80 rewind; #X obj 242 185 route #X #N; #X obj 210 451 pddp/print; #X obj 277 206 route canvas; #X msg 316 308 1; #X obj 184 341 spigot 0; #X obj 316 288 bang; #X obj 175 268 route text restore; #X obj 235 288 bang; #X msg 235 308 0; #X obj 184 364 list split 2; #X obj 100 163 trigger bang anything; #X obj 48 140 bang; #X obj 277 227 list split 4; #X obj 316 247 list trim; #X obj 316 267 route META; #X obj 336 149 print ----------------------------------; #X obj 29 11 inlet; #X obj 30 40 route symbol; #X msg 193 81 read \$1; #X obj 30 60 trigger bang bang symbol; #X msg 76 10 symbol test/test-meta.pd; #X msg 257 10 symbol test2/test2-meta.pd; #X obj 223 386 list trim; #X obj 111 433 print; #X connect 0 0 14 0; #X connect 0 1 1 0; #X connect 0 1 19 0; #X connect 2 0 0 0; #X connect 3 0 0 0; #X connect 4 0 10 0; #X connect 4 1 6 0; #X connect 6 0 16 0; #X connect 7 0 8 1; #X connect 8 0 13 0; #X connect 9 0 7 0; #X connect 10 0 8 0; #X connect 10 1 11 0; #X connect 11 0 12 0; #X connect 12 0 8 1; #X connect 13 1 26 0; #X connect 14 0 15 0; #X connect 14 1 4 0; #X connect 15 0 0 0; #X connect 16 1 17 0; #X connect 17 0 18 0; #X connect 18 0 9 0; #X connect 20 0 21 0; #X connect 21 0 23 0; #X connect 22 0 0 0; #X connect 23 0 2 0; #X connect 23 1 3 0; #X connect 23 2 22 0; #X connect 24 0 21 0; #X connect 25 0 21 0; #X connect 26 0 5 0; #X connect 26 0 27 0; pddp-0.2.1/+pager-help.pd0000644000076500007650000000073012076104535013546 0ustar hanshans#N canvas 368 122 488 350 10; #X obj 144 178 pddp/open +pager; #X text 20 60 +pager.pd is an object that allows you to navigate through a folder of files with "previous" and "next" buttons.; #X text 24 97 To use it \, copy to the folder where the files that you want to browser thru are. The filenames need to start with a number in order to be controlled by +pager.pd.; #X text 36 241 +pager.pd should be the first file in the list in order for things to work properly.; pddp-0.2.1/pddp-meta.pd0000644000076500007650000000047412076104535013327 0ustar hanshans#N canvas 10 10 200 200 10; #N canvas 20 20 420 300 META 0; #X text 10 10 META this is a prototype of a libdir meta file; #X text 10 30 NAME pddp; #X text 10 50 LICENSE GNU GPL; #X text 10 70 DESCRIPTION support objects for the Pure Data Documentation Project; #X text 10 90 VERSION 0.2.1; #X restore 10 10 pd META; pddp-0.2.1/open-help.pd0000644000076500007650000000065712076104535013346 0ustar hanshans#N canvas 176 296 462 312 10; #X text 48 47 open the specified file on the click of the button:; #X text 66 200 only relative paths work \, no absolute.; #X text 29 241 for better or worse \, the .pd is automatically appended ; #X obj 56 78 pddp/open dsp-help; #X text 19 9 BUG: relative paths now work \, but files with no path don't; #X obj 57 107 pddp/open dsp-help; #X obj 57 137 pddp/open ../../3.audio.examples/F02.just.say; pddp-0.2.1/ezoutput~.pd0000644000076500007650000000574312076104535013555 0ustar hanshans#N canvas 146 25 548 407 10; #X obj 13 108 hsl 67 18 0.01 1 1 0 \$0-v \$0-v volume 20 10 1 9 -245500 -13381 -1 0 0; #X obj 82 90 tgl 18 0 THIS_IS_HERE_TO_GET_RID_OF_THE_OUTLET \$0-dsp-toggle dsp 2 9 1 9 -225271 -195568 -33289 1 1; #N canvas 366 514 482 356 dsp 0; #X obj 11 7 inlet; #X obj 92 226 select 0 1; #X msg 125 248 6; #X obj 92 57 route dsp; #X obj 92 36 receive pd; #X obj 206 138 loadbang; #X msg 11 220 dsp \$1; #X obj 11 245 send pd; #X msg 206 278 set \$1; #X obj 206 174 value GLOBAL_PDDP_DSP; #X msg 109 278 color \$1 20 12; #X obj 180 309 send \$0-dsp-toggle; #X obj 92 115 change; #X msg 92 247 0; #X connect 0 0 6 0; #X connect 0 0 12 0; #X connect 1 0 13 0; #X connect 1 1 2 0; #X connect 2 0 10 0; #X connect 3 0 12 0; #X connect 4 0 3 0; #X connect 5 0 9 0; #X connect 6 0 7 0; #X connect 8 0 11 0; #X connect 9 0 8 0; #X connect 9 0 1 0; #X connect 10 0 11 0; #X connect 12 0 8 0; #X connect 12 0 1 0; #X connect 12 0 9 0; #X connect 13 0 10 0; #X restore 112 118 pd dsp logic; #X obj 315 2 inlet; #X obj 82 108 bng 18 1000 50 0 THIS_IS_HERE_TO_GET_RID_OF_THE_OUTLET \$0-MUTE_TOGGLE empty 0 9 2 8 -261234 -258113 -1; #X obj 191 2 inlet~; #X obj 86 273 line~; #X obj 186 333 *~; #X obj 206 363 dac~; #X text 203 22 audio in; #X obj 254 2 inlet~; #X obj 248 332 *~; #X obj 201 73 hip~ 3; #X obj 263 73 hip~ 3; #X obj 12 288 send pd; #X msg 12 267 dsp 1; #X obj 248 362 outlet~; #X obj 148 362 outlet~; #X obj 355 362 outlet; #X obj 86 252 pack 0 50; #X text 153 251 <-- make a ramp to avoid clicks or zipper noise; #X msg 86 217 0; #X obj 86 194 moses 0.011; #X text 307 74 filter out DC; #N canvas 148 311 361 328 mute 0; #X obj 23 20 inlet; #X obj 173 20 inlet; #X obj 222 208 float; #X obj 265 121 tgl 15 1 empty empty empty 17 7 0 10 -262144 -1 -1 0 1; #X obj 222 162 spigot; #X obj 172 41 trigger bang bang; #X obj 254 263 outlet; #X msg 274 208 0; #X obj 274 163 select 0; #X obj 127 64 bang; #X msg 127 85 set 1; #X obj 65 304 send \$0-MUTE_TOGGLE; #X msg 65 283 color \$1 13 20; #X obj 65 235 bang; #X msg 65 255 0; #X msg 98 255 3; #X connect 0 0 2 1; #X connect 0 0 9 0; #X connect 1 0 5 0; #X connect 2 0 6 0; #X connect 2 0 13 0; #X connect 3 0 4 1; #X connect 3 0 8 0; #X connect 4 0 2 0; #X connect 5 0 4 0; #X connect 5 1 3 0; #X connect 7 0 6 0; #X connect 8 0 7 0; #X connect 8 0 15 0; #X connect 9 0 10 0; #X connect 9 0 13 0; #X connect 10 0 3 0; #X connect 12 0 11 0; #X connect 13 0 14 0; #X connect 14 0 12 0; #X connect 15 0 12 0; #X restore 86 148 pd mute; #X connect 0 0 15 0; #X connect 0 0 18 0; #X connect 0 0 22 0; #X connect 0 0 24 0; #X connect 1 0 2 0; #X connect 3 0 0 0; #X connect 4 0 24 1; #X connect 5 0 12 0; #X connect 6 0 11 0; #X connect 6 0 7 0; #X connect 7 0 8 0; #X connect 7 0 17 0; #X connect 10 0 13 0; #X connect 11 0 8 1; #X connect 11 0 16 0; #X connect 12 0 7 1; #X connect 13 0 11 1; #X connect 15 0 14 0; #X connect 19 0 6 0; #X connect 21 0 19 0; #X connect 22 0 21 0; #X connect 22 1 19 0; #X connect 24 0 22 0; #X connect 24 0 0 0; #X coords 0 0 1 1 90 40 1 10 90; pddp-0.2.1/+pager.pd0000644000076500007650000000721212076104535012622 0ustar hanshans#N canvas 680 22 420 70 10; #N canvas 48 162 589 578 guts 0; #X obj 251 124 mapping/tolist; #X obj 150 289 list; #X obj 251 175 list-abs/list-len; #X obj 190 19 loadbang; #X obj 156 400 makefilename pd-%s; #X obj 60 10 bng 50 450 50 0 empty empty --> 12 25 1 24 -141952 -1 -1; #X obj 10 10 bng 50 450 50 0 empty empty <-- 10 25 1 24 -87656 -1 -1 ; #X text 70 65 next; #X text 4 65 previous; #X obj 15 132 trigger bang float; #X text 94 99 up; #X obj 150 260 trigger bang float bang bang float; #X obj 324 286 list; #X obj 324 393 pack symbol symbol; #X msg 324 423 \; pd open \$2 \$1; #X obj 453 393 send \$0-filename; #X msg 453 372 label \$1; #X msg 64 98 0; #X msg 16 97 1; #X obj 151 236 cyclone/counter; #X obj 220 300 float 2; #X obj 220 323 select 0; #X msg 156 424 \; \$1 menuclose 1; #X obj 157 356 list-abs/list-idx; #X obj 324 306 list-abs/list-idx; #X obj 190 42 trigger bang bang bang; #X msg 336 497 label \$1; #X obj 336 517 send \$0-folder_name; #X msg 18 503 label \$1; #X obj 18 523 send \$0-current_page; #X obj 18 457 pack float float; #X obj 18 483 zexy/makesymbol (%s/%s); #X obj 63 242 float; #X obj 324 332 hcs/split_path; #X obj 157 378 hcs/split_path; #X obj 271 458 hcs/split_path; #N canvas 760 129 484 296 generate 0; #X obj 70 70 ggee/getdir; #X obj 70 167 hcs/folder_list; #X obj 68 209 select +pager.pd; #X obj 70 101 trigger symbol symbol; #X obj 247 143 makefilename %s/+pager.pd; #X text 167 209 (filter out this file to prevent endless loops); #N canvas 121 53 458 308 glob 0; #X obj 198 6 inlet; #X obj 167 265 outlet; #X obj 82 212 makefilename %s/*.pd; #X obj 213 212 makefilename %s/[0-9]*.pd; #X obj 25 48 zexy/operating_system; #X obj 25 72 select windows; #X obj 25 25 loadbang; #X obj 106 94 bang; #X obj 117 160 cyclone/gate 2; #X msg 25 116 1; #X msg 106 116 2; #X text 255 230 glob; #X text 116 229 windows; #X connect 0 0 8 1; #X connect 2 0 1 0; #X connect 3 0 1 0; #X connect 4 0 5 0; #X connect 5 0 9 0; #X connect 5 1 7 0; #X connect 6 0 4 0; #X connect 7 0 10 0; #X connect 8 0 2 0; #X connect 8 1 3 0; #X connect 9 0 8 0; #X connect 10 0 8 0; #X restore 70 143 pd glob or windows pattern; #X obj 161 254 outlet; #X obj 70 17 inlet; #X connect 0 0 3 0; #X connect 1 0 2 0; #X connect 2 1 7 0; #X connect 3 0 6 0; #X connect 3 1 4 0; #X connect 4 0 2 1; #X connect 6 0 1 0; #X connect 8 0 0 0; #X restore 319 72 pd generate file list; #X msg 172 139 min 0; #X obj 18 434 + 1; #X connect 0 0 1 1; #X connect 0 0 2 0; #X connect 0 0 12 1; #X connect 1 0 23 0; #X connect 2 0 19 4; #X connect 2 0 32 0; #X connect 3 0 25 0; #X connect 4 0 22 0; #X connect 5 0 17 0; #X connect 6 0 18 0; #X connect 9 0 19 0; #X connect 9 1 19 1; #X connect 11 0 1 0; #X connect 11 1 20 1; #X connect 11 2 20 0; #X connect 11 3 12 0; #X connect 11 4 24 1; #X connect 12 0 24 0; #X connect 13 0 14 0; #X connect 16 0 15 0; #X connect 17 0 9 0; #X connect 18 0 9 0; #X connect 19 0 11 0; #X connect 19 0 38 0; #X connect 20 0 21 0; #X connect 21 1 23 1; #X connect 23 0 34 0; #X connect 24 0 33 0; #X connect 25 0 37 0; #X connect 25 1 0 1; #X connect 25 2 36 0; #X connect 26 0 27 0; #X connect 28 0 29 0; #X connect 30 0 31 0; #X connect 31 0 28 0; #X connect 32 0 30 1; #X connect 33 0 13 0; #X connect 33 0 35 0; #X connect 33 1 16 0; #X connect 33 1 13 1; #X connect 34 1 4 0; #X connect 35 1 26 0; #X connect 36 0 0 0; #X connect 37 0 19 0; #X connect 38 0 30 0; #X coords 0 -1 1 1 100 50 1 10 10; #X restore 6 8 pd guts; #X obj 167 8 cnv 15 240 25 empty \$0-folder_name empty 5 12 1 14 -262131 -28 0; #X obj 107 33 cnv 15 300 25 empty \$0-filename empty 5 12 1 14 -262131 -28 0; #X obj 107 8 cnv 15 60 25 empty \$0-current_page empty 5 12 1 14 -262131 -28 0; #X coords 0 0 1 1 85 60 0; pddp-0.2.1/README.txt0000644000076500007650000000305512076104535012623 0ustar hanshans pddp ---- This library was started to provide useful objects for documentation, and its name comes from the Pure Data Documentation Project. The pddplink object is derived from the pddplink object written by Kzrysztof Czaja in externals/miXed/pddp/pddplink.c. That version also includes a web server. [pddplink] ChangeLog ----------------- alpha3 * .pd back-link tries not to open patches that are already open: if a patch window already exists, it is raised and given focus instead * new option "-gop" (visible in a gop) * bug fix: unclickable in gop, unless visible alpha2 * loading tcl scripts through "package require pddp": . storing them in an immediate subdirectory of the path of pddplink's binary . storing a hand-crafted pkgIndex.tcl there . pddplink's setup appends the path of its binary to tcl's "auto_path" * pddpserver asks for auto-assigning its port first, then starts incrementing from 32768 * pddplink's appearance controlled with creation options (an option switch is any symbol starting from '-' followed by a letter) * options currently recognized: . "-box" (standard object box) . "-text" followed by any number of non-option atoms (body text) * nonboxed version (default) has a custom widgetbehavior, which is a thin layer on top of the standard text widgetbehavior (using all rtext routines), so that merging into core Pd, as a new object type, T_LINK, would be easy. alpha1 * prototype versions of the external "pddplink" and two pd-gui extensions "pddpserver.tcl", "pddpclient.tcl" pddp-0.2.1/open.pd0000644000076500007650000000357112076104535012416 0ustar hanshans#N canvas 128 78 535 398 10; #X obj 200 -3 inlet; #X msg 112 265 \; pd open \$1.pd \$2; #X obj 47 0 bng 17 250 50 0 \$0- \$0- empty 0 -6 0 8 -44926 -1 -1; #X obj 40 61 symbol \$1; #X obj 98 40 symbol; #X text 315 350 released under the GNU GPL; #X text 98 338 (C) Copyright 2005 Hans-Christoph Steiner ; #X text 111 61 <-- store the last value so that the GOP bang will open it; #X text 20 307 This patch opens a patch either from the first argument or sent in as a message.; #X obj 0 0 cnv 16 46 18 empty empty open: 6 9 0 14 -233017 -1 0; #X text 20 174 GOP: 168x18; #X obj 112 232 pack symbol symbol; #X msg 289 162 set \$1; #X obj 233 208 makefilename; #X obj 112 101 trigger symbol symbol bang; #X obj 289 143 makefilename %s/%%s; #X obj 112 209 ext13/strippath; #N canvas 178 406 466 316 splitfilename 0; #X obj 124 58 inlet; #X obj 173 263 outlet; #X text 21 8 this is a kludge to work around a bug in [splitfilename] which makes it output a filename with no slashes as a folder rather than a file.; #X obj 210 165 select symbol; #X obj 297 143 symbol; #X obj 210 115 trigger symbol bang; #X obj 173 217 spigot; #X msg 359 172 1; #X msg 190 192 0; #X msg 249 217 symbol /; #X obj 124 84 iemlib/splitfilename; #X connect 0 0 10 0; #X connect 3 0 8 0; #X connect 3 0 9 0; #X connect 4 0 3 1; #X connect 5 0 3 0; #X connect 5 1 4 0; #X connect 5 1 7 0; #X connect 6 0 1 0; #X connect 7 0 6 1; #X connect 8 0 6 1; #X connect 9 0 1 0; #X connect 10 0 6 0; #X connect 10 1 5 0; #X restore 154 151 pd splitfilename; #X obj 289 123 ggee/getdir; #X connect 0 0 4 0; #X connect 0 0 14 0; #X connect 2 0 3 0; #X connect 3 0 14 0; #X connect 4 0 3 1; #X connect 11 0 1 0; #X connect 12 0 13 0; #X connect 13 0 11 1; #X connect 14 0 16 0; #X connect 14 1 17 0; #X connect 14 2 18 0; #X connect 15 0 12 0; #X connect 16 0 11 0; #X connect 17 0 13 0; #X connect 18 0 15 0; #X coords 0 0 1 1 124 17 1 0 0; pddp-0.2.1/pddplink.c0000644000076500007650000002132112076104535013072 0ustar hanshans/* Copyright (c) 2005 krzYszcz and others. * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. */ /* This is a prototype of an active comment. It might be replaced with a new core object type, T_LINK (te_type bitfield would have to be extended then). */ #include #include #include "m_pd.h" #include "m_imp.h" /* FIXME need access to c_externdir... */ #include "g_canvas.h" typedef struct _pddplink { t_object x_ob; t_glist *x_glist; int x_isboxed; char *x_vistext; int x_vissize; int x_vislength; int x_rtextactive; t_symbol *x_dirsym; t_symbol *x_ulink; t_atom x_openargs[2]; int x_linktype; int x_ishit; } t_pddplink; static t_class *pddplink_class; static t_class *pddplinkbox_class; /* Code that might be merged back to g_text.c starts here: */ static void pddplink_getrect(t_gobj *z, t_glist *glist, int *xp1, int *yp1, int *xp2, int *yp2) { t_pddplink *x = (t_pddplink *)z; int width, height; float x1, y1, x2, y2; if (glist->gl_editor && glist->gl_editor->e_rtext) { if (x->x_rtextactive) { t_rtext *y = glist_findrtext(glist, (t_text *)x); width = rtext_width(y); height = rtext_height(y) - 2; } else { int font = glist_getfont(glist); width = x->x_vislength * sys_fontwidth(font) + 2; height = sys_fontheight(font) + 2; } } else width = height = 10; x1 = text_xpix((t_text *)x, glist); y1 = text_ypix((t_text *)x, glist); x2 = x1 + width; y2 = y1 + height; y1 += 1; *xp1 = x1; *yp1 = y1; *xp2 = x2; *yp2 = y2; } static void pddplink_displace(t_gobj *z, t_glist *glist, int dx, int dy) { t_text *t = (t_text *)z; t->te_xpix += dx; t->te_ypix += dy; if (glist_isvisible(glist)) { t_rtext *y = glist_findrtext(glist, t); rtext_displace(y, dx, dy); } } static void pddplink_select(t_gobj *z, t_glist *glist, int state) { t_pddplink *x = (t_pddplink *)z; t_rtext *y = glist_findrtext(glist, (t_text *)x); rtext_select(y, state); if (state) sys_vgui(".x%lx.c itemconfigure %s -fill blue\n", glist, rtext_gettag(y)); else sys_vgui(".x%lx.c itemconfigure %s -text {%s} -fill #0000dd -activefill #e70000\n", glist, rtext_gettag(y), x->x_vistext); } static void pddplink_activate(t_gobj *z, t_glist *glist, int state) { t_pddplink *x = (t_pddplink *)z; t_rtext *y = glist_findrtext(glist, (t_text *)x); rtext_activate(y, state); x->x_rtextactive = state; } static void pddplink_vis(t_gobj *z, t_glist *glist, int vis) { t_pddplink *x = (t_pddplink *)z; t_rtext *y = glist_findrtext(glist, (t_text *)x); if (vis) { rtext_draw(y); sys_vgui(".x%lx.c itemconfigure %s -text {%s} -fill #0000dd -activefill #e70000\n", glist_getcanvas(glist), rtext_gettag(y), x->x_vistext); } else rtext_erase(y); } static int pddplink_wbclick(t_gobj *z, t_glist *glist, int xpix, int ypix, int shift, int alt, int dbl, int doit); static t_widgetbehavior pddplink_widgetbehavior = { pddplink_getrect, pddplink_displace, pddplink_select, pddplink_activate, 0, pddplink_vis, pddplink_wbclick, }; /* Code that might be merged back to g_text.c ends here. */ /* FIXME need access to glob_pdobject... */ static t_pd *pddplink_pdtarget(t_pddplink *x) { t_pd *pdtarget = gensym("pd")->s_thing; if (pdtarget && !strcmp(class_getname(*pdtarget), "pd")) return (pdtarget); else return ((t_pd *)x); /* internal error */ } static void pddplink_anything(t_pddplink *x, t_symbol *s, int ac, t_atom *av) { if (x->x_ishit) { startpost("pddplink: internal error (%s", (s ? s->s_name : "")); postatom(ac, av); post(")"); } } static void pddplink_click(t_pddplink *x, t_floatarg xpos, t_floatarg ypos, t_floatarg shift, t_floatarg ctrl, t_floatarg alt) { x->x_ishit = 1; sys_vgui("pddplink_open {%s} {%s}\n", \ x->x_ulink->s_name, x->x_dirsym->s_name); x->x_ishit = 0; } static void pddplink_bang(t_pddplink *x) { pddplink_click(x, 0, 0, 0, 0, 0); } static int pddplink_wbclick(t_gobj *z, t_glist *glist, int xpix, int ypix, int shift, int alt, int dbl, int doit) { t_pddplink *x = (t_pddplink *)z; if (doit) { pddplink_click(x, (t_floatarg)xpix, (t_floatarg)ypix, (t_floatarg)shift, 0, (t_floatarg)alt); return (1); } else return (0); } static int pddplink_isoption(char *name) { if (*name == '-') { char c = name[1]; return ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')); } else return (0); } static t_symbol *pddplink_nextsymbol(int ac, t_atom *av, int opt, int *skipp) { int ndx; for (ndx = 0; ndx < ac; ndx++, av++) { if (av->a_type == A_SYMBOL && (!opt || pddplink_isoption(av->a_w.w_symbol->s_name))) { *skipp = ++ndx; return (av->a_w.w_symbol); } } return (0); } static int pddplink_dooptext(char *dst, int maxsize, int ac, t_atom *av) { int i, sz, sep, len; char buf[32], *src; for (i = 0, sz = 0, sep = 0; i < ac; i++, av++) { if (sep) { sz++; if (sz >= maxsize) break; else if (dst) { *dst++ = ' '; *dst = 0; } } else sep = 1; if (av->a_type == A_SYMBOL) src = av->a_w.w_symbol->s_name; else if (av->a_type == A_FLOAT) { src = buf; sprintf(src, "%g", av->a_w.w_float); } else { sep = 0; continue; } len = strlen(src); sz += len; if (sz >= maxsize) break; else if (dst) { strcpy(dst, src); dst += len; } } return (sz); } static char *pddplink_optext(int *sizep, int ac, t_atom *av) { char *result; int sz = pddplink_dooptext(0, MAXPDSTRING, ac, av); *sizep = sz + (sz >= MAXPDSTRING ? 4 : 1); result = getbytes(*sizep); pddplink_dooptext(result, sz + 1, ac, av); if (sz >= MAXPDSTRING) { sz = strlen(result); strcpy(result + sz, "..."); } return (result); } static void pddplink_free(t_pddplink *x) { if (x->x_vistext) freebytes(x->x_vistext, x->x_vissize); } static void *pddplink_new(t_symbol *s, int ac, t_atom *av) { t_pddplink xgen, *x; int skip; xgen.x_isboxed = 0; xgen.x_vistext = 0; xgen.x_vissize = 0; if ((xgen.x_ulink = pddplink_nextsymbol(ac, av, 0, &skip))) { t_symbol *opt; ac -= skip; av += skip; while ((opt = pddplink_nextsymbol(ac, av, 1, &skip))) { ac -= skip; av += skip; if (opt == gensym("-box")) xgen.x_isboxed = 1; else if (opt == gensym("-text")) { t_symbol *nextsym = pddplink_nextsymbol(ac, av, 1, &skip); int natoms = (nextsym ? skip - 1 : ac); if (natoms) xgen.x_vistext = pddplink_optext(&xgen.x_vissize, natoms, av); } } } x = (t_pddplink *) pd_new(xgen.x_isboxed ? pddplinkbox_class : pddplink_class); x->x_glist = canvas_getcurrent(); x->x_dirsym = canvas_getdir(x->x_glist); /* FIXME */ x->x_isboxed = xgen.x_isboxed; x->x_vistext = xgen.x_vistext; x->x_vissize = xgen.x_vissize; x->x_vislength = (x->x_vistext ? strlen(x->x_vistext) : 0); x->x_rtextactive = 0; if (xgen.x_ulink) x->x_ulink = xgen.x_ulink; else x->x_ulink = gensym("Untitled"); SETSYMBOL(&x->x_openargs[0], x->x_ulink); SETSYMBOL(&x->x_openargs[1], x->x_dirsym); x->x_ishit = 0; if (x->x_isboxed) outlet_new((t_object *)x, &s_anything); else { /* do we need to set ((t_text *)x)->te_type = T_TEXT; ? */ if (!x->x_vistext) { x->x_vislength = strlen(x->x_ulink->s_name); x->x_vissize = x->x_vislength + 1; x->x_vistext = getbytes(x->x_vissize); strcpy(x->x_vistext, x->x_ulink->s_name); } } return (x); } void pddplink_setup(void) { t_symbol *dirsym; pddplink_class = class_new(gensym("pddplink"), (t_newmethod)pddplink_new, (t_method)pddplink_free, sizeof(t_pddplink), CLASS_NOINLET | CLASS_PATCHABLE, A_GIMME, 0); class_addanything(pddplink_class, pddplink_anything); class_setwidget(pddplink_class, &pddplink_widgetbehavior); pddplinkbox_class = class_new(gensym("pddplink"), 0, (t_method)pddplink_free, sizeof(t_pddplink), 0, A_GIMME, 0); class_addbang(pddplinkbox_class, pddplink_bang); class_addanything(pddplinkbox_class, pddplink_anything); class_addmethod(pddplinkbox_class, (t_method)pddplink_click, gensym("click"), A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, 0); dirsym = pddplink_class->c_externdir; /* FIXME */ sys_vgui("source {%s/pddplink.tcl}\n", dirsym->s_name); } pddp-0.2.1/helplink-help.pd0000644000076500007650000000147512076104535014212 0ustar hanshans#N canvas 280 108 468 497 12; #X declare -stdpath extra/Gem; #X text 20 10 [helplink] makes a clickable link to a help patch based on the object name. It is useful for providing links to help patches in other patches.; #X obj 51 101 helplink select; #X obj 54 304 helplink; #X obj 50 143 helplink cyclone/counter; #X obj 50 181 helplink iemguts/propertybang; #X text 29 234 If the help patch or object does not exist \, [helplink] will not output an error until someone clicks on the link.; #X obj 55 339 helplink Gem/scale; #X obj 250 308 helplink gemwin; #X obj 239 153 declare -stdpath extra/Gem; #X text 33 384 helplink also has a hidden inlet. You can send a bang to simulate clicking a helplink:; #X obj 54 447 helplink select; #X obj 54 425 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X connect 11 0 10 0; pddp-0.2.1/LICENSE.txt0000644000076500007650000003574512076104535012763 0ustar hanshansGNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS pddp-0.2.1/print.pd0000644000076500007650000000502112076104535012601 0ustar hanshans#N canvas 388 179 439 354 10; #X obj 169 48 inlet; #X obj 226 266 send \$0-pddp_print; #X obj 226 140 zexy/list2symbol; #X text 239 225 reset to blank; #X obj 169 90 route bang; #N canvas 673 22 458 308 reset 0; #X obj 72 21 inlet; #X obj 69 264 outlet; #X msg 233 127 label; #X obj 250 101 loadbang; #X msg 36 130 color 0 22; #X obj 55 57 trigger bang bang bang; #X obj 35 99 delay 50; #X msg 116 130 color 26 22; #X connect 0 0 5 0; #X connect 2 0 1 0; #X connect 3 0 2 0; #X connect 4 0 1 0; #X connect 5 0 6 0; #X connect 5 1 7 0; #X connect 5 2 2 0; #X connect 6 0 4 0; #X connect 7 0 1 0; #X restore 169 222 pd reset; #X msg 129 169 bang; #X obj 85 0 cnv 15 15 20 empty empty empty 2 7 0 14 -262144 -262144 0; #X obj 1 3 cnv 15 98 15 empty \$0-pddp_print (gpointer) 2 7 0 14 -262144 -1 0; #X obj 226 170 list prepend label; #X obj 226 194 list trim; #N canvas 673 22 458 308 flash 0; #X obj 35 38 inlet; #X obj 69 264 outlet; #X msg 35 200 color 0 22; #X obj 35 129 delay 50; #X msg 134 200 color 5 22; #X obj 35 104 trigger bang bang; #X obj 134 179 purepd/once; #X connect 0 0 5 0; #X connect 2 0 1 0; #X connect 3 0 2 0; #X connect 3 0 6 1; #X connect 4 0 1 0; #X connect 5 0 3 0; #X connect 5 1 6 0; #X connect 6 0 4 0; #X restore 27 223 pd flash on input; #X msg 75 190 bang; #N canvas 365 22 342 273 convert_pointer_to_anything 0; #X obj 169 102 symbol; #X obj 169 224 t a; #X obj 104 177 spigot; #X obj 137 147 0; #X obj 232 169 b; #X obj 232 192 1; #X obj 104 8 inlet; #X obj 104 246 outlet; #X obj 104 35 t a a; #X obj 169 58 list append foo; #X obj 169 124 sel if(pointer); #X msg 169 80 if\$1; #X text 204 76 (hack to get pointer; #X text 220 88 to substitute); #X text 8 38 enormous; #X text 14 60 hack; #X text 15 84 to; #X text 11 104 keep; #X text 16 125 pointer; #X text 14 144 from; #X text 12 203 and crashing; #X text 13 222 pd; #X text 10 162 passing thru; #X text 13 184 [route] and; #X msg 169 146 (pointer); #X connect 0 0 10 0; #X connect 1 0 7 0; #X connect 2 0 7 0; #X connect 3 0 2 1; #X connect 4 0 5 0; #X connect 5 0 2 1; #X connect 6 0 8 0; #X connect 8 0 2 0; #X connect 8 1 9 0; #X connect 9 0 11 0; #X connect 10 0 24 0; #X connect 10 0 3 0; #X connect 10 1 4 0; #X connect 11 0 0 0; #X connect 24 0 1 0; #X restore 226 116 pd convert_pointer_to_anything; #X connect 0 0 4 0; #X connect 2 0 9 0; #X connect 4 0 5 0; #X connect 4 1 11 0; #X connect 4 1 13 0; #X connect 5 0 1 0; #X connect 6 0 5 0; #X connect 9 0 10 0; #X connect 10 0 1 0; #X connect 11 0 1 0; #X connect 12 0 11 0; #X connect 13 0 2 0; #X coords 0 -1 1 1 100 20 1 0 0; pddp-0.2.1/print_long.pd0000644000076500007650000000470712076104535013632 0ustar hanshans#N canvas 590 245 429 345 10; #X obj 1 3 cnv 12 198 12 empty \$0-pddp_print empty 2 6 1 14 -262144 -33289 0; #X obj 169 48 inlet; #X obj 227 246 send \$0-pddp_print; #X obj 226 138 zexy/list2symbol; #X text 238 213 reset to blank; #X obj 169 90 route bang; #N canvas 673 22 458 308 reset 0; #X obj 72 21 inlet; #X obj 69 264 outlet; #X msg 233 127 label; #X obj 250 101 loadbang; #X msg 36 130 color 0 22; #X obj 55 57 trigger bang bang bang; #X obj 35 99 delay 50; #X msg 116 130 color 26 22; #X connect 0 0 5 0; #X connect 2 0 1 0; #X connect 3 0 2 0; #X connect 4 0 1 0; #X connect 5 0 6 0; #X connect 5 1 7 0; #X connect 5 2 2 0; #X connect 6 0 4 0; #X connect 7 0 1 0; #X restore 169 202 pd reset; #X msg 129 169 bang; #N canvas 365 22 342 273 convert_pointer_to_anything 0; #X obj 169 102 symbol; #X obj 169 224 t a; #X obj 104 177 spigot; #X obj 137 147 0; #X obj 232 169 b; #X obj 232 192 1; #X obj 104 8 inlet; #X obj 104 246 outlet; #X obj 104 35 t a a; #X obj 169 58 list append foo; #X obj 169 124 sel if(pointer); #X msg 169 80 if\$1; #X text 204 76 (hack to get pointer; #X text 220 88 to substitute); #X text 8 38 enormous; #X text 14 60 hack; #X text 15 84 to; #X text 11 104 keep; #X text 16 125 pointer; #X text 14 144 from; #X text 12 203 and crashing; #X text 13 222 pd; #X text 10 162 passing thru; #X text 13 184 [route] and; #X msg 169 146 (pointer); #X connect 0 0 10 0; #X connect 1 0 7 0; #X connect 2 0 7 0; #X connect 3 0 2 1; #X connect 4 0 5 0; #X connect 5 0 2 1; #X connect 6 0 8 0; #X connect 8 0 2 0; #X connect 8 1 9 0; #X connect 9 0 11 0; #X connect 10 0 24 0; #X connect 10 0 3 0; #X connect 10 1 4 0; #X connect 11 0 0 0; #X connect 24 0 1 0; #X restore 226 113 pd convert_pointer_to_anything; #N canvas 566 22 458 308 flash 0; #X obj 35 38 inlet; #X obj 69 264 outlet; #X msg 35 200 color 0 22; #X obj 35 129 delay 50; #X msg 134 200 color 5 22; #X obj 35 104 trigger bang bang; #X obj 134 179 purepd/once; #X connect 0 0 5 0; #X connect 2 0 1 0; #X connect 3 0 2 0; #X connect 3 0 6 1; #X connect 4 0 1 0; #X connect 5 0 3 0; #X connect 5 1 6 0; #X connect 6 0 4 0; #X restore 21 203 pd flash on input; #X msg 27 162 bang; #X obj 226 163 list prepend label; #X obj 226 183 list trim; #X connect 1 0 5 0; #X connect 3 0 11 0; #X connect 5 0 6 0; #X connect 5 1 8 0; #X connect 5 1 9 0; #X connect 6 0 2 0; #X connect 7 0 6 0; #X connect 8 0 3 0; #X connect 9 0 2 0; #X connect 10 0 9 0; #X connect 11 0 12 0; #X connect 12 0 2 0; #X coords 0 -1 1 1 200 18 1 0 0; pddp-0.2.1/print_long-help.pd0000644000076500007650000000140412076104535014547 0ustar hanshans#N canvas 93 178 458 308 10; #X text 13 30 this object is for displaying generic messages in the patch rather than in the Pd window.; #X msg 41 114 word; #X msg 111 114 symbol asdf; #X msg 214 114 list 1 2 3; #X msg 234 162 selector series of 4; #X text 33 68 its got a longer box and its closed on four sides; #X obj 140 220 pddp/print_long; #X obj 83 93 hsl 128 15 0 127 0 0 empty empty empty -2 -6 0 8 -262144 -1 -1 0 1; #X msg 229 138 list of words?; #X text 11 262 because of Pd's type handling \, it strips off data selectors "float" \, "symbol" and "list".; #X msg 222 193 bang; #X text 256 192 flashes and resets to blank; #X connect 1 0 6 0; #X connect 2 0 6 0; #X connect 3 0 6 0; #X connect 4 0 6 0; #X connect 7 0 6 0; #X connect 8 0 6 0; #X connect 10 0 6 0; pddp-0.2.1/Makefile0000644000076500007650000003554612076104535012577 0ustar hanshans## Pd library template version 1.0.11 # For instructions on how to use this template, see: # http://puredata.info/docs/developer/MakefileTemplate LIBRARY_NAME = pddp # add your .c source files to the SOURCES variable, help files will be # included automatically SOURCES = pddplink.c helplink.c # list all pd objects (i.e. myobject.pd) files here, and their helpfiles will # be included automatically PDOBJECTS = +pager.pd dsp.pd ezoutput~.pd open.pd print.pd print_long.pd # example patches and related files, in the 'examples' subfolder EXAMPLES = pddp.css pddplink-test-01.html pddplink-test-01.pd pddplink-test-01.xml pddplink-test-02.html pddplink-test-02.pd pddplink-test-02.xml test.bg.jpg toonepage topdf # manuals and related files, in the 'manual' subfolder MANUAL = # if you want to include any other files in the source and binary tarballs, # list them here. This can be anything from header files, test patches, # documentation, etc. README.txt and LICENSE.txt are required and therefore # automatically included EXTRA_DIST = parse_meta.pd #------------------------------------------------------------------------------# # # things you might need to edit if you are using other C libraries # #------------------------------------------------------------------------------# ALL_CFLAGS = -I"$(PD_INCLUDE)" ALL_LDFLAGS = SHARED_LDFLAGS = ALL_LIBS = #------------------------------------------------------------------------------# # # you shouldn't need to edit anything below here, if we did it right :) # #------------------------------------------------------------------------------# # these can be set from outside without (usually) breaking the build CFLAGS = -Wall -W -g LDFLAGS = LIBS = # 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) ALL_CFLAGS += -DPD -DVERSION='"$(LIBRARY_VERSION)"' PD_INCLUDE = $(PD_PATH)/include/pd # where to install the library, overridden below depending on platform prefix = /usr/local libdir = $(prefix)/lib pkglibdir = $(libdir)/pd-externals objectsdir = $(pkglibdir) INSTALL = install INSTALL_PROGRAM = $(INSTALL) -p -m 644 INSTALL_DATA = $(INSTALL) -p -m 644 INSTALL_DIR = $(INSTALL) -p -m 755 -d ALLSOURCES := $(SOURCES) $(SOURCES_android) $(SOURCES_cygwin) $(SOURCES_macosx) \ $(SOURCES_iphoneos) $(SOURCES_linux) $(SOURCES_windows) DISTDIR=$(LIBRARY_NAME)-$(LIBRARY_VERSION) ORIGDIR=pd-$(LIBRARY_NAME:~=)_$(LIBRARY_VERSION) UNAME := $(shell uname -s) ifeq ($(UNAME),Darwin) CPU := $(shell uname -p) ifeq ($(CPU),arm) # iPhone/iPod Touch SOURCES += $(SOURCES_iphoneos) EXTENSION = pd_darwin SHARED_EXTENSION = dylib OS = iphoneos PD_PATH = /Applications/Pd-extended.app/Contents/Resources IPHONE_BASE=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin CC=$(IPHONE_BASE)/gcc CPP=$(IPHONE_BASE)/cpp CXX=$(IPHONE_BASE)/g++ ISYSROOT = -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk IPHONE_CFLAGS = -miphoneos-version-min=3.0 $(ISYSROOT) -arch armv6 OPT_CFLAGS = -fast -funroll-loops -fomit-frame-pointer ALL_CFLAGS := $(IPHONE_CFLAGS) $(ALL_CFLAGS) ALL_LDFLAGS += -arch armv6 -bundle -undefined dynamic_lookup $(ISYSROOT) SHARED_LDFLAGS += -arch armv6 -dynamiclib -undefined dynamic_lookup $(ISYSROOT) ALL_LIBS += -lc $(LIBS_iphoneos) STRIP = strip -x DISTBINDIR=$(DISTDIR)-$(OS) else # Mac OS X SOURCES += $(SOURCES_macosx) EXTENSION = pd_darwin SHARED_EXTENSION = dylib OS = macosx PD_PATH = /Applications/Pd-extended.app/Contents/Resources 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 else FAT_FLAGS = -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=10.4 SOURCES += $(SOURCES_iphoneos) endif ALL_CFLAGS += $(FAT_FLAGS) -fPIC -I/sw/include # if the 'pd' binary exists, check the linking against it to aid with stripping BUNDLE_LOADER = $(shell test ! -e $(PD_PATH)/bin/pd || echo -bundle_loader $(PD_PATH)/bin/pd) ALL_LDFLAGS += $(FAT_FLAGS) -bundle $(BUNDLE_LOADER) -undefined dynamic_lookup -L/sw/lib SHARED_LDFLAGS += $(FAT_FLAGS) -dynamiclib -undefined dynamic_lookup \ -install_name @loader_path/$(SHARED_LIB) -compatibility_version 1 -current_version 1.0 ALL_LIBS += -lc $(LIBS_macosx) STRIP = strip -x DISTBINDIR=$(DISTDIR)-$(OS) # install into ~/Library/Pd on Mac OS X since /usr/local isn't used much pkglibdir=$(HOME)/Library/Pd endif endif # Tho Android uses Linux, we use this fake uname to provide an easy way to # setup all this things needed to cross-compile for Android using the NDK ifeq ($(UNAME),ANDROID) CPU := arm SOURCES += $(SOURCES_android) EXTENSION = pd_linux SHARED_EXTENSION = so OS = android PD_PATH = /usr NDK_BASE := /usr/local/android-ndk NDK_PLATFORM_VERSION := 5 NDK_SYSROOT=$(NDK_BASE)/platforms/android-$(NDK_PLATFORM_VERSION)/arch-arm NDK_UNAME := $(shell uname -s | tr '[A-Z]' '[a-z]') NDK_TOOLCHAIN_BASE=$(NDK_BASE)/toolchains/arm-linux-androideabi-4.4.3/prebuilt/$(NDK_UNAME)-x86 CC := $(NDK_TOOLCHAIN_BASE)/bin/arm-linux-androideabi-gcc --sysroot=$(NDK_SYSROOT) OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer CFLAGS += LDFLAGS += -rdynamic -shared SHARED_LDFLAGS += -Wl,-soname,$(SHARED_LIB) -shared LIBS += -lc $(LIBS_android) STRIP := $(NDK_TOOLCHAIN_BASE)/bin/arm-linux-androideabi-strip \ --strip-unneeded -R .note -R .comment DISTBINDIR=$(DISTDIR)-$(OS)-$(shell uname -m) endif ifeq ($(UNAME),Linux) CPU := $(shell uname -m) SOURCES += $(SOURCES_linux) EXTENSION = pd_linux SHARED_EXTENSION = so OS = linux PD_PATH = /usr OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer ALL_CFLAGS += -fPIC ALL_LDFLAGS += -rdynamic -shared -fPIC SHARED_LDFLAGS += -Wl,-soname,$(SHARED_LIB) -shared ALL_LIBS += -lc $(LIBS_linux) STRIP = strip --strip-unneeded -R .note -R .comment DISTBINDIR=$(DISTDIR)-$(OS)-$(shell uname -m) endif ifeq ($(UNAME),GNU) # GNU/Hurd, should work like GNU/Linux for basically all externals CPU := $(shell uname -m) SOURCES += $(SOURCES_linux) EXTENSION = pd_linux SHARED_EXTENSION = so OS = linux PD_PATH = /usr OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer ALL_CFLAGS += -fPIC ALL_LDFLAGS += -rdynamic -shared -fPIC SHARED_LDFLAGS += -shared -Wl,-soname,$(SHARED_LIB) ALL_LIBS += -lc $(LIBS_linux) STRIP = strip --strip-unneeded -R .note -R .comment DISTBINDIR=$(DISTDIR)-$(OS)-$(shell uname -m) endif ifeq ($(UNAME),GNU/kFreeBSD) # Debian GNU/kFreeBSD, should work like GNU/Linux for basically all externals CPU := $(shell uname -m) SOURCES += $(SOURCES_linux) EXTENSION = pd_linux SHARED_EXTENSION = so OS = linux PD_PATH = /usr OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer ALL_CFLAGS += -fPIC ALL_LDFLAGS += -rdynamic -shared -fPIC SHARED_LDFLAGS += -shared -Wl,-soname,$(SHARED_LIB) ALL_LIBS += -lc $(LIBS_linux) STRIP = strip --strip-unneeded -R .note -R .comment DISTBINDIR=$(DISTDIR)-$(OS)-$(shell uname -m) endif ifeq (CYGWIN,$(findstring CYGWIN,$(UNAME))) CPU := $(shell uname -m) SOURCES += $(SOURCES_cygwin) EXTENSION = dll SHARED_EXTENSION = dll OS = cygwin PD_PATH = $(shell cygpath $$PROGRAMFILES)/pd OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer ALL_CFLAGS += ALL_LDFLAGS += -rdynamic -shared -L"$(PD_PATH)/src" -L"$(PD_PATH)/bin" SHARED_LDFLAGS += -shared -Wl,-soname,$(SHARED_LIB) ALL_LIBS += -lc -lpd $(LIBS_cygwin) STRIP = strip --strip-unneeded -R .note -R .comment DISTBINDIR=$(DISTDIR)-$(OS) endif ifeq (MINGW,$(findstring MINGW,$(UNAME))) CPU := $(shell uname -m) SOURCES += $(SOURCES_windows) EXTENSION = dll SHARED_EXTENSION = dll OS = windows PD_PATH = $(shell cd "$$PROGRAMFILES/pd" && pwd) # MinGW doesn't seem to include cc so force gcc CC=gcc OPT_CFLAGS = -O3 -funroll-loops -fomit-frame-pointer ALL_CFLAGS += -mms-bitfields ALL_LDFLAGS += -s -shared -Wl,--enable-auto-import -L"$(PD_PATH)/src" -L"$(PD_PATH)/bin" -L"$(PD_PATH)/obj" SHARED_LDFLAGS += -shared ALL_LIBS += -lpd -lwsock32 -lkernel32 -luser32 -lgdi32 $(LIBS_windows) STRIP = strip --strip-unneeded -R .note -R .comment DISTBINDIR=$(DISTDIR)-$(OS) endif # in case somebody manually set the HELPPATCHES above HELPPATCHES ?= $(SOURCES:.c=-help.pd) $(PDOBJECTS:.pd=-help.pd) ALL_CFLAGS := $(ALL_CFLAGS) $(CFLAGS) $(OPT_CFLAGS) ALL_LDFLAGS := $(LDFLAGS) $(ALL_LDFLAGS) ALL_LIBS := $(LIBS) $(ALL_LIBS) SHARED_SOURCE ?= $(shell test ! -e lib$(LIBRARY_NAME).c || \ echo lib$(LIBRARY_NAME).c ) SHARED_HEADER ?= $(shell test ! -e $(LIBRARY_NAME).h || echo $(LIBRARY_NAME).h) SHARED_LIB = $(SHARED_SOURCE:.c=.$(SHARED_EXTENSION)) .PHONY = install libdir_install single_install install-doc install-examples install-manual clean distclean dist etags $(LIBRARY_NAME) all: $(SOURCES:.c=.$(EXTENSION)) $(SHARED_LIB) %.o: %.c $(CC) $(ALL_CFLAGS) -o "$*.o" -c "$*.c" %.$(EXTENSION): %.o $(SHARED_LIB) $(CC) $(ALL_LDFLAGS) -o "$*.$(EXTENSION)" "$*.o" $(ALL_LIBS) $(SHARED_LIB) chmod a-x "$*.$(EXTENSION)" # this links everything into a single binary file $(LIBRARY_NAME): $(SOURCES:.c=.o) $(LIBRARY_NAME).o $(CC) $(ALL_LDFLAGS) -o $(LIBRARY_NAME).$(EXTENSION) $(SOURCES:.c=.o) $(LIBRARY_NAME).o $(ALL_LIBS) chmod a-x $(LIBRARY_NAME).$(EXTENSION) $(SHARED_LIB): $(SHARED_SOURCE:.c=.o) $(CC) $(SHARED_LDFLAGS) -o $(SHARED_LIB) $(SHARED_SOURCE:.c=.o) $(LIBS) install: libdir_install # The meta and help files are explicitly installed to make sure they are # actually there. Those files are not optional, then need to be there. libdir_install: $(SOURCES:.c=.$(EXTENSION)) $(SHARED_LIB) install-doc install-examples install-manual $(INSTALL_DIR) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) $(INSTALL_DATA) $(LIBRARY_NAME)-meta.pd \ $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) test -z "$(strip $(SOURCES))" || (\ $(INSTALL_PROGRAM) $(SOURCES:.c=.$(EXTENSION)) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) && \ $(STRIP) $(addprefix $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/,$(SOURCES:.c=.$(EXTENSION)))) test -z "$(strip $(SHARED_LIB))" || \ $(INSTALL_DATA) $(SHARED_LIB) \ $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) test -z "$(strip $(wildcard $(SOURCES:.c=.tcl)))" || \ $(INSTALL_DATA) $(wildcard $(SOURCES:.c=.tcl)) \ $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) test -z "$(strip $(PDOBJECTS))" || \ $(INSTALL_DATA) $(PDOBJECTS) \ $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) # install library linked as single binary single_install: $(LIBRARY_NAME) install-doc install-examples install-manual $(INSTALL_DIR) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) $(INSTALL_PROGRAM) $(LIBRARY_NAME).$(EXTENSION) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) $(STRIP) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/$(LIBRARY_NAME).$(EXTENSION) install-doc: $(INSTALL_DIR) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) test -z "$(strip $(SOURCES) $(PDOBJECTS))" || \ $(INSTALL_DATA) $(HELPPATCHES) \ $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) $(INSTALL_DATA) README.txt $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/README.txt $(INSTALL_DATA) LICENSE.txt $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/LICENSE.txt install-examples: test -z "$(strip $(EXAMPLES))" || \ $(INSTALL_DIR) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/examples && \ for file in $(EXAMPLES); do \ $(INSTALL_DATA) examples/$$file $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/examples; \ done install-manual: test -z "$(strip $(MANUAL))" || \ $(INSTALL_DIR) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/manual && \ for file in $(MANUAL); do \ $(INSTALL_DATA) manual/$$file $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/manual; \ done clean: -rm -f -- $(SOURCES:.c=.o) $(SOURCES_LIB:.c=.o) $(SHARED_SOURCE:.c=.o) -rm -f -- $(SOURCES:.c=.$(EXTENSION)) -rm -f -- $(LIBRARY_NAME).o -rm -f -- $(LIBRARY_NAME).$(EXTENSION) -rm -f -- $(SHARED_LIB) distclean: clean -rm -f -- $(DISTBINDIR).tar.gz -rm -rf -- $(DISTBINDIR) -rm -f -- $(DISTDIR).tar.gz -rm -rf -- $(DISTDIR) -rm -f -- $(ORIGDIR).tar.gz -rm -rf -- $(ORIGDIR) $(DISTBINDIR): $(INSTALL_DIR) $(DISTBINDIR) libdir: all $(DISTBINDIR) $(INSTALL_DATA) $(LIBRARY_NAME)-meta.pd $(DISTBINDIR) $(INSTALL_DATA) $(SOURCES) $(SHARED_SOURCE) $(SHARED_HEADER) $(DISTBINDIR) $(INSTALL_DATA) $(HELPPATCHES) $(DISTBINDIR) test -z "$(strip $(EXTRA_DIST))" || \ $(INSTALL_DATA) $(EXTRA_DIST) $(DISTBINDIR) # tar --exclude-vcs -czpf $(DISTBINDIR).tar.gz $(DISTBINDIR) $(DISTDIR): $(INSTALL_DIR) $(DISTDIR) $(ORIGDIR): $(INSTALL_DIR) $(ORIGDIR) dist: $(DISTDIR) $(INSTALL_DATA) Makefile $(DISTDIR) $(INSTALL_DATA) README.txt $(DISTDIR) $(INSTALL_DATA) LICENSE.txt $(DISTDIR) $(INSTALL_DATA) $(LIBRARY_NAME)-meta.pd $(DISTDIR) test -z "$(strip $(ALLSOURCES))" || \ $(INSTALL_DATA) $(ALLSOURCES) $(DISTDIR) test -z "$(strip $(wildcard $(ALLSOURCES:.c=.tcl)))" || \ $(INSTALL_DATA) $(wildcard $(ALLSOURCES:.c=.tcl)) $(DISTDIR) test -z "$(strip $(SHARED_HEADER))" || \ $(INSTALL_DATA) $(SHARED_HEADER) $(DISTDIR) test -z "$(strip $(SHARED_SOURCE))" || \ $(INSTALL_DATA) $(SHARED_SOURCE) $(DISTDIR) test -z "$(strip $(PDOBJECTS))" || \ $(INSTALL_DATA) $(PDOBJECTS) $(DISTDIR) test -z "$(strip $(HELPPATCHES))" || \ $(INSTALL_DATA) $(HELPPATCHES) $(DISTDIR) test -z "$(strip $(EXTRA_DIST))" || \ $(INSTALL_DATA) $(EXTRA_DIST) $(DISTDIR) test -z "$(strip $(EXAMPLES))" || \ $(INSTALL_DIR) $(DISTDIR)/examples && \ for file in $(EXAMPLES); do \ $(INSTALL_DATA) examples/$$file $(DISTDIR)/examples; \ done test -z "$(strip $(MANUAL))" || \ $(INSTALL_DIR) $(DISTDIR)/manual && \ for file in $(MANUAL); do \ $(INSTALL_DATA) manual/$$file $(DISTDIR)/manual; \ done tar --exclude-vcs -czpf $(DISTDIR).tar.gz $(DISTDIR) # make a Debian source package dpkg-source: debclean make distclean dist mv $(DISTDIR) $(ORIGDIR) tar --exclude-vcs -czpf ../$(ORIGDIR).orig.tar.gz $(ORIGDIR) rm -f -- $(DISTDIR).tar.gz rm -rf -- $(DISTDIR) $(ORIGDIR) cd .. && dpkg-source -b $(LIBRARY_NAME) etags: etags *.h $(SOURCES) ../../pd/src/*.[ch] /usr/include/*.h /usr/include/*/*.h showsetup: @echo "CC: $(CC)" @echo "CFLAGS: $(CFLAGS)" @echo "LDFLAGS: $(LDFLAGS)" @echo "LIBS: $(LIBS)" @echo "ALL_CFLAGS: $(ALL_CFLAGS)" @echo "ALL_LDFLAGS: $(ALL_LDFLAGS)" @echo "ALL_LIBS: $(ALL_LIBS)" @echo "PD_INCLUDE: $(PD_INCLUDE)" @echo "PD_PATH: $(PD_PATH)" @echo "objectsdir: $(objectsdir)" @echo "LIBRARY_NAME: $(LIBRARY_NAME)" @echo "LIBRARY_VERSION: $(LIBRARY_VERSION)" @echo "SOURCES: $(SOURCES)" @echo "SHARED_HEADER: $(SHARED_HEADER)" @echo "SHARED_SOURCE: $(SHARED_SOURCE)" @echo "SHARED_LIB: $(SHARED_LIB)" @echo "PDOBJECTS: $(PDOBJECTS)" @echo "ALLSOURCES: $(ALLSOURCES)" @echo "ALLSOURCES TCL: $(wildcard $(ALLSOURCES:.c=.tcl))" @echo "UNAME: $(UNAME)" @echo "CPU: $(CPU)" @echo "pkglibdir: $(pkglibdir)" @echo "DISTDIR: $(DISTDIR)" @echo "ORIGDIR: $(ORIGDIR)" pddp-0.2.1/print-help.pd0000644000076500007650000000104512076104535013531 0ustar hanshans#N canvas 716 408 466 316 10; #X obj 151 182 pddp/print; #X text 17 48 this object is for displaying generic messages in the patch rather than in the Pd window.; #X msg 24 104 word; #X msg 94 104 symbol asdf; #X msg 197 104 list 1 2 3; #X msg 274 104 selector series of 4; #X msg 246 148 bang; #X text 280 147 flashes and resets to blank; #X text 38 245 because of Pd's type handling \, it strips off data selectors "float" \, "symbol" and "list".; #X connect 2 0 0 0; #X connect 3 0 0 0; #X connect 4 0 0 0; #X connect 5 0 0 0; #X connect 6 0 0 0; pddp-0.2.1/dsp.pd0000644000076500007650000000245112076104535012237 0ustar hanshans#N canvas 312 196 485 397 10; #X obj 19 1 cnv 16 40 16 empty pddp_dsp_canvas dsp 7 8 0 14 -24198 -33289 0; #X obj 0 0 tgl 18 0 THIS_IS_HERE_TO_GET_RID_OF_THE_OUTLET GLOBAL_PDDP_DSP_TOGGLE empty 1 8 1 9 -24198 -33289 -33289 1 1; #X obj 82 236 select 0 1; #X msg 115 258 76; #X msg 80 258 10; #X obj 81 37 route dsp; #X msg 1 200 \; pd dsp \$1; #X text 239 358 released under the GNU GPL; #X text 22 344 (C) Copyright 2005 Hans-Christoph Steiner ; #X msg 109 199 \; GLOBAL_PDDP_DSP_TOGGLE set \$1; #X obj 194 133 float; #X obj 82 135 float; #X obj 81 16 receive pd; #X obj 194 11 receive GLOBAL_PDDP_DSP; #X obj 194 80 bang; #X msg 99 288 \; GLOBAL_PDDP_DSP_TOGGLE color \$1 12 12 \; pddp_dsp_canvas color \$1 12 12; #X obj 239 39 loadbang; #X obj 338 80 send GLOBAL_PDDP_DSP; #X obj 194 100 spigot 0; #X msg 239 80 1; #X obj 239 60 trigger bang bang; #X connect 1 0 6 0; #X connect 1 0 11 0; #X connect 2 0 4 0; #X connect 2 1 3 0; #X connect 3 0 15 0; #X connect 4 0 15 0; #X connect 5 0 11 0; #X connect 5 0 10 1; #X connect 10 0 9 0; #X connect 10 0 6 0; #X connect 11 0 9 0; #X connect 11 0 2 0; #X connect 12 0 5 0; #X connect 13 0 14 0; #X connect 14 0 18 0; #X connect 16 0 20 0; #X connect 18 0 10 0; #X connect 19 0 18 1; #X connect 20 0 19 0; #X connect 20 1 17 0; #X coords 0 0 1 1 60 18 1 0 0; pddp-0.2.1/dsp-help.pd0000644000076500007650000000152712076104535013170 0ustar hanshans#N canvas 105 135 468 434 10; #X obj 30 212 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 ; #X obj 2 2 cnv 15 450 20 empty empty pddp/dsp 2 11 1 18 -233017 -66577 0; #X msg 30 236 \; pd dsp \$1; #X text 18 103 Click in the box to the left in the object to turn on/off the DSP:; #X text 23 279 Notice that if you use the the above message \, [pddp_dsp] still responds to the change in DSP status. [pddp_dsp] also responds to the keyboard shortcuts.; #X text 138 343 On Mac OS X: Cmd-. and Cmd-/; #X text 47 329 On Windows and GNU/Linux: Ctrl-. and Ctrl-/; #X obj 34 142 pddp/dsp; #X text 16 182 [pddp/dsp] is basically a fancy version of this:; #X text 16 39 [pddp/dsp] is a GUI object to turn on and off the audio processing \, aka "DSP". It also shows the status of the DSP \, green means DSP is on \, grey means DSP is off.; #X connect 0 0 2 0; pddp-0.2.1/examples/0000755000076500007650000000000012076107341012736 5ustar hanshanspddp-0.2.1/examples/test.bg.jpg0000644000076500007650000001256312076104535015017 0ustar hanshansJFIFHH Photoshop 3.08BIMHH8BIM8BIM 8BIM' 8BIMH/fflff/ff2Z5-8BIMp8BIM@@8BIM JFIFHH'File written by Adobe Photoshop 4.0Adobed            "?   3!1AQa"q2B#$Rb34rC%Scs5&DTdE£t6UeuF'Vfv7GWgw5!1AQaq"2B#R3$brCScs4%&5DTdEU6teuFVfv'7GWgw ?t v >֓qRWq%GǸ48&T;I)ml}ɋtMs& 1IJ$F%Ip$$$$dEsZ|iD&fѠ~ɠ7@X)oHHHx-%1gBL4 ; 8O@IJ-$%IkG*w'dOpa%?d|SICONִ$Ʌ+Ue:f qd}<H&&p Fx ;x )RN-~' @o.m&3ID}KFv˦{' sRw'X $5y)K"wIKrݠ1!#'@و^{@hIKkHdFOP p{$ jJZ!i$$y&s$9I+U$Ɲʋ s!93. `Dq$뢐tpu)b$:H yԁ$wDa3'MRLǂyo:p6ܤdaIJhiI rXH1_l kNfywlNJPL4䔵۫tJ ȕ!2HHe#iZf9HR0K.F`Ja&{$ή8ִm: ${M8tԔ\;Gu6Om i:h{$;{O6Fؙ䧆h0R P@k8|R.R@;?%-xnH 7tNC yf2Od4@J $ɝe#j$% $h cwI%ǘRW/D4'kGDĵCcPD$7:9R-l50$䒕$OGw@!IԤmiD8Bf6֤j h$"SLj~IK@ RcR}ô S{x,k˓\I@JSZ$'"nILBJXJx hL vIsF$"I'ki?㤥:d<ߩ8BIM'File written by Adobe Photoshop 4.0Adobed              "  s!1AQa"q2B#R3b$r%C4Scs5D'6Tdt& EFVU(eufv7GWgw8HXhx)9IYiy*:JZjzm!1AQa"q2#BRbr3$4CS%cs5DT &6E'dtU7()󄔤euFVfvGWgw8HXhx9IYiy*:JZjz ?ERWU\?b^GRM~wo\湵ff_>P4_USe}VU9x]}E6 9IDW*ҭ˾PŘmsu/QPΤSMUf59;&F~<?8B6`iͅHBy6Q5(,(r0BlzmĞ4Ƴ+F_(ԓoȟF_'QeAW#@Ǒ.y53\کr('\Ųռr>W#osi^+(i yISuYN  `J0 '_~8ZHXW"mJg^\.PkNLƬPՈؠ N*J֬6_/3~׾*_s0wMEX*;b94S7"E#QQBƇ5jh PQ ,93yIMBI8W|+gB2ZsCX+?ybO-Xğ/&? )U\FU8*]ʏL*q ipt,ŋ.1rZgMސ^Nw(u o qU̻pG&V(q+58⫑}4 7s6js`/.?g19VPzOWh׌.UIr9y\9= U '_6ۓ\ _`x%~1]3e~/e+ķ ֶRG%~8(QReW2<Qep|^Ӓlo71_8*_n1 qWJ$$Foౣp2mg5i'6U®8! ُ"B8W7j`W(,w5',A͈W5!ͅZ;FHX?"}J Ð=Ł.a'Qx" ˣ >jN.nJφ1$(?D܋8P3S_O`"EQfR*"ElU!cRYZ$|YxefPA=2uG٭mSPܳpZSf~\:\:.`R>L:rfirst simple test

first simple test


test patch is here: pddplink-test-01.pd

The above link works if you opened this page from Pd, for example, by clicking on an object

pddplink pddplink-test-01.html

Pd links should also work in all pages opened through any other, initiating, Pd-opened page.

Another simple test page is here: pddplink-test-02.html

pddp-0.2.1/examples/pddp.css0000644000076500007650000000053212076104535014401 0ustar hanshansbody { color: brown ; background: gray url(test.bg.jpg) ; margin-top: 10 ; font-family: Helvetica, sans-serif ; font-size: larger ; } pre.programlisting { display: table ; background-color: #EEEEEE ; padding: 2pt ; border-style: solid ; border-width: 1pt ; border-color: #000000 ; border-spacing: 3pt ; margin: 3pt ; } pddp-0.2.1/examples/topdf0000644000076500007650000000075712076104535014010 0ustar hanshans#!/bin/bash usage () { cat << EOF usage: topdf .xml EOF } [ "$#" == 0 ] && { usage; exit 1; } SOURCE_NAME="$(basename $1)" SOURCE_STUB="$(basename $SOURCE_NAME .xml)" [ $SOURCE_STUB == $SOURCE_NAME ] && { usage; exit 1; } xmllint >/dev/null --xinclude --postvalid $1 xsltproc --nonet --xinclude \ -o "$SOURCE_STUB.fo" \ /usr/share/xml/docbook/stylesheet/nwalsh/fo/docbook.xsl \ $1 # FIXME need to run this twice, it should be check-wrapped too pdfxmltex "$SOURCE_STUB.fo" pddp-0.2.1/examples/pddplink-test-02.html0000644000076500007650000000202212076104535016623 0ustar hanshanssecond simple test

second simple test


test patch is here: pddplink-test-02.pd

The above link works if you opened this page from Pd, for example, by clicking on an object

pddplink pddplink-test-02.html

Pd links should also work in all pages opened through any other, initiating, Pd-opened page.

Another simple test page is here: pddplink-test-01.html

pddp-0.2.1/examples/pddplink-test-01.pd0000644000076500007650000000124512076104535016267 0ustar hanshans#N canvas 421 92 475 404 12; #X text 20 10 first entry; #X text 50 50 three ways of linking to a; #X obj 270 50 pddplink pddplink-test-01.html -text local html page ; #X obj 50 75 pddplink pddplink-test-01.html; #X obj 50 110 pddplink pddplink-test-01.html -box; #X text 50 170 three ways of linking to a; #X obj 270 170 pddplink http://puredata.info -text remote html page ; #X obj 50 195 pddplink http://puredata.info; #X obj 50 230 pddplink http://puredata.info -box; #X text 50 290 three ways of linking to; #X obj 260 290 pddplink pddplink-test-02.pd -text another local patch ; #X obj 50 315 pddplink pddplink-test-02.pd; #X obj 50 350 pddplink pddplink-test-02.pd -box; pddp-0.2.1/examples/toonepage0000644000076500007650000000070512076104535014646 0ustar hanshans#!/bin/bash usage () { cat << EOF usage: toonepage .xml EOF } [ "$#" == 0 ] && { usage; exit 1; } SOURCE_NAME="$(basename $1)" SOURCE_STUB="$(basename $SOURCE_NAME .xml)" [ $SOURCE_STUB == $SOURCE_NAME ] && { usage; exit 1; } xmllint >/dev/null --xinclude --postvalid $1 xsltproc --nonet --xinclude \ --stringparam html.stylesheet pddp.css \ -o "$SOURCE_STUB.html" \ /usr/share/xml/docbook/stylesheet/nwalsh/html/docbook.xsl \ $1 pddp-0.2.1/examples/pddplink-test-02.pd0000644000076500007650000000124612076104535016271 0ustar hanshans#N canvas 321 192 475 404 12; #X text 20 10 first entry; #X text 50 50 three ways of linking to a; #X obj 270 50 pddplink pddplink-test-02.html -text local html page ; #X obj 50 75 pddplink pddplink-test-02.html; #X obj 50 110 pddplink pddplink-test-02.html -box; #X text 50 170 three ways of linking to a; #X obj 270 170 pddplink http://puredata.info -text remote html page ; #X obj 50 195 pddplink http://puredata.info; #X obj 50 230 pddplink http://puredata.info -box; #X text 50 290 three ways of linking to; #X obj 260 290 pddplink pddplink-test-01.pd -text another local patch ; #X obj 50 315 pddplink pddplink-test-01.pd; #X obj 50 350 pddplink pddplink-test-01.pd -box; pddp-0.2.1/examples/pddplink-test-01.xml0000644000076500007650000000124412076104535016463 0ustar hanshans first simple test test patch is here: The above link works if you opened this page from Pd, for example, by clicking on an object pddplink pddplink-test-01.html Pd links should also work in all pages opened through any other, initiating, Pd-opened page. Another simple test page is here: pddp-0.2.1/examples/pddplink-test-02.xml0000644000076500007650000000124512076104535016465 0ustar hanshans second simple test test patch is here: The above link works if you opened this page from Pd, for example, by clicking on an object pddplink pddplink-test-02.html Pd links should also work in all pages opened through any other, initiating, Pd-opened page. Another simple test page is here: