See: Description
Class | Description |
---|---|
OscWorldComponent |
OSC world component.
|
OscWorldDesktopComponent |
OSC world desktop component.
|
The OpenSound Control (OSC) world adds OSC in and OSC out support to Simbrain. OpenSound Control is a communication protocol which allows musical instruments (especially electronic musical instruments such as synthesizers), computers, and other multimedia devices to share music performance data in realtime over a network. [1]
The OSC world can be coupled to a network in order to send OSC messages with a single float argument to external applications. More than one OSC message sender can be configured to produce messages with different OSC Address Patterns [2].
Insert --> New Network
Right click --> New Neuron
Insert --> New World --> OSC World
File --> Create OSC out message
Type "/melody" and hit OK.
Right click on the /melody, f OSC message --> Set input source --> Network --> Neuron_1 --> Activation
or
Right click on the neuron --> Set output target --> OSC World --> OSC Message --> /melody, f
For example, run the following script in ChucK [3]:
melody.ck:
SinOSC melody => dac; 0.5 => melody.gain; OscRecv recv; 9999 => recv.port; recv.listen(); recv.event("/melody, f") @=> OscEvent @ melodyEvent; spork ~ pollMelodyEvent(melodyEvent); me.yield(); while (true) { 1::second => now; } fun void pollMelodyEvent(OscEvent event) { while (true) { event => now; while (event.nextMsg()) { 1760.0 + (800.0 * event.getFloat()) => melody.freq; } } }
From the command-line:
$ chuck melody.ck
Double-click on the neuron
Set Neuron type to Random
Click OK
Click Global iterate network update algorithm button
The OSC world can be coupled to a network in order to receive OSC messages with a single float argument from external applications. More than one OSC message receiver can be configured to handle messages with different OSC Address Patterns [2].
Insert --> New Network
Right click --> New Neuron
Insert --> New World --> OSC World
File --> Create OSC in message
Type "/pulse" and hit OK.
Right click on the /pulse, f OSC message --> Set output target --> Network --> Neuron_1 --> Activation
or
Right click on the neuron --> Set input source --> OSC World --> OSC Message --> /pulse, f
For example, run the following script in ChucK [3]:
pulse.ck:
OscSend send; send.setHost("localhost", 9998); while (true) { send.startMsg("/pulse", "f"); Std.rand2f(0.1, 0.9) => send.addFloat; 1::second => now; }
From the command-line:
$ chuck pulse.ck
Click Global iterate network update algorithm button
The OSC world is based on the JavaOSC library [4].