|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object micromod.MicroMod
MicroMod 0.9xxx! Copyright 2002 Martin Cameron. This is Free Software subject to the terms of the Gnu Lesser General Public Licence(LGPL). Please see the included file "LGPL-2.1" This player was designed for the "standard" Amiga ProTracker format with extensions for more than four channels and channel panning. The player should work well with most clone formats such as FTK and older formats such as NoiseTracker, SoundTracker2.X and StarTrekker. Problems to address for 0.99: Missing glissando fx. The original Amiga period limits are enforced, so some pc mods may not work. Future plans: Needs a complete functional comparison with Amiga ProTracker. Rewrite planned. Lots of design ideas (will implement in MuXM first). Inherent Limitations: The original and rare Ultimate SoundTracker module format is not supported. The pattern loop command is ignored, for both design and compatibility reasons.
Field Summary | |
protected int |
currentTick
|
protected short[] |
leftOutBuffer
|
protected static int |
LOG2_VOL_RAMP_SAMPLES
|
static int |
MAX_SAMPLES_PER_TICK
|
static java.lang.String |
MICROMOD_VERSION
|
protected Mixer |
mixer
|
protected OutputDevice |
output
|
protected Resampler |
resampler
|
protected short[] |
rightOutBuffer
|
protected Sequencer |
sequencer
|
protected Synthesizer |
synthesizer
|
protected int |
tickLength
|
protected static int |
VOL_RAMP_SAMPLES
|
protected short[] |
volRampLeftBuffer
|
protected short[] |
volRampRightBuffer
|
Constructor Summary | |
MicroMod(Module module,
PCM16StreamOutputDevice output,
Resampler resampler)
|
Method Summary | |
void |
doPlayback()
Call this method in an infinite loop to render a "tick" of audio at a time. |
void |
doRealTimePlayback()
|
int |
getCurrentPatternPos()
|
int |
getSequenceLoopCount()
|
int |
getSongLengthPatterns()
|
boolean |
isPAL()
|
void |
setCurrentPatternPos(int pos)
Set the pattern in the sequence to play from. |
void |
setGain(int gain)
Set the gain value. |
void |
setModule(Module module)
Assign another module to the player to play from the beginning. |
void |
setOutputDevice(PCM16StreamOutputDevice output)
Assign another open output device to the player. |
void |
setResampler(Resampler resampler)
Switch to the specified resampling algorithm. |
void |
setWaveScaler(WaveScaler waveScaler)
Switch to the specified WaveScaler (dithering algorithm). |
void |
setWaveShaper(WaveShaper waveShaper)
Switch to the specified WaveShaper (compressor/expander/limiter etc) |
void |
usePAL(boolean pal)
Set whether to use PAL or NTSC decoding (default PAL for ProTracker/NoiseTracker) |
protected void |
volumeRamp(short[] leftBuffer,
short[] rightBuffer)
Crossfade the volume ramping buffers with the start of the specified buffers. |
protected void |
writeAudio(int length,
boolean ramp,
boolean updateRamp)
Render length samples of audio and write them to the output device. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String MICROMOD_VERSION
protected OutputDevice output
protected Sequencer sequencer
protected Synthesizer synthesizer
protected Resampler resampler
protected Mixer mixer
public static final int MAX_SAMPLES_PER_TICK
protected static final int LOG2_VOL_RAMP_SAMPLES
protected static final int VOL_RAMP_SAMPLES
protected short[] volRampLeftBuffer
protected short[] volRampRightBuffer
protected short[] leftOutBuffer
protected short[] rightOutBuffer
protected int tickLength
protected int currentTick
Constructor Detail |
public MicroMod(Module module, PCM16StreamOutputDevice output, Resampler resampler)
module
- The module to be played.output
- An open output device to send the audio to.Method Detail |
public void setModule(Module module)
public void setOutputDevice(PCM16StreamOutputDevice output)
public void setResampler(Resampler resampler)
public void setWaveShaper(WaveShaper waveShaper)
public void setWaveScaler(WaveScaler waveScaler)
public void usePAL(boolean pal)
public boolean isPAL()
public void setGain(int gain)
public int getSongLengthPatterns()
public int getCurrentPatternPos()
public void setCurrentPatternPos(int pos)
public int getSequenceLoopCount()
public void doRealTimePlayback()
public void doPlayback()
protected void writeAudio(int length, boolean ramp, boolean updateRamp)
ramp
- Crossfade the volume ramp buffer with the start of the audio.updateRamp
- Render a few more samples into the volume ramp buffer.protected void volumeRamp(short[] leftBuffer, short[] rightBuffer)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |