Class:            OSCVoice

Environment:      Siren
Superclass:         Siren.NotelistVoice
Category:         MusicIO-OSC
Instance variables:   port
Indexed variables:   objects

An OSCVoice can play events out to an OSC server using a predefined parameter mapping block to generate the OSC message.

Instance Variables:
   port    my output port

events

oscMessageFrom: event
   Answer a message for the given event by passing it to my parameter-mapper block

play: anEL
   Expand the list and play it now.

playAssociation: ass in: list
   Play the association...

playEvent: event at: start
   Expand the list and play it at the given time.

waitTill: time
   

utilities

send: command args: args
   Send an OSC command with the given arguments

accessing

port
   Return the OSCPort

port: aPort
   Set the OSCPort

MetaClass:         OSCVoice class

examples

fmExample1
   Play a few random notes on the CSL FM instrument

fmExample2
   Play molto legato notes on 4 CSL FM instruments and loop until interrupted

fmExample3
   Play a long CSL FM note and apply some real-time control functions to it

fmExample4
   Play an FM bell using CSL; fork a block that plays a note and waits a bit;
      stop the scheduler to stop the block.

functionExample
   Play a function out to OSC

midiScaleExample
   OSCVoice midiScaleExample

sndExample1
   Play random notes on the CSL sound file instruments

sndExample2
   Play random notes on the CSL sound file instruments; loop until interrupted

sosExample1
   Play random notes on the CSL sum-of-sines instruments; loop until interrupted

instance creation

default
   Answer an OSC voice for use with OSC-to-MIDI by default.

localhost
   Answer an instance on the local host

map: mapSelector
   Answer a default instance that uses the given parameter map name

onPort: pt
   Answer an instance on the given port

scHost
   Answer the default voice for SC over OSC

parameter maps

defaultPMap
   Answer the default parameterMap for use with OSC.

pMapForCSLAdditive
   Answer the default parameterMap for use with the CSL sum-of-sines instrument.
      This creates an OSC bundle with a 'ps' message for the spectrum followed
      by a 'pn' message to play a note.
      CSL SOSInstrument args: dur, ampl, freq, pos, [att, dec, sus, rel]

pMapForCSLFM
   Answer the default parameterMap for use with the CSL FM example instrument.

pMapForCSLSimpleFM
   Answer the default parameterMap for use with the CSL FM example instrument.

pMapForCSLSnd
   Answer the default parameterMap for use with the CSL FM example instrument.

pMapForMIDI
   Answer the default parameterMap for use with OSC-to-MIDI.
   In this class, we create and return a OSCMessage with data taken from the given event.

pMapForMIDItoFM
   Answer the default parameterMap for use with the CSL FM example instrument.

pMapWithBundle
   Answer the default parameterMap for use with OSC-to-MIDI. In this class, we create and return a TypedOSCMessage with data taken from the given event. This allows us to have other versions that create OSC bundles.