Class Swing

java.lang.Object
org.audiveris.proxymusic.Swing

public class Swing extends Object
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 Details

    • straight

      protected Empty straight
    • first

      protected BigInteger first
    • second

      protected BigInteger second
    • swingType

      protected String swingType
    • swingStyle

      protected String swingStyle
  • Constructor Details

    • Swing

      public Swing()
  • Method Details

    • getStraight

      public Empty getStraight()
      Gets the value of the straight property.
      Returns:
      possible object is Empty
    • setStraight

      public void setStraight(Empty value)
      Sets the value of the straight property.
      Parameters:
      value - allowed object is Empty
    • getFirst

      public BigInteger getFirst()
      Gets the value of the first property.
      Returns:
      possible object is BigInteger
    • setFirst

      public void setFirst(BigInteger value)
      Sets the value of the first property.
      Parameters:
      value - allowed object is BigInteger
    • getSecond

      public BigInteger getSecond()
      Gets the value of the second property.
      Returns:
      possible object is BigInteger
    • setSecond

      public void setSecond(BigInteger value)
      Sets the value of the second property.
      Parameters:
      value - allowed object is BigInteger
    • getSwingType

      public String getSwingType()
      Gets the value of the swingType property.
      Returns:
      possible object is String
    • setSwingType

      public void setSwingType(String value)
      Sets the value of the swingType property.
      Parameters:
      value - allowed object is String
    • getSwingStyle

      public String getSwingStyle()
      Gets the value of the swingStyle property.
      Returns:
      possible object is String
    • setSwingStyle

      public void setSwingStyle(String value)
      Sets the value of the swingStyle property.
      Parameters:
      value - allowed object is String