forked from halfbyte/rosc
-
Notifications
You must be signed in to change notification settings - Fork 3
/
README
58 lines (41 loc) · 1.44 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
= 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.