|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.e1.mxdublin.core.SeqEvent
com.e1.mxdublin.Trail
public abstract class Trail
Basic implementation of the dublin callback object.
A trail looks like a thread where it do something (like playing a note, sending a bang) and then call next() of event() method to be called again.
By design, a trail always loop over it self if it has played all the events. Also, a trail never knows when it should be started or stopped.
| Field Summary | |
|---|---|
protected boolean |
clocked
Tells if the trail is waiting for a new event. |
boolean |
globalStart
By setting this to true, when the user issue a global start, this trail will also be started. |
boolean |
globalStop
By setting this to true, when the user issue a global stop, this trail will also be stopped. |
protected int |
last
The value in quarter note when the last event/next has been issued. |
int |
quantizeCtrl
Start/stop quantizing reference. |
protected boolean |
started
Tells if the trail has been started. |
TrailView |
view
The editor of this this trail, if it can be edited. |
| Fields inherited from class com.e1.mxdublin.core.SeqEvent |
|---|
mandatory |
| Constructor Summary | |
|---|---|
Trail()
|
|
Trail(String name)
Trail constructor. |
|
| Method Summary | |
|---|---|
void |
dispose()
Remove trail from registry and cancels any events. |
void |
event(int tm)
Sets when the next call should be issued since start or reset. |
void |
eventf(float tm)
Sets when the next call should be issued since start or reset |
protected TrailView |
factoryView(DublinProject project)
Trails must returns a Swing TrailView object if they want to provide a gui editor to this trail. |
static Trail |
fromXML(Element e)
Return the Trail from the XML representation. |
String |
getName()
Return trail name. |
int |
getTime()
Return the current trail time in sequencer PPQ since the last start or reset. |
boolean |
isRunning()
Returns true if the trail is running. |
protected void |
loadElement(Element e)
Called when the trail is instantiated from fromXML(Element). |
void |
next(int tm)
Sets when the next call should be issued since now. |
void |
nextf(float tm)
Sets when the next call should be issued since now. |
void |
reset()
Reset the event count to 0, so the reference of the event() method will be based on when this method has been called. |
void |
run()
The action to be performed by this com.e1.mxdublin.core.SeqEvent based event. |
TrailView |
showView(DublinProject project)
|
void |
start()
Start trail by quantizing value from quantizeCtrl. |
void |
start(int tm)
Starts trail now + tm. |
void |
stop()
Stop trail and cancel any previous events. |
abstract void |
tick()
Method to be called by the sequencer that has been sync by event() and next(). |
protected Element |
toBaseXML()
Returns the representation of this abstract trail. |
void |
toggle()
Toggle the state of the trail. |
String |
toString()
Return trail identification, setted by @see setName(). |
Element |
toXML()
Returns the XML representation of this Trail. |
| Methods inherited from class com.e1.mxdublin.core.SeqEvent |
|---|
cancel, eventDebug |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected int last
protected boolean clocked
protected boolean started
public boolean globalStart
public boolean globalStop
public int quantizeCtrl
start without trails name or start_ref
is used.
public TrailView view
| Constructor Detail |
|---|
public Trail()
public Trail(String name)
| Method Detail |
|---|
public void start()
quantizeCtrl.
The trail startup will be quantized based on the last start or start_ref issued.
public void start(int tm)
tm - time to start from nowpublic void stop()
public void toggle()
public void next(int tm)
tm - since now to call tick in 480 PPQpublic void event(int tm)
tm - since start() to call tick in 480 PPQpublic void nextf(float tm)
tm - since now to call tick in float (1.0 = 480PPQ)public void eventf(float tm)
tm - since start() to call tick in float (1.0 = 480PPQ)public void reset()
public int getTime()
public void dispose()
public String getName()
public String toString()
toString in class Objectpublic boolean isRunning()
public abstract void tick()
protected void loadElement(Element e)
e - the original generic trail definitionpublic static Trail fromXML(Element e)
e - the XML elementprotected Element toBaseXML()
public Element toXML()
protected TrailView factoryView(DublinProject project)
public final TrailView showView(DublinProject project)
public void run()
SeqEvent
run in interface Runnablerun in class SeqEvent
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||