|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object micromod.Synthesizer
The Synthesizer represents a bunch of Modulators, each with an associated Channel. Methods are provided for setting up/updating the Modulators, and for extracting audio from the channels.
Field Summary | |
static int |
CBM_AMIGA_NTSC_CLOCK
|
static int |
CBM_AMIGA_PAL_CLOCK
|
protected Channel[] |
channels
|
protected int |
ciaPreCalc
|
protected int |
ciaTickSamples
|
protected Modulator[] |
modulators
|
protected Module |
module
|
protected int |
numberOfChannels
|
protected boolean |
pal
|
protected int |
samplingRate
|
Constructor Summary | |
Synthesizer(Module mod,
int mixingRate)
Constructor. |
Method Summary | |
Channel |
getChannel(int channel)
|
int |
getCiaTickSamples()
|
int |
getNumberOfChannels()
|
void |
initialiseFX(int channel,
int period,
int instrument,
int effectCommand,
int effectValue)
Call this method at the start of every row to assign instruments and initialise effects |
boolean |
isPAL()
|
void |
reset()
Silence the channels and reset panning to the default values. |
void |
setBPM(int bpm)
Set the BPM of the playback (which directly affects the number of samples produced per tick of the CIA clock) |
void |
setModule(Module mod)
Reconfigure the Synthesizer for a new module. |
void |
setSamplingRate(int rate)
Set the Synthesizer to produce audio at the specified sampling rate. |
void |
updateFX()
This method is called every tick except the first in a row to update the effect currently active on each channel. |
void |
usePAL(boolean p)
Set whether to decode audio in PAL or NTSC mode. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int CBM_AMIGA_PAL_CLOCK
public static final int CBM_AMIGA_NTSC_CLOCK
protected Module module
protected Modulator[] modulators
protected Channel[] channels
protected int numberOfChannels
protected int samplingRate
protected int ciaTickSamples
protected int ciaPreCalc
protected boolean pal
Constructor Detail |
public Synthesizer(Module mod, int mixingRate)
mod
- The module to use initially.mixingRate
- The sampling rate.Method Detail |
public void setModule(Module mod)
public void setSamplingRate(int rate)
public void usePAL(boolean p)
p
- If true, use PAL pitch, else use NTSC pitch and tempo.public boolean isPAL()
public void reset()
public void setBPM(int bpm)
public int getCiaTickSamples()
public int getNumberOfChannels()
public Channel getChannel(int channel)
public void initialiseFX(int channel, int period, int instrument, int effectCommand, int effectValue)
public void updateFX()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |