Hi folks,
besides the client I also implemented now most of the server functionality for OSC in Squeak, a fancy and free Smalltalk Environment with lots of cool people and developments, definitely interesting also for you arty guys on osc-dev. Check out for example http://www.opencroquet.org
1.) Doc This version is for Smalltalk-Developers. If I come around I like to create an EToyish Interface (see: http://www.squeakland.org) for it. For now you have to fire up a squeak image, then open SqueakMap Package Loader -> OSC, then program Smalltalk...
1.)a OSC-Client:
(OSCMessage for: {'/foo' . 1000 . -1 . 'hello' . 1.234 . 5.678}) sendTo: '10.0.1.2' port: 5017
1.) b OSC-Server:
(OSCServer listenOnPort: yourPort) inspect
Have a look in the messageQueue of the server, you can get the next message from there via nextOrNil (it is a SharedQueue) See also the tests.
2.) Limitations:
- Blobs are not passed yet, also no support for bundles yet.
- One test is not running due to bizarre floating point arithmetic: #('/foo' 1000 -1 'hello' 1.233999967575073 5.67799997329712) is certainly not #('/foo' 1000 -1 'hello' 1.234 5.678) Hope nobody needs too precise floats...
Cheers,
Markus
On Tuesday 29 March 2005 12:41 pm, Markus Gaelli wrote:
- One test is not running due to bizarre floating point arithmetic:
#('/foo' 1000 -1 'hello' 1.233999967575073 5.67799997329712) is certainly not #('/foo' 1000 -1 'hello' 1.234 5.678) Hope nobody needs too precise floats...
Why not just choose either to (a) round the printed output to 0.001, or (b) choose floats that can be exactly represented?
Just remember that these are binary fractions...
If you used (say) 1.125 and 4.0625 it would probably work better.
Hi Ned,
- One test is not running due to bizarre floating point arithmetic:
#('/foo' 1000 -1 'hello' 1.233999967575073 5.67799997329712) is certainly not #('/foo' 1000 -1 'hello' 1.234 5.678) Hope nobody needs too precise floats...
Why not just choose either to (a) round the printed output to 0.001, or (b) choose floats that can be exactly represented?
Just remember that these are binary fractions...
I fixed the test according to your second suggestion, which did work.
"What Every Computer Scientist Should Know About Floating-Point Arithmetic" is a bit long, but I sure will remember your lesson about binary fractions ;-) http://docs.sun.com/source/806-3568/ncg_goldberg.html
If you used (say) 1.125 and 4.0625 it would probably work better.
Thanks,
Markus
- One test is not running due to bizarre floating point arithmetic:
#('/foo' 1000 -1 'hello' 1.233999967575073 5.67799997329712) is certainly not #('/foo' 1000 -1 'hello' 1.234 5.678) Hope nobody needs too precise floats...
This arithmetic might not be as bizare as it may seem, floats are not really as 'exact' as you might first think. im not sure how squeak represents and/or compares floats (the crosspost/followup might help find somone who does.. .), but it looks reasonably consistent with the 'error' from ieee754 which you would be using for OSC encoding (ie. < 0.0001 for such values) and are probably 'close enough' for what ever you are using floats for.
these links might help clarify and/or confuse the issue,.
http://stevehollasch.com/cgindex/coding/ieeefloat.html http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm
and the essential "What Every Computer Scientist Should Know About Floating-Point Arithmetic", by David Goldberg which can be found at http://docs.sun.com/source/806-3568/ncg_goldberg.html
hello,
now that we have OSC support, does someone plan to work on a Squeak client for the Supercollider server ?
Stef
hello
also for a puredata one?
thanks nicolasSelon Stéphane Rollandin lecteur@zogotounga.net:
hello,
now that we have OSC support, does someone plan to work on a Squeak client for the Supercollider server ?
Stef
Stéphane Rollandin wrote:
hello,
now that we have OSC support, does someone plan to work on a Squeak client for the Supercollider server ?
Stef
How do you see Squeak interfacing with SC or PD in practice? Why not just use SC or PD for your compositions? Are you thinking of interfacing non-audio Squeak apps with SC?
brad
Brad Fuller wrote:
Stéphane Rollandin wrote:
hello,
now that we have OSC support, does someone plan to work on a Squeak client for the Supercollider server ?
Stef
How do you see Squeak interfacing with SC or PD in practice? Why not just use SC or PD for your compositions? Are you thinking of interfacing non-audio Squeak apps with SC?
brad
I don't see the same picture with PD and SC. PD patches define their own semantic for OSC messages so there are as many clients as there are patches, while I believe there is a definite OSC adress tree within the SC server which provide hooks for writing the client langage the composer actually program with.
at the moment I am aware of the existence of the original SClang client langage (for MacOS and Linux I reckon), a PLT Scheme implementation and a Python one (which is part of the Windows port of SC).
the original SC3 client/server relationship is explained here: http://www.psi-o.net/pseudonym/boot_up.php (SClang /
the PLT scheme extension is introduced here: http://www.alphalink.com.au/~rd/p/rsc.html
so what I had in mind was something along the line of the PLT Scheme stuff, only within Squeak.
to say it another way: the SC sound engine does not require a specific langage to be programmed. so why not using smalltalk ?
Stef
squeak-dev@lists.squeakfoundation.org