Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

50 lines (29 sloc) 1.171 kb

An OSC client for Ruby


This OSC gem originally created by Tadayoshi Funaba has been updated for ruby 1.9 compatibility. I've made a point to make this code as expressive as possible and provide a test suite for confident hacking. It also should be flexible enough to support most crazy ideas.

Compatible with ruby 1.9, 2.0 and jruby


sudo gem install osc-ruby

for the EMServer, you will need EventMachine

sudo gem install eventmachine

Event Machine Basic example

# compatible with ruby 1.9, 2.0 and jruby
require 'rubygems'
require 'osc-ruby'
require 'osc-ruby/em_server'

@server = 3333 )
@client = 'localhost', 3333 )

@server.add_method '/greeting' do | message |
  puts "#{message.ip_address}:#{message.ip_port} -- #{message.address} -- #{message.to_a}"
end do

@client.send( "/greeting" , "hullo!" ))

sleep( 3 )


Originally created by…

Tadayoshi Funaba

thx also to Toby Tripp, Brian McClain, Andreas Haller, and James Hughes

Jump to Line
Something went wrong with that request. Please try again.