jp.crestmuse.cmx.filewrappers
クラス MusicXMLWrapper.Note

java.lang.Object
  上位を拡張 jp.crestmuse.cmx.filewrappers.NodeInterface
      上位を拡張 jp.crestmuse.cmx.filewrappers.MusicXMLWrapper.MusicData
          上位を拡張 jp.crestmuse.cmx.filewrappers.MusicXMLWrapper.Note
すべての実装されたインタフェース:
Ordered
含まれているクラス:
MusicXMLWrapper

public class MusicXMLWrapper.Note
extends MusicXMLWrapper.MusicData

note要素からの情報を取り出すためのメソッドを提供します. ただし, 現バージョンでは, note要素内で記述されるすべての要素に対応しているわけでは なく, pitch, rest, duration, chord, grace, voice, type, modification, stem, staff, notationsのみ対応しています. 対応していない要素から情報を取り出すには, nodeメソッドでnote要素の Nodeオブジェクトを取得してから, 自分でDOMメソッドを用いる必要があります. なお, notationsについては, 現状では最初に出現したものだけしか扱えません.


メソッドの概要
 double beat()
          obsolete
 boolean chord()
           直前の音符と和音をなすときにtrueを返します.
 java.util.List<MusicXMLWrapper.Note> chordNotes()
           この音符が和音をなすときに, その和音の構成音を表すNoteオブジェクトの リストを返します.
 boolean containsTieType(java.lang.String type)
           
 int duration()
           音符の長さを整数で返します.
 MusicXMLWrapper.Notations getFirstNotations()
           このnote要素内で最初に出現したnotations要素をラップするNotationsオブジェクト を返します.
protected  java.lang.String getSupportedNodeName()
           Returns "note".
 java.lang.String getXPathExpression()
           このnote要素に対応するXPath表現を返します.
 boolean grace()
           装飾音符のときにtrueを返します.
 boolean hasArticulation(java.lang.String name)
           
 boolean hasTimeModification()
           time-modification要素が存在するときにtrueを返します.
 java.lang.String notehead()
           
 java.lang.String noteName()
          音名
 int notenum()
           音高をノートナンバー形式で返します.
 int offset(int ticksPerBeat)
           
 int pitchAlter()
           音符にシャープが付いていれば1, フラットが付いていれば-1を返します.
 int pitchOctave()
           オクターブ番号を返します.
 java.lang.String pitchStep()
           CやDなどの音名を返します.
 boolean rest()
           休符のときにtrueを返します.
 int staff()
           
 java.lang.String stem()
           
 double tiedDuration()
           
 int tiedDuration(int ticksPerBeat)
           
 MusicXMLWrapper.Note tiedTo()
           
 int timeModificationActualNotes()
           
 int timeModificationNormalNotes()
           
 MusicXMLWrapper.Note topNoteOfChord()
           この音符が和音をなすときに, その和音のトップノートを返します.
 java.lang.String type()
           
 int voice()
           
 
クラス jp.crestmuse.cmx.filewrappers.MusicXMLWrapper.MusicData から継承されたメソッド
actualDuration, actualDuration, duration, measure, offet, onset, onsetWithinMeasure, ordinal, subordinal
 
クラス jp.crestmuse.cmx.filewrappers.NodeInterface から継承されたメソッド
getAttribute, getAttribute, getAttributeDouble, getAttributeDouble, getAttributeInt, getAttributeInt, getAttributeNS, getChildByTagName, getChildByTagNameNS, getChildNodes, getChildText, getChildTextDouble, getChildTextInt, getFirstChild, getLastChild, getNodeName, getText, getText, getTextDouble, getTextInt, hasAttribute, hasAttribute, hasChild, node
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

メソッドの詳細

beat

public double beat()
obsolete


chord

public final boolean chord()

直前の音符と和音をなすときにtrueを返します.


chordNotes

public java.util.List<MusicXMLWrapper.Note> chordNotes()

この音符が和音をなすときに, その和音の構成音を表すNoteオブジェクトの リストを返します.


containsTieType

public final boolean containsTieType(java.lang.String type)

duration

public final int duration()

音符の長さを整数で返します. Attributes要素の中のdivisions要素の値が 分母となり, duration/divisions=1.0のときに4分音符1個分の長さとみなされます.

オーバーライド:
クラス MusicXMLWrapper.MusicData 内の duration

getFirstNotations

public MusicXMLWrapper.Notations getFirstNotations()

このnote要素内で最初に出現したnotations要素をラップするNotationsオブジェクト を返します.


getSupportedNodeName

protected final java.lang.String getSupportedNodeName()

Returns "note".

オーバーライド:
クラス MusicXMLWrapper.MusicData 内の getSupportedNodeName

getXPathExpression

public java.lang.String getXPathExpression()

このnote要素に対応するXPath表現を返します.


grace

public final boolean grace()

装飾音符のときにtrueを返します.


hasArticulation

public boolean hasArticulation(java.lang.String name)

hasTimeModification

public final boolean hasTimeModification()

time-modification要素が存在するときにtrueを返します.


notehead

public final java.lang.String notehead()

noteName

public final java.lang.String noteName()
音名


notenum

public int notenum()

音高をノートナンバー形式で返します.


offset

public int offset(int ticksPerBeat)

pitchAlter

public final int pitchAlter()

音符にシャープが付いていれば1, フラットが付いていれば-1を返します.


pitchOctave

public final int pitchOctave()

オクターブ番号を返します. C4=ノートナンバー60を前提としています.


pitchStep

public final java.lang.String pitchStep()

CやDなどの音名を返します.


rest

public final boolean rest()

休符のときにtrueを返します.


staff

public final int staff()

stem

public final java.lang.String stem()

tiedDuration

public double tiedDuration()

tiedDuration

public int tiedDuration(int ticksPerBeat)

tiedTo

public final MusicXMLWrapper.Note tiedTo()

timeModificationActualNotes

public int timeModificationActualNotes()

timeModificationNormalNotes

public int timeModificationNormalNotes()

topNoteOfChord

public final MusicXMLWrapper.Note topNoteOfChord()

この音符が和音をなすときに, その和音のトップノートを返します.


type

public final java.lang.String type()

voice

public final int voice()