jlscp
v0.8

org.linuxsampler.lscp
Class AbstractInstrument

java.lang.Object
  extended by org.linuxsampler.lscp.AbstractInstrument
All Implemented Interfaces:
Instrument, Parseable
Direct Known Subclasses:
DbInstrumentInfo, MidiInstrumentInfo

public abstract class AbstractInstrument
extends java.lang.Object
implements Instrument, Parseable


Constructor Summary
AbstractInstrument()
          Creates a new instance of AbstractInstrument.
AbstractInstrument(java.lang.String[] resultSet)
          Creates a new instance of AbstractInstrument.
 
Method Summary
 java.lang.String getDescription()
          Gets a brief description about this instrument.
 java.lang.String getFilePath()
          Returns the absolute path name of the instrument file.
 java.lang.String getFormatFamily()
          Returns the format family of the instrument.
 java.lang.String getFormatVersion()
          Returns the format version of the instrument.
 int getInstrumentIndex()
          Returns the index of the instrument in the instrument file.
 java.lang.Integer[] getKeyMapping()
           
 java.lang.Integer[] getKeyswitchMapping()
           
 java.lang.String getName()
          Gets the name of this instrument.
 boolean parse(java.lang.String s)
          Parses a line of text.
 void setFilePath(java.lang.String path)
          Sets the absolute path name of the instrument file.
 void setInstrumentIndex(int idx)
          Sets the index of the instrument in the instrument file.
 void setName(java.lang.String name)
          Sets the name of this instrument.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.linuxsampler.lscp.Instrument
getEngine
 

Constructor Detail

AbstractInstrument

public AbstractInstrument()
Creates a new instance of AbstractInstrument.


AbstractInstrument

public AbstractInstrument(java.lang.String[] resultSet)
                   throws LscpException
Creates a new instance of AbstractInstrument.

Parameters:
resultSet - An array with information categories about an instrument.
Throws:
LscpException
Method Detail

getName

public java.lang.String getName()
Gets the name of this instrument.

Specified by:
getName in interface Instrument
Returns:
The name of this instrument.

setName

public void setName(java.lang.String name)
Sets the name of this instrument.

Specified by:
setName in interface Instrument
Parameters:
name - The name of this instrument.

getDescription

public java.lang.String getDescription()
Gets a brief description about this instrument.

Returns:
A brief description about this instrument.

getFilePath

public java.lang.String getFilePath()
Returns the absolute path name of the instrument file.

Specified by:
getFilePath in interface Instrument
Returns:
The absolute path name of the instrument file.

setFilePath

public void setFilePath(java.lang.String path)
Sets the absolute path name of the instrument file.

Specified by:
setFilePath in interface Instrument
Parameters:
path - Specifies the absolute path name of the instrument file.

getInstrumentIndex

public int getInstrumentIndex()
Returns the index of the instrument in the instrument file.

Specified by:
getInstrumentIndex in interface Instrument
Returns:
The index of the instrument in the instrument file.

setInstrumentIndex

public void setInstrumentIndex(int idx)
Sets the index of the instrument in the instrument file.

Specified by:
setInstrumentIndex in interface Instrument
Parameters:
idx - The index of the instrument in the instrument file.

getFormatFamily

public java.lang.String getFormatFamily()
Returns the format family of the instrument.

Specified by:
getFormatFamily in interface Instrument

getFormatVersion

public java.lang.String getFormatVersion()
Returns the format version of the instrument.

Specified by:
getFormatVersion in interface Instrument

getKeyMapping

public java.lang.Integer[] getKeyMapping()
Specified by:
getKeyMapping in interface Instrument

getKeyswitchMapping

public java.lang.Integer[] getKeyswitchMapping()
Specified by:
getKeyswitchMapping in interface Instrument

parse

public boolean parse(java.lang.String s)
              throws LscpException
Parses a line of text.

Specified by:
parse in interface Parseable
Parameters:
s - The string to be parsed.
Returns:
true if the line has been processed, false otherwise.
Throws:
LscpException - If some error occurs.

jlscp
v0.8

Copyright © 2009 Grigor Iliev. All rights reserved.