opusplus.core.lilypond
Class LilypondPianoStaveAutoChanger
java.lang.Object
opusplus.core.lilypond.LilypondPianoStaveAutoChanger
-
public class LilypondPianoStaveAutoChanger
- extends java.lang.Object
-
Class encapsulating the piano stave 'auto' changing of Lilypond. We actually do it manually, from Lilypond's perspective, because we have slightly more control.
- Author:
- Adrian Marriott
Method Summary |
static void |
printAutoChange(java.io.PrintStream out, int[] pitches)
Passed the pitches of the current music element, this method will print out the necessary stave change strings to track pitches. |
static void |
reset(VoiceType voiceType)
Initializes the auto-changer to the default stave of the voice. |
static boolean |
straddlesThreshold(int[] pitches, int threshold)
Returns true if the pitches in the array 'straddle' the passed threshold pitch. |
static void |
untanglePianoVoices()
Untangles the voices in each piano stave. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LilypondPianoStaveAutoChanger
public LilypondPianoStaveAutoChanger()
reset
public static void reset(VoiceType voiceType)
-
Initializes the auto-changer to the default stave of the voice.
-
printAutoChange
public static void printAutoChange(java.io.PrintStream out,
int[] pitches)
-
Passed the pitches of the current music element, this method will print out the necessary stave change strings to track pitches.
-
untanglePianoVoices
public static void untanglePianoVoices()
-
Untangles the voices in each piano stave.
-
straddlesThreshold
public static boolean straddlesThreshold(int[] pitches,
int threshold)
-
Returns true if the pitches in the array 'straddle' the passed threshold pitch. This is true when the threshold pitch falls between the minimum and maximum value found in the pitches array. i.e. min(pitches) < threshold < max(pitches). If the threshold is equal to either the minimum or maximum then this function return false.
-
Copyright © 2005-2010 Adrian Marriott.
All Rights Reserved.