Package jmsltutorial
Class ConvergeToMeanTransform
java.lang.Object
com.softsynth.jmsl.score.UnaryCopyBufferTransform
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.
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
Constructors Constructor Description ConvergeToMeanTransform()
-
Method Summary
Modifier and Type Method Description void
operate(CopyBuffer copyBuffer)
Implement this method to do whatever you want to the Vector of Note in copyBufferMethods 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 Details
-
ConvergeToMeanTransform
public ConvergeToMeanTransform()
-
-
Method Details
-
operate
Description copied from class:UnaryCopyBufferTransform
Implement this method to do whatever you want to the Vector of Note in copyBufferExample: // 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 classUnaryCopyBufferTransform
-