public class NbsCustomInstrument extends java.lang.Object implements Instrument
| Constructor and Description |
|---|
NbsCustomInstrument() |
| Modifier and Type | Method and Description |
|---|---|
NbsCustomInstrument |
copy() |
boolean |
equals(java.lang.Object o) |
java.lang.String |
getName() |
java.lang.String |
getNameOr(java.lang.String fallback) |
int |
getPitch() |
java.lang.String |
getSoundFilePath() |
java.lang.String |
getSoundFilePathOr(java.lang.String fallback) |
int |
hashCode() |
boolean |
isPressKey() |
NbsCustomInstrument |
setName(java.lang.String name) |
NbsCustomInstrument |
setPitch(int pitch) |
NbsCustomInstrument |
setPressKey(boolean pressKey) |
NbsCustomInstrument |
setSoundFilePath(java.lang.String soundFilePath) |
public java.lang.String getName()
public java.lang.String getNameOr(java.lang.String fallback)
fallback - The fallback value if the name is not set.public NbsCustomInstrument setName(java.lang.String name)
name - The name of the instrument.public java.lang.String getSoundFilePath()
public java.lang.String getSoundFilePathOr(java.lang.String fallback)
fallback - The fallback value if the sound file path is not set.public NbsCustomInstrument setSoundFilePath(java.lang.String soundFilePath)
soundFilePath - The sound file of the instrument.public int getPitch()
public NbsCustomInstrument setPitch(int pitch)
pitch - The pitch of the sound file. Just like the note blocks, this ranges from 0-87. Default is 45 (F#4).public boolean isPressKey()
public NbsCustomInstrument setPressKey(boolean pressKey)
pressKey - Whether the piano should automatically press keys with this instrument when the marker passes them.public NbsCustomInstrument copy()
copy in interface Instrumentpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object