Class NoteJustifier

java.lang.Object
com.softsynth.jmsl.score.justify.NoteJustifier

public class NoteJustifier
extends java.lang.Object
Prepare a Measure of Notes for Justifier, pass to Justifer and justify them.
Justification algorithm from D. Blostein and L. Haken, "Justification of Printed Music," Communications of the ACM, Vol. 34, No. 3, March 1991, pp. 88-99.
Author:
Nick Didkovsky, (c) 2005 Nick Didkovsky, nick@didkovsky.com
  • Field Summary

    Fields
    Modifier and Type Field Description
    static double MIN_SPACE_A_NOTE_NEEDS  
  • Constructor Summary

    Constructors
    Constructor Description
    NoteJustifier​(Measure measure)  
  • Method Summary

    Modifier and Type Method Description
    static double getTextualSpacingAfterNote​(Note note)  
    static double getTextualSpacingBeforeNote​(Note note)  
    void justify()  

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • MIN_SPACE_A_NOTE_NEEDS

      public static final double MIN_SPACE_A_NOTE_NEEDS
      See Also:
      Constant Field Values
  • Constructor Details

    • NoteJustifier

      public NoteJustifier​(Measure measure)
  • Method Details

    • justify

      public void justify()
    • getTextualSpacingAfterNote

      public static double getTextualSpacingAfterNote​(Note note)
      Returns:
      spacing required AFTER notehead (like for dot or double dot). Not related to duration. Just textual, like laying out a letter of an alphabet
    • getTextualSpacingBeforeNote

      public static double getTextualSpacingBeforeNote​(Note note)
      Returns:
      spacing required BEFORE notehead (like for accidental)