Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| jlscp v0.8
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.linuxsampler.lscp
Class SamplerChannel

    java.lang.Object
      org.linuxsampler.lscp.SamplerChannel

All Implemented Interfaces:
  Parseable

    public class SamplerChannel

extends java.lang.Object
implements Parseable

Provides information about the current settings of a specific sampler channel.

Constructor Summary
`SamplerChannel()` Creates a new instance of SamplerChannel
`SamplerChannel(java.lang.String[] resultSet)` Creates a new instance of `SamplerChannel` and parses the information about a specific sampler channel described by `resultSet`.

Method Summary
`int` | `getAudioOutputChannels()` Gets the number of output channels the sampler channel offers.
`int` | `getAudioOutputDevice()` Gets the numerical ID of the audio output device which is currently connected to this sampler channel to output the audio signal.
`java.lang.Integer[]` | `getAudioOutputRouting()` Gets a list which reflects to which audio channel of the selected audio output device each sampler output channel is routed to.
`int` | `getChannelId()` Gets the sampler channel number.
`SamplerEngine` | `getEngine()` Gets the engine that is deployed on the sampler channel.
`java.lang.String` | `getInstrumentFile()` Gets the file name of the loaded instrument.
`int` | `getInstrumentIndex()` Gets the instrument index number of the loaded instrument.
`java.lang.String` | `getInstrumentName()` Gets the name of the loaded instrument.
`int` | `getInstrumentStatus()` Gets the instrument status - an integer values from 0 to 100 indicating loading progress percentage for the instrument.
`int` | `getMidiInputChannel()` Gets the MIDI input channel number this sampler channel should listen to or -1 to listen on all MIDI channels.
`int` | `getMidiInputDevice()` Gets the numerical ID of the MIDI input device which is currently connected to this sampler channel to deliver MIDI input commands.
`int` | `getMidiInputPort()` Gets the port number of the MIDI input device.
`int` | `getMidiInstrumentMapId()` Gets the numerical id of the MIDI instrument map, to which this sampler channel is assigned to.
`float` | `getVolume()` Gets the channel volume factor.
`boolean` | `isMuted()` Determines whether this channel is muted.
`boolean` | `isMutedBySolo()` Determines whether this channel is muted because of the presence of a solo channel.
`boolean` | `isSoloChannel()` Determines whether this channel is a solo channel.
`boolean` | `isUsingDefaultMidiInstrumentMap()` Determines whether the sampler channel is assigned to the default MIDI instrument map.
`boolean` | `parse(java.lang.String s)` Parses a line of text.
`void` | `setChannelId(int id)` Sets the sampler channel number.
`void` | `setEngine(SamplerEngine engine)` Associates the specified sampler engine to this sampler channel.
`java.lang.String` | `toString()` Returns the numerical ID of this sampler channel.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### SamplerChannel

    public SamplerChannel()

  Creates a new instance of SamplerChannel

### SamplerChannel

    public SamplerChannel(java.lang.String[] resultSet)
                   throws LscpException

  Creates a new instance of `SamplerChannel` and parses the information about a specific sampler channel described by `resultSet`.

  Parameters:
    `resultSet` - An array with information categories about a sampler channel.
  Throws:
    `LscpException` - If the parse fail.

Method Detail

### getChannelId

    public int getChannelId()

  Gets the sampler channel number.

  Returns:
    The sampler channel number or -1 if the sampler channel number is not set.

### setChannelId

    public void setChannelId(int id)

  Sets the sampler channel number.

  Parameters:
    `id` - The new sampler channel number.

### getEngine

    public SamplerEngine getEngine()

  Gets the engine that is deployed on the sampler channel.

  Returns:
    The engine that is deployed on the sampler channel or `null` if there is no engine deployed yet for this sampler channel.

### setEngine

    public void setEngine(SamplerEngine engine)

  Associates the specified sampler engine to this sampler channel.

  Parameters:
    `engine` - A `SamplerEngine` instance containing the information about the engine to be assigned to this channel.

### getAudioOutputDevice

    public int getAudioOutputDevice()

  Gets the numerical ID of the audio output device which is currently connected to this sampler channel to output the audio signal.

  Returns:
    The numerical ID of the audio output device or -1 if there is no device connected to this sampler channel.

### getAudioOutputChannels

    public int getAudioOutputChannels()

  Gets the number of output channels the sampler channel offers.

  Returns:
    The number of output channels the sampler channel offers.

### getAudioOutputRouting

    public java.lang.Integer[] getAudioOutputRouting()

  Gets a list which reflects to which audio channel of the selected audio output device each sampler output channel is routed to. The number of the array's position represents the sampler output channel and the value at the specified position represents to which channel of the selected audio output device the sampler output channel is routed to.

  Returns:
    A list which reflects to which audio channel of the selected audio output device each sampler output channel is routed to.

### getInstrumentFile

    public java.lang.String getInstrumentFile()

  Gets the file name of the loaded instrument.

  Returns:
    The file name of the loaded instrument. or `null` if there is no instrument yet loaded for this sampler channel.

### getInstrumentIndex

    public int getInstrumentIndex()

  Gets the instrument index number of the loaded instrument.

  Returns:
    The instrument index number of the loaded instrument.

### getInstrumentName

    public java.lang.String getInstrumentName()

  Gets the name of the loaded instrument.

  Returns:
    The name of the loaded instrument or `null` if there is no instrument loaded.

### getInstrumentStatus

    public int getInstrumentStatus()

  Gets the instrument status - an integer values from 0 to 100 indicating loading progress percentage for the instrument. Negative value indicates a loading exception. Value of 100 indicates that the instrument is fully loaded.

  Returns:
    The instrument status.

### getMidiInputDevice

    public int getMidiInputDevice()

  Gets the numerical ID of the MIDI input device which is currently connected to this sampler channel to deliver MIDI input commands.

  Returns:
    The numerical ID of the MIDI input device which is currently connected to this sampler channel to deliver MIDI input commands or -1 if there is no device connected to this sampler channel.

### getMidiInputPort

    public int getMidiInputPort()

  Gets the port number of the MIDI input device.

  Returns:
    The port number of the MIDI input device.

### getMidiInputChannel

    public int getMidiInputChannel()

  Gets the MIDI input channel number this sampler channel should listen to or -1 to listen on all MIDI channels.

  Returns:
    The MIDI input channel number this sampler channel should listen to or -1 to listen on all MIDI channels.

### getVolume

    public float getVolume()

  Gets the channel volume factor. Value less then 1.0 means attenuation, value greater then 1.0 means amplification.

  Returns:
    The channel volume factor.

### isMuted

    public boolean isMuted()

  Determines whether this channel is muted.

  Returns:
    `true` if the channel is muted, `false` otherwise.

### isMutedBySolo

    public boolean isMutedBySolo()

  Determines whether this channel is muted because of the presence of a solo channel. All channels, muted because of the presence of a solo channel, will be automatically unmuted when there are no solo channels left.

  Returns:
    `true` if the channel is muted because of the presence of a solo channel, `false` otherwise.

### isSoloChannel

    public boolean isSoloChannel()

  Determines whether this channel is a solo channel.

  Returns:
    `true` if the channel is a solo channel, `false` otherwise.

### getMidiInstrumentMapId

    public int getMidiInstrumentMapId()

  Gets the numerical id of the MIDI instrument map, to which this sampler channel is assigned to.

  Returns:
    The numerical id of the MIDI instrument map, to which this sampler channel is assigned to, or `-1` if no MIDI instrument map is assigned to this sampler channel and `-2` if the channel is assigned to the default MIDI instrument map.
  See Also:
    `isUsingDefaultMidiInstrumentMap()`

### isUsingDefaultMidiInstrumentMap

    public boolean isUsingDefaultMidiInstrumentMap()

  Determines whether the sampler channel is assigned to the default MIDI instrument map.

  Returns:
    `true` if the sampler channel is assigned to the default MIDI instrument map, `false` otherwise.

### parse

    public boolean parse(java.lang.String s)
                  throws LscpException

  Parses a line of text.

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

### toString

    public java.lang.String toString()

  Returns the numerical ID of this sampler channel.

  Overrides:
    `toString` in class `java.lang.Object`
  Returns:
    The numerical ID of this sampler channel.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| jlscp v0.8
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 Grigor Iliev. All rights reserved.