= An OSC client for Ruby
http://opensoundcontrol.org/
== DESCRIPTION
I've used the OSC gem originally created by Tadayoshi Funaba and wanted to update it for ruby 1.9 compatibility. I'm also writing rspec tests for this library to allow others to more easily understand/update the code.
Compatible with ruby 1.8, 1.9, and jruby
== INSTALL
sudo gem install aberant-osc-ruby
for the EMServer, you will need EventMachine
sudo gem install eventmachine
== EVENT MACHINE EXAMPLE
compatible with ruby 1.8, 1.9, and jruby
require 'rubygems'
require 'osc-ruby'
require 'osc-ruby/em_server'
@server = OSC::EMServer.new( 3333 )
@client = OSC::Client.new( 'localhost', 3333 )
@server.add_method '/greeting' do | message |
puts message.to_a
end
Thread.new do
@server.run
end
@client.send( OSC::Message.new( "/greeting" , "hullo!" ))
sleep( 3 )
== CLASSIC EXAMPLE
compatible with ruby 1.8
require 'rubygems'
require 'osc-ruby'
@server = OSC::Server.new( 3333 )
@client = OSC::Client.new( 'localhost', 3333 )
@server.add_method '/greeting' do | message |
puts message.inspect
end
Thread.new do
@server.run
end
@client.send( OSC::Message.new( "/greeting", "hullo!" ))
sleep( 3 )
== CREDITS
Originally created by...
Tadayoshi Funaba
http://www.funaba.org/en/
thx also to Toby Tripp and Obtiva