JMSL Tutorial: JScore
Binary Copy Buffer Transforms
Recall that JScore support two kinds of transforms:
- Unary Copy Buffer Transforms
- Binary Copy Buffer Transforms
In the previous tutorials, we saw an example
of Unary Copy Buffer Transform, and we designed our own.
This tutorial demonstrates a Binary Copy Buffer Transform. Instead of operating on the Copy Buffer,
a Binary Copy Buffer Transform operates on two copy buffers, called Aux Buffer 1 and Aux Buffer 2.
It loads its operate() results into the Copy Buffer, from where it can be pasted back into the score.
We will demonstrate a Binary Copy Buffer Transform called Zipper Interleave. This transform alternately pulls a
note from Aux 1, then Aux 2, back and forth, loading them into the Copy Buffer for pasting. The result is a melody
that is a kind of zippered merging of the two sources. (This transform was inspired by waiting in one of two
converging lanes of traffic, trying to
get on the onramp of the FDR drive at 96th street in NYC. When it works best,
the two lanes merge to one lane in this zippered interleaving style)
IMPORTANT: After operating, we must use FreeFlow Paste, which ignores the staff and measure numbers of the notes in the
copy buffer, and pours them all into one staff.
Try it!
- In the ScoreFrame opened by this applet, select the melody in the first staff, and choose Edit -> Copy Special -> copy to aux buffer 1
- Now select the melody in the second staff, and choose choose Edit -> Copy Special -> copy to aux buffer 2
- From the Transforms menu, select Binary Copy Buffer Transforms -> Zipper Interleave
- Click in the third staff, and choose Edit -> Freeflow Paste
- You should now see the new melody, made up of the first two alternately "zippered" together
Source
View the applet source.
(C) 2000 Nick Didkovsky and Phil Burk, All Rights Reserved
JMSL is based upon HMSL (C) Phil Burk, Larry Polansky and David Rosenboom.