public class Note
extends java.lang.Object
限定符和类型 | 类和说明 |
---|---|
static class |
Note.Tone
一个包含音调的枚举。
|
构造器和说明 |
---|
Note(int note)
构造一个新的note类。
|
Note(int octave,
Note.Tone tone,
boolean sharped)
构造一个新的note类。
|
限定符和类型 | 方法和说明 |
---|---|
boolean |
equals(java.lang.Object obj) |
static Note |
flat(int octave,
Note.Tone tone)
为一个大调创建一个新的note类,例如A大调。
|
Note |
flattened() |
byte |
getId()
已过时。
不安全的参数
|
int |
getOctave()
返回这个音符的八度音阶。
|
Note.Tone |
getTone()
返回这个音符的音调。
|
int |
hashCode() |
boolean |
isSharped()
返回音符是否升高。
|
static Note |
natural(int octave,
Note.Tone tone)
为一个自然调创建一个note类,例如自然A调。
|
static Note |
sharp(int octave,
Note.Tone tone)
为一个升调创建一个note类,例如A升调。
|
Note |
sharped() |
java.lang.String |
toString() |
public Note(int note)
原文: Creates a new note.
note
- 内部音符ID。getId()
会返回这个数值。这个数值必须在区间[0; 24]中public Note(int octave, Note.Tone tone, boolean sharped)
原文: Creates a new note.
octave
- 音符处于的八度音阶。必须在0-2间tone
- 在这个八度音阶中的音调。如果八度音阶为2则音调必须为F#sharped
- 设置音调是否升高 (例如F#)public static Note flat(int octave, Note.Tone tone)
原文: Creates a new note for a flat tone, such as A-flat.
octave
- 音符处于的八度音阶。必须为0或1tone
- 在这个八度音阶中的音调public static Note sharp(int octave, Note.Tone tone)
原文: Creates a new note for a sharp tone, such as A-sharp.
octave
- 音符处于的八度音阶。必须在0-2间tone
- 在这个八度音阶中的音调。如果八度音阶为2则音调必须为F#public static Note natural(int octave, Note.Tone tone)
原文: Creates a new note for a natural tone, such as A-natural.
octave
- 音符处于的八度音阶。必须为0或1tone
- 在这个八度音阶中的音调public Note sharped()
public Note flattened()
@Deprecated public byte getId()
原文: Returns the internal id of this note.
public int getOctave()
原文: Returns the octave of this note.
public Note.Tone getTone()
原文: Returns the tone of this note.
public boolean isSharped()
原文: Returns if this note is sharped.
public int hashCode()
hashCode
在类中 java.lang.Object
public boolean equals(java.lang.Object obj)
equals
在类中 java.lang.Object
public java.lang.String toString()
toString
在类中 java.lang.Object