com.softsynth.jmsl
Interface DimensionNameSpace

All Known Implementing Classes:
DefaultDimensionNameSpace, DimensionNameSpaceAdapter, MaxDimensionNameSpace, MidiDimensionNameSpace, MidiNoteRecorder, MusicShape, SabbathBrideMusicShape, SynthNoteDimensionNameSpace

public interface DimensionNameSpace

Provides an interface for getting and setting values by name, and associating them with a dimension. Used, for example, to map "modAmp" between various objects one may store it in dimension 5 of an array where it is handed to an Instrument, while another stores it in dimension 6. See DimensionNameSpaceTranslator to handle mapping from one DimensionNameSpace to another

Author:
Nick Didkovsky and Phil Burk. (c) 2002 Nick Didkovsky and Phil Burk, all rights reserved.
See Also:
DimensionNameSpaceTranslator

Method Summary
 int dimension()
           
 java.util.Enumeration dimensionNames()
           
 double getDefault(int dim)
           
 int getDimension(java.lang.String name)
           
 java.lang.String getDimensionName(int dim)
           
 double getHighLimit(int dim)
           
 double getLowLimit(int dim)
           
 int getNumberOfNames()
           
 void setDefault(int dim, double value)
          set the default value for a dimension
 void setDimensionName(int dim, java.lang.String name)
          assign a name to a dimension
 void setLimits(int dim, double low, double high)
          set the lowest and highest limits for a dimension
 

Method Detail

getNumberOfNames

int getNumberOfNames()
Returns:
number of names stored in name space. Not the same as highest dimension. Not all dimensions require names.

dimension

int dimension()
Returns:
number of dimensions. Useful if you are allocating an array for example

getDimensionName

java.lang.String getDimensionName(int dim)
Returns:
name of specified dimension

getDimension

int getDimension(java.lang.String name)
Returns:
dimension associated with name

setDimensionName

void setDimensionName(int dim,
                      java.lang.String name)
assign a name to a dimension


getLowLimit

double getLowLimit(int dim)
Returns:
lowest allowable value for specified dimension

getHighLimit

double getHighLimit(int dim)
Returns:
highest allowable value for specified dimension

getDefault

double getDefault(int dim)
Returns:
default value for specified dimension

setDefault

void setDefault(int dim,
                double value)
set the default value for a dimension


setLimits

void setLimits(int dim,
               double low,
               double high)
set the lowest and highest limits for a dimension


dimensionNames

java.util.Enumeration dimensionNames()