[fluxus] questions about fluxus

Dave Griffiths dave at pawfal.org
Mon Jan 23 02:06:18 PST 2006


Hi Alex,

> Hi, I'm new to fluxus, i have a couple of questions here:
> first, is there a way to make the window display the images in a
> non-squished way if you resize the window to not be square? (i'd like
> to be able to view the window while editing code in a x-terminal, i
> have a small laptop screen)

there is a call in the renderer api to do this, SetFrustum() which sets
the aspect ratio and clipping planes. I'll expose this to the script
interface - this would also make ortho projection more useful.

> second, how would one suggest do this:
> I want to accept an osc message that causes a file to be sourced, i'd
> like to be able to source that same file again when i send the osc
> message a 2nd time.. it seems that if i create something like the
> below, it will work one time, but once the script "/tmp/blah.scm" has
> been sourced I can no longer accept this message...
>
> (osc-source "6543")
>
> (define
>   (test)
>   (if (osc-msg "/loadfluxus")
>          (source "/tmp/blah.scm")
>         )
>   )
>
> (every-frame "(test)")

the problem here is that the file you source is presumably overwriting the
(every-frame) call, thus preventing the osc polling from happening. you
can get round it by using an "every-frame" function that evaluates a list
of functions, which can be registered by osc command. then, if you never
call (every-frame) in these scripts, you can remotely update and run a
number of them at once.

Nik's been using a technique like this, but it would be useful to have it
written up in the docs (hint hint ;)) as I think it's quite a common
requirement.

We were discussing having multiple interpreters, or a dedicated osc
command that fluxus would evaluate, but it seems better to do it in this
way, as it's less hardcoded and it allows the script writer to determine
how scripts are handled.

cheers,

dave





More information about the Fluxus mailing list