Class StemInfoOverrideTransform

java.lang.Object
com.softsynth.jmsl.score.NotePropertiesTransform
com.softsynth.jmsl.score.transforms.StemInfoOverrideTransform

public class StemInfoOverrideTransform
extends NotePropertiesTransform
Override stem direction info 0 = stem_none 1 = stem up 2 = stem down -1 = clear stem override and let NoteFactory calculate it from note's level
Author:
Nick Didkovsky , copyright 2000 Nick Didkovsky , all rights reserved
  • Field Summary

    Fields
    Modifier and Type Field Description
    static int CLEAR  
    static java.lang.String copyright  
  • Constructor Summary

    Constructors
    Constructor Description
    StemInfoOverrideTransform​(int stemInfo)  
  • Method Summary

    Modifier and Type Method Description
    void operate​(Score score, SelectionBuffer selectionBuffer)
    Implement this method to do something to the Notes in the SelectionBuffer.

    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 Details

  • Constructor Details

    • StemInfoOverrideTransform

      public StemInfoOverrideTransform​(int stemInfo)
  • Method Details

    • operate

      public void operate​(Score score, SelectionBuffer selectionBuffer)
      Description copied from class: NotePropertiesTransform
      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!
       
       
            Example:
       
            // 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
            note.setPitchData(note.getPitchData()+12);
            // Use NoteFactory to recalculate staff level, accidental, and stem direction
            NoteFactory.setLevelPitch(note, note.getPitchData());
            }
            }
            }
            
       
      Specified by:
      operate in class NotePropertiesTransform