jmsltutorial
Class HocketTransform
java.lang.Object
com.softsynth.jmsl.score.UnaryCopyBufferTransform
jmsltutorial.HocketTransform
public class HocketTransform
- extends UnaryCopyBufferTransform
HocketTransform
- Author:
- Nick Didkovsky, copyright 2001 Nick Didkovsky, all rights reserved
Field Summary |
static java.lang.String |
copyright
|
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
HocketTransform
public HocketTransform()
setHocketProbability
public void setHocketProbability(double p)
getHocketProbability
public double getHocketProbability()
setNumParts
public void setNumParts(int n)
getNumParts
public int getNumParts()
operate
public void operate(CopyBuffer copyBuffer)
- Description copied from class:
UnaryCopyBufferTransform
- 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--;
}
}
- Specified by:
operate
in class UnaryCopyBufferTransform