|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jfugue.PatternTransformer
org.jfugue.extras.DurationPatternTransformer
public class DurationPatternTransformer
The DurationPatternTransformer multiplies the duration of all notes in the given Pattern by a factor passed as a parameter.
This transformer can be used to increase or decrease the duration of notes. To increase the duration, use a variable greater than 1.0. To decrease the duration, use a value less than 1.0. The default value for this transformer is 1.0, which will result in no change to your Pattern.
For general information on how Pattern Transformers work, refer to the JFugue documentation.
Field Summary | |
---|---|
static java.lang.String |
FACTOR
Pass this String to putVariable, along with the factor by which you wish to alter the duration. |
Fields inherited from class org.jfugue.PatternTransformer |
---|
returnPattern |
Constructor Summary | |
---|---|
DurationPatternTransformer()
Instantiates a new DurationPatternTransformer object. |
|
DurationPatternTransformer(double delta)
Instantiates a new DurationPatternTransformer object, given a value by which to multiply the duration |
Method Summary | |
---|---|
java.lang.String |
getDescription()
Indicates what this PatternTransformer does. |
java.lang.String |
getParameters()
Returns a string declaring what variables DurationPatternTransformer can use to perform the transformation. |
void |
noteEvent(Note note)
Transforms the given note |
void |
parallelNoteEvent(Note note)
Transforms the given note |
void |
sequentialNoteEvent(Note note)
Transforms the given note |
Methods inherited from class org.jfugue.PatternTransformer |
---|
channelPressureEvent, controllerEvent, getParameter, instrumentEvent, keySignatureEvent, layerEvent, measureEvent, pitchBendEvent, polyphonicPressureEvent, putParameter, tempoEvent, timeEvent, transform, voiceEvent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String FACTOR
Constructor Detail |
---|
public DurationPatternTransformer()
public DurationPatternTransformer(double delta)
Method Detail |
---|
public java.lang.String getParameters()
DurationPatternTransformer requires the following:
'factor' - Double - Factor by which to multiply the existing duration of
a note. Greater than 1.0 produces longer notes, less than 1.0 produces shorter notes. Default is 1.0
getParameters
in class PatternTransformer
public java.lang.String getDescription()
PatternTransformer
getDescription
in class PatternTransformer
public void noteEvent(Note note)
noteEvent
in interface ParserListener
noteEvent
in class PatternTransformer
note
- the event that has been parsedNote
public void sequentialNoteEvent(Note note)
sequentialNoteEvent
in interface ParserListener
sequentialNoteEvent
in class PatternTransformer
note
- the event that has been parsedNote
public void parallelNoteEvent(Note note)
parallelNoteEvent
in interface ParserListener
parallelNoteEvent
in class PatternTransformer
note
- the event that has been parsedNote
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |