public abstract class BasicModMixer extends Object
| Modifier and Type | Class and Description |
|---|---|
protected class |
BasicModMixer.ChannelMemory |
| Modifier and Type | Field and Description |
|---|---|
protected BasicModMixer.ChannelMemory[] |
channelMemory |
protected int |
currentArrangement |
protected int |
currentBPM |
protected Pattern |
currentPattern |
protected int |
currentPatternIndex |
protected int |
currentRow |
protected int |
currentTempo |
protected int |
currentTick |
protected boolean |
doFadeOut |
protected boolean |
doFastForward |
protected int |
doISP |
protected int |
doNoLoops |
protected int |
fadeOutFac |
protected int |
fadeOutSub |
protected int |
fadeOutValue |
protected int |
frequencyTableType |
protected int |
globalTuning |
protected int |
globalVolume |
protected int |
globalVolumSlideValue |
protected int |
jumpLoopPatternIndex |
protected int |
jumpLoopPatternRow |
protected boolean |
jumpLoopPositionSet |
protected int |
jumpLoopRepeatCount |
protected static int |
MAX_NNA_CHANNELS |
protected int |
maxChannels |
protected Module |
mod |
protected boolean |
modFinished |
protected int[] |
nvRampL |
protected int[] |
nvRampR |
protected int |
patternBreakRowIndex |
protected int |
patternDelayCount |
protected int |
patternPosJumpPatternIndex |
protected int |
patternTicksDelayCount |
protected int |
samplePerTicks |
protected int |
sampleRate |
protected boolean |
useFastSlides |
protected int |
volRampLen |
protected int[] |
vRampL |
protected int[] |
vRampR |
| Constructor and Description |
|---|
BasicModMixer(Module mod,
int sampleRate,
int doISP,
int doNoLoops)
Constructor for BasicModMixer
|
| Modifier and Type | Method and Description |
|---|---|
protected int |
calculateSamplesPerTick()
Normally you would use the formula (25*samplerate)/(bpm*10)
which is (2.5*sampleRate)/bpm.
|
void |
changeDoNoLoops(int newDoNoLoops)
Changes the interpolation routine.
|
void |
changeISP(int newISP)
Changes the interpolation routine.
|
void |
changeSampleRate(int newSampleRate)
BE SHURE TO STOP PLAYBACK!
|
protected long |
cutOffToFrequency(long cutOff,
int flt_modifier,
boolean isExFilterRange)
calc the cut off
|
protected abstract void |
doRowEffects(BasicModMixer.ChannelMemory aktMemo)
Do the effects of a row.
|
protected void |
doRowEvent()
Do the Events of a new Row!
|
protected abstract void |
doTickEffekts(BasicModMixer.ChannelMemory aktMemo)
Do the Effekts during Ticks
|
protected boolean |
doTickEvents()
Do the events during a Tick.
|
protected abstract void |
doVolumeColumnRowEffekt(BasicModMixer.ChannelMemory aktMemo)
Used to precess the volume column
|
protected abstract void |
doVolumeColumnTickEffekt(BasicModMixer.ChannelMemory aktMemo)
do the volume column tick effekts
|
protected void |
fitIntoLoops(BasicModMixer.ChannelMemory actMemo)
Add current speed to samplepos and
fit currentSamplePos into loop values
or signal Sample finished
|
int |
getCurrentPatternPosition() |
int |
getCurrentUsedChannels() |
protected int |
getFineTunePeriod(BasicModMixer.ChannelMemory aktMemo)
Calls getFineTunePeriod(ChannelMemory, int Period) with the aktual Period assigend.
|
protected int |
getFineTunePeriod(BasicModMixer.ChannelMemory aktMemo,
int period)
Retrievs a Periodvalue (see Helpers.noteValues) shifted by 4 (*16)
XM_LINEAR_TABLE and XM_AMIGA_TABLE is for XM-Mods,
AMIGA_TABLE is for ProTrackerMods only (XM_AMIGA_TABLE is about the same though)
With Mods the AMIGA_TABLE, IT_AMIGA_TABLE and XM_AMIGA_TABLE result in
the approximate same values, but to be purly compatible and correct,
we use the protracker fintune period tables!
|
void |
initializeMixer()
Call this first!
|
protected abstract void |
initializeMixer(int channel,
BasicModMixer.ChannelMemory aktMemo)
Do own inits
Espezially do the init of the panning depending
on ModType
|
protected boolean |
isInfinitLoop(int currentArrangement,
int currentRow) |
protected boolean |
isInfinitLoop(int currentArrangement,
PatternRow patternRow) |
protected abstract boolean |
isNoteDelayEffekt(BasicModMixer.ChannelMemory aktMemo)
Returns true, if the Effekt and EffektOp indicate a NoteDelayEffekt
|
protected abstract boolean |
isPortaToNoteEffekt(BasicModMixer.ChannelMemory aktMemo)
Returns true, if the Effekt and EffektOp indicate a PortaToNoteEffekt
|
protected abstract boolean |
isSampleOffsetEffekt(BasicModMixer.ChannelMemory aktMemo)
Return true, if the effekt and effektop indicate the sample offset effekt
|
int |
mixIntoBuffer(int[] leftBuffer,
int[] rightBuffer,
int count)
Will mix #count 24bit signed samples in stereo into the two buffer.
|
protected void |
processEffekts(boolean inTick,
BasicModMixer.ChannelMemory aktMemo) |
protected void |
processEnvelopes(BasicModMixer.ChannelMemory aktMemo)
Processes the Envelopes
This function now sets the volume - alwayes!!
|
protected abstract void |
resetAllEffects(BasicModMixer.ChannelMemory aktMemo,
PatternElement nextElement,
boolean forced)
Clear all effekts.
|
protected void |
resetInstrument(BasicModMixer.ChannelMemory aktMemo)
Set all index values back to zero!
|
void |
setIsFastForward(boolean newFastForward) |
protected void |
setNewInstrumentAndPeriod(BasicModMixer.ChannelMemory aktMemo) |
protected void |
setNewPlayerTuningFor(BasicModMixer.ChannelMemory aktMemo)
Set the current tuning for the player
|
protected void |
setNewPlayerTuningFor(BasicModMixer.ChannelMemory aktMemo,
int newPeriod)
This Method now takes the current Period (e.g. 856<<4) and calculates the
playerTuning to be used.
|
protected void |
setupChannelFilter(BasicModMixer.ChannelMemory aktMemo,
boolean bReset,
int flt_modifier)
Simple 2-poles resonant filter
|
protected BasicModMixer.ChannelMemory[] channelMemory
protected int maxChannels
protected static final int MAX_NNA_CHANNELS
protected int currentTempo
protected int currentBPM
protected int globalTuning
protected int globalVolume
protected int globalVolumSlideValue
protected boolean useFastSlides
protected int frequencyTableType
protected int currentTick
protected int currentRow
protected int currentArrangement
protected int currentPatternIndex
protected int samplePerTicks
protected int patternDelayCount
protected int patternTicksDelayCount
protected Pattern currentPattern
protected int volRampLen
protected int patternBreakRowIndex
protected int patternPosJumpPatternIndex
protected boolean jumpLoopPositionSet
protected int jumpLoopPatternIndex
protected int jumpLoopPatternRow
protected int jumpLoopRepeatCount
protected final Module mod
protected int sampleRate
protected int doISP
protected int doNoLoops
protected boolean doFastForward
protected boolean modFinished
protected boolean doFadeOut
protected int fadeOutValue
protected int fadeOutFac
protected int fadeOutSub
protected int[] vRampL
protected int[] vRampR
protected int[] nvRampL
protected int[] nvRampR
public BasicModMixer(Module mod, int sampleRate, int doISP, int doNoLoops)
public void changeSampleRate(int newSampleRate)
newSampleRate - public void changeISP(int newISP)
newISP - public void changeDoNoLoops(int newDoNoLoops)
newISP - public void setIsFastForward(boolean newFastForward)
newFastForward - protected abstract void initializeMixer(int channel,
BasicModMixer.ChannelMemory aktMemo)
public void initializeMixer()
protected int calculateSamplesPerTick()
currentBPM - protected int getFineTunePeriod(BasicModMixer.ChannelMemory aktMemo, int period)
aktMemo - period - or noteIndexprotected int getFineTunePeriod(BasicModMixer.ChannelMemory aktMemo)
aktMemo - protected void setNewPlayerTuningFor(BasicModMixer.ChannelMemory aktMemo, int newPeriod)
aktMemo - newPeriod - protected void setNewPlayerTuningFor(BasicModMixer.ChannelMemory aktMemo)
aktMemo - protected long cutOffToFrequency(long cutOff,
int flt_modifier,
boolean isExFilterRange)
cutOff - flt_modifier - isExFilterRange - protected void setupChannelFilter(BasicModMixer.ChannelMemory aktMemo, boolean bReset, int flt_modifier)
aktMemo - bReset - flt_modifier - protected abstract void doRowEffects(BasicModMixer.ChannelMemory aktMemo)
aktMemo - protected abstract void doTickEffekts(BasicModMixer.ChannelMemory aktMemo)
aktMemo - protected abstract void doVolumeColumnRowEffekt(BasicModMixer.ChannelMemory aktMemo)
aktMemo - protected abstract void doVolumeColumnTickEffekt(BasicModMixer.ChannelMemory aktMemo)
aktMemo - protected abstract void resetAllEffects(BasicModMixer.ChannelMemory aktMemo, PatternElement nextElement, boolean forced)
aktMemo - nextElement - protected abstract boolean isNoteDelayEffekt(BasicModMixer.ChannelMemory aktMemo)
effekt - effektOp - protected abstract boolean isPortaToNoteEffekt(BasicModMixer.ChannelMemory aktMemo)
effekt - effektOp - protected abstract boolean isSampleOffsetEffekt(BasicModMixer.ChannelMemory aktMemo)
effekt - effektParam - protected void processEnvelopes(BasicModMixer.ChannelMemory aktMemo)
aktMemo - protected void resetInstrument(BasicModMixer.ChannelMemory aktMemo)
aktMemo - public int getCurrentPatternPosition()
public int getCurrentUsedChannels()
protected void setNewInstrumentAndPeriod(BasicModMixer.ChannelMemory aktMemo)
protected void processEffekts(boolean inTick,
BasicModMixer.ChannelMemory aktMemo)
aktMemo - protected boolean isInfinitLoop(int currentArrangement,
PatternRow patternRow)
protected boolean isInfinitLoop(int currentArrangement,
int currentRow)
protected void doRowEvent()
protected boolean doTickEvents()
protected void fitIntoLoops(BasicModMixer.ChannelMemory actMemo)
aktMemo - public int mixIntoBuffer(int[] leftBuffer,
int[] rightBuffer,
int count)
leftBuffer - rightBuffer - count - Copyright © 2014. All rights reserved.