com.e1.mxdublin.evlist
Class EvNote

java.lang.Object
  extended by com.e1.mxdublin.core.SeqEvent
      extended by com.e1.mxdublin.evlist.EvAbstractItem
          extended by com.e1.mxdublin.evlist.EvSender
              extended by com.e1.mxdublin.evlist.EvNote
All Implemented Interfaces:
Cloneable, Comparable<EvAbstractItem>, Runnable
Direct Known Subclasses:
EvChord, EvProg

public class EvNote
extends EvSender

Event that sends a midi note to the specified receiver.

Event arguments

<note name in tracker format> <note duration> [note velocity]

Properties

sender : the sender name to use to send the event

chl : the midi channel of the note event (default to channel 1)

Example usage:

 
 evlist.add(1, new EvNote("E-2 1 @sender myvst"));
 evlist.add(2, new EvNote("D#2 0.5 63 @sender myothervst @chl 2"));
 


Field Summary
protected static Atom CHL_1
           
protected static Atom FULL_VELOCITY
           
protected static Atom NOTE_OFF
           
protected  Atom[] noteOff
           
 
Fields inherited from class com.e1.mxdublin.evlist.EvSender
arg, BANG, sender
 
Fields inherited from class com.e1.mxdublin.evlist.EvAbstractItem
gp, len_tm
 
Fields inherited from class com.e1.mxdublin.core.SeqEvent
mandatory
 
Constructor Summary
EvNote(String param)
           
EvNote(String param, GroupProperties gp)
           
 
Method Summary
 void appendDefinedProperties(StringBuffer sb)
          Appends the string representation of the defined properties.
 Object clone()
          Clone the abstract event.
 String getValue()
          Returns event representation in string format.
 boolean isLike(EvAbstractItem item)
          Returns true if the content of this event is the same than event item 'comp'.
 void panic()
          Utility that will send noteoff on all note that are currently playing.
 boolean setProperty(String name, String value)
          Set property.
 void setValue(String v)
          Sets event definition using a string.
 void stop()
          Tells this event to stop executing.
 
Methods inherited from class com.e1.mxdublin.evlist.EvSender
play
 
Methods inherited from class com.e1.mxdublin.evlist.EvAbstractItem
bang, cancel, compareTo, equals, fromXML, getGroupProperties, getTm, isSameGroupProperties, loadElement, repr, run, setProperties, setTm, setTm, toString, toXML
 
Methods inherited from class com.e1.mxdublin.core.SeqEvent
eventDebug
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

FULL_VELOCITY

protected static final Atom FULL_VELOCITY

NOTE_OFF

protected static final Atom NOTE_OFF

CHL_1

protected static final Atom CHL_1

noteOff

protected Atom[] noteOff
Constructor Detail

EvNote

public EvNote(String param)

EvNote

public EvNote(String param,
              GroupProperties gp)
Method Detail

stop

public void stop()
Description copied from class: EvAbstractItem
Tells this event to stop executing. This method will be called when the len_tm is reached since the bang() was called.

Overrides:
stop in class EvAbstractItem

setValue

public void setValue(String v)
Description copied from class: EvAbstractItem
Sets event definition using a string.

Overrides:
setValue in class EvSender
Parameters:
v - String value

getValue

public String getValue()
Description copied from class: EvAbstractItem
Returns event representation in string format.

Overrides:
getValue in class EvSender
Returns:
the event represnetation in string format

appendDefinedProperties

public void appendDefinedProperties(StringBuffer sb)
Description copied from class: EvAbstractItem
Appends the string representation of the defined properties. Properties thats are also in the group-properties and have the same values should not be appended.

Overrides:
appendDefinedProperties in class EvSender
Parameters:
sb - the StringBuffer to append the properties values

isLike

public boolean isLike(EvAbstractItem item)
Description copied from class: EvAbstractItem
Returns true if the content of this event is the same than event item 'comp'. Unlike equals(Object o), the event time is not compared.

Overrides:
isLike in class EvSender
Parameters:
item - the event item to compare
Returns:
returns true is the content is the same

panic

public void panic()
Utility that will send noteoff on all note that are currently playing. This will send the 'All Sound Off' CC message to the configured channel.


setProperty

public boolean setProperty(String name,
                           String value)
Description copied from class: EvAbstractItem
Set property. If the property is not supported by the event, the event must return false.

Overrides:
setProperty in class EvSender
Parameters:
name - property name
value - property value
Returns:
true if the property is supported

clone

public Object clone()
Description copied from class: EvAbstractItem
Clone the abstract event. Special care should be taken since if the event is in a list, the owner of the cloned object will be set to null.

Overrides:
clone in class EvSender
See Also:
Object.clone()