jmsltutorial
Class HocketTransform

java.lang.Object
  extended by com.softsynth.jmsl.score.UnaryCopyBufferTransform
      extended by 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
           
 
Constructor Summary
HocketTransform()
           
 
Method Summary
 double getHocketProbability()
           
 int getNumParts()
           
 void operate(CopyBuffer copyBuffer)
          Implement this method to do whatever you want to the Vector of Note in copyBuffer
 void setHocketProbability(double p)
           
 void setNumParts(int n)
           
 
Methods inherited from class com.softsynth.jmsl.score.UnaryCopyBufferTransform
getName, setName
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

copyright

public static final java.lang.String copyright
See Also:
Constant Field Values
Constructor Detail

HocketTransform

public HocketTransform()
Method Detail

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