Class Note
Notes are the most common type of MusicXML data. The MusicXML format distinguishes between elements used for sound information and elements used for notation information (e.g., tie is used for sound, tied for notation). Thus grace notes do not have a duration element. Cue notes have a duration element, as do forward elements, but no tie elements. Having these two types of information available can make interchange easier, as some programs handle one type of information more readily than the other. The print-leger attribute is used to indicate whether leger lines are printed. Notes without leger lines are used to indicate indeterminate high and low notes. By default, it is set to yes. If print-object is set to no, print-leger is interpreted to also be set to no if not present. This attribute is ignored for rests. The dynamics and end-dynamics attributes correspond to MIDI 1.0's Note On and Note Off velocities, respectively. They are expressed in terms of percentages of the default forte value (90 for MIDI 1.0). The attack and release attributes are used to alter the starting and stopping time of the note from when it would otherwise occur based on the flow of durations - information that is specific to a performance. They are expressed in terms of divisions, either positive or negative. A note that starts a tie should not have a release attribute, and a note that stops a tie should not have an attack attribute. The attack and release attributes are independent of each other. The attack attribute only changes the starting time of a note, and the release attribute only changes the stopping time of a note. If a note is played only particular times through a repeat, the time-only attribute shows which times to play the note. The pizzicato attribute is used when just this note is sounded pizzicato, vs. the pizzicato element which changes overall playback between pizzicato and arco.
Java class for note complex type.
The following schema fragment specifies the expected content contained within this class.
<complexType name="note">
<complexContent>
<restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
<sequence>
<sequence>
<element name="grace" type="{}grace" minOccurs="0"/>
<element name="cue" type="{}empty" minOccurs="0"/>
<group ref="{}full-note"/>
<group ref="{}duration" minOccurs="0"/>
<element name="tie" type="{}tie" maxOccurs="2" minOccurs="0"/>
</sequence>
<element name="instrument" type="{}instrument" maxOccurs="unbounded" minOccurs="0"/>
<group ref="{}editorial-voice"/>
<element name="type" type="{}note-type" minOccurs="0"/>
<element name="dot" type="{}empty-placement" maxOccurs="unbounded" minOccurs="0"/>
<element name="accidental" type="{}accidental" minOccurs="0"/>
<element name="time-modification" type="{}time-modification" minOccurs="0"/>
<element name="stem" type="{}stem" minOccurs="0"/>
<element name="notehead" type="{}notehead" minOccurs="0"/>
<element name="notehead-text" type="{}notehead-text" minOccurs="0"/>
<group ref="{}staff" minOccurs="0"/>
<element name="beam" type="{}beam" maxOccurs="8" minOccurs="0"/>
<element name="notations" type="{}notations" maxOccurs="unbounded" minOccurs="0"/>
<element name="lyric" type="{}lyric" maxOccurs="unbounded" minOccurs="0"/>
<element name="play" type="{}play" minOccurs="0"/>
<element name="listen" type="{}listen" minOccurs="0"/>
</sequence>
<attGroup ref="{}font"/>
<attGroup ref="{}optional-unique-id"/>
<attGroup ref="{}printout"/>
<attGroup ref="{}x-position"/>
<attGroup ref="{}color"/>
<attribute name="print-leger" type="{}yes-no" />
<attribute name="dynamics" type="{}non-negative-decimal" />
<attribute name="end-dynamics" type="{}non-negative-decimal" />
<attribute name="attack" type="{}divisions" />
<attribute name="release" type="{}divisions" />
<attribute name="time-only" type="{}time-only" />
<attribute name="pizzicato" type="{}yes-no" />
</restriction>
</complexContent>
</complexType>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Accidentalprotected BigDecimalprotected Emptyprotected Stringprotected Emptyprotected BigDecimalprotected BigDecimalprotected List<EmptyPlacement>protected BigDecimalprotected BigDecimalprotected BigDecimalprotected Stringprotected Stringprotected FontStyleprotected FontWeightprotected FormattedTextprotected Graceprotected Stringprotected List<Instrument>protected Levelprotected Listenprotected Noteheadprotected NoteheadTextprotected Pitchprotected YesNoprotected Playprotected YesNoprotected YesNoprotected YesNoprotected YesNoprotected YesNoprotected BigDecimalprotected BigDecimalprotected BigDecimalprotected Restprotected BigIntegerprotected Stemprotected TimeModificationprotected Stringprotected NoteTypeprotected Unpitchedprotected String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the value of the accidental property.Gets the value of the attack property.getBeam()Gets the value of the beam property.getChord()Gets the value of the chord property.getColor()Gets the value of the color property.getCue()Gets the value of the cue property.Gets the value of the defaultX property.Gets the value of the defaultY property.getDot()Gets the value of the dot property.Gets the value of the duration property.Gets the value of the dynamics property.Gets the value of the endDynamics property.Gets the value of the fontFamily property.Gets the value of the fontSize property.Gets the value of the fontStyle property.Gets the value of the fontWeight property.Gets the value of the footnote property.getGrace()Gets the value of the grace property.getId()Gets the value of the id property.Gets the value of the instrument property.getLevel()Gets the value of the level property.Gets the value of the listen property.getLyric()Gets the value of the lyric property.Gets the value of the notations property.Gets the value of the notehead property.Gets the value of the noteheadText property.getPitch()Gets the value of the pitch property.Gets the value of the pizzicato property.getPlay()Gets the value of the play property.Gets the value of the printDot property.Gets the value of the printLeger property.Gets the value of the printLyric property.Gets the value of the printObject property.Gets the value of the printSpacing property.Gets the value of the relativeX property.Gets the value of the relativeY property.Gets the value of the release property.getRest()Gets the value of the rest property.getStaff()Gets the value of the staff property.getStem()Gets the value of the stem property.getTie()Gets the value of the tie property.Gets the value of the timeModification property.Gets the value of the timeOnly property.getType()Gets the value of the type property.Gets the value of the unpitched property.getVoice()Gets the value of the voice property.voidsetAccidental(Accidental value) Sets the value of the accidental property.voidsetAttack(BigDecimal value) Sets the value of the attack property.voidSets the value of the chord property.voidSets the value of the color property.voidSets the value of the cue property.voidsetDefaultX(BigDecimal value) Sets the value of the defaultX property.voidsetDefaultY(BigDecimal value) Sets the value of the defaultY property.voidsetDuration(BigDecimal value) Sets the value of the duration property.voidsetDynamics(BigDecimal value) Sets the value of the dynamics property.voidsetEndDynamics(BigDecimal value) Sets the value of the endDynamics property.voidsetFontFamily(String value) Sets the value of the fontFamily property.voidsetFontSize(String value) Sets the value of the fontSize property.voidsetFontStyle(FontStyle value) Sets the value of the fontStyle property.voidsetFontWeight(FontWeight value) Sets the value of the fontWeight property.voidsetFootnote(FormattedText value) Sets the value of the footnote property.voidSets the value of the grace property.voidSets the value of the id property.voidSets the value of the level property.voidSets the value of the listen property.voidsetNotehead(Notehead value) Sets the value of the notehead property.voidsetNoteheadText(NoteheadText value) Sets the value of the noteheadText property.voidSets the value of the pitch property.voidsetPizzicato(YesNo value) Sets the value of the pizzicato property.voidSets the value of the play property.voidsetPrintDot(YesNo value) Sets the value of the printDot property.voidsetPrintLeger(YesNo value) Sets the value of the printLeger property.voidsetPrintLyric(YesNo value) Sets the value of the printLyric property.voidsetPrintObject(YesNo value) Sets the value of the printObject property.voidsetPrintSpacing(YesNo value) Sets the value of the printSpacing property.voidsetRelativeX(BigDecimal value) Sets the value of the relativeX property.voidsetRelativeY(BigDecimal value) Sets the value of the relativeY property.voidsetRelease(BigDecimal value) Sets the value of the release property.voidSets the value of the rest property.voidsetStaff(BigInteger value) Sets the value of the staff property.voidSets the value of the stem property.voidSets the value of the timeModification property.voidsetTimeOnly(String value) Sets the value of the timeOnly property.voidSets the value of the type property.voidsetUnpitched(Unpitched value) Sets the value of the unpitched property.voidSets the value of the voice property.
-
Field Details
-
grace
-
cue
-
chord
-
pitch
-
unpitched
-
rest
-
duration
-
tie
-
instrument
-
footnote
-
level
-
voice
-
type
-
dot
-
accidental
-
timeModification
-
stem
-
notehead
-
noteheadText
-
staff
-
beam
-
notations
-
lyric
-
play
-
listen
-
printLeger
-
dynamics
-
endDynamics
-
attack
-
release
-
timeOnly
-
pizzicato
-
fontFamily
-
fontStyle
-
fontSize
-
fontWeight
-
id
-
printDot
-
printLyric
-
printSpacing
-
printObject
-
defaultX
-
defaultY
-
relativeX
-
relativeY
-
color
-
-
Constructor Details
-
Note
public Note()
-
-
Method Details
-
getGrace
Gets the value of the grace property.- Returns:
- possible object is
Grace
-
setGrace
Sets the value of the grace property.- Parameters:
value- allowed object isGrace
-
getCue
Gets the value of the cue property.- Returns:
- possible object is
Empty
-
setCue
Sets the value of the cue property.- Parameters:
value- allowed object isEmpty
-
getChord
Gets the value of the chord property.- Returns:
- possible object is
Empty
-
setChord
Sets the value of the chord property.- Parameters:
value- allowed object isEmpty
-
getPitch
Gets the value of the pitch property.- Returns:
- possible object is
Pitch
-
setPitch
Sets the value of the pitch property.- Parameters:
value- allowed object isPitch
-
getUnpitched
Gets the value of the unpitched property.- Returns:
- possible object is
Unpitched
-
setUnpitched
Sets the value of the unpitched property.- Parameters:
value- allowed object isUnpitched
-
getRest
Gets the value of the rest property.- Returns:
- possible object is
Rest
-
setRest
Sets the value of the rest property.- Parameters:
value- allowed object isRest
-
getDuration
Gets the value of the duration property.- Returns:
- possible object is
BigDecimal
-
setDuration
Sets the value of the duration property.- Parameters:
value- allowed object isBigDecimal
-
getTie
Gets the value of the tie 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 tie property.For example, to add a new item, do as follows:
getTie().add(newItem);Objects of the following type(s) are allowed in the list
Tie -
getInstrument
Gets the value of the instrument 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 instrument property.For example, to add a new item, do as follows:
getInstrument().add(newItem);Objects of the following type(s) are allowed in the list
Instrument -
getFootnote
Gets the value of the footnote property.- Returns:
- possible object is
FormattedText
-
setFootnote
Sets the value of the footnote property.- Parameters:
value- allowed object isFormattedText
-
getLevel
Gets the value of the level property.- Returns:
- possible object is
Level
-
setLevel
Sets the value of the level property.- Parameters:
value- allowed object isLevel
-
getVoice
Gets the value of the voice property.- Returns:
- possible object is
String
-
setVoice
Sets the value of the voice property.- Parameters:
value- allowed object isString
-
getType
Gets the value of the type property.- Returns:
- possible object is
NoteType
-
setType
Sets the value of the type property.- Parameters:
value- allowed object isNoteType
-
getDot
Gets the value of the dot 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 dot property.For example, to add a new item, do as follows:
getDot().add(newItem);Objects of the following type(s) are allowed in the list
EmptyPlacement -
getAccidental
Gets the value of the accidental property.- Returns:
- possible object is
Accidental
-
setAccidental
Sets the value of the accidental property.- Parameters:
value- allowed object isAccidental
-
getTimeModification
Gets the value of the timeModification property.- Returns:
- possible object is
TimeModification
-
setTimeModification
Sets the value of the timeModification property.- Parameters:
value- allowed object isTimeModification
-
getStem
Gets the value of the stem property.- Returns:
- possible object is
Stem
-
setStem
Sets the value of the stem property.- Parameters:
value- allowed object isStem
-
getNotehead
Gets the value of the notehead property.- Returns:
- possible object is
Notehead
-
setNotehead
Sets the value of the notehead property.- Parameters:
value- allowed object isNotehead
-
getNoteheadText
Gets the value of the noteheadText property.- Returns:
- possible object is
NoteheadText
-
setNoteheadText
Sets the value of the noteheadText property.- Parameters:
value- allowed object isNoteheadText
-
getStaff
Gets the value of the staff property.- Returns:
- possible object is
BigInteger
-
setStaff
Sets the value of the staff property.- Parameters:
value- allowed object isBigInteger
-
getBeam
Gets the value of the beam 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 beam property.For example, to add a new item, do as follows:
getBeam().add(newItem);Objects of the following type(s) are allowed in the list
Beam -
getNotations
Gets the value of the notations 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 notations property.For example, to add a new item, do as follows:
getNotations().add(newItem);Objects of the following type(s) are allowed in the list
Notations -
getLyric
Gets the value of the lyric 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 lyric property.For example, to add a new item, do as follows:
getLyric().add(newItem);Objects of the following type(s) are allowed in the list
Lyric -
getPlay
Gets the value of the play property.- Returns:
- possible object is
Play
-
setPlay
Sets the value of the play property.- Parameters:
value- allowed object isPlay
-
getListen
Gets the value of the listen property.- Returns:
- possible object is
Listen
-
setListen
Sets the value of the listen property.- Parameters:
value- allowed object isListen
-
getPrintLeger
Gets the value of the printLeger property.- Returns:
- possible object is
YesNo
-
setPrintLeger
Sets the value of the printLeger property.- Parameters:
value- allowed object isYesNo
-
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
-
getEndDynamics
Gets the value of the endDynamics property.- Returns:
- possible object is
BigDecimal
-
setEndDynamics
Sets the value of the endDynamics property.- Parameters:
value- allowed object isBigDecimal
-
getAttack
Gets the value of the attack property.- Returns:
- possible object is
BigDecimal
-
setAttack
Sets the value of the attack property.- Parameters:
value- allowed object isBigDecimal
-
getRelease
Gets the value of the release property.- Returns:
- possible object is
BigDecimal
-
setRelease
Sets the value of the release property.- Parameters:
value- allowed object isBigDecimal
-
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
-
getFontFamily
Gets the value of the fontFamily property.- Returns:
- possible object is
String
-
setFontFamily
Sets the value of the fontFamily property.- Parameters:
value- allowed object isString
-
getFontStyle
Gets the value of the fontStyle property.- Returns:
- possible object is
FontStyle
-
setFontStyle
Sets the value of the fontStyle property.- Parameters:
value- allowed object isFontStyle
-
getFontSize
Gets the value of the fontSize property.- Returns:
- possible object is
String
-
setFontSize
Sets the value of the fontSize property.- Parameters:
value- allowed object isString
-
getFontWeight
Gets the value of the fontWeight property.- Returns:
- possible object is
FontWeight
-
setFontWeight
Sets the value of the fontWeight property.- Parameters:
value- allowed object isFontWeight
-
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
-
getPrintDot
Gets the value of the printDot property.- Returns:
- possible object is
YesNo
-
setPrintDot
Sets the value of the printDot property.- Parameters:
value- allowed object isYesNo
-
getPrintLyric
Gets the value of the printLyric property.- Returns:
- possible object is
YesNo
-
setPrintLyric
Sets the value of the printLyric property.- Parameters:
value- allowed object isYesNo
-
getPrintSpacing
Gets the value of the printSpacing property.- Returns:
- possible object is
YesNo
-
setPrintSpacing
Sets the value of the printSpacing property.- Parameters:
value- allowed object isYesNo
-
getPrintObject
Gets the value of the printObject property.- Returns:
- possible object is
YesNo
-
setPrintObject
Sets the value of the printObject property.- Parameters:
value- allowed object isYesNo
-
getDefaultX
Gets the value of the defaultX property.- Returns:
- possible object is
BigDecimal
-
setDefaultX
Sets the value of the defaultX property.- Parameters:
value- allowed object isBigDecimal
-
getDefaultY
Gets the value of the defaultY property.- Returns:
- possible object is
BigDecimal
-
setDefaultY
Sets the value of the defaultY property.- Parameters:
value- allowed object isBigDecimal
-
getRelativeX
Gets the value of the relativeX property.- Returns:
- possible object is
BigDecimal
-
setRelativeX
Sets the value of the relativeX property.- Parameters:
value- allowed object isBigDecimal
-
getRelativeY
Gets the value of the relativeY property.- Returns:
- possible object is
BigDecimal
-
setRelativeY
Sets the value of the relativeY property.- Parameters:
value- allowed object isBigDecimal
-
getColor
Gets the value of the color property.- Returns:
- possible object is
String
-
setColor
Sets the value of the color property.- Parameters:
value- allowed object isString
-