com.softsynth.jmsl.score.transforms
Class RestToggleTransform

java.lang.Object
  extended by com.softsynth.jmsl.score.NotePropertiesTransform
      extended by com.softsynth.jmsl.score.transforms.RestToggleTransform

public class RestToggleTransform
extends NotePropertiesTransform

Toggle a note between rest and pitch

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

Field Summary
static java.lang.String copyright
           
 
Constructor Summary
RestToggleTransform()
           
 
Method Summary
 void operate(Score score, SelectionBuffer selectionBuffer)
          If a note is NOT a rest, make it a rest.
 
Methods inherited from class com.softsynth.jmsl.score.NotePropertiesTransform
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

RestToggleTransform

public RestToggleTransform()
Method Detail

operate

public void operate(Score score,
                    SelectionBuffer selectionBuffer)
If a note is NOT a rest, make it a rest. If it IS a rest, make it middle C. If it is a rest which used to be a note, then change it back to the original pitch. A Note is made into a rest by setting its pitch data to 0, followed by NoteFactory.updateFromPitch(note);

Specified by:
operate in class NotePropertiesTransform