com.frinika.sequencer.model
Class SysexEvent

java.lang.Object
  extended by com.frinika.sequencer.model.MultiEvent
      extended by com.frinika.sequencer.model.SysexEvent
All Implemented Interfaces:
Item, EditHistoryRecordable, Selectable, java.io.Serializable, java.lang.Cloneable, java.lang.Comparable

public class SysexEvent
extends MultiEvent

Event for system-exclusive MIDI data.

Author:
Jens Gulden
See Also:
SysexMacro, Serialized Form

Field Summary
protected  java.lang.String macro
           
protected  javax.sound.midi.MidiEvent[] midiEvents
           
 
Fields inherited from class com.frinika.sequencer.model.MultiEvent
startTick
 
Constructor Summary
SysexEvent(MidiPart part, long startTick)
           
SysexEvent(MidiPart part, long startTick, byte[] data)
           
SysexEvent(MidiPart part, long startTick, java.lang.String macro)
           
 
Method Summary
 void commitAddImpl()
          Add the MidiEvents generated by this MultiEvent to the track
 long getEndTick()
          sub classes should override this.
 boolean isSuccessfullyParsed()
           
static byte[] parseHex(java.lang.String s)
           
protected  javax.sound.midi.MidiEvent[] parseMacro(java.lang.String macro)
           
 void restoreFromClone(EditHistoryRecordable object)
          On removal the EditHistoryContainer will attempt to clone the object - and if restored later it will use the restoreFromClone method to restore the cloned data on the original instance.
 void setData(byte[] data)
           
 void setMacroString(java.lang.String macro)
           
 void showEditorGUI(ProjectFrame frame)
           
 
Methods inherited from class com.frinika.sequencer.model.MultiEvent
addToModel, clone, commitAdd, commitChanges, compareTo, deepCopy, deepMove, detachedCopy, getMidiPart, getMultiEventEndTickComparable, getPart, getStartTick, getTrack, getTrackerColumn, getValue, getValueUI, isSelected, isZombie, leftTickForMove, removeFromModel, rightTickForMove, setSelected, setStartTick, setTrackerColumn, setValue, setValueUI
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

macro

protected java.lang.String macro

midiEvents

protected transient javax.sound.midi.MidiEvent[] midiEvents
Constructor Detail

SysexEvent

public SysexEvent(MidiPart part,
                  long startTick)

SysexEvent

public SysexEvent(MidiPart part,
                  long startTick,
                  java.lang.String macro)

SysexEvent

public SysexEvent(MidiPart part,
                  long startTick,
                  byte[] data)
Method Detail

setMacroString

public void setMacroString(java.lang.String macro)

setData

public void setData(byte[] data)

isSuccessfullyParsed

public boolean isSuccessfullyParsed()

parseMacro

protected javax.sound.midi.MidiEvent[] parseMacro(java.lang.String macro)
                                           throws javax.sound.midi.InvalidMidiDataException
Throws:
javax.sound.midi.InvalidMidiDataException

showEditorGUI

public void showEditorGUI(ProjectFrame frame)

commitAddImpl

public void commitAddImpl()
Description copied from class: MultiEvent
Add the MidiEvents generated by this MultiEvent to the track


getEndTick

public long getEndTick()
Description copied from class: MultiEvent
sub classes should override this.

Specified by:
getEndTick in class MultiEvent
Returns:
Returns the endTick

restoreFromClone

public void restoreFromClone(EditHistoryRecordable object)
Description copied from interface: EditHistoryRecordable
On removal the EditHistoryContainer will attempt to clone the object - and if restored later it will use the restoreFromClone method to restore the cloned data on the original instance.


parseHex

public static byte[] parseHex(java.lang.String s)