Package paulscode.sound
Class MidiChannel
java.lang.Object
paulscode.sound.MidiChannel
- All Implemented Interfaces:
EventListener,MetaEventListener
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate static final intprotected floatprotected longprotected floatprotected longprivate MidiChannel.FadeThreadprivate FilenameURLprivate floatprivate static final booleanprotected longprivate booleanprivate SoundSystemLoggerprivate Sequenceprivate LinkedListprivate final Objectprivate Sequencerprivate static final booleanprivate Stringprivate MidiDeviceprivate Synthesizerprivate booleanprivate static final boolean -
Constructor Summary
ConstructorsConstructorDescriptionMidiChannel(boolean bool, String string, String string2) MidiChannel(boolean bool, String string, URL uRL, String string2) MidiChannel(boolean bool, String string, FilenameURL filenameURL) -
Method Summary
Modifier and TypeMethodDescriptionprivate booleanvoidcleanup()voiddequeueSound(String string) protected booleanerrorCheck(boolean bool, String string) protected voiderrorMessage(String string) voidfadeOut(FilenameURL filenameURL, long long2) voidfadeOutIn(FilenameURL filenameURL, long long2, long long3) private FilenameURLfilenameURL(boolean bool, FilenameURL filenameURL) booleanprivate voidprivate voidfloatprotected voidimportantMessage(String string) private booleanprivate voidinit()booleanloading()private booleanloading(boolean bool, boolean bool2) protected voidvoidmeta(MetaMessage metaMessage) private MidiDeviceopenMidiDevice(String string) private SequenceropenSequencer(String string) voidpause()voidplay()protected voidprintStackTrace(Exception exception) voidqueueSound(FilenameURL filenameURL) private voidreset()voidvoidrewind()voidsetFilenameURL(FilenameURL filenameURL) voidsetLooping(boolean bool) private voidsetSequence(URL uRL) voidsetSourcename(String string) voidsetVolume(float float2) private Stringsourcename(boolean bool, String string) voidstop()voidswitchSource(boolean bool, String string, String string2) voidswitchSource(boolean bool, String string, URL uRL, String string2) voidswitchSource(boolean bool, String string, FilenameURL filenameURL) private booleantoLoop(boolean bool, boolean bool2)
-
Field Details
-
CHANGE_VOLUME
private static final int CHANGE_VOLUME- See Also:
-
END_OF_TRACK
private static final int END_OF_TRACK- See Also:
-
GET
private static final boolean GET- See Also:
-
SET
private static final boolean SET- See Also:
-
XXX
private static final boolean XXX- See Also:
-
logger
-
filenameURL
-
sourcename
-
sequencer
-
synthesizer
-
synthDevice
-
sequence
-
toLoop
private boolean toLoop -
gain
private float gain -
loading
private boolean loading -
sequenceQueue
-
sequenceQueueLock
-
fadeOutGain
protected float fadeOutGain -
fadeInGain
protected float fadeInGain -
fadeOutMilis
protected long fadeOutMilis -
fadeInMilis
protected long fadeInMilis -
lastFadeCheck
protected long lastFadeCheck -
fadeThread
-
-
Constructor Details
-
MidiChannel
-
MidiChannel
-
MidiChannel
-
-
Method Details
-
init
private void init() -
cleanup
public void cleanup() -
queueSound
-
dequeueSound
-
fadeOut
-
fadeOutIn
-
checkFadeOut
private boolean checkFadeOut() -
incrementSequence
private boolean incrementSequence() -
play
public void play() -
stop
public void stop() -
pause
public void pause() -
rewind
public void rewind() -
setVolume
public void setVolume(float float2) -
getVolume
public float getVolume() -
switchSource
-
switchSource
-
switchSource
-
reset
private void reset() -
setLooping
public void setLooping(boolean bool) -
getLooping
public boolean getLooping() -
toLoop
private boolean toLoop(boolean bool, boolean bool2) -
loading
public boolean loading() -
loading
private boolean loading(boolean bool, boolean bool2) -
setSourcename
-
getSourcename
-
sourcename
-
setFilenameURL
-
getFilename
-
getFilenameURL
-
filenameURL
-
meta
- Specified by:
metain interfaceMetaEventListener
-
resetGain
public void resetGain() -
getSequencer
private void getSequencer() -
setSequence
-
getSynthesizer
private void getSynthesizer() -
openSequencer
-
openMidiDevice
-
message
-
importantMessage
-
errorCheck
-
errorMessage
-
printStackTrace
-