org.jfugue
Class Instrument

java.lang.Object
  extended by org.jfugue.Instrument
All Implemented Interfaces:
JFugueElement

public final class Instrument
extends java.lang.Object
implements JFugueElement

Represents instrument changes, also known as patch changes.

Version:
2.0
Author:
David Koelle

Field Summary
static byte ACCORDIAN
           
static byte ACOUSTIC_BASS
           
static byte ACOUSTIC_GRAND
           
static byte AGOGO
           
static byte ALTO_SAX
           
static byte APPLAUSE
           
static byte ATMOSPHERE
           
static byte BAGPIPE
           
static byte BANJO
           
static byte BARITONE_SAX
           
static byte BASSLEAD
           
static byte BASSOON
           
static byte BIRD_TWEET
           
static byte BLOWN_BOTTLE
           
static byte BOWED
           
static byte BRASS_SECTION
           
static byte BREATH_NOISE
           
static byte BRIGHT_ACOUSTIC
           
static byte BRIGHTNESS
           
static byte CALLIOPE
           
static byte CELESTA
           
static byte CELLO
           
static byte CHARANG
           
static byte CHIFF
           
static byte CHOIR
           
static byte CHOIR_AAHS
           
static byte CHURCH_ORGAN
           
static byte CLARINET
           
static byte CLAVINET
           
static byte CONTRABASS
           
static byte CRYSTAL
           
static byte DISTORTION_GUITAR
           
static byte DRAWBAR_ORGAN
           
static byte DULCIMER
           
static byte ECHOES
           
static byte ELECTRIC_BASS_FINGER
           
static byte ELECTRIC_BASS_PICK
           
static byte ELECTRIC_CLEAN_GUITAR
           
static byte ELECTRIC_GRAND
           
static byte ELECTRIC_JAZZ_GUITAR
           
static byte ELECTRIC_MUTED_GUITAR
           
static byte ELECTRIC_PIANO
           
static byte ELECTRIC_PIANO_1
           
static byte ELECTRIC_PIANO_2
           
static byte ENGLISH_HORN
           
static byte FIDDLE
           
static byte FIFTHS
           
static byte FLUTE
           
static byte FRENCH_HORN
           
static byte FRETLESS_BASS
           
static byte FX_ATMOSPHERE
           
static byte FX_BRIGHTNESS
           
static byte FX_CRYSTAL
           
static byte FX_ECHOES
           
static byte FX_GOBLINS
           
static byte FX_RAIN
           
static byte FX_SCI
           
static byte FX_SOUNDTRACK
           
static byte GLOCKENSPIEL
           
static byte GOBLINS
           
static byte GUITAR
           
static byte GUITAR_FRET_NOISE
           
static byte GUITAR_HARMONICS
           
static byte GUNSHOT
           
static byte HALO
           
static byte HARMONICA
           
static byte HARPISCHORD
           
static byte HELICOPTER
           
static byte HONKEY_TONK
           
static java.lang.String[] INSTRUMENT_NAME
           
static byte KALIMBA
           
static byte KOTO
           
static byte LEAD_BASSLEAD
           
static byte LEAD_CALLIOPE
           
static byte LEAD_CHARANG
           
static byte LEAD_CHIFF
           
static byte LEAD_FIFTHS
           
static byte LEAD_SAWTOOTH
           
static byte LEAD_SQUARE
           
static byte LEAD_VOICE
           
static byte MARIMBA
           
static byte MELODIC_TOM
           
static byte METALLIC
           
static byte MUSIC_BOX
           
static byte MUTED_TRUMPET
           
static byte NEW_AGE
           
static byte NYLON_STRING_GUITAR
           
static byte OBOE
           
static byte OCARINA
           
static byte ORCHESTRA_HIT
           
static byte ORCHESTRAL_STRINGS
           
static byte OVERDRIVEN_GUITAR
           
static byte PAD_BOWED
           
static byte PAD_CHOIR
           
static byte PAD_HALO
           
static byte PAD_METALLIC
           
static byte PAD_NEW_AGE
           
static byte PAD_POLYSYNTH
           
static byte PAD_SWEEP
           
static byte PAD_WARM
           
static byte PAN_FLUTE
           
static byte PERCUSSIVE_ORGAN
           
static byte PIANO
           
static byte PICCOLO
           
static byte PIZZICATO_STRINGS
           
static byte POLYSYNTH
           
static byte RAIN
           
static byte RECORDER
           
static byte REED_ORGAN
           
static byte REVERSE_CYMBAL
           
static byte ROCK_ORGAN
           
static byte SAWTOOTH
           
static byte SCI
           
static byte SEASHORE
           
static byte SHAMISEN
           
static byte SHANAI
           
static byte SITAR
           
static byte SKAKUHACHI
           
static byte SLAP_BASS_1
           
static byte SLAP_BASS_2
           
static byte SOPRANO_SAX
           
static byte SOUNDTRACK
           
static byte SQUARE
           
static byte STEEL_DRUMS
           
static byte STEEL_STRING_GUITAR
           
static byte STRING_ENSEMBLE_1
           
static byte STRING_ENSEMBLE_2
           
static byte SWEEP
           
static byte SYNTH_BASS_1
           
static byte SYNTH_BASS_2
           
static byte SYNTH_DRUM
           
static byte SYNTH_STRINGS_1
           
static byte SYNTH_STRINGS_2
           
static byte SYNTH_VOICE
           
static byte SYNTHBRASS_1
           
static byte SYNTHBRASS_2
           
static byte TAIKO_DRUM
           
static byte TANGO_ACCORDIAN
           
static byte TELEPHONE_RING
           
static byte TENOR_SAX
           
static byte TIMPANI
           
static byte TINKLE_BELL
           
static byte TREMOLO_STRINGS
           
static byte TROMBONE
           
static byte TRUMPET
           
static byte TUBA
           
static byte TUBULAR_BELLS
           
static byte VIBRAPHONE
           
static byte VIOLA
           
static byte VIOLIN
           
static byte VOICE
           
static byte VOICE_OOHS
           
static byte WARM
           
static byte WHISTLE
           
static byte WOODBLOCK
           
static byte XYLOPHONE
           
 
Constructor Summary
Instrument(byte instrument)
          Creates a new Instrument object, with the specified instrument number.
 
Method Summary
 byte getInstrument()
          Returns the instrument used in this object
 java.lang.String getInstrumentName()
          Returns the name of the instrument used in this object
 java.lang.String getMusicString()
          Returns the Music String representing this element and all of its settings.
 java.lang.String getVerifyString()
          Returns verification string in this format: Instrument: instrument={#}
 void setInstrument(byte instrument)
          Sets the value of the instrument for this object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTRUMENT_NAME

public static final java.lang.String[] INSTRUMENT_NAME

PIANO

public static final byte PIANO
See Also:
Constant Field Values

ACOUSTIC_GRAND

public static final byte ACOUSTIC_GRAND
See Also:
Constant Field Values

BRIGHT_ACOUSTIC

public static final byte BRIGHT_ACOUSTIC
See Also:
Constant Field Values

ELECTRIC_GRAND

public static final byte ELECTRIC_GRAND
See Also:
Constant Field Values

HONKEY_TONK

public static final byte HONKEY_TONK
See Also:
Constant Field Values

ELECTRIC_PIANO

public static final byte ELECTRIC_PIANO
See Also:
Constant Field Values

ELECTRIC_PIANO_1

public static final byte ELECTRIC_PIANO_1
See Also:
Constant Field Values

ELECTRIC_PIANO_2

public static final byte ELECTRIC_PIANO_2
See Also:
Constant Field Values

HARPISCHORD

public static final byte HARPISCHORD
See Also:
Constant Field Values

CLAVINET

public static final byte CLAVINET
See Also:
Constant Field Values

CELESTA

public static final byte CELESTA
See Also:
Constant Field Values

GLOCKENSPIEL

public static final byte GLOCKENSPIEL
See Also:
Constant Field Values

MUSIC_BOX

public static final byte MUSIC_BOX
See Also:
Constant Field Values

VIBRAPHONE

public static final byte VIBRAPHONE
See Also:
Constant Field Values

MARIMBA

public static final byte MARIMBA
See Also:
Constant Field Values

XYLOPHONE

public static final byte XYLOPHONE
See Also:
Constant Field Values

TUBULAR_BELLS

public static final byte TUBULAR_BELLS
See Also:
Constant Field Values

DULCIMER

public static final byte DULCIMER
See Also:
Constant Field Values

DRAWBAR_ORGAN

public static final byte DRAWBAR_ORGAN
See Also:
Constant Field Values

PERCUSSIVE_ORGAN

public static final byte PERCUSSIVE_ORGAN
See Also:
Constant Field Values

ROCK_ORGAN

public static final byte ROCK_ORGAN
See Also:
Constant Field Values

CHURCH_ORGAN

public static final byte CHURCH_ORGAN
See Also:
Constant Field Values

REED_ORGAN

public static final byte REED_ORGAN
See Also:
Constant Field Values

ACCORDIAN

public static final byte ACCORDIAN
See Also:
Constant Field Values

HARMONICA

public static final byte HARMONICA
See Also:
Constant Field Values

TANGO_ACCORDIAN

public static final byte TANGO_ACCORDIAN
See Also:
Constant Field Values

GUITAR

public static final byte GUITAR
See Also:
Constant Field Values

NYLON_STRING_GUITAR

public static final byte NYLON_STRING_GUITAR
See Also:
Constant Field Values

STEEL_STRING_GUITAR

public static final byte STEEL_STRING_GUITAR
See Also:
Constant Field Values

ELECTRIC_JAZZ_GUITAR

public static final byte ELECTRIC_JAZZ_GUITAR
See Also:
Constant Field Values

ELECTRIC_CLEAN_GUITAR

public static final byte ELECTRIC_CLEAN_GUITAR
See Also:
Constant Field Values

ELECTRIC_MUTED_GUITAR

public static final byte ELECTRIC_MUTED_GUITAR
See Also:
Constant Field Values

OVERDRIVEN_GUITAR

public static final byte OVERDRIVEN_GUITAR
See Also:
Constant Field Values

DISTORTION_GUITAR

public static final byte DISTORTION_GUITAR
See Also:
Constant Field Values

GUITAR_HARMONICS

public static final byte GUITAR_HARMONICS
See Also:
Constant Field Values

ACOUSTIC_BASS

public static final byte ACOUSTIC_BASS
See Also:
Constant Field Values

ELECTRIC_BASS_FINGER

public static final byte ELECTRIC_BASS_FINGER
See Also:
Constant Field Values

ELECTRIC_BASS_PICK

public static final byte ELECTRIC_BASS_PICK
See Also:
Constant Field Values

FRETLESS_BASS

public static final byte FRETLESS_BASS
See Also:
Constant Field Values

SLAP_BASS_1

public static final byte SLAP_BASS_1
See Also:
Constant Field Values

SLAP_BASS_2

public static final byte SLAP_BASS_2
See Also:
Constant Field Values

SYNTH_BASS_1

public static final byte SYNTH_BASS_1
See Also:
Constant Field Values

SYNTH_BASS_2

public static final byte SYNTH_BASS_2
See Also:
Constant Field Values

VIOLIN

public static final byte VIOLIN
See Also:
Constant Field Values

VIOLA

public static final byte VIOLA
See Also:
Constant Field Values

CELLO

public static final byte CELLO
See Also:
Constant Field Values

CONTRABASS

public static final byte CONTRABASS
See Also:
Constant Field Values

TREMOLO_STRINGS

public static final byte TREMOLO_STRINGS
See Also:
Constant Field Values

PIZZICATO_STRINGS

public static final byte PIZZICATO_STRINGS
See Also:
Constant Field Values

ORCHESTRAL_STRINGS

public static final byte ORCHESTRAL_STRINGS
See Also:
Constant Field Values

TIMPANI

public static final byte TIMPANI
See Also:
Constant Field Values

STRING_ENSEMBLE_1

public static final byte STRING_ENSEMBLE_1
See Also:
Constant Field Values

STRING_ENSEMBLE_2

public static final byte STRING_ENSEMBLE_2
See Also:
Constant Field Values

SYNTH_STRINGS_1

public static final byte SYNTH_STRINGS_1
See Also:
Constant Field Values

SYNTH_STRINGS_2

public static final byte SYNTH_STRINGS_2
See Also:
Constant Field Values

CHOIR_AAHS

public static final byte CHOIR_AAHS
See Also:
Constant Field Values

VOICE_OOHS

public static final byte VOICE_OOHS
See Also:
Constant Field Values

SYNTH_VOICE

public static final byte SYNTH_VOICE
See Also:
Constant Field Values

ORCHESTRA_HIT

public static final byte ORCHESTRA_HIT
See Also:
Constant Field Values

TRUMPET

public static final byte TRUMPET
See Also:
Constant Field Values

TROMBONE

public static final byte TROMBONE
See Also:
Constant Field Values

TUBA

public static final byte TUBA
See Also:
Constant Field Values

MUTED_TRUMPET

public static final byte MUTED_TRUMPET
See Also:
Constant Field Values

FRENCH_HORN

public static final byte FRENCH_HORN
See Also:
Constant Field Values

BRASS_SECTION

public static final byte BRASS_SECTION
See Also:
Constant Field Values

SYNTHBRASS_1

public static final byte SYNTHBRASS_1
See Also:
Constant Field Values

SYNTHBRASS_2

public static final byte SYNTHBRASS_2
See Also:
Constant Field Values

SOPRANO_SAX

public static final byte SOPRANO_SAX
See Also:
Constant Field Values

ALTO_SAX

public static final byte ALTO_SAX
See Also:
Constant Field Values

TENOR_SAX

public static final byte TENOR_SAX
See Also:
Constant Field Values

BARITONE_SAX

public static final byte BARITONE_SAX
See Also:
Constant Field Values

OBOE

public static final byte OBOE
See Also:
Constant Field Values

ENGLISH_HORN

public static final byte ENGLISH_HORN
See Also:
Constant Field Values

BASSOON

public static final byte BASSOON
See Also:
Constant Field Values

CLARINET

public static final byte CLARINET
See Also:
Constant Field Values

PICCOLO

public static final byte PICCOLO
See Also:
Constant Field Values

FLUTE

public static final byte FLUTE
See Also:
Constant Field Values

RECORDER

public static final byte RECORDER
See Also:
Constant Field Values

PAN_FLUTE

public static final byte PAN_FLUTE
See Also:
Constant Field Values

BLOWN_BOTTLE

public static final byte BLOWN_BOTTLE
See Also:
Constant Field Values

SKAKUHACHI

public static final byte SKAKUHACHI
See Also:
Constant Field Values

WHISTLE

public static final byte WHISTLE
See Also:
Constant Field Values

OCARINA

public static final byte OCARINA
See Also:
Constant Field Values

LEAD_SQUARE

public static final byte LEAD_SQUARE
See Also:
Constant Field Values

SQUARE

public static final byte SQUARE
See Also:
Constant Field Values

LEAD_SAWTOOTH

public static final byte LEAD_SAWTOOTH
See Also:
Constant Field Values

SAWTOOTH

public static final byte SAWTOOTH
See Also:
Constant Field Values

LEAD_CALLIOPE

public static final byte LEAD_CALLIOPE
See Also:
Constant Field Values

CALLIOPE

public static final byte CALLIOPE
See Also:
Constant Field Values

LEAD_CHIFF

public static final byte LEAD_CHIFF
See Also:
Constant Field Values

CHIFF

public static final byte CHIFF
See Also:
Constant Field Values

LEAD_CHARANG

public static final byte LEAD_CHARANG
See Also:
Constant Field Values

CHARANG

public static final byte CHARANG
See Also:
Constant Field Values

LEAD_VOICE

public static final byte LEAD_VOICE
See Also:
Constant Field Values

VOICE

public static final byte VOICE
See Also:
Constant Field Values

LEAD_FIFTHS

public static final byte LEAD_FIFTHS
See Also:
Constant Field Values

FIFTHS

public static final byte FIFTHS
See Also:
Constant Field Values

LEAD_BASSLEAD

public static final byte LEAD_BASSLEAD
See Also:
Constant Field Values

BASSLEAD

public static final byte BASSLEAD
See Also:
Constant Field Values

PAD_NEW_AGE

public static final byte PAD_NEW_AGE
See Also:
Constant Field Values

NEW_AGE

public static final byte NEW_AGE
See Also:
Constant Field Values

PAD_WARM

public static final byte PAD_WARM
See Also:
Constant Field Values

WARM

public static final byte WARM
See Also:
Constant Field Values

PAD_POLYSYNTH

public static final byte PAD_POLYSYNTH
See Also:
Constant Field Values

POLYSYNTH

public static final byte POLYSYNTH
See Also:
Constant Field Values

PAD_CHOIR

public static final byte PAD_CHOIR
See Also:
Constant Field Values

CHOIR

public static final byte CHOIR
See Also:
Constant Field Values

PAD_BOWED

public static final byte PAD_BOWED
See Also:
Constant Field Values

BOWED

public static final byte BOWED
See Also:
Constant Field Values

PAD_METALLIC

public static final byte PAD_METALLIC
See Also:
Constant Field Values

METALLIC

public static final byte METALLIC
See Also:
Constant Field Values

PAD_HALO

public static final byte PAD_HALO
See Also:
Constant Field Values

HALO

public static final byte HALO
See Also:
Constant Field Values

PAD_SWEEP

public static final byte PAD_SWEEP
See Also:
Constant Field Values

SWEEP

public static final byte SWEEP
See Also:
Constant Field Values

FX_RAIN

public static final byte FX_RAIN
See Also:
Constant Field Values

RAIN

public static final byte RAIN
See Also:
Constant Field Values

FX_SOUNDTRACK

public static final byte FX_SOUNDTRACK
See Also:
Constant Field Values

SOUNDTRACK

public static final byte SOUNDTRACK
See Also:
Constant Field Values

FX_CRYSTAL

public static final byte FX_CRYSTAL
See Also:
Constant Field Values

CRYSTAL

public static final byte CRYSTAL
See Also:
Constant Field Values

FX_ATMOSPHERE

public static final byte FX_ATMOSPHERE
See Also:
Constant Field Values

ATMOSPHERE

public static final byte ATMOSPHERE
See Also:
Constant Field Values

FX_BRIGHTNESS

public static final byte FX_BRIGHTNESS
See Also:
Constant Field Values

BRIGHTNESS

public static final byte BRIGHTNESS
See Also:
Constant Field Values

FX_GOBLINS

public static final byte FX_GOBLINS
See Also:
Constant Field Values

GOBLINS

public static final byte GOBLINS
See Also:
Constant Field Values

FX_ECHOES

public static final byte FX_ECHOES
See Also:
Constant Field Values

ECHOES

public static final byte ECHOES
See Also:
Constant Field Values

FX_SCI

public static final byte FX_SCI
See Also:
Constant Field Values

SCI

public static final byte SCI
See Also:
Constant Field Values

SITAR

public static final byte SITAR
See Also:
Constant Field Values

BANJO

public static final byte BANJO
See Also:
Constant Field Values

SHAMISEN

public static final byte SHAMISEN
See Also:
Constant Field Values

KOTO

public static final byte KOTO
See Also:
Constant Field Values

KALIMBA

public static final byte KALIMBA
See Also:
Constant Field Values

BAGPIPE

public static final byte BAGPIPE
See Also:
Constant Field Values

FIDDLE

public static final byte FIDDLE
See Also:
Constant Field Values

SHANAI

public static final byte SHANAI
See Also:
Constant Field Values

TINKLE_BELL

public static final byte TINKLE_BELL
See Also:
Constant Field Values

AGOGO

public static final byte AGOGO
See Also:
Constant Field Values

STEEL_DRUMS

public static final byte STEEL_DRUMS
See Also:
Constant Field Values

WOODBLOCK

public static final byte WOODBLOCK
See Also:
Constant Field Values

TAIKO_DRUM

public static final byte TAIKO_DRUM
See Also:
Constant Field Values

MELODIC_TOM

public static final byte MELODIC_TOM
See Also:
Constant Field Values

SYNTH_DRUM

public static final byte SYNTH_DRUM
See Also:
Constant Field Values

REVERSE_CYMBAL

public static final byte REVERSE_CYMBAL
See Also:
Constant Field Values

GUITAR_FRET_NOISE

public static final byte GUITAR_FRET_NOISE
See Also:
Constant Field Values

BREATH_NOISE

public static final byte BREATH_NOISE
See Also:
Constant Field Values

SEASHORE

public static final byte SEASHORE
See Also:
Constant Field Values

BIRD_TWEET

public static final byte BIRD_TWEET
See Also:
Constant Field Values

TELEPHONE_RING

public static final byte TELEPHONE_RING
See Also:
Constant Field Values

HELICOPTER

public static final byte HELICOPTER
See Also:
Constant Field Values

APPLAUSE

public static final byte APPLAUSE
See Also:
Constant Field Values

GUNSHOT

public static final byte GUNSHOT
See Also:
Constant Field Values
Constructor Detail

Instrument

public Instrument(byte instrument)
Creates a new Instrument object, with the specified instrument number.

Parameters:
instrument - the number of the instrument to use
Method Detail

setInstrument

public void setInstrument(byte instrument)
Sets the value of the instrument for this object.

Parameters:
instrument - the number of the instrument to use

getInstrument

public byte getInstrument()
Returns the instrument used in this object

Returns:
the instrument used in this object

getInstrumentName

public java.lang.String getInstrumentName()
Returns the name of the instrument used in this object

Returns:
the name of the instrument used in this object

getMusicString

public java.lang.String getMusicString()
Returns the Music String representing this element and all of its settings. For an Instrument object, the Music String is Iinstrument-number

Specified by:
getMusicString in interface JFugueElement
Returns:
the Music String for this element

getVerifyString

public java.lang.String getVerifyString()
Returns verification string in this format: Instrument: instrument={#}

Specified by:
getVerifyString in interface JFugueElement