Package org.audiveris.proxymusic
Class Sound
java.lang.Object
org.audiveris.proxymusic.Sound
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 Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected YesNoprotected Stringprotected Stringprotected BigDecimalprotected BigDecimalprotected BigDecimalprotected Stringprotected YesNoprotected Stringprotected Offsetprotected BigDecimalprotected YesNoprotected Stringprotected Stringprotected Stringprotected Swingprotected BigDecimalprotected Stringprotected String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetCoda()Gets the value of the coda property.Gets the value of the dacapo property.Gets the value of the dalsegno property.Gets the value of the damperPedal property.Gets the value of the divisions property.Gets the value of the dynamics property.Gets the value of the elevation property.getFine()Gets the value of the fine property.Gets the value of the forwardRepeat property.getId()Gets the value of the id property.Gets the value of the instrumentChangeAndMidiDeviceAndMidiInstrument property.Gets the value of the offset property.getPan()Gets the value of the pan property.Gets the value of the pizzicato property.getSegno()Gets the value of the segno property.Gets the value of the softPedal property.Gets the value of the sostenutoPedal property.getSwing()Gets the value of the swing property.getTempo()Gets the value of the tempo property.Gets the value of the timeOnly property.Gets the value of the tocoda property.voidSets the value of the coda property.voidSets the value of the dacapo property.voidsetDalsegno(String value) Sets the value of the dalsegno property.voidsetDamperPedal(String value) Sets the value of the damperPedal property.voidsetDivisions(BigDecimal value) Sets the value of the divisions property.voidsetDynamics(BigDecimal value) Sets the value of the dynamics property.voidsetElevation(BigDecimal value) Sets the value of the elevation property.voidSets the value of the fine property.voidsetForwardRepeat(YesNo value) Sets the value of the forwardRepeat property.voidSets the value of the id property.voidSets the value of the offset property.voidsetPan(BigDecimal value) Sets the value of the pan property.voidsetPizzicato(YesNo value) Sets the value of the pizzicato property.voidSets the value of the segno property.voidsetSoftPedal(String value) Sets the value of the softPedal property.voidsetSostenutoPedal(String value) Sets the value of the sostenutoPedal property.voidSets the value of the swing property.voidsetTempo(BigDecimal value) Sets the value of the tempo property.voidsetTimeOnly(String value) Sets the value of the timeOnly property.voidSets the value of the tocoda property.
-
Field Details
-
instrumentChangeAndMidiDeviceAndMidiInstrument
-
swing
-
offset
-
tempo
-
dynamics
-
dacapo
-
segno
-
dalsegno
-
coda
-
tocoda
-
divisions
-
forwardRepeat
-
fine
-
timeOnly
-
pizzicato
-
pan
-
elevation
-
damperPedal
-
softPedal
-
sostenutoPedal
-
id
-
-
Constructor Details
-
Sound
public Sound()
-
-
Method Details
-
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
setmethod 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
InstrumentChangeMidiDeviceMidiInstrumentPlay -
getSwing
Gets the value of the swing property.- Returns:
- possible object is
Swing
-
setSwing
Sets the value of the swing property.- Parameters:
value- allowed object isSwing
-
getOffset
Gets the value of the offset property.- Returns:
- possible object is
Offset
-
setOffset
Sets the value of the offset property.- Parameters:
value- allowed object isOffset
-
getTempo
Gets the value of the tempo property.- Returns:
- possible object is
BigDecimal
-
setTempo
Sets the value of the tempo property.- Parameters:
value- allowed object isBigDecimal
-
getDynamics
Gets the value of the dynamics property.- Returns:
- possible object is
BigDecimal
-
setDynamics
Sets the value of the dynamics property.- Parameters:
value- allowed object isBigDecimal
-
getDacapo
Gets the value of the dacapo property.- Returns:
- possible object is
YesNo
-
setDacapo
Sets the value of the dacapo property.- Parameters:
value- allowed object isYesNo
-
getSegno
Gets the value of the segno property.- Returns:
- possible object is
String
-
setSegno
Sets the value of the segno property.- Parameters:
value- allowed object isString
-
getDalsegno
Gets the value of the dalsegno property.- Returns:
- possible object is
String
-
setDalsegno
Sets the value of the dalsegno property.- Parameters:
value- allowed object isString
-
getCoda
Gets the value of the coda property.- Returns:
- possible object is
String
-
setCoda
Sets the value of the coda property.- Parameters:
value- allowed object isString
-
getTocoda
Gets the value of the tocoda property.- Returns:
- possible object is
String
-
setTocoda
Sets the value of the tocoda property.- Parameters:
value- allowed object isString
-
getDivisions
Gets the value of the divisions property.- Returns:
- possible object is
BigDecimal
-
setDivisions
Sets the value of the divisions property.- Parameters:
value- allowed object isBigDecimal
-
getForwardRepeat
Gets the value of the forwardRepeat property.- Returns:
- possible object is
YesNo
-
setForwardRepeat
Sets the value of the forwardRepeat property.- Parameters:
value- allowed object isYesNo
-
getFine
Gets the value of the fine property.- Returns:
- possible object is
String
-
setFine
Sets the value of the fine property.- Parameters:
value- allowed object isString
-
getTimeOnly
Gets the value of the timeOnly property.- Returns:
- possible object is
String
-
setTimeOnly
Sets the value of the timeOnly property.- Parameters:
value- allowed object isString
-
getPizzicato
Gets the value of the pizzicato property.- Returns:
- possible object is
YesNo
-
setPizzicato
Sets the value of the pizzicato property.- Parameters:
value- allowed object isYesNo
-
getPan
Gets the value of the pan property.- Returns:
- possible object is
BigDecimal
-
setPan
Sets the value of the pan property.- Parameters:
value- allowed object isBigDecimal
-
getElevation
Gets the value of the elevation property.- Returns:
- possible object is
BigDecimal
-
setElevation
Sets the value of the elevation property.- Parameters:
value- allowed object isBigDecimal
-
getDamperPedal
Gets the value of the damperPedal property.- Returns:
- possible object is
String
-
setDamperPedal
Sets the value of the damperPedal property.- Parameters:
value- allowed object isString
-
getSoftPedal
Gets the value of the softPedal property.- Returns:
- possible object is
String
-
setSoftPedal
Sets the value of the softPedal property.- Parameters:
value- allowed object isString
-
getSostenutoPedal
Gets the value of the sostenutoPedal property.- Returns:
- possible object is
String
-
setSostenutoPedal
Sets the value of the sostenutoPedal property.- Parameters:
value- allowed object isString
-
getId
Gets the value of the id property.- Returns:
- possible object is
String
-
setId
Sets the value of the id property.- Parameters:
value- allowed object isString
-