net.sourceforge.geeboss.model.midi.roland
Class RolandDevice

java.lang.Object
  extended by net.sourceforge.geeboss.model.midi.memory.MemoryComponent
      extended by net.sourceforge.geeboss.model.midi.memory.MemoryObject
          extended by net.sourceforge.geeboss.model.midi.memory.MappedDevice
              extended by net.sourceforge.geeboss.model.midi.roland.RolandDevice
All Implemented Interfaces:
javax.sound.midi.Receiver, ValueChangeListener, Referencing, Sysexable, org.apache.avalon.framework.activity.Initializable
Direct Known Subclasses:
Gt8

public abstract class RolandDevice
extends MappedDevice
implements javax.sound.midi.Receiver, ValueChangeListener, org.apache.avalon.framework.activity.Initializable

Base class for roland midi devices

Author:
Frederic BORRY

Field Summary
static byte DT1_COMMAND
          Roland DT1 command
static byte MANUFACTURER_ID
          Roland manufacturer id
static byte RQ1_COMMAND
          Roland RQ1 command
 
Fields inherited from class net.sourceforge.geeboss.model.midi.memory.MemoryObject
mMemoryMap
 
Fields inherited from class net.sourceforge.geeboss.model.midi.memory.MemoryComponent
mAbsoluteAddress, mBaseAddress, mName, mParent, mSize
 
Constructor Summary
RolandDevice(GeebossContainer container)
          Create a new RolandDevice
 
Method Summary
 void close()
          Receive a close command fromt the midi thread
 void dataSet1(long address, byte[] data)
          Send a data set 1 command
abstract  org.apache.avalon.framework.configuration.Configuration getEditorsConfiguration()
          Get the implementation specific editors configuration
 MemoryEditorsManager getEditorsManager()
          Getter for editors manager
abstract  byte[] getModelId()
          Implmentation specific model id (3 bytes)
 StringTableManager getStringTableManager()
          Getter for string table manager
abstract  org.apache.avalon.framework.configuration.Configuration getStringTablesConfiguration()
          Get the implementation specific string tables configuration
abstract  Patch getTemporaryPatch()
          Getter for temporary patch
 void initialize()
          Initialize this component
 void requestData1(long address, long size)
          Send a request data 1 command
 void requestMemoryComponent(MemoryComponent component)
          Request the data associated to a memory component from the device
 void send(javax.sound.midi.MidiMessage message, long timeStamp)
          Receive data from the midi thread
 void sendMemoryComponent(MemoryComponent component)
          Send the data associated to a memory component to the device
 void sendMemoryMessage(SysexMemoryMessage message)
          Send the provided sysex memory message to the device
 void sendMemoryMessages(java.util.List<SysexMemoryMessage> messages)
          Send memory messages to the device
 void sendMemoryObject(MemoryObject object)
          Send the data associated to a memory object to the device
 void sendMemoryValue(MemoryValue value)
          Send the data associated to a memory value to the device
 void sendSysexMessage(byte[] message)
          Send a sysex message to the device
 void sendSysexMessage(byte[] message, boolean waitForAck)
          Send a sysex message to the device
 void setDeviceId(byte deviceId)
          Setter for device id
 void valueChanged(MemoryComponent value)
          Notify the listener that the provided value (or object) has changed
 
Methods inherited from class net.sourceforge.geeboss.model.midi.memory.MappedDevice
fromSysex, getComponent, getDeviceConfiguration, toSysex
 
Methods inherited from class net.sourceforge.geeboss.model.midi.memory.MemoryObject
addReference, fromSysex, getComponent, handleClassCastException, isValue, setup
 
Methods inherited from class net.sourceforge.geeboss.model.midi.memory.MemoryComponent
getAbsoluteAddress, getBaseAddress, getName, getParent, getSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MANUFACTURER_ID

public static final byte MANUFACTURER_ID
Roland manufacturer id

See Also:
Constant Field Values

RQ1_COMMAND

public static final byte RQ1_COMMAND
Roland RQ1 command

See Also:
Constant Field Values

DT1_COMMAND

public static final byte DT1_COMMAND
Roland DT1 command

See Also:
Constant Field Values
Constructor Detail

RolandDevice

public RolandDevice(GeebossContainer container)
             throws org.apache.avalon.framework.configuration.ConfigurationException
Create a new RolandDevice

Parameters:
container - the GeebossContainer
Throws:
org.apache.avalon.framework.configuration.ConfigurationException
Method Detail

initialize

public void initialize()
                throws java.lang.Exception
Initialize this component

Specified by:
initialize in interface org.apache.avalon.framework.activity.Initializable
Throws:
java.lang.Exception

getStringTableManager

public StringTableManager getStringTableManager()
Getter for string table manager

Returns:
the string table manager

getEditorsManager

public MemoryEditorsManager getEditorsManager()
Getter for editors manager

Returns:
the editors manager

getTemporaryPatch

public abstract Patch getTemporaryPatch()
Getter for temporary patch

Returns:
the temporary patch for this device

getStringTablesConfiguration

public abstract org.apache.avalon.framework.configuration.Configuration getStringTablesConfiguration()
                                                                                              throws org.apache.avalon.framework.configuration.ConfigurationException
Get the implementation specific string tables configuration

Returns:
the implementation specific string tables configuration
Throws:
org.apache.avalon.framework.configuration.ConfigurationException

getEditorsConfiguration

public abstract org.apache.avalon.framework.configuration.Configuration getEditorsConfiguration()
                                                                                         throws org.apache.avalon.framework.configuration.ConfigurationException
Get the implementation specific editors configuration

Returns:
the implementation specific editors configuration
Throws:
org.apache.avalon.framework.configuration.ConfigurationException

setDeviceId

public void setDeviceId(byte deviceId)
Setter for device id

Parameters:
deviceId - the device id

getModelId

public abstract byte[] getModelId()
Implmentation specific model id (3 bytes)

Returns:
the model id (3 bytes)

sendSysexMessage

public void sendSysexMessage(byte[] message)
Send a sysex message to the device

Parameters:
message - the message to send

sendSysexMessage

public void sendSysexMessage(byte[] message,
                             boolean waitForAck)
Send a sysex message to the device

Parameters:
message - the message to send
waitForAck - if true wait for data from the device before sending another message

dataSet1

public void dataSet1(long address,
                     byte[] data)
Send a data set 1 command

Parameters:
address - the address
data - data bytes

requestData1

public void requestData1(long address,
                         long size)
Send a request data 1 command

Parameters:
address - the address
size - the size

sendMemoryComponent

public void sendMemoryComponent(MemoryComponent component)
Send the data associated to a memory component to the device

Parameters:
component - the component to send

sendMemoryObject

public void sendMemoryObject(MemoryObject object)
Send the data associated to a memory object to the device

Parameters:
object - the object to send

sendMemoryValue

public void sendMemoryValue(MemoryValue value)
Send the data associated to a memory value to the device

Parameters:
value - the value to send

requestMemoryComponent

public void requestMemoryComponent(MemoryComponent component)
Request the data associated to a memory component from the device

Parameters:
component - the component we want the data for

sendMemoryMessages

public void sendMemoryMessages(java.util.List<SysexMemoryMessage> messages)
Send memory messages to the device

Parameters:
messages - the messages to send

sendMemoryMessage

public void sendMemoryMessage(SysexMemoryMessage message)
Send the provided sysex memory message to the device

Parameters:
message - the message to senb

send

public void send(javax.sound.midi.MidiMessage message,
                 long timeStamp)
Receive data from the midi thread

Specified by:
send in interface javax.sound.midi.Receiver

close

public void close()
Receive a close command fromt the midi thread

Specified by:
close in interface javax.sound.midi.Receiver

valueChanged

public void valueChanged(MemoryComponent value)
Notify the listener that the provided value (or object) has changed

Specified by:
valueChanged in interface ValueChangeListener
Parameters:
value - the changed value (or object)


Copyright (c) 2005 The Geeboss team (http://geeboss.sourceforge.net). All Rights Reserved.