com.frinika.sequencer.midi.sysex
Class E70set

java.lang.Object
  extended by com.frinika.sequencer.model.AbstractSysexMacro
      extended by com.frinika.sequencer.midi.sysex.E70set
All Implemented Interfaces:
SysexMacro

public class E70set
extends AbstractSysexMacro

Sysex-macro for sending a general data-store message to a Roland E70. Usage: e70set

...

Author:
Jens Gulden

Field Summary
static byte COMMAND_SYSEX_REQUEST
           
static byte COMMAND_SYSEX_SET
           
static byte DEVICE_ID_ROLAND
           
static byte MODEL_ID_E70
           
static int USER_PROGRAM_BASE_ADDR
           
static int USER_PROGRAM_SIZE
           
 
Fields inherited from class com.frinika.sequencer.model.AbstractSysexMacro
SYSEX_MACRO_PACKAGE
 
Constructor Summary
E70set()
           
 
Method Summary
static byte calculateChecksum(byte[] data, int from, int to)
           
 void checksum(byte[] data)
           
static byte[] denibblize(byte[] nibbles)
           
protected  byte[] e70Req(int addr, int size)
           
protected  byte[] e70Set(int addr, byte[] data)
           
protected  byte[] e70UserProgramReq(int userProgram, int offset, int size)
           
protected  byte[] e70UserProgramSet(int userProgram, int offset, byte[] data)
           
static byte[] nibblize(byte[] data)
           
 byte[] parse(int[] args)
          Macro: e70set
...
protected  byte[] rolandSysexReq(byte modelId, int addr, int size)
          Creates sysex-data for requesting a block of data from the midi-device.
protected  byte[] rolandSysexSet(byte modelId, int addr, byte[] data)
          Creates sysex-data for sending a block of data to the device.
protected  byte[] rolandSysexSetRaw(byte modelId, int addr, byte[] data)
          Creates sysex-data for sending a block of data to the device.
static javax.sound.midi.MidiMessage[] usrPrgChg(int pgmnr, int chn)
           
 
Methods inherited from class com.frinika.sequencer.model.AbstractSysexMacro
error, findMacro, parse, parse, parse, parseByte, parseInt, parseInt, parseIntArg, parseMessages, parseType, splitArgs, usage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MODEL_ID_E70

public static final byte MODEL_ID_E70
See Also:
Constant Field Values

USER_PROGRAM_BASE_ADDR

public static final int USER_PROGRAM_BASE_ADDR
See Also:
Constant Field Values

USER_PROGRAM_SIZE

public static final int USER_PROGRAM_SIZE
See Also:
Constant Field Values

DEVICE_ID_ROLAND

public static final byte DEVICE_ID_ROLAND
See Also:
Constant Field Values

COMMAND_SYSEX_SET

public static final byte COMMAND_SYSEX_SET
See Also:
Constant Field Values

COMMAND_SYSEX_REQUEST

public static final byte COMMAND_SYSEX_REQUEST
See Also:
Constant Field Values
Constructor Detail

E70set

public E70set()
Method Detail

parse

public byte[] parse(int[] args)
Macro: e70set
... arg[0]: address arg[1]..arg[n]: bytes to send

Overrides:
parse in class AbstractSysexMacro
Returns:

e70Set

protected byte[] e70Set(int addr,
                        byte[] data)

e70Req

protected byte[] e70Req(int addr,
                        int size)

e70UserProgramSet

protected byte[] e70UserProgramSet(int userProgram,
                                   int offset,
                                   byte[] data)

e70UserProgramReq

protected byte[] e70UserProgramReq(int userProgram,
                                   int offset,
                                   int size)

usrPrgChg

public static javax.sound.midi.MidiMessage[] usrPrgChg(int pgmnr,
                                                       int chn)
                                                throws javax.sound.midi.InvalidMidiDataException
Throws:
javax.sound.midi.InvalidMidiDataException

checksum

public void checksum(byte[] data)

rolandSysexSet

protected byte[] rolandSysexSet(byte modelId,
                                int addr,
                                byte[] data)
Creates sysex-data for sending a block of data to the device. The data will automatically converted to nibblized format, as internally required for transmission.

Parameters:
modelId -
addr -
data -
Returns:

rolandSysexSetRaw

protected byte[] rolandSysexSetRaw(byte modelId,
                                   int addr,
                                   byte[] data)
Creates sysex-data for sending a block of data to the device. The data is expected to already be in nibblized format, as required for transmission.

Parameters:
modelId -
addr -
data -
Returns:

rolandSysexReq

protected byte[] rolandSysexReq(byte modelId,
                                int addr,
                                int size)
Creates sysex-data for requesting a block of data from the midi-device.

Parameters:
modelId -
addr -
size -
Returns:

nibblize

public static byte[] nibblize(byte[] data)

denibblize

public static byte[] denibblize(byte[] nibbles)

calculateChecksum

public static byte calculateChecksum(byte[] data,
                                     int from,
                                     int to)