jmsltutorial
Class ConvergeToMeanTransform

java.lang.Object
  extended by com.softsynth.jmsl.score.UnaryCopyBufferTransform
      extended by jmsltutorial.ConvergeToMeanTransform

public class ConvergeToMeanTransform
extends UnaryCopyBufferTransform

Calculate the mean pitch of all notes in the copy buffer.
Set the pitch of each according to the position in the buffer: early notes changed minimally, later notes attracted maximally to mean.

Author:
Nick Didkovsky, copyright 2000 Nick Didkovsky, all right reserved

Field Summary
 
Fields inherited from class com.softsynth.jmsl.score.UnaryCopyBufferTransform
copyright
 
Constructor Summary
ConvergeToMeanTransform()
           
 
Method Summary
 void operate(CopyBuffer copyBuffer)
          Implement this method to do whatever you want to the Vector of Note in copyBuffer
 
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
 

Constructor Detail

ConvergeToMeanTransform

public ConvergeToMeanTransform()
Method Detail

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