Index of /pub/lisp/osc
Name Last modified Size Description
Parent Directory 26-Aug-2005 17:44 -
v0.1/ 26-Aug-2005 17:44 -
v0.2/ 26-Aug-2005 17:44 -
PLT Scheme implementation of OSC protocol.
ChangeLog
v.0.2.
- I've burried the dream to port the library to other schemes for a time
being. This version is in a file osc.ss to reflect that it's PLT-scheme only
implementation.
- Dropped slib dependancy
- Added SRFI-13 dependancy (but it's ported to PLT scheme)
- Parser uses substring/shared so less garbage is generated
- Modularised using PLT scheme modules system
v.0.1.
- parsing OSC messages and bundles
- generating scheme functions constructing an OSC packet for a method
- bundle generator function
- OSC globs (pattern matching)
- functional style (more or less): higher level functions for
integrating in user's application, client methods as closures.
Example output (v0.1):
Welcome to MzScheme version 205, Copyright (c) 1995-2003 PLT
> (load "osc.scm")
> (test-server 7770)
found matching method for (/foo/bar ff 16570089/134217728 23)
found matching method for (/a/b/c/d sfsff one 16570089/134217728 three -16185515/70368744177664 1)
found matching method for (/a/b/c/d b ABCDE)
found matching method for (/jamin/scene i 2)
found matching method for (/test/me ifsbthd 10 5/2 str blob (1 . 0) 10 10)
found matching method for (/test/simple if 10 1)
found matching method for (/test/string s Hello)
found matching method for (/test/simple if 25 11198791/4194304)
found matching method for (/test/simple if 10 1)
found matching method for (/test/string s Hello)
found matching method for (/test/me ifsbthd 19 9646899/4194304 hoi aha! (0 . 100) 100 5854679515581645/2251799813685248)
no matching methods for (/no/such/thing i 10)
;; test-server is defined in the osc.scm, but it will eventually move
;; to its own file.
;; the first 4 matches are results of running liblo's example_client
;; the rest are from the following session in a different scheme session:
;; the weird ratios are made from floats, dunno if its bad...
;; after porting to PLT scheme (v0.2) ratios became floats
Welcome to MzScheme version 205, Copyright (c) 1995-2003 PLT
> (load "osc.scm")
> (define serv-sock (udp-open-socket))
> (udp-connect! serv-sock "localhost" 7770)
> (udp-send serv-sock (/test/me 10 2.5 "str" "blob" '(1 . 0) 10 10))
> (udp-send serv-sock bundle)
> (udp-send serv-sock bundle2)
> (define /no/such/thing (osc:make-method "/no/such/thing" "i"))
> (udp-send serv-sock (/no/such/thing 10))