public class StemEnd extends Object
Modifier and Type | Field and Description |
---|---|
protected int |
flags
Number of flags
|
protected int |
leftLong
Number of long beams (going to the next stem) poiting to the left.
|
protected int |
leftShort
Number of stemlets poiting to the left.
|
protected int |
rightLong
Number of long beams (going to the next stem) poiting to the right.
|
protected int |
rightShort
Number of stemlets poiting to the right.
|
Constructor and Description |
---|
StemEnd(int leftLong,
int rightLong)
Constructor where "flags" and left and right beamlets default to 0.
|
StemEnd(int leftLong,
int leftShort,
int rightLong,
int rightShort)
Constructor where "flags" default to 0.
|
StemEnd(int flags,
int leftLong,
int leftShort,
int rightLong,
int rightShort)
Full constructor, setting all values.
|
Modifier and Type | Method and Description |
---|---|
StemEnd |
add(int leftLong,
int rightLong)
Return a new instance with field values increased by the parameter
with the corresponding name, otherwise unaltered.
|
StemEnd |
add(int leftLong,
int leftShort,
int rightLong,
int rightShort)
Return a new instance with field values increased by the parameter
with the corresponding name, otherwise unaltered.
|
StemEnd |
add(int flags,
int leftLong,
int leftShort,
int rightLong,
int rightShort)
Return a new instance with field values increased by the parameter
with the corresponding name, otherwise unaltered.
|
StemEnd |
cutDownLeft(int newLongs)
Iff current long left beams are more than "newLongs", then convert the difference
to short ones.
|
StemEnd |
cutDownRight(int newLongs)
Iff current long right beams are more than "newLongs", then convert the difference
to short ones.
|
int |
getEffectiveExponent()
Return the maximum number of left beams plus beamlets and right beams plus beamlets,
plus number of flags.
|
int |
getFlags()
Evident
|
int |
getLeftLong()
Evident
|
int |
getLeftShort()
Evident
|
int |
getRightLong()
Evident
|
int |
getRightShort()
Evident
|
String |
toString() |
protected final int flags
protected final int leftShort
protected final int leftLong
protected final int rightShort
protected final int rightLong
public StemEnd(int flags, int leftLong, int leftShort, int rightLong, int rightShort)
public StemEnd(int leftLong, int leftShort, int rightLong, int rightShort)
public StemEnd(int leftLong, int rightLong)
public StemEnd add(int flags, int leftLong, int leftShort, int rightLong, int rightShort)
public StemEnd add(int leftLong, int leftShort, int rightLong, int rightShort)
public StemEnd add(int leftLong, int rightLong)
public StemEnd cutDownLeft(int newLongs)
public StemEnd cutDownRight(int newLongs)
public int getFlags()
public int getLeftLong()
public int getLeftShort()
public int getRightLong()
public int getRightShort()
public int getEffectiveExponent()
r>=0
. If r>0
, then
power(2, -r-2)
is the base duration of the note symbol.