Class weasel.Channel
Defined in: Channel.js.
Constructor Attributes | Constructor Name and Description |
---|---|
weasel.Channel(oModule, iPlaybackFrequency, fMasterVolume)
Object to contain all the details needed for creating audio data associated
with a soundtracker channel.
|
Field Attributes | Field Name and Description |
---|---|
Supported arpeggio modes (different trackers behave slightly differently).
|
|
Supported Protracker Tremolo waveforms, note that Random does not actually
exist, its defined in the help docs (see PT 2.3a) but not in the code and just
results in a Square wave being used.
|
|
Supported Protracker Vibrato waveforms, note that Random does not actually
exist, its defined in the help docs (see PT 2.3a) but not in the code and just
results in a Square wave being used.
|
|
Supported interpolation methods (that may change in future), also used for
display names where '$' is converted to '-' and '_' becomes ' '.
|
Method Attributes | Method Name and Description |
---|---|
arpeggio(iCurrentTick, iArpeggioMode)
Apply arpeggio to the current note.
|
|
changePlaybackFrequency(iPlaybackFrequency)
Set new output play back frequency, which requires the resizing of various buffers.
|
|
Clear appropriate attributes for a (manual) song restart (not when a song loops round to the beginning).
|
|
Decrement Protracker Pattern Row Loop Effect Command's loop counter.
|
|
delaySampleStart(bDelay, fDelayInMs)
Indicate that the current sample should not start immediately, and should be
delayed by 0.768ms (12 scanlines) as this is what Karstens' Amiga replay routines does,
the delay is actually to allow the Amiga DMA to stop playing its current sample.
|
|
Is TJC Soundtracker 2 Effect Command AutoSlide enabled?
|
|
Get TJC Soundtracker 2 Effect Command AutoSlide value.
|
|
Get the Channel Interpolation type.
|
|
Get the circular audio buffer containing the rendered sample.
|
|
Get the current position in the circular array (rendered sample data is behind this offset).
|
|
get the NTSC or PAL Amiga Clock Constant.
|
|
get the NTSC or PAL Amiga Clock Constant in human readable form.
|
|
Get current pattern cell.
|
|
Get the Delayed Note Period, used by the Protracker Note Delay command.
|
|
Get the current state of the delayed sample start.
|
|
get the effect number for this Channel object.
|
|
get the effect parameter for this Channel object.
|
|
Get Protracker Sample Fine Tune.
|
|
Get the Frequency Step rate for the current note period at the current Playback Frequency Rate.
|
|
Get the instrument number for this Channel object.
|
|
Get the saved Protracker Sample Offset for latter use when 00 is used as a Parameter.
|
|
Get the last saved note period for this Channel object.
|
|
Get the current master volume of this Channel.
|
|
Get whether there is No Note Delay Quirk to be used when the current sample is played (state changes on a per row basis).
|
|
get the note period for this Channel object.
|
|
Get Taketracker/Fasttracker panning position.
|
|
Get Protracker Pattern Row Loop counter.
|
|
Get Protracker Pattern Row Loop point.
|
|
get the pending instrument number for this Channel object, pending in that
once a new note period fires the instrument will have this number.
|
|
Get Protracker Tremolo Continue Waveform setting.
|
|
Get Protracker Vibrato Continue Waveform setting.
|
|
Get Protracker Invert Loop Speed.
|
|
Get Protracker Tremolo Waveform Type setting.
|
|
Get Protracker Vibrato Waveform Type setting.
|
|
Get the Sample Object for this channel.
|
|
get the position within the sample that is being played (the sample offset) for this Channel object.
|
|
Get the last saved note period used for Pitch Bend Command for this Channel object.
|
|
get the shadow volume for this Channel object, which represent the volume
set in the pattern (not in the Volume register of the Amiga, the Protracker
Tremolo command needs this separation).
|
|
Get list of supported interpolation type, used for populating a drop down list for user selection.
|
|
get the volume for this Channel object, when the audio is created it uses this
volume level.
|
|
make(iSamplesToFill)
Make the audio data for this sound Channel.
|
|
make6PointCubicSplineInterpolation(aSampleData, iSamplesToFill)
Make/render using a 6 point Cubic spline interpolation, only call this function if frequency
step rate is less than or equal to 1 or errors will occur.
|
|
makeNoise(aSampleData, iSamplesToFill)
Make/render the requested number of instrument samples into the circular audio buffer, at the correct note frequency and volume (but no stereo panning, in mono).
|
|
makeNoiseAmigaStyle(aSampleData, iSamplesToFill)
Make/render the requested number of instrument samples into the circular audio buffer, at the correct note frequency and volume (but no stereo panning, in mono).
|
|
makeNoiseCatmullRomSplineInterpolation(aSampleData, iSamplesToFill)
Make/render using Catmull-Rom spline interpolation, only call this function if frequency
step rate is less than or equal to 1 or errors will occur.
|
|
makeNoiseCubicSplineInterpolation(aSampleData, iSamplesToFill)
Make/render using Cubic spline interpolation, only call this function if frequency
step rate is less than or equal to 1 or errors will occur.
|
|
makeNoiseLinearInterpolation(aSampleData, iSamplesToFill)
Make/render using linear interpolation, only call this function if frequency
step rate is less than or equal to 1 or errors will occur.
|
|
makeNoiseRLMDAliasReduction(aSampleData, iSamplesToFill)
Make/render using RLM-D Alias Reduction, the requested number of instrument samples into the circular
audio buffer, at the correct note frequency and volume (but no stereo panning, in mono).
|
|
makeSilence(iSamplesToFill)
Make the requested number of silent samples in the circular audio buffer.
|
|
notePortamento(iCurrentTick)
Apply Noisetracker Note Portamento to current note period, Protracker adds
a Glissando Mode on top.
|
|
pitchBend(iCurrentTick, iPitchBendDown, iPitchBendUp)
Apply pitch bend to the current note, Soundtrackers prior to Noisetracker 1.0/1,1
store separate note periods for Arpeggio and Pitch Bend Commands (Arpeggio
after a Pitchbend with be done on the original note period NOT the final Pitch Bend period).
|
|
Protracker get Sample Offset, the starting offset in samples to play the current sample.
|
|
protrackerVibrato(iCurrentTick, bRememberLastVibrato, bNoisetracker20Vibrato)
Apply Protracker Vibrato Command to current note period, different from
Noisetracker Vibrato in that the parameters (Vibrato rate and depth) get stored
independently and there are 3 different Vibrato Waveforms to choose from.
|
|
retriggerNote(iCurrentTick, iRetriggerOn, fWaitForDMAToStop)
Apply Protracker Note re-trigger.
|
|
setAutoSlide(bAutoSlide)
Set TJC Soundtracker 2 Effect Command AutoSlide enabled.
|
|
setAutoSlideValue(iAutoSlideValue)
Set TJC Soundtracker 2 Effect Command AutoSlide enabled.
|
|
setChannelInterpolation(iInterpolationType)
Set the Channel Interpolation type.
|
|
setCircularBufferPosition(iPosition)
Set the position in the circular audio buffer.
|
|
setClockConstant(bool)
Set Clock Constant to either PAL or NTSC.
|
|
setCurrentPatternCell(oPatternCell)
Set current pattern cell (this is just used for easy reference and does not
set the effects/note period/instrument of the current channel).
|
|
setDelayedNotePeriod(iNotePeriod)
Set the Delayed Note Period, used by the Protracker Note Delay command.
|
|
setEffectNumber(iEffectNumber)
Set the effect number for this Channel object.
|
|
setEffectParameter(iEffectParameter)
Set the effect parameter for this Channel object.
|
|
setFineTune(iFineTune)
Set Protracker Sample Fine Tune.
|
|
setGlissando(bGlissandoMode)
Set Protracker Glissando mode, which is used during Note Portamento (Glissando
limits the pitch bend to actual physical keys on a keyboard, for example
a piano cannot smooth pitch bend between two adjacent keys to goes from one to
the other.
|
|
setInstrumentNumber(iInstrumentNumber)
Set the instrument number for this Channel object.
|
|
setLastSampleOffsetParameter(iSampleOffsetParameter)
Set/Save Protracker Sample Offset for latter use when 00 is used as a Parameter.
|
|
setLastSavedNotePeriod(iNotePeriod)
Set the last saved period for this Channel object.
|
|
setMasterVolume(fVolume)
Set the overriding master volume for this Channel.
|
|
setMute(bMute)
Mute/un mute this channel.
|
|
setNoNoteDelayQuirk(bNoNoteDelayQuirk)
Set whether there is No Note Delay Quirk to be used when the current sample is played.
|
|
setNotePeriod(iNotePeriod)
Set the note period for this Channel object.
|
|
setNotePortamentoSpeed(iPortamentoSpeed)
Set Noisetracker Effect Command Note Portomento slide speed.
|
|
setNotePortamentoTarget(iTargetPeriod)
Set Noisetracker Effect Command Note Portomento target note period (the note to slide too).
|
|
setPanningPosition(iPanningPosition)
Set Taketracker/Fasttracker panning position.
|
|
setPatternRowLoopCounter(iLoopCounter)
Set Protracker Pattern Row Loop Effect Command's loop counter.
|
|
setPatternRowLoopStart(iRow)
Set Protracker Pattern Row Loop Effect Command.
|
|
setPendingInstrumentNumber(iPendingInstrumentNumber, oInstrument)
Set the pending instrument number for this Channel object, pending in that
once a new note period fires the instrument will have this number, the pending
instrument (oInstrument) is needed for Noisetracker/Soundtracker2.5/Protracker which
inherit the ability to seamlessly chain samples together (when one loop point has
finished it starts playing the sample loop of the pending instrument, without a pause).
|
|
setPlayFromOffset(iSampleOffset)
Protracker Set Sample Offset command, start playing a sample from a given offset instead of zero.
|
|
setProtrackerContinueTremoloWaveform(bContinue)
Set Protracker Tremolo Continue Waveform when a note is encountered or not.
|
|
setProtrackerContinueVibratoWaveform(bContinue)
Set Protracker Vibrato Continue Waveform when a note is encountered or not.
|
|
setProtrackerInvertLoopOffset(oInstrument)
Set Protracker Invert Loop Offset.
|
|
setProtrackerInvertLoopSpeed(iInvertLoopSpeed)
Set Protracker Invert Loop Speed.
|
|
setProtrackerTremoloWaveformType(iWaveformType)
Set Protracker Tremolo Waveform Type used for the Protracker Tremolo command.
|
|
setProtrackerVibratoWaveformType(iWaveformType)
Set Protracker Vibrato Waveform Type used for the Protracker Vibrato command.
|
|
setSample(oSample)
Set the Sample Object for this channel.
|
|
Set the Sample Accumulator, which is used by makeNoiseAliasReduction()
to reduce (but not eliminate) the aliasing, it is set to the first sample of
the current instrument, without volume being applied.
|
|
setSamplePosition(fSamplePosition)
get the position within the sample that is being played (the sample offset) for this Channel object.
|
|
setShadowNotePeriod(iNotePeriod)
Set the last saved period used for Pitch Bend Command for this Channel object.
|
|
setTremoloTablePosition(iTableOffset)
Set Protracker Tremolo Table Position.
|
|
setVibratoTablePosition(iTableOffset)
Set Noisetracker Vibrato Table Position.
|
|
setVolume(iVolume)
Set the volume for this Channel object.
|
|
tremolo(iCurrentTick, bProtrackerBugMode)
Apply Protracker Tremolo Command.
|
|
Handle Protracker Invert Loop updates to the current sample.
|
|
vibrato(iCurrentTick, bRememberLastVibrato, bNoisetracker20Vibrato)
Apply Noisetracker Vibrato Command to current note period.
|
|
volumeSlide(iCurrentTick)
Apply volume slide to current channel, as used by TJC Soundktracker 2, Spreadpoint Soundtracker 2.3, Noisetracker 1.1/2.0.
|
Class Detail
weasel.Channel(oModule, iPlaybackFrequency, fMasterVolume)
Object to contain all the details needed for creating audio data associated
with a soundtracker channel.
Author: Warren Willmey 2011.
Author: Warren Willmey 2011.
- Parameters:
- {weasel.UltimateSoundTracker121|weasel.UltimateSoundTracker18|weasel.DOCSoundTracker9|weasel.DOCSoundTracker22|weasel.TJCSoundTracker2|weasel.DefJamSoundTracker3|weasel.SpreadpointSoundTracker23|weasel.SpreadpointSoundTracker25|weasel.NoiseTracker11|weasel.NoiseTracker20|weasel.ProTrackerMK|weasel.FSTModule} oModule
- = The current module.
- {int} iPlaybackFrequency
- = The playback frequency in hertz to use.
- {float} fMasterVolume
- = The master volume for this channel (0.0 to 1.0 range)..
Field Detail
ArpeggioMode
Supported arpeggio modes (different trackers behave slightly differently).
ProtrackerTremoloWaveform
Supported Protracker Tremolo waveforms, note that Random does not actually
exist, its defined in the help docs (see PT 2.3a) but not in the code and just
results in a Square wave being used.
ProtrackerVibratoWaveform
Supported Protracker Vibrato waveforms, note that Random does not actually
exist, its defined in the help docs (see PT 2.3a) but not in the code and just
results in a Square wave being used.
SupportedInterpolationTypes
Supported interpolation methods (that may change in future), also used for
display names where '$' is converted to '-' and '_' becomes ' '.
Method Detail
arpeggio(iCurrentTick, iArpeggioMode)
Apply arpeggio to the current note.
- Parameters:
- {int} iCurrentTick
- = The current row tick value (0-5 range).
- {weasel.Channel.prototype.ArpeggioMode} iArpeggioMode
- = Some Soundtracker Arpeggio's were bugged prior to Noisetracker 1.0/1.1 if they have used the SetSpeed Command they where unable to handle a current row tick greater than 5 (they just ignored Arpeggio). And they cannot be combined with Pitch Bend command as they use their own Note Period for the Arpeggio which does not change with the Pitch Bend (this was corected in Noisetracker), Protracker has Fine Tune applied.
changePlaybackFrequency(iPlaybackFrequency)
Set new output play back frequency, which requires the resizing of various buffers.
- Parameters:
- {int} iPlaybackFrequency
- = new replay play back frequency.
clearChannel()
Clear appropriate attributes for a (manual) song restart (not when a song loops round to the beginning).
decPatternRowLoopCounter()
Decrement Protracker Pattern Row Loop Effect Command's loop counter.
delaySampleStart(bDelay, fDelayInMs)
Indicate that the current sample should not start immediately, and should be
delayed by 0.768ms (12 scanlines) as this is what Karstens' Amiga replay routines does,
the delay is actually to allow the Amiga DMA to stop playing its current sample.
- Parameters:
- {bool} bDelay
- = true : delay the sample.
- {float} fDelayInMs
- = The delay, in milliseconds, to use.
{bool}
getAutoSlide()
Is TJC Soundtracker 2 Effect Command AutoSlide enabled?
- Returns:
- {bool} = True : AutoSlide enabled, False : AutoSlide disabled.
{int}
getAutoSlideValue()
Get TJC Soundtracker 2 Effect Command AutoSlide value.
- Returns:
- {int} = The amount to slide the volume by this tick [-15 to 15].
{int}
getChannelInterpolation()
Get the Channel Interpolation type.
- Returns:
- {int} = The channel interpolation value, 0 = none, 1 = RLM-D Alias Reduction, 2 = Linear Interpolation.
{Array}
getCircularAudioBuffer()
Get the circular audio buffer containing the rendered sample.
- Returns:
- {Array} = The circular array containing the rendered sample data.
{int}
getCircularBufferPosition()
Get the current position in the circular array (rendered sample data is behind this offset).
- Returns:
- {int} = The current position in the circular array containing the rendered sample data.
{int}
getClockConstant()
get the NTSC or PAL Amiga Clock Constant.
- Returns:
- {int} = The Amiga Clock Constant.
getClockConstantType()
get the NTSC or PAL Amiga Clock Constant in human readable form.
- Returns:
- string = The Amiga Clock Constant in human readable form e.g. 'PAL' or 'NTSC'.
{weasel.PatternCell|weasel.MKPatternCell}
getCurrentPatternCell()
Get current pattern cell.
- Returns:
- {weasel.PatternCell|weasel.MKPatternCell} = The current pattern cell.
{int}
getDelayedNotePeriod()
Get the Delayed Note Period, used by the Protracker Note Delay command..
- Returns:
- {int} = The note period to be used by the Note Delay command.
{bool}
getDelaySampleStart()
Get the current state of the delayed sample start.
- Returns:
- {bool} = The delayed start.
{int}
getEffectNumber()
get the effect number for this Channel object.
- Returns:
- {int} = The effect number.
{int}
getEffectParameter()
get the effect parameter for this Channel object.
- Returns:
- {int} = The effect parameter.
{int}
getFineTune()
Get Protracker Sample Fine Tune.
- Returns:
- {int} = The Fine Tune value as stored in the pattern (0-15).
getFrequencyStepRate()
Get the Frequency Step rate for the current note period at the current Playback Frequency Rate.
- Returns:
- float = The frequency step rate of the current note period at the current Playback Frequency Rate.
{int}
getInstrumentNumber()
Get the instrument number for this Channel object.
- Returns:
- {int} = The instrument number.
{int}
getLastSampleOffsetParameter()
Get the saved Protracker Sample Offset for latter use when 00 is used as a Parameter.
- Returns:
- {int} = The parameter part of the previously saved Set Sample Offset command.
{int}
getLastSavedNotePeriod()
Get the last saved note period for this Channel object.
- Returns:
- {int} = The last saved note period.
{float}
getMasterVolume()
Get the current master volume of this Channel.
- Returns:
- {float} The current master volume.
{bool}
getNoNoteDelayQuirk()
Get whether there is No Note Delay Quirk to be used when the current sample is played (state changes on a per row basis).
- Returns:
- {bool} = true : No Note Delay Quirk (so normal DMA Wait start), false : Note Delay Quirk effecting this channel.
{int}
getNotePeriod()
get the note period for this Channel object.
- Returns:
- {int} = The current note period.
{int}
getPanningPosition()
Get Taketracker/Fasttracker panning position.
- Returns:
- {int} = The Taketracker/Fasttracker panning position [0-255] where 0 = full left, 255 full right and 128 is middle.
{int}
getPatternRowLoopCounter()
Get Protracker Pattern Row Loop counter.
- Returns:
- {int} = The current Pattern Row Loop counter value.
{int}
getPatternRowLoopStart()
Get Protracker Pattern Row Loop point.
- Returns:
- {int} = The row number in the current pattern to loop too.
{int}
getPendingInstrumentNumber()
get the pending instrument number for this Channel object, pending in that
once a new note period fires the instrument will have this number.
- Returns:
- {int} = The pending instrument number.
{bool}
getProtrackerContinueTremoloWaveform()
Get Protracker Tremolo Continue Waveform setting.
- Returns:
- {bool} = Whether the Tremolo waveform will be restart when a new note is encountered.
{bool}
getProtrackerContinueVibratoWaveform()
Get Protracker Vibrato Continue Waveform setting.
- Returns:
- {bool} = Whether the vibrato waveform will be restart when a new note is encountered.
{int}
getProtrackerInvertLoopSpeed()
Get Protracker Invert Loop Speed.
- Returns:
- {int} = The Protracker Invert Loop Speed.
{weasel.Channel.prototype.ProtrackerTremoloWaveform}
getProtrackerTremoloWaveformType()
Get Protracker Tremolo Waveform Type setting.
- Returns:
- {weasel.Channel.prototype.ProtrackerTremoloWaveform} = The Protracker Tremolo Waveform type.
{weasel.Channel.prototype.ProtrackerVibratoWaveform}
getProtrackerVibratoWaveformType()
Get Protracker Vibrato Waveform Type setting.
- Returns:
- {weasel.Channel.prototype.ProtrackerVibratoWaveform} = The Protracker Vibrato Waveform type.
{weasel.Sample}
getSample()
Get the Sample Object for this channel.
- Returns:
- {weasel.Sample} = The Sample object to use.
{float}
getSamplePosition()
get the position within the sample that is being played (the sample offset) for this Channel object.
- Returns:
- {float} = The current sample offset (in samples).
{int}
getShadowNotePeriod()
Get the last saved note period used for Pitch Bend Command for this Channel object.
Soundtrackers prior to Noisetracker 1.0/1.1 used a separate note period for
Pitch Bend Effect Command. Resulting in different note period when switching
between Arpeggio and Pitch Bend.
- Returns:
- {int} = The last saved note period.
{int}
getShadowVolume()
get the shadow volume for this Channel object, which represent the volume
set in the pattern (not in the Volume register of the Amiga, the Protracker
Tremolo command needs this separation).
- Returns:
- {int} = The shadow volume.
{weasel.Channel.prototype.SupportedInterpolationTypes}
getSupportedInterpolationTypes()
Get list of supported interpolation type, used for populating a drop down list for user selection.
- Returns:
- {weasel.Channel.prototype.SupportedInterpolationTypes} = The list of supported interpolation types.
{int}
getVolume()
get the volume for this Channel object, when the audio is created it uses this
volume level.
- Returns:
- {int} = The current volume.
make(iSamplesToFill)
Make the audio data for this sound Channel.
- Parameters:
- {int} iSamplesToFill
- = The number of samples to make.
make6PointCubicSplineInterpolation(aSampleData, iSamplesToFill)
Make/render using a 6 point Cubic spline interpolation, only call this function if frequency
step rate is less than or equal to 1 or errors will occur.
Author: Warren Willmey 2011, references based on algo posted by David Waugh, which in turn comes from Joshua Scholar..
Author: Warren Willmey 2011, references based on algo posted by David Waugh, which in turn comes from Joshua Scholar..
- Parameters:
- {Array} aSampleData
- = The current Instrument Sample Data to render.
- {int} iSamplesToFill
- = The Samples to make.
makeNoise(aSampleData, iSamplesToFill)
Make/render the requested number of instrument samples into the circular audio buffer, at the correct note frequency and volume (but no stereo panning, in mono).
- Parameters:
- {Array} aSampleData
- = The current Instrument Sample Data to render.
- {int} iSamplesToFill
- = The Samples to make.
makeNoiseAmigaStyle(aSampleData, iSamplesToFill)
Make/render the requested number of instrument samples into the circular audio buffer, at the correct note frequency and volume (but no stereo panning, in mono).
- Parameters:
- {Array} aSampleData
- = The current Instrument Sample Data to render.
- {int} iSamplesToFill
- = The Samples to make.
makeNoiseCatmullRomSplineInterpolation(aSampleData, iSamplesToFill)
Make/render using Catmull-Rom spline interpolation, only call this function if frequency
step rate is less than or equal to 1 or errors will occur.
Author: Warren Willmey 2011, reference Paul Bourke "Interpolation methods"..
Author: Warren Willmey 2011, reference Paul Bourke "Interpolation methods"..
- Parameters:
- {Array} aSampleData
- = The current Instrument Sample Data to render.
- {int} iSamplesToFill
- = The Samples to make.
makeNoiseCubicSplineInterpolation(aSampleData, iSamplesToFill)
Make/render using Cubic spline interpolation, only call this function if frequency
step rate is less than or equal to 1 or errors will occur.
Author: Warren Willmey 2011, reference Paul Bourke "Interpolation methods"..
Author: Warren Willmey 2011, reference Paul Bourke "Interpolation methods"..
- Parameters:
- {Array} aSampleData
- = The current Instrument Sample Data to render.
- {int} iSamplesToFill
- = The Samples to make.
makeNoiseLinearInterpolation(aSampleData, iSamplesToFill)
Make/render using linear interpolation, only call this function if frequency
step rate is less than or equal to 1 or errors will occur.
- Parameters:
- {Array} aSampleData
- = The current Instrument Sample Data to render.
- {int} iSamplesToFill
- = The Samples to make.
makeNoiseRLMDAliasReduction(aSampleData, iSamplesToFill)
Make/render using RLM-D Alias Reduction, the requested number of instrument samples into the circular
audio buffer, at the correct note frequency and volume (but no stereo panning, in mono).
This useful technique I worked out on the (ahem) "other" machine (the Atari ST..) in the early 90ies
it applies a small amount of feedback/echo PER sample byte which quickly fades out
thus does not destroy the original sample and its not linear interpolation, leaving
enough of aliasing noise to be heard but not enough to be annoying. This is very useful
for samples that depend on aliasing noise for timbre, such as percussion or square/sawtooth waveforms
but smooths out sinewave/low frequency samples. Downfall is its very dependant on the replay frequency (you wont hear any effect at 192khz).
- Parameters:
- {Array} aSampleData
- = The current Instrument Sample Data to render.
- {int} iSamplesToFill
- = The Samples to make.
makeSilence(iSamplesToFill)
Make the requested number of silent samples in the circular audio buffer.
- Parameters:
- {int} iSamplesToFill
- = The number of samples of silence to make.
notePortamento(iCurrentTick)
Apply Noisetracker Note Portamento to current note period, Protracker adds
a Glissando Mode on top.
- Parameters:
- {int} iCurrentTick
- = The current row tick value (tick of 0 ignores note portamento).
pitchBend(iCurrentTick, iPitchBendDown, iPitchBendUp)
Apply pitch bend to the current note, Soundtrackers prior to Noisetracker 1.0/1,1
store separate note periods for Arpeggio and Pitch Bend Commands (Arpeggio
after a Pitchbend with be done on the original note period NOT the final Pitch Bend period).
- Parameters:
- {int} iCurrentTick
- = The current row tick value (tick of 0 ignores pitch bend).
- {int} iPitchBendDown
- = The pitch bend down effect parameter.
- {int} iPitchBendUp
- = The pitch bend up effect parameter.
{int}
playFromOffset()
Protracker get Sample Offset, the starting offset in samples to play the current sample.
- Returns:
- {int} = The starting offset in samples to play the current sample.
protrackerVibrato(iCurrentTick, bRememberLastVibrato, bNoisetracker20Vibrato)
Apply Protracker Vibrato Command to current note period, different from
Noisetracker Vibrato in that the parameters (Vibrato rate and depth) get stored
independently and there are 3 different Vibrato Waveforms to choose from.
- Parameters:
- {int} iCurrentTick
- = The current row tick value (tick of 0 ignores note portamento).
- {bool} bRememberLastVibrato
- = Remember last Vibrato Effect Parameter (used for VibratoAndVolumeSlide Command).
- {bool} bNoisetracker20Vibrato
- = True : Noisetracker 2.0 applies a smaller Vibrato that Noisetracker 1.1, this also applies to Protracker 1.0c and below, Protracker 1.1a and above adopted the same Vibrato Depth as Noisetracker 2.0.
{bool}
retriggerNote(iCurrentTick, iRetriggerOn, fWaitForDMAToStop)
Apply Protracker Note re-trigger.
- Parameters:
- {int} iCurrentTick
- = The current row tick value.
- {int} iRetriggerOn
- = The number of ticks to re-trigger, this is applied as a modulus so a value of 2 causes a trigger every 2 ticks,( Range 0-15 ).
- {float} fWaitForDMAToStop
- = The value to use (in milliseconds) for the pause between samples, typically weasel.FormatNoiseTracker11.WaitForDMAToStop.
- Returns:
- {bool} True = sample retriggered this Tick, false = Sample not retriggered this Tick.
setAutoSlide(bAutoSlide)
Set TJC Soundtracker 2 Effect Command AutoSlide enabled.
- Parameters:
- {bool} bAutoSlide
- = True : AutoSlide enabled, False : AutoSlide disabled.
setAutoSlideValue(iAutoSlideValue)
Set TJC Soundtracker 2 Effect Command AutoSlide enabled.
- Parameters:
- {int} iAutoSlideValue
- = The amount to slide the volume by this tick [-15 to 15].
setChannelInterpolation(iInterpolationType)
Set the Channel Interpolation type.
- Parameters:
- {int} iInterpolationType
- =0 = none, 1 = RLM-D Alias Reduction, 2 = Linear Interpolation.
setCircularBufferPosition(iPosition)
Set the position in the circular audio buffer.
- Parameters:
- {int} iPosition
- = The new position in the the circular audio buffer.
setClockConstant(bool)
Set Clock Constant to either PAL or NTSC.
- Parameters:
- bool
- bClockConstant = true : PAL, false : NTSC.
setCurrentPatternCell(oPatternCell)
Set current pattern cell (this is just used for easy reference and does not
set the effects/note period/instrument of the current channel).
- Parameters:
- {weasel.PatternCell|weasel.MKPatternCell} oPatternCell
- = The current pattern cell, can be null.
setDelayedNotePeriod(iNotePeriod)
Set the Delayed Note Period, used by the Protracker Note Delay command.
- Parameters:
- {int} iNotePeriod
- = The note period to be used by the Note Delay command.
setEffectNumber(iEffectNumber)
Set the effect number for this Channel object.
- Parameters:
- {int} iEffectNumber
- = The effect number.
setEffectParameter(iEffectParameter)
Set the effect parameter for this Channel object.
- Parameters:
- {int} iEffectParameter
- = The effect parameter.
setFineTune(iFineTune)
Set Protracker Sample Fine Tune.
- Parameters:
- {int} iFineTune
- = The Fine Tune value as stored in the pattern (0-15).
setGlissando(bGlissandoMode)
Set Protracker Glissando mode, which is used during Note Portamento (Glissando
limits the pitch bend to actual physical keys on a keyboard, for example
a piano cannot smooth pitch bend between two adjacent keys to goes from one to
the other. Unlike a trombone).
- Parameters:
- {bool} bGlissandoMode
- = Enable/ disable Glissando when using Toneportamento.
setInstrumentNumber(iInstrumentNumber)
Set the instrument number for this Channel object.
- Parameters:
- {int} iInstrumentNumber
- = The instrument number.
setLastSampleOffsetParameter(iSampleOffsetParameter)
Set/Save Protracker Sample Offset for latter use when 00 is used as a Parameter.
- Parameters:
- {int} iSampleOffsetParameter
- = The parameter part of the Set Sample Offset command [0-255].
setLastSavedNotePeriod(iNotePeriod)
Set the last saved period for this Channel object.
- Parameters:
- {int} iNotePeriod
- = The note period.
setMasterVolume(fVolume)
Set the overriding master volume for this Channel.
- Parameters:
- {float} fVolume
- = The volume range ( 0.0 - 1.0 ) although a range of 0.0 to 2.0 is accepted, the volume levels may not be clamped by the mixer causing clicks/pops etc.
setMute(bMute)
Mute/un mute this channel.
- Parameters:
- {boolean} bMute
- = TRUE: silence this channel, FALSE: un-silence this channel.
setNoNoteDelayQuirk(bNoNoteDelayQuirk)
Set whether there is No Note Delay Quirk to be used when the current sample is played.
- Parameters:
- {bool} bNoNoteDelayQuirk
- = True : No Note Delay Quirk, False : Note Delay Quirk effecting this channel.
setNotePeriod(iNotePeriod)
Set the note period for this Channel object.
- Parameters:
- {int} iNotePeriod
- = The note period.
setNotePortamentoSpeed(iPortamentoSpeed)
Set Noisetracker Effect Command Note Portomento slide speed.
- Parameters:
- {int} iPortamentoSpeed
- = The speed at which to slide the note, if not zero.
setNotePortamentoTarget(iTargetPeriod)
Set Noisetracker Effect Command Note Portomento target note period (the note to slide too).
- Parameters:
- {int} iTargetPeriod
- = The note period to slide too.
setPanningPosition(iPanningPosition)
Set Taketracker/Fasttracker panning position.
- Parameters:
- {int} iPanningPosition
- = The Taketracker/Fasttracker panning position [0-255] where 0 = full left, 255 full right and 128 is middle.
setPatternRowLoopCounter(iLoopCounter)
Set Protracker Pattern Row Loop Effect Command's loop counter.
- Parameters:
- {int} iLoopCounter
- = The number of times to loop.
setPatternRowLoopStart(iRow)
Set Protracker Pattern Row Loop Effect Command.
- Parameters:
- {int} iRow
- = The row number in the current pattern to loop to.
setPendingInstrumentNumber(iPendingInstrumentNumber, oInstrument)
Set the pending instrument number for this Channel object, pending in that
once a new note period fires the instrument will have this number, the pending
instrument (oInstrument) is needed for Noisetracker/Soundtracker2.5/Protracker which
inherit the ability to seamlessly chain samples together (when one loop point has
finished it starts playing the sample loop of the pending instrument, without a pause).
- Parameters:
- {int} iPendingInstrumentNumber
- = The pending instrument number.
- {weasel.Instrument} oInstrument
- = The pending instrument, which is used for Noisetracker Loop Chaining of samples together.
setPlayFromOffset(iSampleOffset)
Protracker Set Sample Offset command, start playing a sample from a given offset instead of zero.
- Parameters:
- {int} iSampleOffset
- = The sample offset.
setProtrackerContinueTremoloWaveform(bContinue)
Set Protracker Tremolo Continue Waveform when a note is encountered or not.
- Parameters:
- {bool} bContinue
- = true : do not restart the waveform when a new note is encountered. false : Restart Tremolo waveform when a new note is encountered.
setProtrackerContinueVibratoWaveform(bContinue)
Set Protracker Vibrato Continue Waveform when a note is encountered or not.
- Parameters:
- {bool} bContinue
- = true : do not restart the waveform when a new note is encountered. false : Restart vibrato waveform when a new note is encountered.
setProtrackerInvertLoopOffset(oInstrument)
Set Protracker Invert Loop Offset.
- Parameters:
- {weasel.Instrument} oInstrument
- = The current instrument.
setProtrackerInvertLoopSpeed(iInvertLoopSpeed)
Set Protracker Invert Loop Speed.
- Parameters:
- {int} iInvertLoopSpeed
- = The Invert Loop Speed.
setProtrackerTremoloWaveformType(iWaveformType)
Set Protracker Tremolo Waveform Type used for the Protracker Tremolo command.
- Parameters:
- {weasel.Channel.prototype.ProtrackerTremoloWaveform} iWaveformType
- = The Tremolo Waveform type to use.
setProtrackerVibratoWaveformType(iWaveformType)
Set Protracker Vibrato Waveform Type used for the Protracker Vibrato command.
- Parameters:
- {weasel.Channel.prototype.ProtrackerVibratoWaveform} iWaveformType
- = The Vibrato Waveform type to use.
setSample(oSample)
Set the Sample Object for this channel.
- Parameters:
- {weasel.Sample} oSample
- = The Sample object to use.
setSampleAccumulator()
Set the Sample Accumulator, which is used by makeNoiseAliasReduction()
to reduce (but not eliminate) the aliasing, it is set to the first sample of
the current instrument, without volume being applied.
setSamplePosition(fSamplePosition)
get the position within the sample that is being played (the sample offset) for this Channel object.
- Parameters:
- {float} fSamplePosition
- = The sample offset (in samples).
setShadowNotePeriod(iNotePeriod)
Set the last saved period used for Pitch Bend Command for this Channel object.
Soundtrackers prior to Noisetracker 1.0/1.1 used a separate note period for
Pitch Bend Effect Command. Resulting in different note period when switching
between Arpeggio and Pitch Bend.
- Parameters:
- {int} iNotePeriod
- = The note period.
setTremoloTablePosition(iTableOffset)
Set Protracker Tremolo Table Position.
- Parameters:
- {int} iTableOffset
- = The current position in the sinewave [0-255] of the Tremolo, set to zero when a new sample is started in Protracker.
setVibratoTablePosition(iTableOffset)
Set Noisetracker Vibrato Table Position.
- Parameters:
- {int} iTableOffset
- = The current position in the sinewave [0-255] of the Vibrato, set to zero when a new sample is started in Noisetracker.
setVolume(iVolume)
Set the volume for this Channel object.
- Parameters:
- {int} iVolume
- = The volume (0-64).
tremolo(iCurrentTick, bProtrackerBugMode)
Apply Protracker Tremolo Command.
- Parameters:
- {int} iCurrentTick
- = The current row tick value (tick of 0 ignores note portamento).
- {bool} bProtrackerBugMode
- = true : The Protracker series has a bug when using the Ramp Down Sawtooth waveform during the Tremolo command (the other waveform types are fine). The bug is caused by using the Vibrato Table Position instead of the Tremolo Table Position during construction of the sawtooth resulting in a Ramp Up (not Ramp Down) sawooth if the Vibrato command is not used or a triangle-ish waveform that almost randomly changes direction if the Vibrato command has been used on the same channel. Even more weird is that I've been sitting on this bug for ~20 years! :-O Good to finally get it off the chest so to speak! Especially as its obviously just a cut and paste error (the code for the Vibrato is 95% the same). False : Behave as expected (without the bug). The Protracker series also contains another bug in the Editor (but NOT in th replay.s) in that it resets the volume to that of the sample on every tick 0, so for Ramp Down it creates an annoying clicking noise.
updateProtrackerInvertLoop()
Handle Protracker Invert Loop updates to the current sample.
vibrato(iCurrentTick, bRememberLastVibrato, bNoisetracker20Vibrato)
Apply Noisetracker Vibrato Command to current note period.
- Parameters:
- {int} iCurrentTick
- = The current row tick value (tick of 0 ignores note portamento).
- {bool} bRememberLastVibrato
- = Remember last Vibrato Effect Parameter (used for VibratoAndVolumeSlide Command).
- {bool} bNoisetracker20Vibrato
- = True : Noisetracker 2.0 applies a smaller Vibrato that Noisetracker 1.1.
volumeSlide(iCurrentTick)
Apply volume slide to current channel, as used by TJC Soundktracker 2, Spreadpoint Soundtracker 2.3, Noisetracker 1.1/2.0.
- Parameters:
- {int} iCurrentTick
- = The current row tick value (tick of 0 ignores volumeSlide).