diff --git a/bamboo/README b/bamboo/README new file mode 100644 index 0000000..ffb79c0 --- /dev/null +++ b/bamboo/README @@ -0,0 +1,7 @@ + +A flexible scaffold for communication between pd and fluxus, with a +focus on asset mgmt and exploration of existing fluxus code using pd. + +- fluxus llink.scm +- open llink.pd in pd +- connect from pd diff --git a/bamboo/llink.pd b/bamboo/llink.pd new file mode 100644 index 0000000..a91ba40 --- /dev/null +++ b/bamboo/llink.pd @@ -0,0 +1,186 @@ +#N canvas 784 86 566 540 10; +#X obj 101 405 sendOSC; +#X msg 204 361 disconnect; +#X msg 204 342 connect localhost 88008; +#X obj 492 251 freadln; +#X obj 494 281 fwriteln; +#X obj 495 315 textfile; +#N canvas 891 74 194 300 colouric 0; +#X obj 59 29 vsl 15 128 0 255 0 0 empty empty R 0 -9 0 10 -258113 -1 +-1 4900 1; +#X obj 59 175 / 255; +#X obj 80 29 vsl 15 128 0 255 0 0 empty empty G 0 -9 0 10 -4034 -1 +-1 9200 1; +#X obj 80 175 / 255; +#X obj 101 29 vsl 15 128 0 255 0 0 empty empty B 0 -9 0 10 -4160 -1 +-1 0 1; +#X obj 101 175 / 255; +#X obj 122 29 vsl 15 128 0 255 0 0 empty empty A 0 -9 0 10 -228856 +-1 -1 0 1; +#X obj 122 175 / 255; +#X obj 59 233 outlet; +#X obj 31 176 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 +-1; +#X obj 59 205 pack 0 0 0; +#X connect 0 0 1 0; +#X connect 1 0 10 0; +#X connect 2 0 3 0; +#X connect 2 0 9 0; +#X connect 3 0 10 1; +#X connect 4 0 5 0; +#X connect 4 0 9 0; +#X connect 5 0 10 2; +#X connect 6 0 7 0; +#X connect 6 0 9 0; +#X connect 9 0 10 0; +#X connect 10 0 8 0; +#X restore 192 123 pd colouric; +#N canvas 538 152 491 425 file-selector 1; +#X symbolatom -331 49 50 0 0 0 - - -; +#X obj -332 -171 playlist all 400 200 {Monaco 10 normal} #a2a9ff yellow +black red; +#X symbolatom -330 72 50 0 0 0 - - -; +#X symbolatom -329 96 50 0 0 0 - - -; +#X obj -555 -157 loadbang; +#X msg -404 -69 scroll 200; +#X msg -408 -45 scroll -200; +#X obj -453 -104 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 +1 1; +#X msg -543 -104 graphics \$1; +#X msg -430 -105 1; +#X obj -397 -104 loadbang; +#X msg -555 -128 font Monaco normal 10; +#N canvas 0 22 450 300 | 0; +#X obj 198 67 inlet; +#X obj 187 127 outlet; +#X connect 0 0 1 0; +#X restore -377 -194 pd |; +#X obj -416 133 outlet; +#X msg -340 -257 location /Users/zzk/code/groworld; +#X obj -371 133 outlet; +#X msg -512 -182 sort \$1; +#X obj 11 -192 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 +1; +#X obj 30 -193 s sort; +#X obj -554 -181 r sort; +#X msg -339 -236 location /Users/zzk; +#X text -124 -316 comment; +#X connect 0 0 13 0; +#X connect 1 0 0 0; +#X connect 1 1 2 0; +#X connect 1 2 3 0; +#X connect 2 0 15 0; +#X connect 4 0 11 0; +#X connect 5 0 12 0; +#X connect 6 0 12 0; +#X connect 7 0 8 0; +#X connect 8 0 12 0; +#X connect 9 0 7 0; +#X connect 10 0 9 0; +#X connect 11 0 12 0; +#X connect 12 0 1 0; +#X connect 14 0 12 0; +#X connect 16 0 12 0; +#X connect 17 0 18 0; +#X connect 19 0 16 0; +#X connect 20 0 12 0; +#X coords 0 0 1 1 200 100 0; +#X restore 60 128 pd file-selector; +#N canvas 846 285 450 300 rndd 0; +#X obj 121 42 struct rgbox float r float g float b; +#X obj 123 83 drawpolygon; +#X restore 499 212 pd rndd; +#N canvas 270 173 450 300 send-texture 0; +#X obj 39 76 inlet; +#X obj 36 210 outlet; +#X symbolatom 162 89 20 0 0 0 - - -; +#X obj 162 37 inlet; +#X obj 20 133 sprintf send /code (set-texture_"%s"); +#X connect 0 0 4 0; +#X connect 3 0 2 0; +#X connect 4 0 1 0; +#X coords 0 0 1 1 85 60 0; +#X restore 59 152 pd send-texture; +#X obj 71 182 print; +#X msg 203 297 send /ping; +#X msg 204 321 connect localhost 88009; +#X text 356 342 < fluxus; +#X text 355 321 < test; +#N canvas 270 173 450 300 send-colour 0; +#X obj 86 76 inlet; +#X obj 36 165 outlet; +#X symbolatom 231 57 20 0 0 0 - - -; +#X obj 231 32 inlet; +#X obj 84 101 unpack 0 0 0; +#X obj 20 133 sprintf send /code (set-colour_%s_%s_%s); +#X connect 0 0 4 0; +#X connect 3 0 2 0; +#X connect 4 0 5 0; +#X connect 4 1 5 1; +#X connect 4 2 5 2; +#X connect 5 0 1 0; +#X coords 0 0 1 1 85 60 0; +#X restore 193 149 pd send-colour; +#X obj 101 405 sendOSC; +#X obj 493 170 dumpOSC; +#X obj 69 360 r sosc; +#X obj 60 208 s sosc; +#X obj 193 176 s sosc; +#X obj 313 187 s sosc; +#N canvas 771 56 171 283 rotor 0; +#X obj 56 24 vsl 15 128 0 255 0 0 empty empty X 0 -9 0 10 -228856 -1 +-1 9400 1; +#X obj 77 24 vsl 15 128 0 255 0 0 empty empty Y 0 -9 0 10 -228856 -1 +-1 2300 1; +#X obj 98 24 vsl 15 128 0 255 0 0 empty empty Z 0 -9 0 10 -228856 -1 +-1 0 1; +#X obj 56 228 outlet; +#X obj 28 171 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 +-1; +#X obj 56 200 pack 0 0 0; +#X obj 97 170 / 1; +#X obj 77 170 / 1; +#X obj 56 170 / 1; +#X text 85 4; +#X connect 0 0 8 0; +#X connect 1 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 4 0; +#X connect 2 0 6 0; +#X connect 4 0 5 0; +#X connect 5 0 3 0; +#X connect 6 0 5 2; +#X connect 7 0 5 1; +#X connect 8 0 5 0; +#X restore 312 134 pd rotor; +#N canvas 305 439 450 300 send-rotor 0; +#X obj 86 76 inlet; +#X obj 36 165 outlet; +#X symbolatom 231 57 20 0 0 0 - - -; +#X obj 231 32 inlet; +#X obj 84 101 unpack 0 0 0; +#X obj 20 133 sprintf send /code (set-rotor_%s_%s_%s); +#X connect 0 0 4 0; +#X connect 3 0 2 0; +#X connect 4 0 5 0; +#X connect 4 1 5 1; +#X connect 4 2 5 2; +#X connect 5 0 1 0; +#X coords 0 0 1 1 85 60 0; +#X restore 313 160 pd send-rotor; +#X text 71 451 simple example of setting texture \, colour and rotation +of an object in fluxus. requires llink.scm to be running in fluxus +; +#X connect 1 0 0 0; +#X connect 2 0 0 0; +#X connect 6 0 15 0; +#X connect 7 0 9 0; +#X connect 7 1 9 1; +#X connect 9 0 10 0; +#X connect 9 0 19 0; +#X connect 11 0 0 0; +#X connect 12 0 0 0; +#X connect 15 0 20 0; +#X connect 18 0 0 0; +#X connect 22 0 23 0; +#X connect 23 0 21 0; diff --git a/bamboo/llink.scm b/bamboo/llink.scm new file mode 100644 index 0000000..198140f --- /dev/null +++ b/bamboo/llink.scm @@ -0,0 +1,27 @@ +;; simple example of setting texture, colour and rotation of an object +;; in fluxus from pd. requires llink.pd to be running in pd and the +;; 'frame-functions' to be loaded. + +(define t1 0) +(define c1 (vector 0 0 0)) +(define v1 (vector 0 0 0)) + +(define (set-texture str) + (set! t1 (load-texture str))) + +(define (set-colour r g b) + (set! c1 (vector r g b))) + +(define (set-rotor x y z) + (set! v1 (vector x y z))) + + +(define (spin) + (push) + (colour c1) + (texture t1) + (rotate v1) + (draw-cube) + (pop)) + +(add-frame-fcn spin)