com.softsynth.jmsl.score
Class UnaryCopyBufferTransform
java.lang.Object
com.softsynth.jmsl.score.UnaryCopyBufferTransform
- Direct Known Subclasses:
- ConvergeToMeanTransform, HocketTransform, RetrogradeTransform, ScrambleTransform
public abstract class UnaryCopyBufferTransform
- extends java.lang.Object
UnaryCopyBufferTransform.
Override operate() to do something to Notes in the copy buffer. See example
for retrograde below.
JMSL Notation Project
- Author:
- Nick Didkovsky, copyright 2000 Nick Didkovsky
Field Summary |
static java.lang.String |
copyright
|
Method Summary |
java.lang.String |
getName()
|
abstract void |
operate(CopyBuffer copyBuffer)
Implement this method to do whatever you want to the Vector of Note in
copyBuffer |
void |
setName(java.lang.String s)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
copyright
public static final java.lang.String copyright
- See Also:
- Constant Field Values
UnaryCopyBufferTransform
public UnaryCopyBufferTransform()
getName
public java.lang.String getName()
setName
public void setName(java.lang.String s)
operate
public abstract void operate(CopyBuffer copyBuffer)
- Implement this method to do whatever you want to the Vector of Note in
copyBuffer
Example:
// retrograde
public void operate(CopyBuffer copyBuffer) {
int start =0;
int end = copyBuffer.size()-1;
while (start < end) {
Object temp = copyBuffer.elementAt(start);
copyBuffer.setElementAt(copyBuffer.elementAt(end), start);
copyBuffer.setElementAt(temp, end);
start++;
end--;
}
}