Imported Upstream version 0.1

parents
#N canvas 212 52 426 266 10;
#X msg 139 82 bang;
#X symbolatom 138 156 0 0 0 0 - - -;
#X text 49 29 output the current date in ISO format;
#X obj 139 114 ISOdate;
#X connect 0 0 3 0;
#X connect 3 0 1 0;
#N canvas 619 362 462 310 10;
#X obj 93 84 zexy/date -----------;
#X obj 93 31 inlet;
#X obj 93 58 bang;
#X obj 93 229 outlet;
#X obj 93 175 pack float symbol symbol;
#X obj 93 202 zexy/makesymbol %s-%s-%s;
#X obj 118 129 makefilename %02d;
#X obj 247 129 makefilename %02d;
#X connect 0 0 4 0;
#X connect 0 1 6 0;
#X connect 0 2 7 0;
#X connect 1 0 2 0;
#X connect 2 0 0 0;
#X connect 4 0 5 0;
#X connect 5 0 3 0;
#X connect 6 0 4 1;
#X connect 7 0 4 2;
#N canvas 98 95 426 266 10;
#X msg 139 82 bang;
#X symbolatom 138 156 0 0 0 0 - - -;
#X obj 139 114 ISOtime;
#X text 49 29 output the current time in ISO format;
#X connect 0 0 2 0;
#X connect 2 0 1 0;
#N canvas 479 189 470 318 10;
#X obj 93 31 inlet;
#X obj 93 58 bang;
#X obj 93 229 outlet;
#N canvas 0 22 462 312 addzero 0;
#X obj 186 38 inlet;
#X obj 191 255 outlet;
#X obj 188 102 moses 10;
#X obj 244 187 zexy/makesymbol %s;
#X obj 65 187 zexy/makesymbol 0%s;
#X connect 0 0 2 0;
#X connect 2 0 4 0;
#X connect 2 1 3 0;
#X connect 3 0 1 0;
#X connect 4 0 1 0;
#X restore 136 135 pd addzero;
#N canvas 0 22 462 312 addzero 0;
#X obj 186 38 inlet;
#X obj 191 255 outlet;
#X obj 188 102 moses 10;
#X obj 244 187 zexy/makesymbol %s;
#X obj 65 187 zexy/makesymbol 0%s;
#X connect 0 0 2 0;
#X connect 2 0 4 0;
#X connect 2 1 3 0;
#X connect 3 0 1 0;
#X connect 4 0 1 0;
#X restore 216 135 pd addzero;
#X obj 93 84 zexy/time -----------;
#X obj 93 175 pack float symbol symbol;
#X obj 93 202 zexy/makesymbol %s:%s:%s;
#X connect 0 0 1 0;
#X connect 1 0 5 0;
#X connect 3 0 6 1;
#X connect 4 0 6 2;
#X connect 5 0 6 0;
#X connect 5 1 3 0;
#X connect 5 2 4 0;
#X connect 6 0 7 0;
#X connect 7 0 2 0;
This diff is collapsed.
This diff is collapsed.
You need the iFeel linux kernel module from
http://sourceforge.net/projects/tactile in order to use this external.
The iFeel mouse uses periodic pulses to create the various haptic
effects.
------------------------------------------------------------------------------
control type raw range pd range
------------------------------------------------------------------------------
strength of pulse 1-255 0 - 1
delay between pulses 1-255 0 - infinite milliseconds
number of pulses 1-255 0 - infinite
The 'hcs' library is a random grabbag of objects that are experiments that
sometimes lead to full-fledged libraries.
====
TODO
====
- pddate compare object
- make ISOdate and ISOtime accept pddate format
- rename [folder_list] to [file/match] and make other file lib objects
- make [file/match] handle lists of patterns
- make [file/match] behave like [qlist]
- [cursor] object
- based on [MouseState] and/or [gcanvas]
- inlet to control the mouse cursor icon (pointer, X, text select, etc)
- mDNS objects!
- add pan objects to audio basics library
- create math library
- standard constants like Pi, etc.
- standard math functions
- create networking library
- socket objects
- multicast DNS objects
- create mapping library
- move [hid] toolkit objects into mapping lib
- sort thru Cyrille's ds_ objects
- objects for smoothing sensor data
- create i/o library
- add hid, comport, platform-specific hid, libusb, midi
- convert [hid] to libhid
- write [directinput]
- [serial]
- port numbering on darwin: number /dev/cu.* sequentially
- perhaps specific objects for sensorboxs like the arduino, multio, etc
- create standard gui objects lib (what's the name?)
- dsp
- pan
- amp
- create support lib for creating objects in Pd
- *_argument objects
- rename blocksize_in_ms to block_size_in_ms
- how about "foundation" or "class" or "support"
ifeel.c
------------------------------------------------------------------------
- make default device be /dev/input/ifeel0 when there are no arguments
- add abort command ( http://moore.cx/dan/out/ifeel/
http://inebriated-innovation.org/ifeel/ )
#N canvas 438 263 461 272 10;
#X floatatom 253 143 5 0 0 0 - - -;
#X obj 241 191 ascii2int;
#X msg 305 168 bang;
#X msg 192 168 bang;
#X text 20 169 output current value -2;
#X text 343 168 <-- reset;
#X floatatom 241 220 0 0 0 0 - - -;
#X obj 241 117 int;
#X text 38 28 convert a stream of ASCII digits to a single int value
;
#X msg 242 63 49 52 57 32;
#X msg 138 63 53 56 49 50 1;
#X obj 241 240 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X obj 241 95 zexy/drip 500;
#X connect 1 0 6 0;
#X connect 2 0 1 1;
#X connect 3 0 1 0;
#X connect 6 0 11 0;
#X connect 7 0 0 0;
#X connect 7 0 1 0;
#X connect 9 0 12 0;
#X connect 10 0 12 0;
#X connect 12 0 7 0;
#N canvas 667 123 490 433 10;
#X obj 206 298 +;
#X obj 176 320 float;
#X obj 206 160 trigger float bang;
#X obj 222 259 float;
#X obj 222 278 * 10;
#X obj 303 286 float;
#X msg 179 220 0;
#X text 212 222 <-- reset for the next pot reading;
#X obj 68 57 moses 48;
#X obj 206 111 - 48;
#X obj 119 76 moses 58;
#X obj 106 140 bang;
#X obj 106 160 purepd/once;
#X obj 176 345 outlet;
#X obj 16 36 route bang float symbol;
#X obj 16 7 inlet;
#X obj 327 12 inlet;
#X text 286 12 reset;
#X obj 327 34 trigger bang bang;
#X obj 16 270 bang;
#X text 244 404 released under the GNU GPL;
#X text 27 390 (C) Copyright 2006 Hans-Christoph Steiner <hans@at.or.at>
;
#X text 25 366 TODO: make it support negative numbers;
#X connect 0 0 1 1;
#X connect 0 0 5 0;
#X connect 1 0 13 0;
#X connect 2 0 0 0;
#X connect 2 1 3 0;
#X connect 3 0 4 0;
#X connect 4 0 0 1;
#X connect 5 0 3 1;
#X connect 6 0 3 1;
#X connect 8 0 11 0;
#X connect 8 1 10 0;
#X connect 9 0 2 0;
#X connect 9 0 12 1;
#X connect 10 0 9 0;
#X connect 10 1 11 0;
#X connect 11 0 12 0;
#X connect 12 0 6 0;
#X connect 12 0 1 0;
#X connect 14 0 19 0;
#X connect 14 1 8 0;
#X connect 15 0 14 0;
#X connect 16 0 18 0;
#X connect 18 0 11 0;
#X connect 18 1 12 1;
#X connect 19 0 1 0;
#N canvas 48 99 462 532 10;
#X floatatom 26 88 5 0 0 0 - - -;
#X floatatom 26 152 0 0 0 0 - - -;
#X obj 68 270 autoscale;
#X obj 2 2 cnv 15 450 20 empty empty autoscale 2 11 1 18 -233017
-66577 0;
#X msg 418 3 pddp;
#X text 18 35 [autoscale] scales a stream of numbers based on an output
range set as arguments \, and an input range which is set dynamically.
;
#X text 13 193 If you use [autoscale] with no arguments \, then the
output range defaults to 0-127.;
#X floatatom 68 249 5 0 0 0 - - -;
#X obj 71 293 hsl 128 15 0 127 0 0 empty empty empty -2 -6 0 8 -262144
-1 -1 0 1;
#X text 17 453 (C) Copyright 2004 Hans-Christoph Steiner <hans@at.or.at>
;
#X text 234 467 released under the GNU GPL;
#X floatatom 150 152 0 0 0 0 - - -;
#X floatatom 297 152 0 0 0 0 - - -;
#X obj 213 83 hsl 128 15 0 127 0 0 empty empty empty -2 -6 0 8 -262144
-1 -1 0 1;
#X text 17 486 $Revision: 1.5 $$Date: 2006-03-17 04:50:03 $;
#X text 18 499 $Author: eighthave $;
#X text 25 336 The [reset( message resets the stored max and min to
zero.;
#X floatatom 46 360 5 0 0 0 - - -;
#X obj 71 413 hsl 128 15 0 127 0 0 empty empty empty -2 -6 0 8 -262144
-1 -1 0 1;
#X msg 96 358 reset;
#X obj 26 122 autoscale 0 1;
#X obj 150 122 autoscale -0.01 0.01;
#X obj 297 122 autoscale -4095 4095;
#X obj 68 390 autoscale;
#X connect 0 0 20 0;
#X connect 2 0 8 0;
#X connect 7 0 2 0;
#X connect 13 0 21 0;
#X connect 13 0 22 0;
#X connect 17 0 23 0;
#X connect 19 0 23 0;
#X connect 20 0 1 0;
#X connect 21 0 11 0;
#X connect 22 0 12 0;
#X connect 23 0 18 0;
#N canvas 206 226 773 542 10;
#X obj 45 30 inlet;
#X obj 175 453 outlet;
#X obj 235 268 f;
#X text 262 268 min;
#X text 360 269 max;
#X obj 454 167 f \$1;
#X obj 652 167 f \$2;
#X obj 235 245 moses 0;
#X obj 320 245 moses 0;
#X obj 175 102 trigger float float float bang bang;
#X obj 175 390 expr (($f1 - $f2) * (($f5 - $f4) / ($f3 - $f2))) + $f4
;
#X obj 326 205 oneshot;
#X obj 364 226 f;
#X obj 320 178 t f b f;
#X obj 241 205 oneshot;
#X obj 279 226 f;
#X obj 235 178 t f b f;
#X obj 384 269 + 1e-09;
#X obj 478 213 ==;
#X obj 478 233 sel 1;
#X obj 545 77 loadbang;
#X obj 478 299 print [autoscale];
#X floatatom 472 189 5 0 0 0 - - -;
#X obj 545 100 t b b;
#X obj 454 329 expr if ($f1 == $f2 \, 0 \, $f1) \; if ($f1 == $f2 \,
127 \, $f2);
#X msg 478 278 using default range (0-127);
#X obj 478 256 oneshot;
#X text 2 476 (C) Copyright 2004 Hans-Christoph Steiner <hans@at.or.at>
;
#X text 219 491 released under the GNU GPL;
#X text 417 475 $Revision: 1.5 $$Date: 2004-11-28 20:50:14 $;
#X text 417 488 $Author: eighthave $;
#X obj 45 62 route reset;
#X obj 45 81 bang;
#X msg 45 129 0;
#X msg 114 102 clear;
#X text 172 47 these [oneshot] bits are just here to get the max/min
tracking started;
#X text 8 3 [autoscale];
#X connect 0 0 31 0;
#X connect 2 0 7 1;
#X connect 2 0 10 1;
#X connect 5 0 18 0;
#X connect 5 0 22 0;
#X connect 5 0 24 0;
#X connect 6 0 18 1;
#X connect 6 0 24 1;
#X connect 7 0 2 0;
#X connect 8 1 17 0;
#X connect 9 0 10 0;
#X connect 9 1 16 0;
#X connect 9 2 13 0;
#X connect 9 3 5 0;
#X connect 9 4 6 0;
#X connect 10 0 1 0;
#X connect 11 0 12 0;
#X connect 12 0 8 1;
#X connect 13 0 8 0;
#X connect 13 1 11 0;
#X connect 13 2 12 1;
#X connect 14 0 15 0;
#X connect 15 0 7 1;
#X connect 16 0 7 0;
#X connect 16 1 14 0;
#X connect 16 2 15 1;
#X connect 17 0 8 1;
#X connect 17 0 10 2;
#X connect 18 0 19 0;
#X connect 19 0 26 0;
#X connect 20 0 23 0;
#X connect 23 0 5 0;
#X connect 23 1 6 0;
#X connect 24 0 10 3;
#X connect 24 1 10 4;
#X connect 25 0 21 0;
#X connect 26 0 25 0;
#X connect 31 0 32 0;
#X connect 31 1 9 0;
#X connect 32 0 33 0;
#X connect 32 0 34 0;
#X connect 33 0 2 0;
#X connect 33 0 12 0;
#X connect 34 0 14 0;
#X connect 34 0 11 0;
#N canvas 256 153 461 330 10;
#X obj 5 2 cnv 15 450 20 empty empty blocksize_in_ms 2 11 1 18 -233017
-66577 0;
#X msg 422 3 pddp;
#X text 27 270 (C) Copyright 2004 Hans-Christoph Steiner <hans@at.or.at>
;
#X text 244 284 released under the GNU GPL;
#X obj 152 157 blocksize_in_ms;
#X msg 152 115 bang;
#X text 197 117 bang to recalculate;
#X floatatom 152 210 7 0 0 1 ms - -;
#X text 18 36 Output the current blocksize in ms rather than samples.
This is currently set at a fixed blocksize of 64 \, but it will change
dynamically in the future.;
#X connect 4 0 7 0;
#X connect 5 0 4 0;
#N canvas 0 22 458 308 10;
#X obj 178 262 outlet;
#X obj 164 31 inlet;
#X obj 164 56 bang;
#X text 209 31 bang to recalculate;
#X obj 164 124 samplerate~;
#X obj 178 192 /;
#X msg 164 170 64;
#X obj 164 151 t b f;
#X text 30 170 default block size:;
#X text 8 25 [blocksize_in_ms];
#X obj 178 229 * 1000;
#X text 35 278 TODO: make blocksize read from actual Pd setting;
#X connect 1 0 2 0;
#X connect 2 0 4 0;
#X connect 4 0 7 0;
#X connect 5 0 10 0;
#X connect 6 0 5 0;
#X connect 7 0 6 0;
#X connect 7 1 5 1;
#X connect 10 0 0 0;
#N canvas 73 22 480 392 10;
#X obj 136 290 sys_gui;
#X symbolatom 254 206 0 0 0 0 - - -;
#X obj 241 145 loadbang;
#X msg 136 260 \$2 configure -background \$1;
#X obj 136 231 pack symbol symbol;
#X obj 86 64 colorpanel;
#X obj 67 356 pddp/pddplink http://tcl.tk/man/tcl8.4/TkCmd/canvas.htm
;
#X text 34 330 for more options:;
#N canvas 685 90 416 325 generate 0;
#X obj 81 23 inlet;
#X obj 82 262 outlet;
#X obj 83 66 unpack float float float;
#X obj 83 90 * 255;
#X obj 83 113 int;
#X obj 83 136 makefilename %x;
#X obj 183 90 * 255;
#X obj 183 113 int;
#X obj 183 136 makefilename %x;
#X obj 283 90 * 255;
#X obj 283 113 int;
#X obj 283 136 makefilename %x;
#X obj 83 171 pack symbol symbol symbol;
#X obj 83 195 zexy/makesymbol #%s%s%s;
#X connect 0 0 2 0;
#X connect 2 0 3 0;
#X connect 2 1 6 0;
#X connect 2 2 9 0;
#X connect 3 0 4 0;
#X connect 4 0 5 0;
#X connect 5 0 12 0;
#X connect 6 0 7 0;
#X connect 7 0 8 0;
#X connect 8 0 12 1;
#X connect 9 0 10 0;
#X connect 10 0 11 0;
#X connect 11 0 12 2;
#X connect 12 0 13 0;
#X connect 13 0 1 0;
#X restore 86 85 pd generate web color;
#X obj 86 20 bng 35 250 50 0 empty empty empty 17 7 0 10 -204786 -1
-1;
#X symbolatom 106 113 10 0 0 0 - - -;
#X obj 198 293 print;
#X obj 241 182 canvas_name;
#X msg 138 143 grey;
#X msg 148 162 white;
#X msg 158 183 pink;
#X msg 162 205 black;
#N canvas 373 75 457 313 get 0;
#X symbolatom 42 225 0 0 0 0 - - -;
#X obj 42 204 canvas_name;
#X obj 42 181 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X symbolatom 126 225 0 0 0 0 - - -;
#X obj 126 181 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#N canvas 0 22 450 300 subname 0;
#X obj 117 21 inlet;
#X obj 119 265 outlet;
#X obj 107 137 canvas_name;
#X connect 0 0 2 0;
#X connect 2 0 1 0;
#X restore 126 204 pd subname;
#X symbolatom 209 225 0 0 0 0 - - -;
#X obj 209 181 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#N canvas 496 269 450 300 get 0;
#X obj 117 21 inlet;
#X obj 119 265 outlet;
#X obj 109 137 canvas_name 1;
#X connect 0 0 2 0;
#X connect 2 0 1 0;
#X restore 209 204 pd get parent;
#X symbolatom 73 118 0 0 0 0 - - -;
#X obj 73 74 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X text 47 26 You can get the canvas name of other patches that this
one is embedded in by setting the argument to the level:;
#X obj 73 97 canvas_name 1;
#X text 78 137 ^-- this is the same as the top level of this help patch
;
#X symbolatom 299 225 0 0 0 0 - - -;
#X obj 299 181 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#N canvas 496 269 450 300 get 0;
#X obj 117 21 inlet;
#X obj 119 265 outlet;
#X obj 109 137 canvas_name 2;
#X connect 0 0 2 0;
#X connect 2 0 1 0;
#X restore 299 204 pd get parent of parent;
#N canvas 169 157 481 329 get 0;
#X symbolatom 114 120 0 0 0 0 - - -;
#X obj 101 96 canvas_name 1;
#X symbolatom 119 205 0 0 0 0 - - -;
#X obj 84 66 loadbang;
#X obj 106 181 canvas_name 0;
#X symbolatom 43 204 0 0 0 0 - - -;
#X obj 30 180 canvas_name;
#N canvas 0 22 450 300 add 0;
#X symbolatom 175 224 0 0 0 0 - - -;
#X obj 162 200 canvas_name 1;
#X symbolatom 264 224 0 0 0 0 - - -;
#X obj 251 200 canvas_name 2;
#X symbolatom 85 224 0 0 0 0 - - -;
#X obj 175 101 loadbang;
#X obj 72 200 canvas_name 0;
#X text 59 28 Now 0 is this subpatch \, 1 is the "pd get from parent"
subpatch that this subpatch is in \, and 2 is the "canvas_name-help.pd"
patch.;
#X connect 1 0 0 0;
#X connect 3 0 2 0;
#X connect 5 0 1 0;
#X connect 5 0 3 0;
#X connect 5 0 6 0;
#X connect 6 0 4 0;
#X restore 164 267 pd add another level;
#X text 31 14 Following the interface of [getdir] and others \, you
can get the canvas name from parent patches by using a float to represent
how many levels up you want to get:;
#X text 36 237 To see it in action with a 2nd level \, check this subpatch:
;
#X text 189 204 <-- these two are the same since Pd inits to 0;
#X text 187 119 <-- this gets the canvas name from the parent;
#X connect 1 0 0 0;
#X connect 3 0 1 0;
#X connect 3 0 4 0;
#X connect 3 0 6 0;
#X connect 4 0 2 0;
#X connect 6 0 5 0;
#X restore 183 267 pd get from parent;
#X text 43 268 some more examples:;
#X connect 1 0 0 0;
#X connect 2 0 1 0;
#X connect 4 0 5 0;
#X connect 5 0 3 0;
#X connect 7 0 8 0;
#X connect 8 0 6 0;
#X connect 10 0 12 0;
#X connect 12 0 9 0;
#X connect 15 0 16 0;
#X connect 16 0 14 0;
#X restore 265 51 pd get from different levels;
#N canvas 0 22 450 300 get 0;
#X symbolatom 73 259 0 0 0 0 - - -;
#X obj 73 215 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X symbolatom 72 176 0 0 0 0 - - -;
#X obj 72 132 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X obj 72 155 canvas_name pd-test;
#X obj 73 238 canvas_name pd-canvas_name-help.pd;
#N canvas 0 22 450 300 test 0;
#X restore 221 155 pd test;
#X obj 220 77 namecanvas myname;
#X symbolatom 73 99 0 0 0 0 - - -;
#X obj 73 55 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X obj 73 78 canvas_name myname;
#X text 53 14 You can also use the canvas receive symbol to get the
canvas_name:;
#X connect 1 0 5 0;
#X connect 3 0 4 0;
#X connect 4 0 2 0;
#X connect 5 0 0 0;
#X connect 9 0 10 0;
#X connect 10 0 8 0;
#X restore 265 76 pd get by canvas receive symbol;
#X connect 2 0 12 0;
#X connect 3 0 0 0;
#X connect 3 0 11 0;
#X connect 4 0 3 0;
#X connect 5 0 8 0;
#X connect 8 0 10 0;
#X connect 8 0 4 0;
#X connect 9 0 5 0;
#X connect 12 0 1 0;
#X connect 12 0 4 1;
#X connect 13 0 4 0;
#X connect 14 0 4 0;
#X connect 15 0 4 0;
#X connect 16 0 4 0;
#include <stdio.h>
#include <string.h>
#include <m_pd.h>
#include "g_canvas.h"
#define DEBUG(x)
static t_class *canvas_name_class;
static t_canvas *canvas;
typedef struct _canvas_name
{
t_object x_obj;
t_atom x_atom;
t_symbol *x_canvas_name;
t_symbol *x_remote_name;
} t_canvas_name;
static void canvas_name_bang(t_canvas_name *x)
{
if (x->x_atom.a_type == A_SYMBOL)
{
canvas=(t_canvas *)pd_findbyclass(x->x_remote_name, canvas_class);
char buf[MAXPDSTRING];
snprintf(buf, MAXPDSTRING, ".x%lx.c", (long unsigned int)canvas);
x->x_canvas_name = gensym(buf);
}
outlet_symbol(x->x_obj.ob_outlet,x->x_canvas_name);
}
static void *canvas_name_new(t_symbol *s, int argc, t_atom *argv)
{
t_atom a;
if (argc == 0)
{
argc = 1;
SETFLOAT(&a, 0);
argv = &a;
}
t_canvas_name *x = (t_canvas_name *)pd_new(canvas_name_class);
x->x_atom = *argv;
if (argv->a_type == A_FLOAT)
{ // thx to IOhannes's iemguts:
t_glist *glist=(t_glist *)canvas_getcurrent();
canvas=(t_canvas *)glist_getcanvas(glist);
int depth=(int)atom_getint(&x->x_atom);
if(depth<0)depth=0;
while(depth && canvas) {
canvas=canvas->gl_owner;
depth--;
}
char buf[MAXPDSTRING];
snprintf(buf, MAXPDSTRING, ".x%lx.c", (long unsigned int)canvas);
x->x_canvas_name = gensym(buf);
}
else
{
x->x_remote_name = (t_symbol *)atom_getsymbol(&x->x_atom);
}
outlet_new(&x->x_obj, &s_symbol);
return(x);
}
void canvas_name_setup(void)
{
canvas_name_class = class_new(gensym("canvas_name"),
(t_newmethod)canvas_name_new, NULL,
sizeof(t_canvas_name), 0, A_GIMME, 0);
class_addbang(canvas_name_class, (t_method)canvas_name_bang);
}
#N canvas 121 22 423 338 10;
#X declare -lib cyclone -lib mapping -lib zexy;
#X msg 21 52 bang;
#X symbolatom 32 170 0 0 0 0 - - -;
#X obj 21 246 print;
#X text 80 75 start at the top of the list again;
#X msg 33 76 rewind;
#X obj 21 129 ce_path;
#X obj 61 150 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X text 81 148 done;
#X text 68 51 get next item in list of canvas-local paths;
#X text 29 269 Sending bangs to [ce_path] makes it output the loaded
paths one at a time.;
#X obj 226 10 import cyclone mapping zexy;
#X connect 0 0 5 0;
#X connect 4 0 5 0;
#X connect 5 0 1 0;
#X connect 5 0 2 0;
#X connect 5 1 6 0;
/*
* This object allows you to see what is currently in the canvas-local path.
*/
#include "m_pd.h"
#include "s_stuff.h"
#include "g_canvas.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* WARNING: KLUDGE! */
/*
* this struct is not publically defined (its in g_canvas.c) so I need to
* include this here. Its from Pd 0.41-test03 2006-11-19. */
struct _canvasenvironment
{
t_symbol *ce_dir; /* directory patch lives in */
int ce_argc; /* number of "$" arguments */
t_atom *ce_argv; /* array of "$" arguments */
int ce_dollarzero; /* value of "$0" */
t_namelist *ce_path; /* search path */
};
static char *version = "$Revision: 1.2 $";
#define DEBUG(x)
//#define DEBUG(x) x
/*------------------------------------------------------------------------------
* CLASS DEF
*/
t_class *ce_path_class;
typedef struct _ce_path
{
t_object x_obj;
t_canvas *x_canvas;
t_namelist *x_current;
t_outlet *x_data_outlet;
t_outlet *x_status_outlet;