public class NbsNote extends Note implements NoteWithVolume
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 |
|---|---|
Note |
clone() |
NbsLayer |
getLayer() |
short |
getPanning() |
short |
getPitch()
100 = 1 key
1200 = 1 octave
|
float |
getVolume() |
void |
setLayer(NbsLayer layer) |
void |
setPanning(short panning) |
void |
setPitch(short pitch) |
void |
setVolume(float volume) |
void |
write(NbsHeader header,
com.google.common.io.LittleEndianDataOutputStream dos) |
getInstrument, getKey, 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%.public short getPanning()
public void setPanning(short panning)
panning - The stereo position of the note block, from 0-200. 100 is center panning.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.