Class Instrument
java.lang.Object
org.episteme.social.arts.music.Instrument
Represents a musical instrument.
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if the instrument can play a note.intintgetName()intgetRange()Returns range in semitones.getType()static Instrumentguitar()booleanstatic Instrumentpiano()voidsetRange(int lowest, int highest) voidsetTransposing(boolean transposing) voidtoString()static Instrumentviolin()
-
Constructor Details
-
Instrument
-
-
Method Details
-
getName
-
getFamily
-
getType
-
getLowestMidiNote
public int getLowestMidiNote() -
getHighestMidiNote
public int getHighestMidiNote() -
isTransposing
public boolean isTransposing() -
getTuning
-
setRange
public void setRange(int lowest, int highest) -
setTransposing
public void setTransposing(boolean transposing) -
setTuning
-
canPlay
Checks if the instrument can play a note. -
getRange
public int getRange()Returns range in semitones. -
toString
-
piano
-
violin
-
guitar
-