ahah, it's been years we're making CGI's that sends controls from web pages to Pure Data.
( maybe you're not aware of this as well as you don't know about subpatches and say : Pure Data can't do this, blah, blah, blah, ... )
besides, i could never set GridFlow to work and there's not a single help patch included for pure data.... it's funny for someone who criticize PD all the time ( yeah, i don't like too much your posts )
bye,
sevy/yves
Mathieu Bouchard wrote:
controlling jMax from the Web and from PureData
I created a new class "ruby_udpsend" that is an emulation of jMax's "udpsend". Which means you can send messages from PureData to jMax.
I create an objectbox "ruby_udpsend localhost 2042" in PureData. Then I create an objectbox "udpreceive 2042" in jMax. Then messages i send to ruby_udpsend will be catched by jMax.
If you have GridFlow 0.6.5 or 0.7.0 installed, you may add this functionality to PureData by adding those lines to your ~/.gridflow_startup file :
----------------8<--------cut-here--------8<----------------
class RubyUDPSend < FObject def initialize(host,port) @socket = UDPSocket.new @host,@port = host.to_s,port.to_i end def encode(x) case x when Integer; "\x03" + [x].pack("N") when Float; "\x04" + [x].pack("g") when Symbol, String; "\x01" + x.to_s + "\x02" end end def method_missing(sel,*args) sel=sel.to_s.sub /^_\d_/, "" @socket.send encode(sel) + args.map{|arg| encode(arg) }.join("") + "\x0b", 0, @host, @port end install "ruby_udpsend", 1, 0 end
----------------8<--------cut-here--------8<----------------
Furthermore, the above code can be combined with the following one to produce a CGI script capable of sending messages to jMax...
----------------8<--------cut-here--------8<----------------
#!/opt/bin/ruby
ENV["HOME"]="/" STDERR.reopen "/dev/null", "w" require "cgi" require "gridflow" include GridFlow
puts "Content-type: text/plain", "", "hello world!" message = CGI.new.params['message'][0]
# create the gridflow object s = RubyUDPSend.new "karelia", 2042
# convert values and send in inlet 0 of the gridflow object s.send_in 0, *(message.split(',').map {|atom| if atom =~ /^\d/ then if atom =~ /.|E/i then Float(atom) else Integer(atom) end else atom.intern end })
----------------8<--------cut-here--------8<----------------
Mathieu Bouchard http://artengine.ca/matju
PD-list mailing list PD-list@iem.kug.ac.at http://iem.kug.ac.at/cgi-bin/mailman/listinfo/pd-list
On Thu, 13 Feb 2003, Yves Degoyon wrote:
ahah, it's been years we're making CGI's that sends controls from web pages to Pure Data.
True, but I'm talking about jMax here... I'm also talking about PD in the same mail, and I doubt PD can talk to jMax by UDP by its own means.
( maybe you're not aware of this as well as you don't know about subpatches and say : Pure Data can't do this, blah, blah, blah, ... )
Well I don't know everything, and sometimes I don't do my research, and sometimes I'm misled, and then I look like a troll or like an ignorant, but such is life, and then I stand corrected.
besides, i could never set GridFlow to work
[and from another mail]
no, let's say, do binary distros if you feel users can't learn compilation basics, but, well, be bored with "version X.Y is not compatible with my debian x.y.z, blah, blah, blah, ... )
Nowadays I'm getting that kind of problems with random distros, and I never ever distributed binaries.
Now if you could help me troubleshoot your problem...
and there's not a single help patch included for pure data....
Actually, if you look in gridflow/doc, you will find a quite elaborate manual, HTMLized.
And the help patches for jMax are out of date, too.
GridFlow is not appropriately described by help patches, which are nice for objects that have quite obvious patterns of behaviour, but for GridFlow I can't do that, else I'd need to add GUI objects (grid viewers) that I don't have the time to add. And that would not fix the problem of creating online (web) doc, and keeping all the forms of doc in sync, and creating doc for things that are *not* objects and never will, and the fact that PD comments delete their own linefeeds upon saving!
it's funny for someone who criticize PD all the time
If you'd criticize gridflow a little bit more then I'd know what's going on!
( yeah, i don't like too much your posts )
You know, it's a matter of taste.
On Fri, 14 Feb 2003, Yves Degoyon wrote:
i'm quite sorry that i've been so rude,
Ça en prend plus que ça pour m'atteindre.
but, please, check that what you say about PD is accurate,
see above... i'll try to make an effort here...
about gridflow, sorry, no success here and even though i'd have, as there's no help patches, i don't really know where to start..
the manual, the manual...
Mathieu Bouchard http://artengine.ca/matju
Mathieu Bouchard wrote:
On Thu, 13 Feb 2003, Yves Degoyon wrote:
ahah, it's been years we're making CGI's that sends controls from web pages to Pure Data.
True, but I'm talking about jMax here... I'm also talking about PD in the same mail, and I doubt PD can talk to jMax by UDP by its own means.
it could using OSC objects, no ??? ( but i don't know if they're available for jmax)
Now if you could help me troubleshoot your problem...
gridflow crashes after a while, i've got ruby 1.6.7
And the help patches for jMax are out of date, too.
why can't we get help patches for PD if there are some for jmax ???
going through the manual is really tedious and i also doubt it's complete.
sevy/yves
On Fri, 14 Feb 2003, Yves Degoyon wrote:
Mathieu Bouchard wrote:
On Thu, 13 Feb 2003, Yves Degoyon wrote:
ahah, it's been years we're making CGI's that sends controls from web pages to Pure Data.
True, but I'm talking about jMax here... I'm also talking about PD in the same mail, and I doubt PD can talk to jMax by UDP by its own means.
it could using OSC objects, no ??? ( but i don't know if they're available for jmax)
OSC is available for jMax, but afaik, this is limited to the DSP: it can't transmit messages. What I have done, in turn, is limited to messages, and doesn't do DSP. So they are complementary.
Now if you could help me troubleshoot your problem...
gridflow crashes after a while, i've got ruby 1.6.7
There's a way to reduce that, by putting this line in ~/.gridflow_startup:
GridFlow.clock_tick = 1000.0
but it's a hack and doesn't resolve the problem, for which I currently have no solution. (It's a very difficult bug. I'm sorry.)
And the help patches for jMax are out of date, too.
why can't we get help patches for PD if there are some for jmax ???
Because it's tedious work for me and I'm not nearly satisfied with the jMax help-patches at all and so it doesn't encourage me to translate them to PD. Also my jMax->PD translator is really not ready yet and I've explained in another mail the problems with PD's comment-boxes.
going through the manual is really tedious and i also doubt it's complete.
It's fairly complete (only C++/Ruby APIs are missing), but since many classes share common concepts, those are described in a separate file called "doc/architecture.html".
[Je vais répondre à tes autres mails quand j'aurai le temps. Bonne journée.]
Mathieu Bouchard http://artengine.ca/matju