Class NotePropertiesTransform

  extended by com.softsynth.jmsl.score.NotePropertiesTransform
Direct Known Subclasses:
AccidentalPreferenceTransform, AltEnharmonicSpellingToggleTransform, AmplitudeTransform, BeamTransform, CrescTransform, DotTransform, DoubleTransform, DurationTransform, DynamicTransform, HalveTransform, HoldTransform, LyricLevelTransform, MarkTransform, NoteHeadTransform, OctavaTransform, RestToggleTransform, SlurTransform, TieTransform, TranspositionTransform, TupletTransform

public abstract class NotePropertiesTransform
extends java.lang.Object

Abstract superclass for Transforms that apply to the properties of Notes in Selection Buffer. Examples include transposition and beaming. Notes are left in place in their tracks after their properties are altered. You should provide a constructor that set"something unique" so that this can be put into a ScoreFrame Menu and show up with a meaningful name.

Nick Didkovsky , copyright 2000 Nick Didkovsky , all rights reserved

Field Summary
static java.lang.String copyright
Constructor Summary
Method Summary
 java.lang.String getName()
abstract  void operate(Score score, SelectionBuffer selectionBuffer)
          Implement this method to do something to the Notes in the SelectionBuffer.
 void setName(java.lang.String s)
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail


public static final java.lang.String copyright
See Also:
Constant Field Values
Constructor Detail


public NotePropertiesTransform()
Method Detail


public java.lang.String getName()


public void setName(java.lang.String s)


public abstract void operate(Score score,
                             SelectionBuffer selectionBuffer)
Implement this method to do something to the Notes in the SelectionBuffer. Operations are upon the Notes themselves, not a clone of the Notes. Be careful!
      // transpose pitch up an octave
      public void operate(SelectionBuffer selectionBuffer) {
      for (Enumeration e=selectionBuffer.elements(); e.hasMoreElements(); ) {
      Note note = (Note)e.nextElement();
      if (!note.isRest()) {
      // get pitch data, transpose it, and set it again
      // Use NoteFactory to recalculate staff level, accidental, and stem direction
      NoteFactory.setLevelPitch(note, note.getPitchData());