Class ZipperTransform
java.lang.Object
com.softsynth.jmsl.score.BinaryCopyBufferTransform
com.softsynth.jmsl.score.transforms.ZipperTransform
public class ZipperTransform extends BinaryCopyBufferTransform
ZipperTransform.
Operate on two copy buffers, send output to a third copyBuffer. Presumably, the third is Score.copyBuffer which is used by paste() JMSL Notation Project
Operate on two copy buffers, send output to a third copyBuffer. Presumably, the third is Score.copyBuffer which is used by paste() JMSL Notation Project
- Author:
- Nick Didkovsky, copyright 2000 Nick Didkovsky, all rights reserved
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
copyright
-
Constructor Summary
Constructors Constructor Description ZipperTransform()
-
Method Summary
Modifier and Type Method Description void
operate(CopyBuffer fromBuffer1, CopyBuffer fromBuffer2, CopyBuffer toBuffer)
Operate on CopyBuffer source1 & source2, sending result to CopyBuffer result.Methods inherited from class com.softsynth.jmsl.score.BinaryCopyBufferTransform
getName, setName
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
copyright
public static final java.lang.String copyright- See Also:
- Constant Field Values
-
-
Constructor Details
-
ZipperTransform
public ZipperTransform()
-
-
Method Details
-
operate
Operate on CopyBuffer source1 & source2, sending result to CopyBuffer result. Don't forget to result.removeAllElements() first!Example: // interleave every other element public void operate(CopyBuffer fromBuffer1, CopyBuffer fromBuffer2, CopyBuffer toBuffer) { toBuffer.removeAllElements(); Enumeration e1=fromBuffer1.elements(); Enumeration e2=fromBuffer2.elements(); while (e1.hasMoreElements() || e2.hasMoreElements()) { if (e1.hasMoreElements()) toBuffer.addElement(e1.nextElement()); if (e2.hasMoreElements()) toBuffer.addElement(e2.nextElement()); } }
- Specified by:
operate
in classBinaryCopyBufferTransform
-