com.frinika.sequencer.model
Class MidiLane

java.lang.Object
  extended by com.frinika.sequencer.model.Lane
      extended by com.frinika.sequencer.model.MidiLane
All Implemented Interfaces:
EditHistoryRecordable, EditHistoryRecorder<Part>, RecordableLane, Selectable, java.io.Serializable

public class MidiLane
extends Lane
implements RecordableLane

See Also:
Serialized Form

Field Summary
static int DRUM
           
static int MELODIC
           
static int SCORE
           
static int UNKNOWN_TYPE
          Stuff to let the GUI know what sort of lane it is.
 
Fields inherited from class com.frinika.sequencer.model.Lane
children, height, parts
 
Constructor Summary
protected MidiLane()
           
  MidiLane(FrinikaTrackWrapper ftw, ProjectContainer project)
          Construct an empty lane
 
Method Summary
 void addMidiMessageListener(MidiMessageListener l)
           
 void addToModel()
          Add the lane from the project.
 void attachFTW()
           
 Part createPart()
           
 Selectable deepCopy(Selectable parent)
          Complete copy of object.
 void deepMove(long tick)
          Lanes just move down the list.
 void detachFTW()
           
 ControllerListProvider getControllerList()
           
 MidiPart getHeadPart()
           
 javax.swing.Icon getIcon()
           
 java.lang.String[] getKeyNames()
           
 int getMidiChannel()
           
 javax.sound.midi.MidiDevice getMidiDevice()
           
 java.lang.Integer getMidiDeviceIndex()
          The index of the midiDevice according to the stored order in the saved project
 double getMonitorValue()
           
 java.lang.String getPatchMapName()
           
 MidiPlayOptions getPlayOptions()
           
 MyPatch getProgram()
           
 javax.sound.midi.Receiver getReceiver()
           
 int getStoredMidiChannel()
          The midi channel stored in the saved project
 FrinikaTrackWrapper getTrack()
           
 int getType()
           
 java.lang.String getVoiceName()
          This is used to find the entry in Voice To Patch map.
 boolean isDrumLane()
           
 boolean isMute()
           
 boolean isRecording()
           
 boolean isSolo()
           
 int mapNote(int num)
           
 void onLoad()
          Actions to be done when this lane is loaded
 void removeMidiMessageListener(MidiMessageListener l)
           
 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 setDrumMapping(int k, int index)
           
 void setKeyNames(java.lang.String[] keyNames)
           
 void setMidiChannel(int channel)
           
 void setMidiDevice(javax.sound.midi.MidiDevice dev)
           
 void setMute(boolean b)
           
 void setPatchMapName(java.lang.String patchMapName)
           
 void setProgram(int prog, int msb, int lsb)
           
 void setProgram(MyPatch patch)
           
 void setRecording(boolean b)
           
 void setSolo(boolean b)
           
 void setType(int type)
           
protected  void setUpKeys()
          Deprecated. 
 void setVoiceName(java.lang.String name)
           
 
Methods inherited from class com.frinika.sequencer.model.Lane
add, addChildLane, addChildLane, clone, displayStructure, getChildren, getDisplayH, getDisplayID, getDisplayY, getFamilyLanes, getHeight, getName, getParts, getProject, isHidden, isOpen, isSelected, leftTickForMove, remove, removeAll, removeChildLane, removeFromModel, rightTickForMove, setHeight, setHidden, setName, setOpen, setSelected
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNKNOWN_TYPE

public static final int UNKNOWN_TYPE
Stuff to let the GUI know what sort of lane it is.

See Also:
Constant Field Values

MELODIC

public static final int MELODIC
See Also:
Constant Field Values

DRUM

public static final int DRUM
See Also:
Constant Field Values

SCORE

public static final int SCORE
See Also:
Constant Field Values
Constructor Detail

MidiLane

protected MidiLane()

MidiLane

public MidiLane(FrinikaTrackWrapper ftw,
                ProjectContainer project)
Construct an empty lane

Parameters:
ftw -
project -
Method Detail

getPatchMapName

public java.lang.String getPatchMapName()

setPatchMapName

public void setPatchMapName(java.lang.String patchMapName)

getHeadPart

public MidiPart getHeadPart()

getTrack

public FrinikaTrackWrapper getTrack()

getMidiDevice

public javax.sound.midi.MidiDevice getMidiDevice()

getReceiver

public javax.sound.midi.Receiver getReceiver()
Returns:
The reciever associated with this lane

getMidiChannel

public int getMidiChannel()

getStoredMidiChannel

public int getStoredMidiChannel()
The midi channel stored in the saved project

Returns:

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.

Specified by:
restoreFromClone in interface EditHistoryRecordable

getControllerList

public ControllerListProvider getControllerList()

attachFTW

public void attachFTW()

detachFTW

public void detachFTW()

getVoiceName

public java.lang.String getVoiceName()
This is used to find the entry in Voice To Patch map.

Returns:
name associated with the midipatch (prog,bank) pair

setVoiceName

public void setVoiceName(java.lang.String name)

onLoad

public void onLoad()
Description copied from class: Lane
Actions to be done when this lane is loaded

Overrides:
onLoad in class Lane

setProgram

public void setProgram(int prog,
                       int msb,
                       int lsb)

setProgram

public void setProgram(MyPatch patch)

getProgram

public MyPatch getProgram()

deepCopy

public Selectable deepCopy(Selectable parent)
Description copied from interface: Selectable
Complete copy of object.

Specified by:
deepCopy in interface Selectable
Parameters:
parent - owner of the new object;
Returns:

deepMove

public void deepMove(long tick)
Lanes just move down the list. SIlly generic interface.

Specified by:
deepMove in interface Selectable

addToModel

public void addToModel()
Description copied from class: Lane
Add the lane from the project. Override to do any subclass specific stuff. (used by redo)

Specified by:
addToModel in interface Selectable
Overrides:
addToModel in class Lane

isRecording

public boolean isRecording()
Specified by:
isRecording in interface RecordableLane

isMute

public boolean isMute()
Specified by:
isMute in interface RecordableLane

isSolo

public boolean isSolo()

setRecording

public void setRecording(boolean b)
Specified by:
setRecording in interface RecordableLane

setMute

public void setMute(boolean b)
Specified by:
setMute in interface RecordableLane

setSolo

public void setSolo(boolean b)

getMonitorValue

public double getMonitorValue()
Specified by:
getMonitorValue in interface RecordableLane

getPlayOptions

public MidiPlayOptions getPlayOptions()

addMidiMessageListener

public void addMidiMessageListener(MidiMessageListener l)

removeMidiMessageListener

public void removeMidiMessageListener(MidiMessageListener l)

setMidiChannel

public void setMidiChannel(int channel)

isDrumLane

public boolean isDrumLane()

setMidiDevice

public void setMidiDevice(javax.sound.midi.MidiDevice dev)

setType

public void setType(int type)

getType

public int getType()

setKeyNames

public void setKeyNames(java.lang.String[] keyNames)

setUpKeys

@Deprecated
protected void setUpKeys()
Deprecated. 


getKeyNames

public java.lang.String[] getKeyNames()

setDrumMapping

public void setDrumMapping(int k,
                           int index)

mapNote

public int mapNote(int num)

createPart

public Part createPart()
Specified by:
createPart in class Lane

getIcon

public javax.swing.Icon getIcon()
Specified by:
getIcon in class Lane
Returns:
icon for the gui (e.g. lane header)

getMidiDeviceIndex

public java.lang.Integer getMidiDeviceIndex()
The index of the midiDevice according to the stored order in the saved project

Returns: