public class NbsNote extends Note implements NoteWithVolume, NoteWithPanning
instrument, key| Constructor and Description |
|---|
NbsNote(byte instrument,
byte key) |
NbsNote(NbsHeader header,
NbsLayer layer,
com.google.common.io.LittleEndianDataInputStream dis) |
NbsNote(NbsLayer layer,
byte instrument,
byte key) |
NbsNote(NbsLayer layer,
byte instrument,
byte key,
byte velocity,
short panning,
short pitch) |
| Modifier and Type | Method and Description |
|---|---|
NbsNote |
clone() |
boolean |
equals(java.lang.Object o) |
NbsLayer |
getLayer() |
float |
getPanning() |
short |
getPitch()
100 = 1 key
1200 = 1 octave
|
short |
getRawPanning() |
byte |
getRawVelocity() |
float |
getVolume() |
int |
hashCode() |
void |
setLayer(NbsLayer layer) |
void |
setPanning(float panning) |
void |
setPitch(short pitch) |
void |
setVolume(float volume) |
void |
write(NbsHeader header,
com.google.common.io.LittleEndianDataOutputStream dos) |
getInstrument, getKey, getRawInstrument, getRawKey, setInstrument, setKeypublic NbsNote(NbsHeader header, NbsLayer layer, com.google.common.io.LittleEndianDataInputStream dis) throws java.io.IOException
java.io.IOExceptionpublic NbsNote(NbsLayer layer, byte instrument, byte key, byte velocity, short panning, short pitch)
public NbsNote(NbsLayer layer, byte instrument, byte key)
public NbsNote(byte instrument,
byte key)
public void write(NbsHeader header, com.google.common.io.LittleEndianDataOutputStream dos) throws java.io.IOException
java.io.IOExceptionpublic NbsLayer getLayer()
public void setLayer(NbsLayer layer)
layer - The NBS layer this note is in.public float getVolume()
getVolume in interface NoteWithVolumepublic void setVolume(float volume)
setVolume in interface NoteWithVolumevolume - The velocity/volume of the note, from 0% to 100%. Does not change the layer's volume.public byte getRawVelocity()
public float getPanning()
getPanning in interface NoteWithPanningpublic void setPanning(float panning)
setPanning in interface NoteWithPanningpanning - The stereo position of the note block. (-100 is 2 blocks right, 0 is center, 100 is 2 blocks left). Does not change the layer's panning.public short getRawPanning()
public short getPitch()
public void setPitch(short pitch)
pitch - The fine pitch of the note block, from -32,768 to 32,767 cents (but the max in Note Block Studio is limited to -1200 and +1200). 0 is no fine-tuning. ±100 cents is a single semitone difference.