public
Fork of halfbyte/rosc
Description: OpenSound Control for Ruby
Homepage: http://hans.fugal.net/src/rosc/
Clone URL: git://github.com/fugalh/rosc.git
fugalh (author)
Thu Mar 26 10:30:37 -0700 2009
commit  37b6cfb9bd7df8a3e22366402979f31c5aa74778
tree    149b0d14456dafb821944c7b422caaa8f6c0a771
parent  e4e7af1c7c95fbbc0ee045055d1cea9aee968751
rosc /
name age message
file AUTHORS Thu Jun 26 13:14:31 -0700 2008 Giving credit and releasing. [fugalh]
file ChangeLog Thu Jun 26 13:14:31 -0700 2008 Giving credit and releasing. [fugalh]
file GPL.txt Loading commit data...
file LICENSE Fri Feb 15 07:14:35 -0800 2008 LICENSE darcs-hash:20080215151435-28bda-9622f5... [fugalh]
file README
file Rakefile
file TODO Fri Feb 09 15:43:28 -0800 2007 readme, etc. darcs-hash:20070209234328-28bda-4... [fugalh]
directory examples/
directory lib/ Tue Dec 09 09:01:34 -0800 2008 Packet.decode_string optimization Thanks to Ia... [fugalh]
file setup.rb Fri Feb 09 15:56:05 -0800 2007 setup.rb darcs-hash:20070209235605-28bda-d85a1... [fugalh]
directory test/
= rosc - OpenSound Control for Ruby
== Synopsis

    require 'osc'

    Host = 'localhost'
    Port = 5000

    s = OSC::UDPServer.new
    s.bind Host, Port

    c = OSC::UDPSocket.new
    m = OSC::Message.new('/foo', 'fi', Math::PI, 42)
    c.send m, 0, Host, Port

    s.add_method '/f*', 'fi' do |msg|
      domain, port, host, ip = msg.source
      puts "#{msg.address} -> #{msg.args.inspect} from #{host}:#{port}"
    end
    Thread.new do
      s.serve
    end
    sleep 5

    #=> /foo -> [3.14159274101257, 42] from localhost:50843

== Requirements
- Ruby

== Installation

    sudo ruby setup.rb

== Details
See the OSC home page[1], especially the "State of the Art" paper (for an
overview) and the specification. This library makes OSC easy, but you will
still need to understand OSC concepts and limitations.

The important classes are Message, Bundle, UDPSocket, and UDPServer. If you
want to make your own server on a different transport (e.g. TCP or UNIX
sockets, which are still on the TODO list), you will want to use the Server
mixin.

Please read the AUTHORS file for credits and see the TODO list for planned
enhancements.

1. http://www.cnmat.berkeley.edu/OpenSoundControl

== Download/Contribute
The project is hosted at GitHub: http://github.com/fugalh/rosc

== Examples
Send me your interesting examples and I'll include them.

== License
Copyright (C) 2007 Hans Fugal and Tadayoshi Funaba

Distributed under Ruby's license. See the LICENSE file.