org.jfugue.demo
Class IntervalPatternTransformer
java.lang.Object
|
+--org.jfugue.PatternTransformer
|
+--org.jfugue.demo.IntervalPatternTransformer
- All Implemented Interfaces:
- ParserListener
- public class IntervalPatternTransformer
- extends PatternTransformer
The IntervalPatternTransformer alters music by changing the interval, or step, for each
note. For example, a C5 (note 60) raised 3 steps would turn into a D#5 (note 63).
For general information on how Pattern Transformers work, refer to the JFugue
documentation.
- Version:
- 2.0
- Author:
- David Koelle
Field Summary |
static java.lang.String |
INTERVAL
Pass this String to putVariable, along with the interval by which you wish to alter the notes. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INTERVAL
public static final java.lang.String INTERVAL
- Pass this String to putVariable, along with the interval by which you wish to alter the notes.
IntervalPatternTransformer
public IntervalPatternTransformer()
- Instantiates a new IntervalPatternTransformer object. The default value by which
to increase the duration is 1.
getVariables
public java.lang.String getVariables()
- Returns a string declaring what variables IntervalPatternTransformer can use to perform the transformation.
IntervalPatternTransformer requires the following:
'interval' - Integer - Number of intervals by which to change each note, can be positive or negative. Default is 1.
- Overrides:
getVariables
in class PatternTransformer
getDescription
public java.lang.String getDescription()
- Description copied from class:
PatternTransformer
- Indicates what this PatternTransformer does.
- Overrides:
getDescription
in class PatternTransformer
- Following copied from class:
org.jfugue.PatternTransformer
- Returns:
- A String giving a quick description of this transformer
noteEvent
public void noteEvent(Note note)
- Transforms the given note
- Overrides:
noteEvent
in class PatternTransformer
- Following copied from interface:
org.jfugue.ParserListener
- Parameters:
note
- the event that has been parsed
sequentialNoteEvent
public void sequentialNoteEvent(Note note)
- Transforms the given note
- Overrides:
sequentialNoteEvent
in class PatternTransformer
- Following copied from interface:
org.jfugue.ParserListener
- Parameters:
note
- the event that has been parsed
parallelNoteEvent
public void parallelNoteEvent(Note note)
- Transforms the given note
- Overrides:
parallelNoteEvent
in class PatternTransformer
- Following copied from interface:
org.jfugue.ParserListener
- Parameters:
note
- the event that has been parsed