Package org.audiveris.proxymusic
Class Swing
java.lang.Object
org.audiveris.proxymusic.Swing
The swing element specifies whether or not to use swing playback, where consecutive on-beat / off-beat eighth or 16th notes are played with unequal nominal durations.
The straight element specifies that no swing is present, so consecutive notes have equal durations.
The first and second elements are positive integers that specify the ratio between durations of consecutive notes. For example, a first element with a value of 2 and a second element with a value of 1 applied to eighth notes specifies a quarter note / eighth note tuplet playback, where the first note is twice as long as the second note. Ratios should be specified with the smallest integers possible. For example, a ratio of 6 to 4 should be specified as 3 to 2 instead.
The optional swing-type element specifies the note type, either eighth or 16th, to which the ratio is applied. The value is eighth if this element is not present.
The optional swing-style element is a string describing the style of swing used.
The swing element has no effect for playback of grace notes, notes where a type element is not present, and notes where the specified duration is different than the nominal value associated with the specified type. If a swung note has attack and release attributes, those values modify the swung playback.
Java class for swing complex type.
The following schema fragment specifies the expected content contained within this class.
<complexType name="swing">
<complexContent>
<restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
<sequence>
<choice>
<element name="straight" type="{}empty"/>
<sequence>
<element name="first" type="{http://www.w3.org/2001/XMLSchema}positiveInteger"/>
<element name="second" type="{http://www.w3.org/2001/XMLSchema}positiveInteger"/>
<element name="swing-type" type="{}swing-type-value" minOccurs="0"/>
</sequence>
</choice>
<element name="swing-style" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
</sequence>
</restriction>
</complexContent>
</complexType>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected BigIntegerprotected BigIntegerprotected Emptyprotected Stringprotected String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetFirst()Gets the value of the first property.Gets the value of the second property.Gets the value of the straight property.Gets the value of the swingStyle property.Gets the value of the swingType property.voidsetFirst(BigInteger value) Sets the value of the first property.voidsetSecond(BigInteger value) Sets the value of the second property.voidsetStraight(Empty value) Sets the value of the straight property.voidsetSwingStyle(String value) Sets the value of the swingStyle property.voidsetSwingType(String value) Sets the value of the swingType property.
-
Field Details
-
straight
-
first
-
second
-
swingType
-
swingStyle
-
-
Constructor Details
-
Swing
public Swing()
-
-
Method Details
-
getStraight
Gets the value of the straight property.- Returns:
- possible object is
Empty
-
setStraight
Sets the value of the straight property.- Parameters:
value- allowed object isEmpty
-
getFirst
Gets the value of the first property.- Returns:
- possible object is
BigInteger
-
setFirst
Sets the value of the first property.- Parameters:
value- allowed object isBigInteger
-
getSecond
Gets the value of the second property.- Returns:
- possible object is
BigInteger
-
setSecond
Sets the value of the second property.- Parameters:
value- allowed object isBigInteger
-
getSwingType
Gets the value of the swingType property.- Returns:
- possible object is
String
-
setSwingType
Sets the value of the swingType property.- Parameters:
value- allowed object isString
-
getSwingStyle
Gets the value of the swingStyle property.- Returns:
- possible object is
String
-
setSwingStyle
Sets the value of the swingStyle property.- Parameters:
value- allowed object isString
-