Class Sound

java.lang.Object
org.audiveris.proxymusic.Sound

public class Sound extends Object
The sound element contains general playback parameters. They can stand alone within a part/measure, or be a component element within a direction. Tempo is expressed in quarter notes per minute. If 0, the sound-generating program should prompt the user at the time of compiling a sound (MIDI) file. Dynamics (or MIDI velocity) are expressed as a percentage of the default forte value (90 for MIDI 1.0). Dacapo indicates to go back to the beginning of the movement. When used it always has the value "yes". Segno and dalsegno are used for backwards jumps to a segno sign; coda and tocoda are used for forward jumps to a coda sign. If there are multiple jumps, the value of these parameters can be used to name and distinguish them. If segno or coda is used, the divisions attribute can also be used to indicate the number of divisions per quarter note. Otherwise sound and MIDI generating programs may have to recompute this. By default, a dalsegno or dacapo attribute indicates that the jump should occur the first time through, while a tocoda attribute indicates the jump should occur the second time through. The time that jumps occur can be changed by using the time-only attribute. The forward-repeat attribute indicates that a forward repeat sign is implied but not displayed. It is used for example in two-part forms with repeats, such as a minuet and trio where no repeat is displayed at the start of the trio. This usually occurs after a barline. When used it always has the value of "yes". The fine attribute follows the final note or rest in a movement with a da capo or dal segno direction. If numeric, the value represents the actual duration of the final note or rest, which can be ambiguous in written notation and different among parts and voices. The value may also be "yes" to indicate no change to the final duration. If the sound element applies only particular times through a repeat, the time-only attribute indicates which times to apply the sound element. Pizzicato in a sound element effects all following notes. Yes indicates pizzicato, no indicates arco. The pan and elevation attributes are deprecated in Version 2.0. The pan and elevation elements in the midi-instrument element should be used instead. The meaning of the pan and elevation attributes is the same as for the pan and elevation elements. If both are present, the mid-instrument elements take priority. The damper-pedal, soft-pedal, and sostenuto-pedal attributes effect playback of the three common piano pedals and their MIDI controller equivalents. The yes value indicates the pedal is depressed; no indicates the pedal is released. A numeric value from 0 to 100 may also be used for half pedaling. This value is the percentage that the pedal is depressed. A value of 0 is equivalent to no, and a value of 100 is equivalent to yes. Instrument changes, MIDI devices, MIDI instruments, and playback techniques are changed using the instrument-change, midi-device, midi-instrument, and play elements. When there are multiple instances of these elements, they should be grouped together by instrument using the id attribute values. The offset element is used to indicate that the sound takes place offset from the current score position. If the sound element is a child of a direction element, the sound offset element overrides the direction offset element if both elements are present. Note that the offset reflects the intended musical position for the change in sound. It should not be used to compensate for latency issues in particular hardware configurations.

Java class for sound complex type.

The following schema fragment specifies the expected content contained within this class.

 <complexType name="sound">
   <complexContent>
     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
       <sequence>
         <sequence maxOccurs="unbounded" minOccurs="0">
           <element name="instrument-change" type="{}instrument-change" minOccurs="0"/>
           <element name="midi-device" type="{}midi-device" minOccurs="0"/>
           <element name="midi-instrument" type="{}midi-instrument" minOccurs="0"/>
           <element name="play" type="{}play" minOccurs="0"/>
         </sequence>
         <element name="swing" type="{}swing" minOccurs="0"/>
         <element name="offset" type="{}offset" minOccurs="0"/>
       </sequence>
       <attGroup ref="{}optional-unique-id"/>
       <attribute name="tempo" type="{}non-negative-decimal" />
       <attribute name="dynamics" type="{}non-negative-decimal" />
       <attribute name="dacapo" type="{}yes-no" />
       <attribute name="segno" type="{http://www.w3.org/2001/XMLSchema}token" />
       <attribute name="dalsegno" type="{http://www.w3.org/2001/XMLSchema}token" />
       <attribute name="coda" type="{http://www.w3.org/2001/XMLSchema}token" />
       <attribute name="tocoda" type="{http://www.w3.org/2001/XMLSchema}token" />
       <attribute name="divisions" type="{}divisions" />
       <attribute name="forward-repeat" type="{}yes-no" />
       <attribute name="fine" type="{http://www.w3.org/2001/XMLSchema}token" />
       <attribute name="time-only" type="{}time-only" />
       <attribute name="pizzicato" type="{}yes-no" />
       <attribute name="pan" type="{}rotation-degrees" />
       <attribute name="elevation" type="{}rotation-degrees" />
       <attribute name="damper-pedal" type="{}yes-no-number" />
       <attribute name="soft-pedal" type="{}yes-no-number" />
       <attribute name="sostenuto-pedal" type="{}yes-no-number" />
     </restriction>
   </complexContent>
 </complexType>
 
  • Field Details

    • instrumentChangeAndMidiDeviceAndMidiInstrument

      protected List<Object> instrumentChangeAndMidiDeviceAndMidiInstrument
    • swing

      protected Swing swing
    • offset

      protected Offset offset
    • tempo

      protected BigDecimal tempo
    • dynamics

      protected BigDecimal dynamics
    • dacapo

      protected YesNo dacapo
    • segno

      protected String segno
    • dalsegno

      protected String dalsegno
    • coda

      protected String coda
    • tocoda

      protected String tocoda
    • divisions

      protected BigDecimal divisions
    • forwardRepeat

      protected YesNo forwardRepeat
    • fine

      protected String fine
    • timeOnly

      protected String timeOnly
    • pizzicato

      protected YesNo pizzicato
    • pan

      protected BigDecimal pan
    • elevation

      protected BigDecimal elevation
    • damperPedal

      protected String damperPedal
    • softPedal

      protected String softPedal
    • sostenutoPedal

      protected String sostenutoPedal
    • id

      protected String id
  • Constructor Details

    • Sound

      public Sound()
  • Method Details

    • getInstrumentChangeAndMidiDeviceAndMidiInstrument

      public List<Object> getInstrumentChangeAndMidiDeviceAndMidiInstrument()
      Gets the value of the instrumentChangeAndMidiDeviceAndMidiInstrument property.

      This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a set method for the instrumentChangeAndMidiDeviceAndMidiInstrument property.

      For example, to add a new item, do as follows:

          getInstrumentChangeAndMidiDeviceAndMidiInstrument().add(newItem);
       

      Objects of the following type(s) are allowed in the list InstrumentChange MidiDevice MidiInstrument Play

    • getSwing

      public Swing getSwing()
      Gets the value of the swing property.
      Returns:
      possible object is Swing
    • setSwing

      public void setSwing(Swing value)
      Sets the value of the swing property.
      Parameters:
      value - allowed object is Swing
    • getOffset

      public Offset getOffset()
      Gets the value of the offset property.
      Returns:
      possible object is Offset
    • setOffset

      public void setOffset(Offset value)
      Sets the value of the offset property.
      Parameters:
      value - allowed object is Offset
    • getTempo

      public BigDecimal getTempo()
      Gets the value of the tempo property.
      Returns:
      possible object is BigDecimal
    • setTempo

      public void setTempo(BigDecimal value)
      Sets the value of the tempo property.
      Parameters:
      value - allowed object is BigDecimal
    • getDynamics

      public BigDecimal getDynamics()
      Gets the value of the dynamics property.
      Returns:
      possible object is BigDecimal
    • setDynamics

      public void setDynamics(BigDecimal value)
      Sets the value of the dynamics property.
      Parameters:
      value - allowed object is BigDecimal
    • getDacapo

      public YesNo getDacapo()
      Gets the value of the dacapo property.
      Returns:
      possible object is YesNo
    • setDacapo

      public void setDacapo(YesNo value)
      Sets the value of the dacapo property.
      Parameters:
      value - allowed object is YesNo
    • getSegno

      public String getSegno()
      Gets the value of the segno property.
      Returns:
      possible object is String
    • setSegno

      public void setSegno(String value)
      Sets the value of the segno property.
      Parameters:
      value - allowed object is String
    • getDalsegno

      public String getDalsegno()
      Gets the value of the dalsegno property.
      Returns:
      possible object is String
    • setDalsegno

      public void setDalsegno(String value)
      Sets the value of the dalsegno property.
      Parameters:
      value - allowed object is String
    • getCoda

      public String getCoda()
      Gets the value of the coda property.
      Returns:
      possible object is String
    • setCoda

      public void setCoda(String value)
      Sets the value of the coda property.
      Parameters:
      value - allowed object is String
    • getTocoda

      public String getTocoda()
      Gets the value of the tocoda property.
      Returns:
      possible object is String
    • setTocoda

      public void setTocoda(String value)
      Sets the value of the tocoda property.
      Parameters:
      value - allowed object is String
    • getDivisions

      public BigDecimal getDivisions()
      Gets the value of the divisions property.
      Returns:
      possible object is BigDecimal
    • setDivisions

      public void setDivisions(BigDecimal value)
      Sets the value of the divisions property.
      Parameters:
      value - allowed object is BigDecimal
    • getForwardRepeat

      public YesNo getForwardRepeat()
      Gets the value of the forwardRepeat property.
      Returns:
      possible object is YesNo
    • setForwardRepeat

      public void setForwardRepeat(YesNo value)
      Sets the value of the forwardRepeat property.
      Parameters:
      value - allowed object is YesNo
    • getFine

      public String getFine()
      Gets the value of the fine property.
      Returns:
      possible object is String
    • setFine

      public void setFine(String value)
      Sets the value of the fine property.
      Parameters:
      value - allowed object is String
    • getTimeOnly

      public String getTimeOnly()
      Gets the value of the timeOnly property.
      Returns:
      possible object is String
    • setTimeOnly

      public void setTimeOnly(String value)
      Sets the value of the timeOnly property.
      Parameters:
      value - allowed object is String
    • getPizzicato

      public YesNo getPizzicato()
      Gets the value of the pizzicato property.
      Returns:
      possible object is YesNo
    • setPizzicato

      public void setPizzicato(YesNo value)
      Sets the value of the pizzicato property.
      Parameters:
      value - allowed object is YesNo
    • getPan

      public BigDecimal getPan()
      Gets the value of the pan property.
      Returns:
      possible object is BigDecimal
    • setPan

      public void setPan(BigDecimal value)
      Sets the value of the pan property.
      Parameters:
      value - allowed object is BigDecimal
    • getElevation

      public BigDecimal getElevation()
      Gets the value of the elevation property.
      Returns:
      possible object is BigDecimal
    • setElevation

      public void setElevation(BigDecimal value)
      Sets the value of the elevation property.
      Parameters:
      value - allowed object is BigDecimal
    • getDamperPedal

      public String getDamperPedal()
      Gets the value of the damperPedal property.
      Returns:
      possible object is String
    • setDamperPedal

      public void setDamperPedal(String value)
      Sets the value of the damperPedal property.
      Parameters:
      value - allowed object is String
    • getSoftPedal

      public String getSoftPedal()
      Gets the value of the softPedal property.
      Returns:
      possible object is String
    • setSoftPedal

      public void setSoftPedal(String value)
      Sets the value of the softPedal property.
      Parameters:
      value - allowed object is String
    • getSostenutoPedal

      public String getSostenutoPedal()
      Gets the value of the sostenutoPedal property.
      Returns:
      possible object is String
    • setSostenutoPedal

      public void setSostenutoPedal(String value)
      Sets the value of the sostenutoPedal property.
      Parameters:
      value - allowed object is String
    • getId

      public String getId()
      Gets the value of the id property.
      Returns:
      possible object is String
    • setId

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