|
jlscp v0.8 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.linuxsampler.lscp.Client
public class Client
This class is the abstraction representing a client endpoint for communication with LinuxSampler instance. Since it implements all commands specified in the LSCP protocol v1.3, for more information look at the LSCP specification.
The following code establishes connection to LinuxSampler instance and gets the LinuxSampler version:
try { Client client = new Client(); client.connect(); String version = client.getServerInfo().getVersion(); System.out.println(version); client.disconnect(); } catch(Exception x) { x.printStackTrace(); }
For more examples look at the examples
directory
located in the jlscp distribution.
Nested Class Summary | |
---|---|
static class |
Client.ScanMode
|
Constructor Summary | |
---|---|
Client()
Creates a new instance of Client with default server address and port. |
|
Client(boolean printOnlyMode)
Creates a new instance of Client. |
|
Client(java.lang.String address)
Creates a new instance of Client with the specified address and default port. |
|
Client(java.lang.String address,
int port)
Creates a new instance of Client with the specified address and port. |
Method Summary | |
---|---|
void |
addAudioDeviceCountListener(ItemCountListener l)
Registers the specified listener for receiving event messages. |
void |
addAudioDeviceInfoListener(ItemInfoListener l)
Registers the specified listener for receiving event messages. |
void |
addBufferFillListener(BufferFillListener l)
Registers the specified listener for receiving event messages. |
void |
addChannelCountListener(ChannelCountListener l)
Registers the specified listener for receiving event messages. |
void |
addChannelInfoListener(ChannelInfoListener l)
Registers the specified listener for receiving event messages. |
void |
addChannelMidiDataListener(ChannelMidiDataListener l)
Registers the specified listener for receiving event messages. |
void |
addDbDirectory(java.lang.String dir)
Adds the specified directory to the instruments database. |
void |
addDbInstrument(java.lang.String dbDir,
java.lang.String filePath,
int instrIndex)
Adds the specified instrument to the specified instruments database directory. |
int |
addDbInstrument(java.lang.String dbDir,
java.lang.String filePath,
int instrIndex,
boolean background)
Adds the specified instrument to the specified instruments database directory. |
void |
addDbInstruments(Client.ScanMode mode,
java.lang.String dbDir,
java.lang.String fsDir)
Adds the instruments in the specified file system directory to the specified instruments database directory. |
int |
addDbInstruments(Client.ScanMode mode,
java.lang.String dbDir,
java.lang.String fsDir,
boolean background)
Adds the instruments in the specified file system directory to the specified instruments database directory. |
int |
addDbInstruments(Client.ScanMode mode,
java.lang.String dbDir,
java.lang.String fsDir,
boolean background,
boolean insDir)
Adds the instruments in the specified file system directory to the specified instruments database directory. |
void |
addDbInstruments(java.lang.String dbDir,
java.lang.String filePath)
Adds the instruments in the specified file to the specified instruments database directory. |
int |
addDbInstruments(java.lang.String dbDir,
java.lang.String filePath,
boolean background)
Adds the instruments in the specified file to the specified instruments database directory. |
void |
addDeviceMidiDataListener(DeviceMidiDataListener l)
Registers the specified listener for receiving event messages. |
void |
addFxSendCountListener(FxSendCountListener l)
Registers the specified listener for receiving event messages. |
void |
addFxSendInfoListener(FxSendInfoListener l)
Registers the specified listener for receiving event messages. |
void |
addGlobalInfoListener(GlobalInfoListener l)
Registers the specified listener for receiving event messages. |
void |
addInstrumentsDbListener(InstrumentsDbListener l)
Registers the specified listener for receiving event messages. |
void |
addMidiDeviceCountListener(ItemCountListener l)
Registers the specified listener for receiving event messages. |
void |
addMidiDeviceInfoListener(ItemInfoListener l)
Registers the specified listener for receiving event messages. |
void |
addMidiInstrumentCountListener(MidiInstrumentCountListener l)
Registers the specified listener for receiving event messages. |
void |
addMidiInstrumentInfoListener(MidiInstrumentInfoListener l)
Registers the specified listener for receiving event messages. |
int |
addMidiInstrumentMap(java.lang.String name)
Adds a new MIDI instrument map. |
void |
addMidiInstrumentMapCountListener(ItemCountListener l)
Registers the specified listener for receiving event messages. |
void |
addMidiInstrumentMapInfoListener(ItemInfoListener l)
Registers the specified listener for receiving event messages. |
void |
addMiscellaneousListener(MiscellaneousListener l)
Registers the specified listener for receiving event messages. |
int |
addSamplerChannel()
Adds a new sampler channel. |
void |
addStreamCountListener(StreamCountListener l)
Registers the specified listener for receiving event messages. |
void |
addTotalStreamCountListener(TotalStreamCountListener l)
Registers the specified listener for receiving event messages. |
void |
addTotalVoiceCountListener(TotalVoiceCountListener l)
Registers the specified listener for receiving event messages. |
void |
addVoiceCountListener(VoiceCountListener l)
Registers the specified listener for receiving event messages. |
void |
connect()
Connects to the LinuxSampler. |
void |
copyDbDirectories(java.lang.String[] dirs,
java.lang.String dst)
Copies the specified directories into the specified location. |
void |
copyDbDirectory(java.lang.String dir,
java.lang.String dst)
Copies the specified directory into the specified location. |
void |
copyDbInstrument(java.lang.String instr,
java.lang.String dst)
Copies the specified instrument into the specified location. |
void |
copyDbInstruments(java.lang.String[] instrs,
java.lang.String dst)
Copies the specified instruments into the specified location. |
int |
createAudioOutputDevice(java.lang.String aoDriver,
Parameter... paramList)
Creates a new audio output device for the desired audio output system. |
int |
createFxSend(int channel,
int midiCtrl)
Creates an additional effect send on the specified sampler channel. |
int |
createFxSend(int channel,
int midiCtrl,
java.lang.String name)
Creates an additional effect send on the specified sampler channel. |
int |
createMidiInputDevice(java.lang.String miDriver,
Parameter... paramList)
Creates a new MIDI input device. |
void |
destroyAudioOutputDevice(int deviceId)
Destroys already created audio output device. |
void |
destroyFxSend(int channel,
int fxSend)
Destroys the specified effect send on the specified sampler channel. |
void |
destroyMidiInputDevice(int deviceId)
Destroys already created MIDI input device. |
void |
disconnect()
Closes the connection to LinuxSampler. |
void |
editChannelInstrument(int samplerChn)
Starts an instrument editor for editing the loaded instrument on the specified sampler channel. |
void |
enableAudioOutputDevice(int deviceId,
boolean enable)
Enables/disables the specified audio output device. |
void |
enableMidiInputDevice(int deviceId,
boolean enable)
Enables/disables the specified MIDI input device. |
DbDirectoryInfo[] |
findDbDirectories(java.lang.String dir,
DbSearchQuery query)
Finds all directories in the specified directory that corresponds to the specified search criterias. |
DbDirectoryInfo[] |
findDbDirectories(java.lang.String dir,
DbSearchQuery query,
boolean nonRecursive)
Finds all directories in the specified directory that corresponds to the specified search criterias. |
DbInstrumentInfo[] |
findDbInstruments(java.lang.String dir,
DbSearchQuery query)
Finds all instruments in the specified directory that corresponds to the specified search criterias. |
DbInstrumentInfo[] |
findDbInstruments(java.lang.String dir,
DbSearchQuery query,
boolean nonRecursive)
Finds all instruments in the specified directory that corresponds to the specified search criterias. |
java.lang.String[] |
findLostDbInstrumentFiles()
Returns a list of all instrument files in the database that that don't exist in the filesystem. |
void |
formatInstrumentsDb()
Removes all instruments and directories and re-creates the instruments database structure. |
AudioOutputChannel |
getAudioOutputChannelInfo(int deviceId,
int audioChn)
Gets information about an audio channel. |
Parameter |
getAudioOutputChannelParameterInfo(int devId,
int chan,
java.lang.String param)
Gets detailed information about a specific audio output channel parameter. |
int |
getAudioOutputDeviceCount()
Gets the current number of all created audio output devices. |
java.lang.Integer[] |
getAudioOutputDeviceIDs()
Gets a list of numerical IDs of all created audio output devices. |
AudioOutputDevice |
getAudioOutputDeviceInfo(int deviceId)
Gets the current settings of a specific, already created audio output device. |
AudioOutputDevice[] |
getAudioOutputDevices()
Gets a list of all created audio output devices. |
int |
getAudioOutputDriverCount()
Gets the number of all audio output drivers currently available for the LinuxSampler instance. |
AudioOutputDriver |
getAudioOutputDriverInfo(java.lang.String driverName,
Parameter... depList)
Gets detailed information about a specific audio output driver. |
Parameter |
getAudioOutputDriverParameterInfo(java.lang.String driver,
java.lang.String param,
Parameter... deplist)
Gets detailed information about a specific audio output driver parameter. |
AudioOutputDriver[] |
getAudioOutputDrivers()
Gets all audio output drivers currently available for the LinuxSampler instance. |
java.util.Vector<BufferFill> |
getChannelBufferFillBytes(int samplerChn)
Gets the current fill state of all disk streams on the specified sampler channel in bytes. |
java.util.Vector<BufferFill> |
getChannelBufferFillPercentage(int samplerChn)
Gets the current fill state of all disk streams on the specified sampler channel in percent. |
int |
getChannelStreamCount(int samplerChn)
Gets the current number of active disk streams on the specified sampler channel. |
int |
getChannelVoiceCount(int samplerChn)
Gets the current number of active voices on the specified sampler channel. |
static java.lang.String |
getClientVersion()
Specifies the jlscp version. |
DbDirectoryInfo[] |
getDbDirectories(java.lang.String dir)
Gets the list of directories in the specified directory. |
int |
getDbDirectoryCount(java.lang.String dir)
Gets the number of directories in the specified directory. |
int |
getDbDirectoryCount(java.lang.String dir,
boolean recursive)
Gets the number of directories in the specified directory. |
DbDirectoryInfo |
getDbDirectoryInfo(java.lang.String dir)
Gets information about the specified directory. |
java.lang.String[] |
getDbDirectoryNames(java.lang.String dir)
Gets the list of directories in the specified directory. |
int |
getDbInstrumentCount(java.lang.String dir)
Gets the number of instruments in the specified directory. |
int |
getDbInstrumentCount(java.lang.String dir,
boolean recursive)
Gets the number of instruments in the specified directory. |
DbInstrumentInfo |
getDbInstrumentInfo(java.lang.String instr)
Gets information about the specified instrument. |
java.lang.String[] |
getDbInstrumentNames(java.lang.String dir)
Gets the list of instruments in the specified directory. |
DbInstrumentInfo[] |
getDbInstruments(java.lang.String dir)
Gets the list of instruments in the specified directory. |
ScanJobInfo |
getDbInstrumentsJobInfo(int jobId)
Gets status information about the specified job. |
int |
getEngineCount()
Gets the number of all available engines. |
SamplerEngine[] |
getEngines()
Gets a list of all available engines. |
boolean |
getExtendedCharacterEscaping()
Determines whether strings sent to LinuxSampler should be more aggressively escaped. |
int |
getFileInstrumentCount(java.lang.String filename)
Gets the number of instruments in the specified instrument file. |
Instrument |
getFileInstrumentInfo(java.lang.String filename,
int instrIdx)
Gets information about the instrument with index instrIdx in the specified instrument file. |
Instrument[] |
getFileInstruments(java.lang.String filename)
Gets the list of instruments in the specified instrument file. |
java.lang.Integer[] |
getFxSendIDs(int channel)
Gets a list of effect sends on the specified sampler channel. |
FxSend |
getFxSendInfo(int channel,
int fxSend)
Gets the current settings of the specified effect send entity. |
FxSend[] |
getFxSends(int channel)
Gets a list of all created effect sends on the specified sampler channel. |
int |
getFxSoundCount(int channel)
Gets the current number of effect sends on the specified sampler channel. |
int |
getGlobalStreamLimit()
Gets the global sampler-wide limit of maximum disk streams. |
int |
getGlobalVoiceLimit()
Gets the global sampler-wide limit of maximum voices. |
protected static java.util.logging.Logger |
getLogger()
Returns the logger for this library. |
int |
getMidiInputDeviceCount()
Gets the current number of all created MIDI input devices. |
java.lang.Integer[] |
getMidiInputDeviceIDs()
Gets a list of numerical IDs of all created MIDI input devices. |
MidiInputDevice |
getMidiInputDeviceInfo(int deviceId)
Gets the current settings of a specific, already created MIDI input device. |
MidiInputDevice[] |
getMidiInputDevices()
Gets a list of all created MIDI input devices. |
int |
getMidiInputDriverCount()
Gets the current number of all MIDI input drivers. |
MidiInputDriver |
getMidiInputDriverInfo(java.lang.String driverName,
Parameter... depList)
Gets detailed information about a specific MIDI input driver. |
Parameter |
getMidiInputDriverParameterInfo(java.lang.String driver,
java.lang.String param,
Parameter... deplist)
Gets detailed information about a specific MIDI input driver parameter. |
MidiInputDriver[] |
getMidiInputDrivers()
Gets all MIDI input drivers currently available for the LinuxSampler instance. |
MidiPort |
getMidiInputPortInfo(int deviceId,
int midiPort)
Gets detailed information about a specific MIDI input port. |
Parameter |
getMidiInputPortParameterInfo(int deviceId,
int port,
java.lang.String param)
Gets detailed information about a specific MIDI input port parameter. |
int |
getMidiInstrumentCount()
Gets the current number of all MIDI instrument in all maps. |
int |
getMidiInstrumentCount(int mapId)
Gets the current number of MIDI instrument in the specified map. |
int[][] |
getMidiInstrumentEntries(int mapId)
Gets all MIDI instrument entries contained int the specified MIDI instrument map. |
MidiInstrumentInfo |
getMidiInstrumentInfo(int mapId,
int bank,
int program)
Gets the current settings of the specified MIDI instrument. |
int |
getMidiInstrumentMapCount()
Gets the current number of all MIDI instrument maps. |
java.lang.Integer[] |
getMidiInstrumentMapIDs()
Gets a list of numerical IDs of all created MIDI instrument maps. |
MidiInstrumentMapInfo |
getMidiInstrumentMapInfo(int mapId)
Gets the current settings of a specific, already created MIDI instrument map. |
MidiInstrumentMapInfo[] |
getMidiInstrumentMaps()
Gets an information of all created MIDI instrument maps. |
MidiInstrumentInfo[] |
getMidiInstruments()
Gets all MIDI instrument from all maps. |
MidiInstrumentInfo[] |
getMidiInstruments(int mapId)
Gets all MIDI instruments contained int the specified MIDI instrument map. |
boolean |
getPrintOnlyMode()
Determines whether the client is in print-only mode. |
int |
getSamplerChannelCount()
Gets the current number of all created sampler channels. |
java.lang.Integer[] |
getSamplerChannelIDs()
Gets a list with numerical IDs of all created sampler channels. |
SamplerChannel |
getSamplerChannelInfo(int samplerChn)
Gets the current settings of the specified sampler channel. |
SamplerChannel[] |
getSamplerChannels()
Gets a list of all created sampler channels. |
java.lang.String |
getServerAddress()
Gets the Linux Sampler address. |
ServerInfo |
getServerInfo()
Gets information about the LinuxSampler instance. |
int |
getServerPort()
Gets the Linux Sampler port number. |
int |
getTotalStreamCount()
Gets the current number of all active streams. |
int |
getTotalVoiceCount()
Gets the current number of all active voices. |
int |
getTotalVoiceCountMax()
Gets the maximum number of active voices. |
float |
getVolume()
Gets the global volume of the sampler. |
boolean |
isConnected()
Determines whether the client is connected. |
void |
loadInstrument(java.lang.String filename,
int instrIdx,
int samplerChn)
Loads and assigns an instrument to a sampler channel. |
void |
loadInstrument(java.lang.String filename,
int instrIdx,
int samplerChn,
boolean nonModal)
Loads and assigns an instrument to a sampler channel. |
void |
loadSamplerEngine(java.lang.String engineName,
int samplerChn)
Loads a sampler engine to a specific sampler channel. |
void |
mapMidiInstrument(int mapId,
MidiInstrumentEntry entry,
MidiInstrumentInfo info)
Creates or replaces a MIDI instrument map entry. |
void |
mapMidiInstrument(int mapId,
MidiInstrumentEntry entry,
MidiInstrumentInfo info,
boolean nonModal)
Creates or replaces a MIDI instrument map entry. |
void |
moveDbDirectories(java.lang.String[] dirs,
java.lang.String dst)
Moves the specified directories into the specified location. |
void |
moveDbDirectory(java.lang.String dir,
java.lang.String dst)
Moves the specified directory into the specified location. |
void |
moveDbInstrument(java.lang.String instr,
java.lang.String dst)
Moves the specified instrument into the specified location. |
void |
moveDbInstruments(java.lang.String[] instrs,
java.lang.String dst)
Moves the specified instruments into the specified location. |
void |
removeAllMidiInstrumentMaps()
Removes the all MIDI instrument maps. |
void |
removeAudioDeviceCountListener(ItemCountListener l)
Removes the specified listener. |
void |
removeAudioDeviceInfoListener(ItemInfoListener l)
Removes the specified listener. |
void |
removeBufferFillListener(BufferFillListener l)
Removes the specified listener. |
void |
removeChannelCountListener(ChannelCountListener l)
Removes the specified listener. |
void |
removeChannelInfoListener(ChannelInfoListener l)
Removes the specified listener. |
void |
removeChannelMidiDataListener(ChannelMidiDataListener l)
Removes the specified listener. |
void |
removeDbDirectories(java.lang.String[] dirs,
boolean force)
Removes the specified directories from the instruments database. |
void |
removeDbDirectory(java.lang.String dir)
Removes the specified directory from the instruments database. |
void |
removeDbDirectory(java.lang.String dir,
boolean force)
Removes the specified directory from the instruments database. |
void |
removeDbInstrument(java.lang.String instr)
Removes the specified instrument from the instruments database. |
void |
removeDbInstruments(java.lang.String[] instrs)
Removes the specified instruments from the instruments database. |
void |
removeDeviceMidiDataListener(DeviceMidiDataListener l)
Removes the specified listener. |
void |
removeFxSendCountListener(FxSendCountListener l)
Removes the specified listener. |
void |
removeFxSendInfoListener(FxSendInfoListener l)
Removes the specified listener. |
void |
removeGlobalInfoListener(GlobalInfoListener l)
Removes the specified listener. |
void |
removeInstrumentsDbListener(InstrumentsDbListener l)
Removes the specified listener. |
void |
removeMidiDeviceCountListener(ItemCountListener l)
Removes the specified listener. |
void |
removeMidiDeviceInfoListener(ItemInfoListener l)
Removes the specified listener. |
void |
removeMidiInstrumentCountListener(MidiInstrumentCountListener l)
Removes the specified listener. |
void |
removeMidiInstrumentInfoListener(MidiInstrumentInfoListener l)
Removes the specified listener. |
void |
removeMidiInstrumentMap(int mapId)
Removes the specified MIDI instrument map. |
void |
removeMidiInstrumentMapCountListener(ItemCountListener l)
Removes the specified listener. |
void |
removeMidiInstrumentMapInfoListener(ItemInfoListener l)
Removes the specified listener. |
void |
removeMiscellaneousListener(MiscellaneousListener l)
Removes the specified listener. |
void |
removeSamplerChannel(int samplerChn)
Removes the specified sampler channel. |
void |
removeStreamCountListener(StreamCountListener l)
Removes the specified listener. |
void |
removeTotalStreamCountListener(TotalStreamCountListener l)
Removes the specified listener. |
void |
removeTotalVoiceCountListener(TotalVoiceCountListener l)
Removes the specified listener. |
void |
removeVoiceCountListener(VoiceCountListener l)
Removes the specified listener. |
void |
renameDbDirectory(java.lang.String dir,
java.lang.String name)
Renames the specified directory. |
void |
renameDbInstrument(java.lang.String instr,
java.lang.String name)
Renames the specified instrument. |
void |
resetChannel(int samplerChn)
Resets the specified sampler channel. |
void |
resetSampler()
Resets the whole sampler. |
void |
sendChannelMidiData(int samplerChn,
MidiDataEvent.Type type,
int arg1,
int arg2)
Sends a MIDI event to this sampler channel. |
void |
setAudioOutputChannelCount(int deviceId,
int channels)
Changes the channel number of the speicifed audio output device. |
void |
setAudioOutputChannelParameter(int devId,
int chn,
Parameter prm)
Alters a specific setting of an audio output channel. |
void |
setAudioOutputDeviceParameter(int deviceId,
Parameter prm)
Alters a specific setting of a created audio output device. |
void |
setChannelAudioOutputChannel(int samplerChn,
int audioOut,
int audioIn)
Sets the audio output channel on the specified sampler channel. |
void |
setChannelAudioOutputDevice(int samplerChn,
int devId)
Sets the audio output device on the specified sampler channel. |
void |
setChannelMidiInputChannel(int samplerChn,
int midiChn)
Sets the MIDI input channel the specified sampler channel should listen to. |
void |
setChannelMidiInputDevice(int samplerChn,
int devId)
Sets the MIDI input device on the specified sampler channel. |
void |
setChannelMidiInputPort(int samplerChn,
int port)
Sets the MIDI input port on the specified sampler channel. |
void |
setChannelMidiInstrumentMap(int samplerChn,
int mapId)
Sets the MIDI instrument map to be used on the specified sampler channel. |
void |
setChannelMute(int samplerChn,
boolean mute)
Mute/unmute the specified sampler channel. |
void |
setChannelSolo(int samplerChn,
boolean solo)
Solo/unsolo the specified sampler channel. |
void |
setChannelVolume(int samplerChn,
float volume)
Sets the volume of the specified sampler channel. |
void |
setDbDirectoryDescription(java.lang.String dir,
java.lang.String desc)
Changes the description of the specified directory. |
void |
setDbInstrumentDescription(java.lang.String instr,
java.lang.String desc)
Changes the description of the specified instrument. |
void |
setDbInstrumentFilePath(java.lang.String oldPath,
java.lang.String newPath)
Substitutes all occurrences of the instrument file oldPath in the database, with newPath . |
void |
setExtendedCharacterEscaping(boolean b)
Sets whether strings sent to LinuxSampler should be more aggressively escaped. |
void |
setFxSendAudioOutputChannel(int channel,
int fxSend,
int audioSrc,
int audioDst)
Sets the destination of an effect send's audio channel in the specified sampler channel. |
void |
setFxSendLevel(int channel,
int fxSend,
float volume)
Sets the current send level of the specified effect send entity in the specified sampler channel. |
void |
setFxSendMidiController(int channel,
int fxSend,
int midiCtrl)
Sets the MIDI controller, which will be able to modify the send level of the specified effect send in the specified sampler channel. |
void |
setFxSendName(int channel,
int fxSend,
java.lang.String name)
Sets the name of the specified effect send. |
void |
setGlobalStreamLimit(int maxStreams)
Sets the global sampler-wide limit for maximum disk streams. |
void |
setGlobalVoiceLimit(int maxVoices)
Sets the global sampler-wide limit of maximum voices. |
void |
setMidiInputDeviceParameter(int deviceId,
Parameter prm)
Alters a specific setting of a created MIDI input device. |
void |
setMidiInputPortCount(int deviceId,
int ports)
Changes the port number of the speicified MIDI input device. |
void |
setMidiInputPortParameter(int deviceId,
int port,
Parameter prm)
Alters a specific setting of a MIDI input port. |
void |
setMidiInstrumentMapName(int mapId,
java.lang.String name)
Sets the name of the specified MIDI instrument map. |
void |
setPrintOnlyMode(boolean b)
Sets the print-only mode. |
void |
setPrintOnlyModeOutputStream(java.io.OutputStream out)
Sets the output stream to be used in print-only mode. |
void |
setServerAddress(java.lang.String address)
Sets the Linux Sampler address. |
void |
setServerPort(int port)
Sets the Linux Sampler port number. |
void |
setSoTimeout(int timeout)
|
void |
setVolume(float volume)
Sets the global volume of the sampler. |
void |
unmapMidiInstrument(int mapId,
MidiInstrumentEntry entry)
Removes an entry MIDI instrument map. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Client()
public Client(java.lang.String address)
address
- The address of linux sampler server.public Client(java.lang.String address, int port)
address
- The address of the Linux Sampler.port
- The Linux Sampler port number.public Client(boolean printOnlyMode)
printOnlyMode
- Determines whether the client will be in print-only mode.Method Detail |
---|
public void setExtendedCharacterEscaping(boolean b)
public boolean getExtendedCharacterEscaping()
public void setSoTimeout(int timeout)
Socket.setSoTimeout(int)
public boolean getPrintOnlyMode()
java.lang.System.out
) if no output stream is specified,
without taking any further actions. Thus, in print-only mode all returned
values by Client
's methods are meaningless and should be discarded.
true
if the client is in
print-only mode, false
otherwise.setPrintOnlyModeOutputStream(java.io.OutputStream)
public void setPrintOnlyMode(boolean b)
Client
's methods are meaningless and should be discarded.
The default output stream in print-only mode is java.lang.System.out
.
b
- If true
all LSCP commands will be sent
to the specified output stream or to the standard output stream
(java.lang.System.out
) if no output stream is specified,
and no further actions will be taken.
java.lang.IllegalStateException
- If the client is connected.setPrintOnlyModeOutputStream(java.io.OutputStream)
public void setPrintOnlyModeOutputStream(java.io.OutputStream out)
out
- The output stream to be used in print-only mode.
java.lang.IllegalStateException
- If the client is not in print-only mode.
java.lang.IllegalArgumentException
- if out
is null
.setPrintOnlyMode(boolean)
public static java.lang.String getClientVersion()
public java.lang.String getServerAddress()
public void setServerAddress(java.lang.String address)
address
- The Linux Sampler address.
If address
is null
sets to default address - 127.0.0.1.public int getServerPort()
public void setServerPort(int port)
port
- The Linux Sampler port number.public void connect() throws LscpException
LscpException
- If timeout occurs or any other I/O exception.public void disconnect()
public boolean isConnected()
true
if there is established connection,
false
otherwise.public void addAudioDeviceCountListener(ItemCountListener l)
l
- The ItemCountListener
to register.public void removeAudioDeviceCountListener(ItemCountListener l)
l
- The ItemCountListener
to remove.public void addAudioDeviceInfoListener(ItemInfoListener l)
l
- The ItemInfoListener
to register.public void removeAudioDeviceInfoListener(ItemInfoListener l)
l
- The ItemInfoListener
to remove.public void addBufferFillListener(BufferFillListener l)
l
- The BufferFillListener
to register.public void removeBufferFillListener(BufferFillListener l)
l
- The BufferFillListener
to remove.public void addChannelCountListener(ChannelCountListener l)
l
- The ChannelCountListener
to register.public void removeChannelCountListener(ChannelCountListener l)
l
- The ChannelCountListener
to remove.public void addChannelInfoListener(ChannelInfoListener l)
l
- The ChannelInfoListener
to register.public void removeChannelInfoListener(ChannelInfoListener l)
l
- The ChannelInfoListener
to remove.public void addFxSendCountListener(FxSendCountListener l)
l
- The FxSendCountListener
to register.public void removeFxSendCountListener(FxSendCountListener l)
l
- The FxSendCountListener
to remove.public void addFxSendInfoListener(FxSendInfoListener l)
l
- The FxSendInfoListener
to register.public void removeFxSendInfoListener(FxSendInfoListener l)
l
- The FxSendInfoListener
to remove.public void addMidiDeviceCountListener(ItemCountListener l)
l
- The ItemCountListener
to register.public void removeMidiDeviceCountListener(ItemCountListener l)
l
- The ItemCountListener
to remove.public void addMidiDeviceInfoListener(ItemInfoListener l)
l
- The ItemInfoListener
to register.public void removeMidiDeviceInfoListener(ItemInfoListener l)
l
- The ItemInfoListener
to remove.public void addMiscellaneousListener(MiscellaneousListener l)
l
- The MiscellaneousListener
to register.public void removeMiscellaneousListener(MiscellaneousListener l)
l
- The MiscellaneousListener
to remove.public void addStreamCountListener(StreamCountListener l)
l
- The StreamCountListener
to register.public void removeStreamCountListener(StreamCountListener l)
l
- The StreamCountListener
to remove.public void addVoiceCountListener(VoiceCountListener l)
l
- The VoiceCountListener
to register.public void removeVoiceCountListener(VoiceCountListener l)
l
- The VoiceCountListener
to remove.public void addTotalStreamCountListener(TotalStreamCountListener l)
l
- The TotalStreamCountListener
to register.public void removeTotalStreamCountListener(TotalStreamCountListener l)
l
- The TotalStreamCountListener
to remove.public void addTotalVoiceCountListener(TotalVoiceCountListener l)
l
- The TotalVoiceCountListener
to register.public void removeTotalVoiceCountListener(TotalVoiceCountListener l)
l
- The TotalVoiceCountListener
to remove.public void addMidiInstrumentMapCountListener(ItemCountListener l)
l
- The ItemCountListener
to register.public void removeMidiInstrumentMapCountListener(ItemCountListener l)
l
- The ItemCountListener
to remove.public void addMidiInstrumentMapInfoListener(ItemInfoListener l)
l
- The ItemInfoListener
to register.public void removeMidiInstrumentMapInfoListener(ItemInfoListener l)
l
- The ItemInfoListener
to remove.public void addMidiInstrumentCountListener(MidiInstrumentCountListener l)
l
- The MidiInstrumentCountListener
to register.public void removeMidiInstrumentCountListener(MidiInstrumentCountListener l)
l
- The MidiInstrumentCountListener
to remove.public void addMidiInstrumentInfoListener(MidiInstrumentInfoListener l)
l
- The MidiInstrumentInfoListener
to register.public void removeMidiInstrumentInfoListener(MidiInstrumentInfoListener l)
l
- The MidiInstrumentInfoListener
to remove.public void addDeviceMidiDataListener(DeviceMidiDataListener l)
l
- The DeviceMidiDataListener
to register.public void removeDeviceMidiDataListener(DeviceMidiDataListener l)
l
- The DeviceMidiDataListener
to remove.public void addChannelMidiDataListener(ChannelMidiDataListener l)
l
- The ChannelMidiDataListener
to register.public void removeChannelMidiDataListener(ChannelMidiDataListener l)
l
- The ChannelMidiDataListener
to remove.public void addInstrumentsDbListener(InstrumentsDbListener l)
l
- The InstrumentsDbListener
to register.public void removeInstrumentsDbListener(InstrumentsDbListener l)
l
- The InstrumentsDbListener
to remove.public void addGlobalInfoListener(GlobalInfoListener l)
l
- The GlobalInfoListener
to register.public void removeGlobalInfoListener(GlobalInfoListener l)
l
- The GlobalInfoListener
to remove.public int getAudioOutputDriverCount() throws java.io.IOException, LscpException, LSException
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If some other error occurs.public AudioOutputDriver[] getAudioOutputDrivers() throws java.io.IOException, LscpException, LSException
AudioOutputDriver
array containing all audio output drivers
currently available for the LinuxSampler instance.
java.io.IOException
- If an I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If some other error occurs.public AudioOutputDriver getAudioOutputDriverInfo(java.lang.String driverName, Parameter... depList) throws java.io.IOException, LscpException, LSException
driverName
- The name of the audio output driver.depList
- An optional list of dependences parameters.
AudioOutputDriver
object containing
information about the specified audio output driver.
java.io.IOException
- If an I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If there is no driver with name driverName
.getAudioOutputDriverNames()
public Parameter getAudioOutputDriverParameterInfo(java.lang.String driver, java.lang.String param, Parameter... deplist) throws java.io.IOException, LscpException, LSException
driver
- The name of the audio output driver.param
- A specific parameter name for which information should be obtained.deplist
- An optional list of parameters on which the sought parameter
param
depends on. Parameter
instances can be
easily created using ParameterFactory
factory.
Parameter
object containing
information about the specified audio output driver parameter.
java.io.IOException
- If an I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If driver
is not a valid driver name
or param
is not a valid parameter for the specified driver.getAudioOutputDrivers()
,
getAudioOutputDriverInfo(java.lang.String, org.linuxsampler.lscp.Parameter...)
,
ParameterFactory
public int createAudioOutputDevice(java.lang.String aoDriver, Parameter... paramList) throws java.io.IOException, LSException, LscpException
aoDriver
- The desired audio output system.paramList
- An optional list of driver specific parameters. Parameter
instances can be easily created using ParameterFactory
factory.
java.io.IOException
- If some I/O error occurs.
LSException
- If the creation of the new audio output device failed.
LscpException
- If LSCP protocol corruption occurs.getAudioOutputDrivers()
,
getAudioOutputDriverInfo(java.lang.String, org.linuxsampler.lscp.Parameter...)
,
ParameterFactory
public void destroyAudioOutputDevice(int deviceId) throws java.io.IOException, LSException, LscpException
deviceId
- The ID of the audio output device to be destroyed.
java.io.IOException
- If some I/O error occurs.
LSException
- If the destroying of the audio output device failed.
LscpException
- If LSCP protocol corruption occurs.getAudioOutputDevices()
public void enableAudioOutputDevice(int deviceId, boolean enable) throws java.io.IOException, LSException, LscpException
deviceId
- The ID of the audio output device to be enabled/disabled.enable
- If true
the audio output device is enabled,
else the device is disabled.
java.io.IOException
- If some I/O error occurs.
LSException
- If there is no audio output
device with numerical ID deviceId
.
LscpException
- If LSCP protocol corruption occurs.public int getAudioOutputDeviceCount() throws java.io.IOException, LscpException, LSException
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If some other error occurs.public AudioOutputDevice[] getAudioOutputDevices() throws java.io.IOException, LscpException, LSException
AudioOutputDevice
array
providing all created audio output devices.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If some other error occurs.public java.lang.Integer[] getAudioOutputDeviceIDs() throws java.io.IOException, LscpException, LSException
Integer
array providing the numerical IDs of
all created audio output devices.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If some other error occurs.public AudioOutputDevice getAudioOutputDeviceInfo(int deviceId) throws java.io.IOException, LscpException, LSException
deviceId
- Specifies the numerical ID of the audio output device.
AudioOutputDevice
instance containing information
about the specified device.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If there is no audio output device
with device id deviceId
.getAudioOutputDevices()
public void setAudioOutputDeviceParameter(int deviceId, Parameter prm) throws java.io.IOException, LscpException, LSException
deviceId
- The numerical ID of the audio output device.prm
- A Parameter
instance containing the name of the parameter
and the new value for this parameter.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If
deviceId
;
getAudioOutputDevices()
,
getAudioOutputDeviceInfo(int)
public void setAudioOutputChannelCount(int deviceId, int channels) throws java.io.IOException, LscpException, LSException
deviceId
- The numerical ID of the audio output device.channels
- The new number of audio output channels.
java.io.IOException
- If an I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If there is no device with ID deviceId
or
if channels
number is out of range.getAudioOutputChannelInfo(int, int)
public AudioOutputChannel getAudioOutputChannelInfo(int deviceId, int audioChn) throws java.io.IOException, LscpException, LSException
deviceId
- The numerical ID of the audio output device.audioChn
- The audio channel number.
AudioOutputChannel
instance containing the
information about the specified audio output channel.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If
deviceId
;
audioChn
is not a valid channel number;
getAudioOutputDevices()
,
getAudioOutputDeviceInfo(int)
public Parameter getAudioOutputChannelParameterInfo(int devId, int chan, java.lang.String param) throws java.io.IOException, LscpException, LSException
devId
- The numerical ID of the audio output device.chan
- The audio channel number.param
- a specific channel parameter name for which information should be obtained.
Parameter
instance containing
information about the specified audio output channel parameter.
java.io.IOException
- If an I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If
devId
is not a valid device ID;
chan
is not a valid channel number;
getAudioOutputDevices()
,
getAudioOutputChannelInfo(int, int)
public void setAudioOutputChannelParameter(int devId, int chn, Parameter prm) throws java.io.IOException, LscpException, LSException
devId
- The numerical ID of the audio device.chn
- The audio channel number.prm
- A Parameter
instance containing the name of the parameter
and the new value for this parameter.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If
devId
;
chn
is not a valid channel number;
getAudioOutputDevices()
,
getAudioOutputChannelInfo(int, int)
public int getMidiInputDriverCount() throws java.io.IOException, LscpException, LSException
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If some other error occurs.public MidiInputDriver[] getMidiInputDrivers() throws java.io.IOException, LscpException, LSException
MidiInputDriver
array containing all MIDI input drivers currently
available for the LinuxSampler instance.
java.io.IOException
- If an I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If some other error occurs.public MidiInputDriver getMidiInputDriverInfo(java.lang.String driverName, Parameter... depList) throws java.io.IOException, LscpException, LSException
driverName
- The name of the MIDI input driver.depList
- An optional list of dependences parameters.
MidiInputDriver
object containing
information about the specified MIDI input driver.
java.io.IOException
- If an I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If there is no driver with name driverName
.getMidiInputDriverNames()
public Parameter getMidiInputDriverParameterInfo(java.lang.String driver, java.lang.String param, Parameter... deplist) throws java.io.IOException, LscpException, LSException
driver
- The name of the MIDI input driver.param
- a specific parameter name for which information should be obtained.deplist
- An optional list of parameters on which the sought parameter
param
depends on. Parameter
instances can be
easily created using ParameterFactory
factory.
Parameter
object containing
information about the specified MIDI input driver parameter.
java.io.IOException
- If an I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If driver
is not a valid driver name
or param
is not a valid parameter for the specified driver.getMidiInputDrivers()
,
getMidiInputDriverInfo(java.lang.String, org.linuxsampler.lscp.Parameter...)
,
ParameterFactory
public int createMidiInputDevice(java.lang.String miDriver, Parameter... paramList) throws java.io.IOException, LSException, LscpException
miDriver
- The desired MIDI input system.paramList
- An optional list of driver specific parameters. Parameter
instances can be easily created using ParameterFactory
factory.
java.io.IOException
- If some I/O error occurs.
LSException
- If the creation of the new MIDI input device failed.
LscpException
- If LSCP protocol corruption occurs.getMidiInputDrivers()
,
getMidiInputDriverInfo(java.lang.String, org.linuxsampler.lscp.Parameter...)
,
ParameterFactory
public void destroyMidiInputDevice(int deviceId) throws java.io.IOException, LSException, LscpException
deviceId
- The numerical ID of the MIDI input device to be destroyed.
java.io.IOException
- If some I/O error occurs.
LSException
- If the destroying of the MIDI input device failed.
LscpException
- If LSCP protocol corruption occurs.createMidiInputDevice(java.lang.String, org.linuxsampler.lscp.Parameter...)
,
getMidiInputDevices()
public void enableMidiInputDevice(int deviceId, boolean enable) throws java.io.IOException, LSException, LscpException
deviceId
- The ID of the MIDI input device to be enabled/disabled.enable
- If true
the MIDI input device is enabled,
else the device is disabled.
java.io.IOException
- If some I/O error occurs.
LSException
- If there is no MIDI input
device with numerical ID deviceId
.
LscpException
- If LSCP protocol corruption occurs.public int getMidiInputDeviceCount() throws java.io.IOException, LscpException, LSException
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If some other error occurs.public MidiInputDevice[] getMidiInputDevices() throws java.io.IOException, LscpException, LSException
MidiInputDevice
array
providing all created MIDI input devices.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If some other error occurs.createMidiInputDevice(java.lang.String, org.linuxsampler.lscp.Parameter...)
,
destroyMidiInputDevice(int)
public java.lang.Integer[] getMidiInputDeviceIDs() throws java.io.IOException, LscpException, LSException
Integer
array providing the numerical IDs of
all created MIDI input devices.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If some other error occurs.createMidiInputDevice(java.lang.String, org.linuxsampler.lscp.Parameter...)
,
destroyMidiInputDevice(int)
public MidiInputDevice getMidiInputDeviceInfo(int deviceId) throws java.io.IOException, LscpException, LSException
deviceId
- Specifies the numerical ID of the MIDI input device.
MidiInputDevice
instance containing information
about the specified device.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If there is no MIDI input device
with device id deviceId
.getMidiInputDevices()
public void setMidiInputDeviceParameter(int deviceId, Parameter prm) throws java.io.IOException, LscpException, LSException
deviceId
- The numerical ID of the MIDI input device.prm
- A Parameter
instance containing the name of the parameter
and the new value for this parameter.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If
deviceId
;
getMidiInputDevices()
,
getMidiInputDeviceInfo(int)
public void setMidiInputPortCount(int deviceId, int ports) throws java.io.IOException, LscpException, LSException
deviceId
- The numerical ID of the MIDI input device.ports
- The new number of MIDI input ports.
java.io.IOException
- If an I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If there is no device with ID deviceId
or
if ports
number is out of range.getMidiInputPortInfo(int, int)
public MidiPort getMidiInputPortInfo(int deviceId, int midiPort) throws java.io.IOException, LscpException, LSException
deviceId
- The numerical ID of the MIDI input device.midiPort
- The MIDI input port number.
MidiPort
instance containing
information about the specified MIDI input port.
java.io.IOException
- If an I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If there is no device with ID deviceId
or
if midiPort
is not a valid MIDI port number.getMidiInputDevices()
public Parameter getMidiInputPortParameterInfo(int deviceId, int port, java.lang.String param) throws java.io.IOException, LscpException, LSException
deviceId
- The numerical ID of the MIDI input device.port
- The MIDI port number.param
- A specific parameter name for which information should be obtained.
Parameter
instance containing
information about the specified MIDI input port parameter.
java.io.IOException
- If an I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If
deviceId
;
port
is not a valid MIDI port number;
param
is not a valid parameter for the specified MIDI port.
getMidiInputDevices()
,
getMidiInputPortInfo(int, int)
public void setMidiInputPortParameter(int deviceId, int port, Parameter prm) throws java.io.IOException, LscpException, LSException
deviceId
- The numerical ID of the MIDI device.port
- The MIDI port number.prm
- A Parameter
instance containing the name of the parameter
and the new value for this parameter.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If
deviceId
;
port
is not a valid MIDI port number;
prm
is not a valid parameter;
getMidiInputDevices()
,
getMidiInputPortInfo(int, int)
public int addMidiInstrumentMap(java.lang.String name) throws java.io.IOException, LSException, LscpException
name
- The name of this MIDI instrument map.
java.io.IOException
- If some I/O error occurs.
LSException
- If the creation of the new MIDI instrument map failed.
LscpException
- If LSCP protocol corruption occurs.removeMidiInstrumentMap(int)
public void removeMidiInstrumentMap(int mapId) throws java.io.IOException, LscpException, LSException
mapId
- The numerical ID of the MIDI instrument map to be removed.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If the removing of the MIDI instrument map failed.addMidiInstrumentMap(java.lang.String)
,
getMidiInstrumentMapIDs()
public void removeAllMidiInstrumentMaps() throws java.io.IOException, LscpException, LSException
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If the removing of the MIDI instrument maps failed.public int getMidiInstrumentMapCount() throws java.io.IOException, LscpException, LSException
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If some other error occurs.public java.lang.Integer[] getMidiInstrumentMapIDs() throws java.io.IOException, LscpException, LSException
Integer
array providing the numerical IDs of
all created MIDI instrument maps.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If some other error occurs.addMidiInstrumentMap(java.lang.String)
,
removeMidiInstrumentMap(int)
public MidiInstrumentMapInfo getMidiInstrumentMapInfo(int mapId) throws java.io.IOException, LscpException, LSException
mapId
- Specifies the numerical ID of the MIDI instrument map.
MidiInstrumentMapInfo
instance containing information
about the specified device.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If there is no MIDI instrument map
with map id mapId
.getMidiInstrumentMaps()
public MidiInstrumentMapInfo[] getMidiInstrumentMaps() throws java.io.IOException, LscpException, LSException
MidiInstrumentMap
array
providing information for all created MIDI instrument maps.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If some other error occurs.addMidiInstrumentMap(java.lang.String)
,
removeMidiInstrumentMap(int)
public void setMidiInstrumentMapName(int mapId, java.lang.String name) throws java.io.IOException, LscpException, LSException
mapId
- The numerical ID of the MIDI instrument map.name
- The new name for the specified MIDI instrument map.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If mapId
is not a valid MIDI
instrument map number or name
is not a valid name;public void mapMidiInstrument(int mapId, MidiInstrumentEntry entry, MidiInstrumentInfo info) throws java.io.IOException, LSException, LscpException
mapId
- The ID of the map, where this instrument should be mapped.entry
- Specifies the position of the MIDI instrument in the MIDI instrument map.info
- Provides the needed information of the
MIDI instrument, which will be mapped to the specified MIDI instrument map.
java.io.IOException
- If some I/O error occurs.
LSException
- If the mapping failed.
LscpException
- If LSCP protocol corruption occurs.unmapMidiInstrument(int, org.linuxsampler.lscp.MidiInstrumentEntry)
public void mapMidiInstrument(int mapId, MidiInstrumentEntry entry, MidiInstrumentInfo info, boolean nonModal) throws java.io.IOException, LSException, LscpException
mapId
- The ID of the map, where this instrument should be mapped.entry
- Specifies the position of the MIDI instrument in the MIDI instrument map.info
- Provides the needed information of the
MIDI instrument, which will be mapped to the specified MIDI instrument map.nonModal
- If true
the function returns immediately
and the mapping is established in the background.
java.io.IOException
- If some I/O error occurs.
LSException
- If the mapping failed.
LscpException
- If LSCP protocol corruption occurs.unmapMidiInstrument(int, org.linuxsampler.lscp.MidiInstrumentEntry)
public void unmapMidiInstrument(int mapId, MidiInstrumentEntry entry) throws java.io.IOException, LSException, LscpException
mapId
- The ID of the map, from which
the specified MIDI instrument should be removed.entry
- The entry to remove from the specified MIDI instrument map.
java.io.IOException
- If some I/O error occurs.
LSException
- If the unmapping failed.
LscpException
- If LSCP protocol corruption occurs.mapMidiInstrument(int, org.linuxsampler.lscp.MidiInstrumentEntry, org.linuxsampler.lscp.MidiInstrumentInfo)
public int getMidiInstrumentCount() throws java.io.IOException, LscpException, LSException
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If some other error occurs.public int getMidiInstrumentCount(int mapId) throws java.io.IOException, LscpException, LSException
mapId
- The ID of the map.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If some other error occurs.public MidiInstrumentInfo[] getMidiInstruments() throws java.io.IOException, LscpException, LSException
MidiInstrumentInfo
array providing
all MIDI instruments from all MIDI instrument maps.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If some other error occurs.public int[][] getMidiInstrumentEntries(int mapId) throws java.io.IOException, LscpException, LSException
mapId
- The ID of the map, which instruments should be obtained.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If some other error occurs.public MidiInstrumentInfo[] getMidiInstruments(int mapId) throws java.io.IOException, LscpException, LSException
mapId
- The ID of the map, which instruments should be obtained.
MidiInstrumentInfo
array providing
all MIDI instruments in the specified MIDI instrument map.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If some other error occurs.public MidiInstrumentInfo getMidiInstrumentInfo(int mapId, int bank, int program) throws java.io.IOException, LscpException, LSException
mapId
- The ID of the map.bank
- The index of the MIDI bank.program
- The MIDI program number of the instrument.
MidiInstrumentInfo
instance containing
the current settings of the specified MIDI instrument.
java.io.IOException
- If an I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If the specified MIDI instrument is missing.public void loadInstrument(java.lang.String filename, int instrIdx, int samplerChn) throws java.io.IOException, LscpException, LSException
filename
- The name of the instrument file
on the LinuxSampler instance's host system.instrIdx
- The index of the instrument in the instrument file.samplerChn
- The number of the sampler channel the instrument should be assigned to.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If the loading of the instrument failed.loadInstrument(String, int, int, boolean)
,
getSamplerChannels()
public void loadInstrument(java.lang.String filename, int instrIdx, int samplerChn, boolean nonModal) throws java.io.IOException, LscpException, LSException
filename
- The name of the instrument file
on the LinuxSampler instance's host system.instrIdx
- The index of the instrument in the instrument file.samplerChn
- The number of the sampler channel the instrument should be assigned to.nonModal
- If false
the function will return after the instrument
has been fully loaded and the channel is ready to be used. If true
the function returns immediately.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If the loading of the instrument failed.loadInstrument(String, int, int)
,
getSamplerChannels()
public void loadSamplerEngine(java.lang.String engineName, int samplerChn) throws java.io.IOException, LscpException, LSException
engineName
- The name of the engine.samplerChn
- The number of the sampler channel
the deployed engine should be assigned to.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If the loading of the sampler engine failed.getEngines()
,
getSamplerChannels()
public int getSamplerChannelCount() throws java.io.IOException, LscpException, LSException
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If some other error occurs.public SamplerChannel[] getSamplerChannels() throws java.io.IOException, LscpException, LSException
SamplerChannel
array providing all created sampler channels.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If some other error occurs.addSamplerChannel()
,
removeSamplerChannel(int)
public java.lang.Integer[] getSamplerChannelIDs() throws java.io.IOException, LscpException, LSException
Integer
array providing
the numerical IDs of all created sampler channels.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If some other error occurs.addSamplerChannel()
,
removeSamplerChannel(int)
public int addSamplerChannel() throws java.io.IOException, LSException, LscpException
java.io.IOException
- If some I/O error occurs.
LSException
- If the creation of the new sampler channel failed.
LscpException
- If LSCP protocol corruption occurs.removeSamplerChannel(int)
public void removeSamplerChannel(int samplerChn) throws java.io.IOException, LscpException, LSException
samplerChn
- The numerical ID of the sampler channel to be removed.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If the removing of the sampler channel failed.addSamplerChannel()
,
getSamplerChannels()
public int getEngineCount() throws java.io.IOException, LscpException, LSException
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If some other error occurs.public SamplerEngine[] getEngines() throws java.io.IOException, LscpException, LSException
SamplerEngine
array containing all available engines.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If some other error occurs.public SamplerChannel getSamplerChannelInfo(int samplerChn) throws java.io.IOException, LscpException, LSException
samplerChn
- The sampler channel number.
SamplerChannel
instance containing
the current settings of the specified sampler channel.
java.io.IOException
- If an I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If there is no sampler channel with samplerChn
number.getSamplerChannels()
public int getChannelVoiceCount(int samplerChn) throws java.io.IOException, LscpException, LSException
samplerChn
- The sampler channel number.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If there is no sampler channel with number samplerChn
.getSamplerChannels()
public int getChannelStreamCount(int samplerChn) throws java.io.IOException, LscpException, LSException
samplerChn
- The sampler channel number.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If there is no sampler channel with number samplerChn
.getSamplerChannels()
public java.util.Vector<BufferFill> getChannelBufferFillBytes(int samplerChn) throws java.io.IOException, LscpException, LSException
samplerChn
- The sampler channel number.
null
if the engine which is deployed doesn't support disk streaming.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If there is no sampler channel with number samplerChn
.getChannelBufferFillPercentage(int)
,
getSamplerChannels()
public java.util.Vector<BufferFill> getChannelBufferFillPercentage(int samplerChn) throws java.io.IOException, LscpException, LSException
samplerChn
- The sampler channel number.
null
if the engine which is deployed doesn't support disk streaming.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If there is no sampler channel with number samplerChn
.getChannelBufferFillBytes(int)
,
getSamplerChannels()
public void setChannelAudioOutputDevice(int samplerChn, int devId) throws java.io.IOException, LscpException, LSException
samplerChn
- The sampler channel number.devId
- The numerical ID of the audio output device.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If
samplerChn
is not a valid channel number;
devId
is not a valid audio output device ID;
getSamplerChannels()
,
getAudioOutputDevices()
public void setChannelAudioOutputChannel(int samplerChn, int audioOut, int audioIn) throws java.io.IOException, LscpException, LSException
samplerChn
- The sampler channel number.audioOut
- The sampler channel's audio output channel which should be rerouted.audioIn
- The audio channel of the selected audio output device
where audioOut
should be routed to.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If
samplerChn
is not a valid channel number;
getSamplerChannels()
public void setChannelMidiInputDevice(int samplerChn, int devId) throws java.io.IOException, LscpException, LSException
samplerChn
- The sampler channel number.devId
- The numerical ID of the MIDI input device.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If
samplerChn
is not a valid channel number;
devId
is not a valid MIDI input device ID;
getSamplerChannels()
,
getMidiInputDevices()
public void setChannelMidiInputPort(int samplerChn, int port) throws java.io.IOException, LscpException, LSException
samplerChn
- The sampler channel number.port
- The MIDI input port number of
the MIDI input device connected to the specified sampler channel.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If samplerChn
is not a valid channel number.getSamplerChannels()
public void setChannelMidiInputChannel(int samplerChn, int midiChn) throws java.io.IOException, LscpException, LSException
samplerChn
- The sampler channel number.midiChn
- The number of the new MIDI input channel where
samplerChn
should listen to or -1 to listen on all 16 MIDI channels.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If samplerChn
is not a valid channel number.getSamplerChannels()
public void setChannelMidiInstrumentMap(int samplerChn, int mapId) throws java.io.IOException, LscpException, LSException
samplerChn
- The sampler channel number.mapId
- Specifies the numerical ID of the MIDI instrument
map to assign. To remove the current map binding use -1
.
To set the current map to be the default map use -2
.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If
samplerChn
is not a valid channel number;
mapId
is not a valid MIDI instrument map ID;
getSamplerChannels()
,
getMidiInstrumentMaps()
public void setChannelVolume(int samplerChn, float volume) throws java.io.IOException, LscpException, LSException
samplerChn
- The sampler channel number.volume
- The new volume value.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If samplerChn
is not a valid channel number or if
there is no engine assigned yet to the specified sampler channel.getSamplerChannels()
public void setChannelMute(int samplerChn, boolean mute) throws java.io.IOException, LscpException, LSException
samplerChn
- The sampler channel number.mute
- If true
the specified channel is muted, else the channel
is unmuted.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If samplerChn
is not a valid channel number or if
there is no engine assigned yet to the specified sampler channel.getSamplerChannels()
public void setChannelSolo(int samplerChn, boolean solo) throws java.io.IOException, LscpException, LSException
samplerChn
- The sampler channel number.solo
- true
to solo the specified channel, false
otherwise.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If samplerChn
is not a valid channel number or if
there is no engine assigned yet to the specified sampler channel.getSamplerChannels()
public int createFxSend(int channel, int midiCtrl) throws java.io.IOException, LSException, LscpException
channel
- The sampler channel, on which a new effect send should be added.midiCtrl
- Defines the MIDI controller, which
will be able alter the effect send level.
java.io.IOException
- If some I/O error occurs.
LSException
- If the creation of the effect send failed.
LscpException
- If LSCP protocol corruption occurs.destroyFxSend(int, int)
public int createFxSend(int channel, int midiCtrl, java.lang.String name) throws java.io.IOException, LSException, LscpException
channel
- The sampler channel, on which the effect send should be created on.midiCtrl
- Defines the MIDI controller, which can alter the effect send level.name
- The name of the effect send entity. The name does not have to be unique.
java.io.IOException
- If some I/O error occurs.
LSException
- If the creation of the effect send failed.
LscpException
- If LSCP protocol corruption occurs.destroyFxSend(int, int)
public void destroyFxSend(int channel, int fxSend) throws java.io.IOException, LSException, LscpException
channel
- The sampler channel, from which
the specified effect send should be removed.fxSend
- The ID of the effect send that should be removed.
LSException
- If some other error occurs.
LscpException
- If LSCP protocol corruption occurs.
java.io.IOException
createFxSend(int, int)
public int getFxSoundCount(int channel) throws java.io.IOException, LscpException, LSException
channel
- The ID of the sampler channel.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If some other error occurs.public FxSend[] getFxSends(int channel) throws java.io.IOException, LscpException, LSException
channel
- The sampler channel number.
FxSend
array providing all created
effect sends on the specified sampler channel.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If channel
is not a valid sampler channel ID.createFxSend(int, int)
,
destroyFxSend(int, int)
public java.lang.Integer[] getFxSendIDs(int channel) throws java.io.IOException, LscpException, LSException
channel
- The sampler channel number.
Integer
array providing
the numerical IDs of all effect sends on the specified sampler channel.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If channel
is not a valid sampler channel ID.createFxSend(int, int)
,
destroyFxSend(int, int)
public FxSend getFxSendInfo(int channel, int fxSend) throws java.io.IOException, LscpException, LSException
channel
- The sampler channel number.fxSend
- The numerical ID of the effect send entity.
FxSend
instance containing
the current settings of the specified effect send entity.
java.io.IOException
- If an I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If the sampler channel and/or the effect send number are invalid.public void setFxSendName(int channel, int fxSend, java.lang.String name) throws java.io.IOException, LscpException, LSException
channel
- The sampler channel number.fxSend
- The numerical ID of the effect send entity.name
- The new name for the specified effect send.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If channel
is not a valid channel
number or fxSend
is not a valid effect send ID;public void setFxSendAudioOutputChannel(int channel, int fxSend, int audioSrc, int audioDst) throws java.io.IOException, LscpException, LSException
channel
- The sampler channel number.fxSend
- The numerical ID of the effect send entity to be rerouted.audioSrc
- The numerical ID of the effect send's audio output channel,
which should be rerouted.audioDst
- The audio channel of the selected audio output device
where audioSrc
should be routed to.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If
channel
is not a valid channel number;
fxSend
is not a valid effect send ID;
public void setFxSendMidiController(int channel, int fxSend, int midiCtrl) throws java.io.IOException, LscpException, LSException
channel
- The sampler channel number.fxSend
- The numerical ID of the effect send entity.midiCtrl
- The MIDI controller which shall be
able to modify the effect send's send level.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If
channel
is not a valid channel number;
fxSend
is not a valid effect send ID;
midiCtrl
is not a valid controller;
public void setFxSendLevel(int channel, int fxSend, float volume) throws java.io.IOException, LscpException, LSException
channel
- The sampler channel number.fxSend
- The numerical ID of the effect send entity.volume
- The new volume value (a value smaller than 1.0 means
attenuation, whereas a value greater than 1.0 means amplification).
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If some other error occurs.public void editChannelInstrument(int samplerChn) throws java.io.IOException, LscpException, LSException
samplerChn
- The sampler channel number.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If samplerChn
is not a valid channel number or if
there is no instrument loaded on the specified sampler channel.getSamplerChannels()
public void sendChannelMidiData(int samplerChn, MidiDataEvent.Type type, int arg1, int arg2) throws java.io.IOException, LscpException, LSException
samplerChn
- The sampler channel number.type
- The type of MIDI message to send.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If samplerChn
is not a valid channel number or if
there is no instrument loaded on the specified sampler channel.getSamplerChannels()
public void resetChannel(int samplerChn) throws java.io.IOException, LscpException, LSException
samplerChn
- The sampler channel number.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If samplerChn
is not a valid channel number or if
there is no engine assigned yet to the specified sampler channel.getSamplerChannels()
public void addDbDirectory(java.lang.String dir) throws java.io.IOException, LSException, LscpException
dir
- The absolute (escaped) path name of the directory to add.
java.io.IOException
- If some I/O error occurs.
LSException
- If the creation of the directory failed.
LscpException
- If LSCP protocol corruption occurs.public void removeDbDirectory(java.lang.String dir) throws java.io.IOException, LscpException, LSException
dir
- The absolute (escaped) path name of the directory to remove.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If the specified directory is not
empty or if the removal of the directory failed.public void removeDbDirectory(java.lang.String dir, boolean force) throws java.io.IOException, LscpException, LSException
dir
- The absolute path name of the directory to remove.force
- If true
forces the removal of non-empty
directory and all its content.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If the removing of the directory failed.public void removeDbDirectories(java.lang.String[] dirs, boolean force) throws java.io.IOException, LscpException, LSException
dirs
- The absolute (escaped) path names of the directories to remove.force
- If true
forces the removal of non-empty
directories.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If the removing of the directores failed.public int getDbDirectoryCount(java.lang.String dir) throws java.io.IOException, LscpException, LSException
dir
- The absolute path name of the directory.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If some other error occurs.public int getDbDirectoryCount(java.lang.String dir, boolean recursive) throws java.io.IOException, LscpException, LSException
dir
- The absolute path name of the directory.recursive
- If true
, the number of all directories
in the specified subtree will be returned.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If some other error occurs.public java.lang.String[] getDbDirectoryNames(java.lang.String dir) throws java.io.IOException, LscpException, LSException
dir
- The absolute path name of the directory.
String
array providing the names of
all directories in the specified directory.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If the specified path name is invalid.public DbDirectoryInfo getDbDirectoryInfo(java.lang.String dir) throws java.io.IOException, LscpException, LSException
dir
- The absolute path name of the directory.
DbDirectoryInfo
instance providing information
about the specified directory.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If the specified directory is not found.public DbDirectoryInfo[] getDbDirectories(java.lang.String dir) throws java.io.IOException, LscpException, LSException
dir
- The absolute path name of the directory.
DbDirectoryInfo
array providing
information about all directories in the specified directory.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If the specified path name is invalid.public void renameDbDirectory(java.lang.String dir, java.lang.String name) throws java.io.IOException, LSException, LscpException
dir
- The absolute path name of the directory to rename.name
- The new name for the directory.
java.io.IOException
- If some I/O error occurs.
LSException
- If the renaming of the directory failed.
LscpException
- If LSCP protocol corruption occurs.public void moveDbDirectory(java.lang.String dir, java.lang.String dst) throws java.io.IOException, LSException, LscpException
dir
- The absolute path name of the directory to move.dst
- The location where the directory will be moved to.
java.io.IOException
- If some I/O error occurs.
LSException
- If the operation failed.
LscpException
- If LSCP protocol corruption occurs.public void moveDbDirectories(java.lang.String[] dirs, java.lang.String dst) throws java.io.IOException, LSException, LscpException
dirs
- The absolute path names of the directories to move.dst
- The location where the directories will be moved to.
java.io.IOException
- If some I/O error occurs.
LSException
- If the operation failed.
LscpException
- If LSCP protocol corruption occurs.public void copyDbDirectory(java.lang.String dir, java.lang.String dst) throws java.io.IOException, LSException, LscpException
dir
- The absolute path name of the directory to copy.dst
- The location where the directory will be copied to.
java.io.IOException
- If some I/O error occurs.
LSException
- If the operation failed.
LscpException
- If LSCP protocol corruption occurs.public void copyDbDirectories(java.lang.String[] dirs, java.lang.String dst) throws java.io.IOException, LSException, LscpException
dirs
- The absolute path names of the directories to copy.dst
- The location where the directories will be copied to.
java.io.IOException
- If some I/O error occurs.
LSException
- If the operation failed.
LscpException
- If LSCP protocol corruption occurs.public void setDbDirectoryDescription(java.lang.String dir, java.lang.String desc) throws java.io.IOException, LSException, LscpException
dir
- The absolute path name of the directory.desc
- The new description for the directory.
java.io.IOException
- If some I/O error occurs.
LSException
- If failed to change the description.
LscpException
- If LSCP protocol corruption occurs.public void addDbInstrument(java.lang.String dbDir, java.lang.String filePath, int instrIndex) throws java.io.IOException, LSException, LscpException
dbDir
- The absolute path name of the database directory in which the
specified instrument will be added.filePath
- The absolute path name of the instrument file.instrIndex
- The index of the instrument (in the given instrument file) to add.
java.io.IOException
- If some I/O error occurs.
LSException
- If the operation failed.
LscpException
- If LSCP protocol corruption occurs.public int addDbInstrument(java.lang.String dbDir, java.lang.String filePath, int instrIndex, boolean background) throws java.io.IOException, LSException, LscpException
dbDir
- The absolute path name of the database directory in which the
specified instrument will be added.filePath
- The absolute path name of the instrument file.instrIndex
- The index of the instrument (in the given instrument file) to add.background
- If true
, the scan will be done
in background and this method may return before the job is finished.
background
is true
, the ID
of the scan job.
java.io.IOException
- If some I/O error occurs.
LSException
- If the operation failed.
LscpException
- If LSCP protocol corruption occurs.addInstrumentsDbListener(org.linuxsampler.lscp.event.InstrumentsDbListener)
public void addDbInstruments(java.lang.String dbDir, java.lang.String filePath) throws java.io.IOException, LSException, LscpException
dbDir
- The absolute path name of the database directory
in which the the supported instruments will be added.filePath
- The absolute path name of the file to scan for instruments.
java.io.IOException
- If some I/O error occurs.
LSException
- If the operation failed.
LscpException
- If LSCP protocol corruption occurs.public int addDbInstruments(java.lang.String dbDir, java.lang.String filePath, boolean background) throws java.io.IOException, LSException, LscpException
dbDir
- The absolute path name of the database directory
in which the the supported instruments will be added.filePath
- The absolute path name of the file to scan for instruments.background
- If true
, the scan will be done
in background and this method may return before the job is finished.
background
is true
, the ID
of the scan job.
java.io.IOException
- If some I/O error occurs.
LSException
- If the operation failed.
LscpException
- If LSCP protocol corruption occurs.addInstrumentsDbListener(org.linuxsampler.lscp.event.InstrumentsDbListener)
public void addDbInstruments(Client.ScanMode mode, java.lang.String dbDir, java.lang.String fsDir) throws java.io.IOException, LSException, LscpException
mode
- Determines the scanning mode. If RECURSIVE is
specified, all supported instruments in the specified file system
direcotry will be added to the specified instruments database
directory, including the instruments in subdirectories
of the supplied directory. If NON_RECURSIVE is specified,
the instruments in the subdirectories will not be processed.
If FLAT is specified, all supported instruments in the specified
file system direcotry will be added, including the instruments in
subdirectories of the supplied directory, but the respective
subdirectory structure will not be recreated in the instruments
database and all instruments will be added directly in the
specified database directory.dbDir
- The absolute path name of the database directory
in which the supported instruments will be added.fsDir
- The absolute path name of the file system directory.
java.io.IOException
- If some I/O error occurs.
LSException
- If the operation failed.
LscpException
- If LSCP protocol corruption occurs.public int addDbInstruments(Client.ScanMode mode, java.lang.String dbDir, java.lang.String fsDir, boolean background) throws java.io.IOException, LSException, LscpException
mode
- Determines the scanning mode. If RECURSIVE is
specified, all supported instruments in the specified file system
direcotry will be added to the specified instruments database
directory, including the instruments in subdirectories
of the supplied directory. If NON_RECURSIVE is specified,
the instruments in the subdirectories will not be processed.
If FLAT is specified, all supported instruments in the specified
file system direcotry will be added, including the instruments in
subdirectories of the supplied directory, but the respective
subdirectory structure will not be recreated in the instruments
database and all instruments will be added directly in the
specified database directory.dbDir
- The absolute path name of the database directory
in which the supported instruments will be added.fsDir
- The absolute path name of the file system directory.background
- If true
, the scan will be done
in background and this method may return before the job is finished.
background
is true
, the ID
of the scan job.
java.io.IOException
- If some I/O error occurs.
LSException
- If the operation failed.
LscpException
- If LSCP protocol corruption occurs.addInstrumentsDbListener(org.linuxsampler.lscp.event.InstrumentsDbListener)
public int addDbInstruments(Client.ScanMode mode, java.lang.String dbDir, java.lang.String fsDir, boolean background, boolean insDir) throws java.io.IOException, LSException, LscpException
mode
- Determines the scanning mode. If RECURSIVE is
specified, all supported instruments in the specified file system
direcotry will be added to the specified instruments database
directory, including the instruments in subdirectories
of the supplied directory. If NON_RECURSIVE is specified,
the instruments in the subdirectories will not be processed.
If FLAT is specified, all supported instruments in the specified
file system direcotry will be added, including the instruments in
subdirectories of the supplied directory, but the respective
subdirectory structure will not be recreated in the instruments
database and all instruments will be added directly in the
specified database directory.dbDir
- The absolute path name of the database directory
in which the supported instruments will be added.fsDir
- The absolute path name of the file system directory.background
- If true
, the scan will be done
in background and this method may return before the job is finished.insDir
- If true
a drieectory is created for each
instrument file.
background
is true
, the ID
of the scan job.
java.io.IOException
- If some I/O error occurs.
LSException
- If the operation failed.
LscpException
- If LSCP protocol corruption occurs.addInstrumentsDbListener(org.linuxsampler.lscp.event.InstrumentsDbListener)
public void removeDbInstrument(java.lang.String instr) throws java.io.IOException, LscpException, LSException
instr
- The absolute path name of the instrument to remove.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If the removing of the instrument failed.public void removeDbInstruments(java.lang.String[] instrs) throws java.io.IOException, LscpException, LSException
instrs
- The absolute path names of the instruments to remove.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If the removing of the instruments failed.public int getDbInstrumentCount(java.lang.String dir) throws java.io.IOException, LscpException, LSException
dir
- The absolute path name of the directory.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If some other error occurs.public int getDbInstrumentCount(java.lang.String dir, boolean recursive) throws java.io.IOException, LscpException, LSException
dir
- The absolute path name of the directory.recursive
- If true
, the number of all instruments
in the specified subtree will be returned.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If some other error occurs.public java.lang.String[] getDbInstrumentNames(java.lang.String dir) throws java.io.IOException, LscpException, LSException
dir
- The absolute path name of the directory.
String
array providing the names of
all instruments in the specified directory.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If the specified path name is invalid.public DbInstrumentInfo getDbInstrumentInfo(java.lang.String instr) throws java.io.IOException, LscpException, LSException
instr
- The absolute path name of the instrument.
DbInstrumentInfo
instance providing information
about the specified instrument.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If the specified instrument is not found.public DbInstrumentInfo[] getDbInstruments(java.lang.String dir) throws java.io.IOException, LscpException, LSException
dir
- The absolute path name of the directory.
DbInstrumentInfo
array providing
information about all instruments in the specified directory.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If the specified path name is invalid.public void renameDbInstrument(java.lang.String instr, java.lang.String name) throws java.io.IOException, LSException, LscpException
instr
- The absolute path name of the instrument to rename.name
- The new name for the instrument.
java.io.IOException
- If some I/O error occurs.
LSException
- If the renaming of the instrument failed.
LscpException
- If LSCP protocol corruption occurs.public void moveDbInstrument(java.lang.String instr, java.lang.String dst) throws java.io.IOException, LSException, LscpException
instr
- The absolute path name of the instrument to move.dst
- The directory where the specified instrument will be moved to.
java.io.IOException
- If some I/O error occurs.
LSException
- If the operation failed.
LscpException
- If LSCP protocol corruption occurs.public void moveDbInstruments(java.lang.String[] instrs, java.lang.String dst) throws java.io.IOException, LSException, LscpException
instrs
- The absolute path names of the instruments to move.dst
- The directory where the specified instruments will be moved to.
java.io.IOException
- If some I/O error occurs.
LSException
- If the operation failed.
LscpException
- If LSCP protocol corruption occurs.public void copyDbInstrument(java.lang.String instr, java.lang.String dst) throws java.io.IOException, LSException, LscpException
instr
- The absolute path name of the instrument to copy.dst
- The directory where the specified instrument will be copied to.
java.io.IOException
- If some I/O error occurs.
LSException
- If the operation failed.
LscpException
- If LSCP protocol corruption occurs.public void copyDbInstruments(java.lang.String[] instrs, java.lang.String dst) throws java.io.IOException, LSException, LscpException
instrs
- The absolute path name of the instruments to copy.dst
- The directory where the specified instruments will be copied to.
java.io.IOException
- If some I/O error occurs.
LSException
- If the operation failed.
LscpException
- If LSCP protocol corruption occurs.public void setDbInstrumentDescription(java.lang.String instr, java.lang.String desc) throws java.io.IOException, LSException, LscpException
instr
- The absolute path name of the instrument.desc
- The new description for the instrument.
java.io.IOException
- If some I/O error occurs.
LSException
- If failed to change the description.
LscpException
- If LSCP protocol corruption occurs.public void setDbInstrumentFilePath(java.lang.String oldPath, java.lang.String newPath) throws java.io.IOException, LSException, LscpException
oldPath
in the database, with newPath
.
oldPath
- The absolute path name of the instrument file to substitute.newPath
- The new absolute path name.
java.io.IOException
- If some I/O error occurs.
LSException
- If the operation failed.
LscpException
- If LSCP protocol corruption occurs.public DbDirectoryInfo[] findDbDirectories(java.lang.String dir, DbSearchQuery query) throws java.io.IOException, LscpException, LSException
dir
- The absolute path name of the directory to search.query
- Provides the search criterias.
DbDirectoryInfo
array providing
information about all directories that are found in the specified directory.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If the specified path name is invalid.public DbDirectoryInfo[] findDbDirectories(java.lang.String dir, DbSearchQuery query, boolean nonRecursive) throws java.io.IOException, LscpException, LSException
dir
- The absolute path name of the directory to search.query
- Provides the search criterias.nonRecursive
- If true
, the search will be non-recursive.
DbDirectoryInfo
array providing
information about all directories that are found in the specified directory.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If the specified path name is invalid.public DbInstrumentInfo[] findDbInstruments(java.lang.String dir, DbSearchQuery query) throws java.io.IOException, LscpException, LSException
dir
- The absolute path name of the directory to search.query
- Provides the search criterias.
DbInstrumentInfo
array providing
information about all instruments that are found in the specified directory.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If the specified path name is invalid.public DbInstrumentInfo[] findDbInstruments(java.lang.String dir, DbSearchQuery query, boolean nonRecursive) throws java.io.IOException, LscpException, LSException
dir
- The absolute path name of the directory to search.query
- Provides the search criterias.nonRecursive
- If true
, the search will be non-recursive.
DbInstrumentInfo
array providing
information about all instruments that are found in the specified directory.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If the specified path name is invalid.public java.lang.String[] findLostDbInstrumentFiles() throws java.io.IOException, LscpException, LSException
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If other error occurs.public ScanJobInfo getDbInstrumentsJobInfo(int jobId) throws java.io.IOException, LscpException, LSException
jobId
- The ID of the job.
ScanJobInfo
instance providing information
about the specified job.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If the specified job is not found.public void formatInstrumentsDb() throws java.io.IOException, LscpException, LSException
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If the formatting of the instruments database failed.public void resetSampler() throws java.io.IOException, LscpException
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.public int getTotalStreamCount() throws java.io.IOException, LscpException, LSException
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If some other error occurs.public int getTotalVoiceCount() throws java.io.IOException, LscpException, LSException
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If some other error occurs.public int getTotalVoiceCountMax() throws java.io.IOException, LscpException, LSException
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If some other error occurs.public ServerInfo getServerInfo() throws java.io.IOException, LscpException, LSException
ServerInfo
instance containing
information about the LinuxSampler instance.
java.io.IOException
- If an I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If some other error occurs.public float getVolume() throws java.io.IOException, LscpException, LSException
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If some other error occurs.public void setVolume(float volume) throws java.io.IOException, LscpException, LSException
volume
- The new volume value.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If some other error occurs.getVolume()
public int getGlobalVoiceLimit() throws java.io.IOException, LscpException, LSException
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If some other error occurs.public void setGlobalVoiceLimit(int maxVoices) throws java.io.IOException, LscpException, LSException
maxVoices
- The new global limit of maximum voices.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If some other error occurs.getVolume()
public int getGlobalStreamLimit() throws java.io.IOException, LscpException, LSException
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If some other error occurs.public void setGlobalStreamLimit(int maxStreams) throws java.io.IOException, LscpException, LSException
maxVoices
- The new global limit of maximum disk streams.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If some other error occurs.getVolume()
public int getFileInstrumentCount(java.lang.String filename) throws java.io.IOException, LscpException, LSException
filename
- The absolute path name of the instrument file.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If the file is not found, or other error occur.public Instrument getFileInstrumentInfo(java.lang.String filename, int instrIdx) throws java.io.IOException, LscpException, LSException
instrIdx
in the specified instrument file.
filename
- The absolute path name of the instrument file.instrIdx
- The index of the instrument in the specified instrument file.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If failed to retrieve information.public Instrument[] getFileInstruments(java.lang.String filename) throws java.io.IOException, LscpException, LSException
filename
- The absolute path name of the instrument file.
Instrument
array providing
information about all instruments in the specified instrument file.
java.io.IOException
- If some I/O error occurs.
LscpException
- If LSCP protocol corruption occurs.
LSException
- If the specified file name is invalid.protected static java.util.logging.Logger getLogger()
|
jlscp v0.8 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |