JSampler
v0.8a

org.jsampler
Interface MidiDeviceModel

All Known Implementing Classes:
DefaultMidiDeviceModel

public interface MidiDeviceModel

A data model for a MIDI input device.


Method Summary
 void addMidiDeviceListener(MidiDeviceListener l)
          Registers the specified listener to be notified when the settings of the MIDI device are changed.
 int getDeviceId()
          Gets the numerical ID of this MIDI device.
 MidiInputDevice getDeviceInfo()
          Gets the current settings of the MIDI device represented by this model.
 boolean isActive()
          Determines whether the MIDI device is active.
 void removeMidiDeviceListener(MidiDeviceListener l)
          Removes the specified listener.
 void setActive(boolean active)
          Sets whether the MIDI device is enabled or disabled.
 void setBackendActive(boolean active)
          Schedules a new task for enabling/disabling the MIDI device.
 void setBackendDeviceParameter(Parameter prm)
          Schedules a new task for altering a specific setting of the MIDI input device.
 void setBackendPortCount(int ports)
          Schedules a new task for changing the port number of the MIDI device.
 void setBackendPortParameter(int port, Parameter prm)
          Schedules a new task for altering a specific setting of the specified MIDI input port.
 void setDeviceInfo(MidiInputDevice device)
          Updates the settings of the MIDI device represented by this model.
 

Method Detail

addMidiDeviceListener

void addMidiDeviceListener(MidiDeviceListener l)
Registers the specified listener to be notified when the settings of the MIDI device are changed.

Parameters:
l - The MidiDeviceListListener to register.

removeMidiDeviceListener

void removeMidiDeviceListener(MidiDeviceListener l)
Removes the specified listener.

Parameters:
l - The MidiDeviceListener to remove.

getDeviceId

int getDeviceId()
Gets the numerical ID of this MIDI device.

Returns:
The numerical ID of this MIDI device or -1 if the device number is not set.

getDeviceInfo

MidiInputDevice getDeviceInfo()
Gets the current settings of the MIDI device represented by this model.

Returns:
MidiInputDevice instance providing the current settings of the MIDI device represented by this model.

setDeviceInfo

void setDeviceInfo(MidiInputDevice device)
Updates the settings of the MIDI device represented by this model.

Parameters:
device - The new MIDI device settings.

isActive

boolean isActive()
Determines whether the MIDI device is active.

Returns:
true if the device is enabled and false otherwise.

setActive

void setActive(boolean active)
Sets whether the MIDI device is enabled or disabled.

Parameters:
active - If true the MIDI device is enabled, else the device is disabled.

setBackendActive

void setBackendActive(boolean active)
Schedules a new task for enabling/disabling the MIDI device.

Parameters:
active - If true the MIDI device is enabled, else the device is disabled.

setBackendDeviceParameter

void setBackendDeviceParameter(Parameter prm)
Schedules a new task for altering a specific setting of the MIDI input device.

Parameters:
prm - The parameter to be set.

setBackendPortCount

void setBackendPortCount(int ports)
Schedules a new task for changing the port number of the MIDI device.

Parameters:
ports - The new number of ports.

setBackendPortParameter

void setBackendPortParameter(int port,
                             Parameter prm)
Schedules a new task for altering a specific setting of the specified MIDI input port.

Parameters:
port - The port number.
prm - The parameter to be set.

JSampler
v0.8a

Copyright © 2007 Grigor Iliev. All rights reserved.