<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>GuruBlog : Articles about osc</title>
    <description>local-guru.net</description>
    <link>http://www.local-guru.net/blog</link>
    <ttl>40</ttl>
    <item>
      <title>Android Monome-Clone in Processing</title>
      <link>http://www.local-guru.net//blog/2011/4/28/android-monome-clone-in-processing</link>
      <description>&lt;p&gt;Processing 1.5 is the first released version that supports the android mode in processing. So I wrote
a simple monome-clone in processing to test it.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.local-guru.net/processing/monometest.pde"&gt;Download the complete source here&lt;/a&gt; if you want
to try it yourself.&lt;/p&gt;

&lt;p&gt;The sketch uses the OscP5 library to generate or react to osc-messages, but unfortenatly processing
still has problems resolving external libraries in android mode. So I added the oscp5.jar to the
sketch using "Add File" - works like a charm.&lt;/p&gt;

&lt;p&gt;The sketch is far from perfect - the target address of the osc events is still hardcoded, no support
for multitouch events yet, etc - but its really nice to see how fast an android app can be made
with processing&lt;/p&gt;

&lt;p&gt;This is my Archos 101 running the my monome-clone&lt;/p&gt;

&lt;p&gt;&lt;img src="http://www.local-guru.net/img/guru/android_monome.jpg" alt="android monome clone" /&gt;&lt;/p&gt;
</description>
      <pubDate>2011-04-28T05:23:03+02:00</pubDate>
    </item>
    <item>
      <title>Mapping linux input events to OSC</title>
      <link>http://www.local-guru.net//blog/2009/9/6/mapping-linux-input-events-to-osc</link>
      <description>&lt;p&gt;In linux every input device registers under /dev/input/eventX and sends events in 16 byte blocks.
these data chunks contain a timestamp the event type, the event code and a value
depending on the event type the semantic of value changes. for a event type 1 (key event) value 1 means pressed
and value 0 mean released.&lt;/p&gt;

&lt;p&gt;here is a little ruby program that reacts to key press events and sends osc messages. which could trigger drum sounds,
start play back, ...&lt;/p&gt;

&lt;p&gt;key press events are not only sent by keyboards but also by mice, joystics, gamepads, a DDR mat, a buzz buzzer, ...&lt;/p&gt;

&lt;p&gt;the code example is used to map keys of my PS3 Controller to drum sounds.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;require 'osc';

c = OSC::UDPSocket.new

hh = OSC::Message.new('/drum', 's', "hh" )
bd = OSC::Message.new('/drum', 's', "bd" )
sn = OSC::Message.new('/drum', 's', "sn" )

File.open("/dev/input/event7") do |f|
  while true
    event = f.read(16).unpack("llSSl")
    time = event[0] + event[1] / 1000000.0
    type = event[2]
    code = event[3]
    value = event[4]

    puts "Ti: #{time} T: #{type} C: #{code} V: #{value} " if type == 1

    c.send( bd, 0, 'localhost', 3334 ) if type == 1 &amp;amp;&amp;amp; code == 298 &amp;amp;&amp;amp; value == 1
    c.send( sn, 0, 'localhost', 3334 ) if type == 1 &amp;amp;&amp;amp; code == 293 &amp;amp;&amp;amp; value == 1
    c.send( hh, 0, 'localhost', 3334 ) if type == 1 &amp;amp;&amp;amp; code == 303 &amp;amp;&amp;amp; value == 1
  end
end
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The code was inspired by 2 articles i found recently the first one is about how to use a
&lt;a href="http://t-a-w.blogspot.com/2007/05/using-ddr-dance-mat-as-musical.html"&gt;DDR-mat to trigger Drum Sounds&lt;/a&gt;
and the second one shows how to
&lt;a href="http://wiki.openmoko.org/wiki/Accelerometer_data_retrieval"&gt;read the accelerometer data from a openmonoko phone&lt;/a&gt;&lt;/p&gt;
</description>
      <pubDate>2009-09-06T04:48:00+02:00</pubDate>
    </item>
    <item>
      <title>cocoa osc app</title>
      <link>http://www.local-guru.net//blog/2009/4/14/cocoa-osc-app</link>
      <description>&lt;p&gt;i just wrote a cocoa frontend for my &lt;a href="http://www.local-guru.net/blog/2009/04/13/ruby-osc-seqencer-version2"&gt;ruby osc sequencer&lt;/a&gt; using &lt;a href="http://github.com/mrRay/vvosc/tree/master"&gt;vvosc&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://www.local-guru.net/img/vvosc_tut/vvosc_tut3.png" alt="vvosc test" /&gt;&lt;/p&gt;

&lt;p&gt;this is a simple tutorial to show how i got my vvosc app running. i'm neither a
xcode nor objective-c expert - so be gentle if there are some mistakes, or there
is a simpler more xcody way to do it :-)&lt;/p&gt;
</description>
      <pubDate>2009-04-14T05:14:00+02:00</pubDate>
    </item>
    <item>
      <title>ruby osc seqencer version2</title>
      <link>http://www.local-guru.net//blog/2009/4/13/ruby-osc-seqencer-version2</link>
      <description>&lt;p&gt;i updated my &lt;a href="http://www.local-guru.net/blog/2009/01/20/osc-sequencer-in-ruby"&gt;osc sequencer in ruby&lt;/a&gt;. now it doesn't just send osc events but also react to it. i made a small
processing sketch that sends osc play,pause,stop events for each track in the sequencer.
i also refactored the ruby code a bit, to use classes. next steps i plan are to separate the sequencer code
from the sequences and allow sequences to be added or deleted at runtime via osc messages.&lt;/p&gt;

&lt;p&gt;the code isn't very reusable now, so i still considere this more as a prove of concept, but i like the idea
of separating the frontend and the backend via osc events and having sequences that can run independently.&lt;/p&gt;

&lt;p&gt;that should enable some nice osc controlled audio/video installations.&lt;/p&gt;

&lt;p&gt;write me a comment or mail if you have some ideas for improvement or if you use the code in one of your
projects&lt;/p&gt;
</description>
      <pubDate>2009-04-13T14:57:00+02:00</pubDate>
    </item>
    <item>
      <title>osc linkdump</title>
      <link>http://www.local-guru.net//blog/2009/3/8/osc-linkdump</link>
      <description>&lt;p&gt;&lt;a href="http://opensoundcontrol.org/"&gt;http://opensoundcontrol.org&lt;/a&gt; the mother of all osc pages ;-)&lt;/p&gt;

&lt;p&gt;&lt;a href="http://nodebox.net/code/index.php/OSC"&gt;http://nodebox.net/code/index.php/OSC&lt;/a&gt; osc support in NodeBox a programming environment based on python - with strong processing influences&lt;/p&gt;

&lt;p&gt;&lt;a href="http://hans.fugal.net/src/rosc/"&gt;http://hans.fugal.net/src/rosc/&lt;/a&gt; osc support for ruby&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.ixi-audio.net/content/body_backyard_python.html"&gt;http://www.ixi-audio.net/content/body_backyard_python.html&lt;/a&gt; simple osc library for python&lt;/p&gt;

&lt;p&gt;&lt;a href="http://frey.co.nz/projects/ofxosc/"&gt;http://frey.co.nz/projects/ofxosc/&lt;/a&gt; osc library for openframeworks&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.audiomulch.com/~rossb/code/oscpack/"&gt;http://www.audiomulch.com/~rossb/code/oscpack/&lt;/a&gt; osc library for c++. is used by ofxosc&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.sojamo.de/libraries/oscP5/"&gt;http://www.sojamo.de/libraries/oscP5/&lt;/a&gt; osc library for processing&lt;/p&gt;

&lt;p&gt;&lt;a href="http://chuck.cs.princeton.edu/doc/language/event.html"&gt;http://chuck.cs.princeton.edu/doc/language/event.html&lt;/a&gt; chuck osc documentation&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.local-guru.net/blog/2009/03/06/osc-events-in-pd"&gt;http://www.local-guru.net/blog/2009/03/06/osc-events-in-pd&lt;/a&gt; osc events in puredata&lt;/p&gt;

&lt;p&gt;&lt;a href="http://supercollider.svn.sourceforge.net/viewvc/supercollider/trunk/build/Help/ServerArchitecture/Server-Command-Reference.html"&gt;http://supercollider.svn.sourceforge.net/viewvc/supercollider/trunk/build/Help/ServerArchitecture/Server-Command-Reference.html&lt;/a&gt; supercollider osc command reference&lt;/p&gt;

&lt;p&gt;&lt;a href="http://supercollider.svn.sourceforge.net/viewvc/supercollider/trunk/build/Help/Control/OSCresponderNode.html"&gt;http://supercollider.svn.sourceforge.net/viewvc/supercollider/trunk/build/Help/Control/OSCresponderNode.html&lt;/a&gt; supercollider OSCresponderNode documentation&lt;/p&gt;

&lt;p&gt;&lt;a href="http://mtg.upf.edu/reactable/?tuio"&gt;http://mtg.upf.edu/reactable/?tuio&lt;/a&gt; osc based protocol for tangiable user interface&lt;/p&gt;

&lt;p&gt;&lt;a href="http://wiki.monome.org/view/40hOscProtocol"&gt;http://wiki.monome.org/view/40hOscProtocol&lt;/a&gt; the monome protocol&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.grahamwakefield.net/MAT-F04/233/index.html"&gt;http://www.grahamwakefield.net/MAT-F04/233/index.html&lt;/a&gt; java based osc sequencer&lt;/p&gt;
</description>
      <pubDate>2009-03-08T17:37:00+01:00</pubDate>
    </item>
    <item>
      <title>osc events in supercollider</title>
      <link>http://www.local-guru.net//blog/2009/3/8/osc-events-in-supercollider</link>
      <description>&lt;p&gt;&lt;a href="http://supercollider.sourceforge.net/"&gt;supercollider&lt;/a&gt; uses osc to controll the synthisizers internally,
but i wanted a supercollider synth to react to my osc events instead of having to send supercollider-osc
events from my app&lt;/p&gt;

&lt;p&gt;after some research in the help files i found out that
&lt;a href="http://supercollider.svn.sourceforge.net/viewvc/supercollider/trunk/build/Help/Control/OSCresponderNode.html"&gt;OSCresponderNode&lt;/a&gt;
does the trick.&lt;/p&gt;

&lt;p&gt;the code example shows how to register for an osc event and trigger a synth. now i can use a supercollidersynt
with my &lt;a href="http://www.local-guru.net/blog/2009/01/20/osc-sequencer-in-ruby"&gt;ruby osc sequencer&lt;/a&gt;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;(
    SynthDef( "guru2", { arg mfreq=40;
        var env, amp;

        env = Env.perc( 0, 0.2 );
        amp = EnvGen.kr(env, 1, doneAction:2);

        Out.ar([0,1], SinOsc.ar( mfreq.midicps ) * amp * 0.5);
    }).send(s);
)

n = NetAddr("127.0.0.1", 57120)
o = OSCresponderNode(nil, '/melody', { |t, r, msg| Synth( "guru2", [\mfreq, msg[1]]);  }).add;

o.remove
&lt;/code&gt;&lt;/pre&gt;
</description>
      <pubDate>2009-03-08T17:18:00+01:00</pubDate>
    </item>
    <item>
      <title>using the BlenderGameEngine as OSC client </title>
      <link>http://www.local-guru.net//blog/2009/3/8/using-the-blendergameengine-as-osc-client</link>
      <description>&lt;p&gt;i just managed to use the
&lt;a href="http://wiki.blender.org/index.php/BSoD/Introduction_to_the_Game_Engine/The_basics_of_the_Blender_GE"&gt;GameEngine&lt;/a&gt; of
&lt;a href="http://www.blender.org"&gt;blender&lt;/a&gt; as a client for OSC events :-)&lt;/p&gt;

&lt;p&gt;now i can change the color of a cube by sending osc events from my
 &lt;a href="http://www.local-guru.net/blog/2009/03/06/osc-events-in-pd"&gt;pd-patch&lt;/a&gt;
or the ruby-script i wrote for my
 &lt;a href="http://www.local-guru.net/blog/2009/03/06/osc-app-using-openframeworks"&gt;openframeworks-demo&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src="http://www.local-guru.net/projects/bge-osc/bge-cube.png" alt="bge-cube.png" /&gt;&lt;/p&gt;

&lt;p&gt;the blend file can be &lt;a href="http://www.local-guru.net/projects/bge-osc/bgetest.blend"&gt;downloaded here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;the blend file needs &lt;a href="http://www.local-guru.net/projects/bge-osc/OSC.py"&gt;OSC.py&lt;/a&gt; by
&lt;a href="http://dingoskidneys.com/~dholth/"&gt;Daniel W. Holth&lt;/a&gt; to be in the python searchpath, so either copy it to location you
start blender form or copy it to your site-package folder (obviously i'm not the only one who had
the idea of using this lib with the blender game engine :-] )&lt;/p&gt;
</description>
      <pubDate>2009-03-08T15:18:00+01:00</pubDate>
    </item>
    <item>
      <title>oscdispatch 0.1</title>
      <link>http://www.local-guru.net//blog/2009/3/7/oscdispatch-0-1</link>
      <description>&lt;p&gt;I finished the first version of my &lt;a href="http://www.local-guru.net/blog/pages/oscdispatch"&gt;OSCDispatch&lt;/a&gt; server in erlang.&lt;/p&gt;

&lt;p&gt;The program defines a generic server and uses a callback function for the dispaching rules.&lt;/p&gt;

&lt;p&gt;the oscdispatch.erl looks like this and uses a parameter in the module definition&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;-module(oscdispatch, [Dispatch]).
-export([start_server/0]).
-include("server_config.hrl").

start_server() -&amp;gt;
    spawn( fun() -&amp;gt; server(?server_port) end ).

server(Port) -&amp;gt;
    {ok, Socket} = gen_udp:open( Port, [binary] ),
    io:format( "socked opened ~p~n ", [Socket]),
    loop(Socket).

loop(Socket) -&amp;gt;
    receive
        {udp, Socket, Host, Port, Bin} -&amp;gt;
            Adr = binary_to_list(util:getadr(Bin)),
            io:format( "got: ~p~n", [{Host, Port, Adr}]),
            Dispatch:dispatch( Adr, Bin ),
            loop(Socket)
    end.
&lt;/code&gt;&lt;/pre&gt;
</description>
      <pubDate>2009-03-07T08:51:00+01:00</pubDate>
    </item>
    <item>
      <title>Osc events in PD</title>
      <link>http://www.local-guru.net//blog/2009/3/6/osc-events-in-pd</link>
      <description>&lt;p&gt;i have written an &lt;a href="http://puredata.info/"&gt;pd-patch&lt;/a&gt; to controll the simple &lt;a href="http://www.local-guru.net/blog/2009/03/06/osc-app-using-openframeworks"&gt;openframeworks osc demo&lt;/a&gt; i wrote ealier today.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://www.local-guru.net/projects/pd/pd-osc-patch.png" alt="osc-patch" /&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.local-guru.net/projects/pd/pd-osc-patch.pd"&gt;pd-osc-patch.pd&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;the hardest part in using osc with pd was getting a pd-version that supports osc.
the deb packages for pd-extended don't work on unbuntu 8.10.&lt;/p&gt;

&lt;p&gt;so i had to compile my own package using &lt;a href="http://puredata.info/docs/developer/BuildingPdExtended64bitUbuntuIntrepid"&gt;this instructions&lt;/a&gt;&lt;/p&gt;
</description>
      <pubDate>2009-03-06T08:44:00+01:00</pubDate>
    </item>
    <item>
      <title>very simple OSC debug tool</title>
      <link>http://www.local-guru.net//blog/2009/3/6/very-simple-osc-debug-tool</link>
      <description>&lt;p&gt;when playing with OSC and i'm not quite sure what osc messages get send by an application
i use a little python script which uses &lt;a href="http://www.ixi-audio.net/content/body_backyard_python.html"&gt;the simple OSC api&lt;/a&gt;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;import osc
osc.init()
osc.listen( "127.0.0.1", 1234 )
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;in fact it &lt;em&gt;misuses&lt;/em&gt; the library ;-)&lt;/p&gt;

&lt;p&gt;every time a message is received that isn't bound by a callback function (which is all
messages, since we dont bind anything here ), the listener prints a waring containing
the address, the format and the value of the message&lt;/p&gt;
</description>
      <pubDate>2009-03-06T08:09:00+01:00</pubDate>
    </item>
  </channel>
</rss>

