de.sciss.jcollider
Class ServerOptions

java.lang.Object
  extended by de.sciss.jcollider.ServerOptions

public class ServerOptions
extends java.lang.Object

A class full of getter/setter methods to describe the options to boot a local scsynth server.

Version:
0.32, 11-Feb-08
Author:
Hanns Holger Rutz

Field Summary
static java.lang.String TCP
          Protocol type : transport control protocol
static java.lang.String UDP
          Protocol type : universal datagram protocol
 
Constructor Summary
ServerOptions()
          Creates a new instance with default options
 
Method Summary
 BlockAllocator.Factory getBlockAllocFactory()
           
 int getBlockSize()
           
 java.lang.String getDevice()
           
 int getFirstPrivateBus()
          Utility method to return the audio bus offset for the first bus which is not connected to audio hardware interface channels.
 int getHardwareBufferSize()
           
 java.lang.String getInputStreamsEnabled()
           
 boolean getLoadDefs()
           
 int getMaxNodes()
           
 int getMaxSynthDefs()
           
 int getMemSize()
           
 int getNumAudioBusChannels()
           
 int getNumBuffers()
           
 int getNumControlBusChannels()
           
 int getNumInputBusChannels()
           
 int getNumOutputBusChannels()
           
 int getNumRGens()
           
 int getNumWireBufs()
           
 java.lang.String getOutputStreamsEnabled()
           
 java.lang.String getProtocol()
           
 boolean getRendezvous()
           
 double getSampleRate()
           
 int getVerbosity()
           
static java.lang.String[] optionListToStringArray(java.util.List list)
          Converts a list of string elements to one an array of strings
 void setBlockAllocFactory(BlockAllocator.Factory baf)
           
 void setBlockSize(int blockSize)
           
 void setDevice(java.lang.String device)
           
 void setHardwareBufferSize(int hardwareBufferSize)
           
 void setInputStreamsEnabled(java.lang.String inputStreamsEnabled)
           
 void setLoadDefs(boolean loadDefs)
           
 void setMaxNodes(int maxNodes)
           
 void setMaxSynthDefs(int maxSynthDefs)
           
 void setMemSize(int memSize)
           
 void setNumAudioBusChannels(int numAudioBusChannels)
           
 void setNumBuffers(int numBuffers)
           
 void setNumControlBusChannels(int numControlBusChannels)
           
 void setNumInputBusChannels(int numInputBusChannels)
           
 void setNumOutputBusChannels(int numOutputBusChannels)
           
 void setNumRGens(int numRGens)
           
 void setNumWireBufs(int numWireBufs)
           
 void setOutputStreamsEnabled(java.lang.String outputStreamsEnabled)
           
 void setProtocol(java.lang.String protocol)
           
 void setRendezvous(boolean rendezvous)
           
 void setSampleRate(double sampleRate)
           
 void setVerbosity(int verbosity)
           
static java.lang.String stringArrayToConsoleString(java.lang.String[] array)
          Converts an array of strings to a string which can be used in a Un*x console.
 java.util.List toOptionList(int port)
          Creates a list of all the server options, omitting those whose value equals the default value.
 java.util.List toOptionList(int port, boolean verbose)
          Creates a list of all the server options.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UDP

public static final java.lang.String UDP
Protocol type : universal datagram protocol

See Also:
Constant Field Values

TCP

public static final java.lang.String TCP
Protocol type : transport control protocol

See Also:
Constant Field Values
Constructor Detail

ServerOptions

public ServerOptions()
Creates a new instance with default options

Method Detail

toOptionList

public java.util.List toOptionList(int port)
Creates a list of all the server options, omitting those whose value equals the default value.

Parameters:
port - the port number to use for the -u option
Returns:
a list containing String elements of the server options

toOptionList

public java.util.List toOptionList(int port,
                                   boolean verbose)
Creates a list of all the server options.

Parameters:
port - the port number to use for the -u option
verbose - if true, elements for all parameters are generated, otherwise only elements for parameters that are different from scsynth's defaults are generated
Returns:
a list containing String elements of the server options

getNumAudioBusChannels

public int getNumAudioBusChannels()

setNumAudioBusChannels

public void setNumAudioBusChannels(int numAudioBusChannels)

getNumControlBusChannels

public int getNumControlBusChannels()

setNumControlBusChannels

public void setNumControlBusChannels(int numControlBusChannels)

getNumInputBusChannels

public int getNumInputBusChannels()

setNumInputBusChannels

public void setNumInputBusChannels(int numInputBusChannels)

getNumOutputBusChannels

public int getNumOutputBusChannels()

setNumOutputBusChannels

public void setNumOutputBusChannels(int numOutputBusChannels)

getNumBuffers

public int getNumBuffers()

setNumBuffers

public void setNumBuffers(int numBuffers)

getMaxNodes

public int getMaxNodes()

setMaxNodes

public void setMaxNodes(int maxNodes)

getMaxSynthDefs

public int getMaxSynthDefs()

setMaxSynthDefs

public void setMaxSynthDefs(int maxSynthDefs)

getProtocol

public java.lang.String getProtocol()

setProtocol

public void setProtocol(java.lang.String protocol)
Throws:
java.lang.IllegalArgumentException - if protocol is not UDP

getBlockSize

public int getBlockSize()

setBlockSize

public void setBlockSize(int blockSize)

getHardwareBufferSize

public int getHardwareBufferSize()

setHardwareBufferSize

public void setHardwareBufferSize(int hardwareBufferSize)

getMemSize

public int getMemSize()

setMemSize

public void setMemSize(int memSize)

getNumRGens

public int getNumRGens()

setNumRGens

public void setNumRGens(int numRGens)

getNumWireBufs

public int getNumWireBufs()

setNumWireBufs

public void setNumWireBufs(int numWireBufs)

getSampleRate

public double getSampleRate()

setSampleRate

public void setSampleRate(double sampleRate)

getLoadDefs

public boolean getLoadDefs()

setLoadDefs

public void setLoadDefs(boolean loadDefs)

getInputStreamsEnabled

public java.lang.String getInputStreamsEnabled()

setInputStreamsEnabled

public void setInputStreamsEnabled(java.lang.String inputStreamsEnabled)

getOutputStreamsEnabled

public java.lang.String getOutputStreamsEnabled()

setOutputStreamsEnabled

public void setOutputStreamsEnabled(java.lang.String outputStreamsEnabled)

getDevice

public java.lang.String getDevice()

setDevice

public void setDevice(java.lang.String device)

getBlockAllocFactory

public BlockAllocator.Factory getBlockAllocFactory()

setBlockAllocFactory

public void setBlockAllocFactory(BlockAllocator.Factory baf)

getVerbosity

public int getVerbosity()

setVerbosity

public void setVerbosity(int verbosity)

getRendezvous

public boolean getRendezvous()

setRendezvous

public void setRendezvous(boolean rendezvous)

getFirstPrivateBus

public int getFirstPrivateBus()
Utility method to return the audio bus offset for the first bus which is not connected to audio hardware interface channels. This value is only valid, if the server was booted with this options

Returns:
the index of the first audio bus not connected to audio hardware

optionListToStringArray

public static java.lang.String[] optionListToStringArray(java.util.List list)
Converts a list of string elements to one an array of strings

Parameters:
list - a list whose elements are Strings
Returns:
array of those elements in the same order as they appeared in the list

stringArrayToConsoleString

public static java.lang.String stringArrayToConsoleString(java.lang.String[] array)
Converts an array of strings to a string which can be used in a Un*x console. This assembles all elements with space characters between them. If an element contains a space character, it will be put in quotes.

Parameters:
array - parameters to a un*x process
Returns:
concatenated command string