[fluxus] from-osc vrs. osc-msg
nik gaffney
nik at fo.am
Fri Jul 22 03:04:07 PDT 2005
hi alejo
> could anyone comment on how to avoid making a mess when sending a lot of
> data from pd2fluxus?
depends what you mean by alot.
but i use an aproach something like this.. ,
(define (osc-repl)
(if (osc-msg "/code")
(eval-string (osc-peek)))
(if (osc-msg "/ping")
(begin (display "ping... ")
(newline)))
(if (osc-msg "/speed")
(set! speed (osc 0)))
(if (osc-msg "/spin")
(set! spin (osc 0)))
;; etc++
;; probaly cleaner using 'case'
which uses global variables, accessable by any functions in the fluxus
script. (yeah i know its not really schemisch, . but.. .) so from pd, just
send /speed 34.6 with the idea being that you only adjust paramters that you
choose to expose. its easier to keep track of than a huge long list, with
position information becoming semantic.
> 2nd question(related to a fluxus patch) -this patch contains the "#"
> character, i havent seen it before and when i delete it everthing breaks,
> i will like to understand its use since in this particular patch i see i
> cannot replace nay of those values by a (osc X) kindda value
the sexp #(1 2 3) is roughly (vector 1 2 3) but does not get evaluated, so
something like #(x y z) is not (vector x y z). reader macro?!
for general info about scheme programming (in particular guile) have a look
at these refs. ,
http://schemers.org/
http://www.gnu.org/software/guile/docs/docs.html
> 3rd Q
> -can one add comments to the code? i have tryed few characters: / - # and
>
> \ but havent found the right one, is commenting fluxus code possible?
> it could be a nice to have "live commentaries" as in "live news" or is it
use one or more ; characters. (its only really an issue as to how many you
use, if yr editor does autoindenting for you. )
nik
More information about the Fluxus
mailing list