public abstract class Note
extends java.lang.Object
implements java.lang.Cloneable
| Modifier and Type | Field and Description |
|---|---|
protected Instrument |
instrument |
protected byte |
key |
| Constructor and Description |
|---|
Note(Instrument instrument,
byte key) |
| Modifier and Type | Method and Description |
|---|---|
abstract Note |
clone() |
boolean |
equals(java.lang.Object o) |
Instrument |
getInstrument() |
byte |
getKey() |
byte |
getRawKey() |
int |
hashCode() |
void |
setInstrument(Instrument instrument) |
void |
setKey(byte key) |
protected Instrument instrument
protected byte key
public Note(Instrument instrument, byte key)
public Instrument getInstrument()
public void setInstrument(Instrument instrument)
instrument - The instrument of the note. Null if the note uses a custom instrument.public byte getKey()
public void setKey(byte key)
key - The key of the note, from 0-87, where 0 is A0 and 87 is C8. 33-57 is within the 2-octave limit.public byte getRawKey()
public abstract Note clone()
clone in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object