--- Tom Schouten doelie@zzz.kotnet.org wrote:
Most likely not, but I am working on a patch for
Puredata Trigger Gang
Bang 1 - have you any tips for connecting Gem with
Gridflow? I'm
experimenting with pix_snap, pix_dump and pix_set,
but unsuccessful so
far in the 45mins I've spent on that aspect.
What do you think about using pf for this? If possible i'd like to make gem and gridflow interface with pdp/pf in the same matter, keep it a bit simpler..
I managed to get Gridflow images into Gem like this:
[loadbang]
|
grid[H][W][3] [ 255 (
| |
[loadbang] [@cast float32] [@cast float32] | | | [RGB( [@ / ] / | [gemhead] [@export_list] |/ | [pix_set W H ] | useable-in-gem
replace "RGB" with "RGBA" for 4-channel images
Is there a way to cast Gridflow operators directly so I don't have to cast both inputs?
My experiments trying to get Gem output into Gridflow with [pix_snap], [pix_dump] and [@import] have so far been unsuccessful, possibly because the float to int conversion is happening at the wrong time - I end up with a grid full of 0s.
http://www.claudiusmaximus.tk Each unsolicited commercial email received is subject to a US$50 handling fee.
___________________________________________________________ALL-NEW Yahoo! Messenger - all new features - even more fun! http://uk.messenger.yahoo.com
On Wed, 8 Sep 2004, Claudius Maximus wrote:
I managed to get Gridflow images into Gem like this:
Note that, according to doc/architecture.html, you can send lists in place of grids, and they may contain about the same information as you'd have in @import/@cast/@redim. Another thing is that all six data types may have their name abbreviated to a single letter that is the initial letter of each java name: b=uint8, s=int16, i=int32, l=int64, f=float32, d=float64. One last is that lists can be arguments in GridFlow, if you enclose them in space-separated parens, and drop the "list" selector too.
So you can actually write [@ / ( f # 255 )] as a shorthand.
Is there a way to cast Gridflow operators directly so I don't have to cast both inputs?
The GF-0.7 series introduced multiple datatypes, but not automatic casting, because I'm not too sure what would be the best way to do it, and that if I implement the "wrong one", then I can't go back because I have to keep some compatibility.
My experiments trying to get Gem output into Gridflow with [pix_snap], [pix_dump] and [@import] have so far been unsuccessful, possibly because the float to int conversion is happening at the wrong time - I end up with a grid full of 0s.
[@import] has an argument for doing the job of [@cast] all at once, but it didn't fully work because in some cases the conversion from floats/lists was going through the int32 type in the middle. I since hacked something so that it actually works, but I don't recall which version it was, maybe 0.7.6, maybe even 0.7.7.
Mathieu Bouchard http://artengine.ca/matju