Class Index | File Index

Classes


Class weasel.Instrument


Defined in: Instrument.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
weasel.Instrument(oModule, iInstrumentNumber, iSampleScannerMode, bNoisetrackerInstrument, bNoiseTrackerLoopQuirk, bProtrackerFineTuning)
Object to contain a single Instrument from the Ultimate Soundtracker module, the Instrument contains the sample associated with it.
Method Summary
Method Attributes Method Name and Description
 
Get the fine tuning value of this instrument.
 
Get the length, in words (sample pairs), of the sample, you may be looking to use Sample.getLength() instead.
 
Get the loop length in words (sample pairs), you may be looking to use Sample.getLoopLength() instead.
 
Get the loop starting offset in bytes/samples, you may be looking to use Sample.getLoopStart() instead.
 
Get the name of the instrument.
 
Get the Sample object associated with this instrument.
 
Get the volume of the instrument.
 
Is this a Noistracker instrument (looped samples play differently, they do not start from the loop start, but start from the beginning of the sample and then loop).
 
Noisetracker introduced a loop quirk (also in protracker) which is an additional loop mode where the entire sample is played first and then the loop is played but this only happens if the loop start point is set at zero.
Class Detail
weasel.Instrument(oModule, iInstrumentNumber, iSampleScannerMode, bNoisetrackerInstrument, bNoiseTrackerLoopQuirk, bProtrackerFineTuning)
Object to contain a single Instrument from the Ultimate Soundtracker module, the Instrument contains the sample associated with it.
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 module containing the instruments.
{int} iInstrumentNumber
= The number of the instrument to construct from the module data.
{weasel.Sample.prototype.SampleScannerMode} iSampleScannerMode
= Scan for IFF Header corruption residue?.
{bool} bNoisetrackerInstrument
= True : Instrument is to become a Noisetracker/Protracker instrument where as the Sample Loop Offset/Repeat Offset is stored in words not bytes. False : Repeat Offset is in bytes as used in Ultimate Soundtracker 1.21.
{bool} bNoiseTrackerLoopQuirk
= True : Instrument is to use Noisetracker/Protracker loop quirk mode which Taketracker/Fasttracker does not support.
{bool} bProtrackerFineTuning
= True : Instrument is to support the use of Protrackers Fine Tuning.
Method Detail
{int} getFineTuning()
Get the fine tuning value of this instrument.
Returns:
{int} The fine tuning value [ 0-15 in two complement form].

{int} getLengthInWords()
Get the length, in words (sample pairs), of the sample, you may be looking to use Sample.getLength() instead.
Returns:
{int} The length of the sample in words (sample pairs).

{int} getLoopLengthInWords()
Get the loop length in words (sample pairs), you may be looking to use Sample.getLoopLength() instead.
Returns:
{int} The loop length in words (sample pairs).

{int} getLoopOffsetInBytes()
Get the loop starting offset in bytes/samples, you may be looking to use Sample.getLoopStart() instead.
Returns:
{int} The loop starting offset in bytes/samples.

{String} getName()
Get the name of the instrument.
Returns:
{String} The name of the instrument as stored in the module.

{weasel.Sample} getSample()
Get the Sample object associated with this instrument.
Returns:
{weasel.Sample} The Sample belonging to this instrument.

{int} getVolume()
Get the volume of the instrument.
Returns:
{int} Volume of the instrument (0-64, 0 being silent, 64 being maximum volume).

{weasel.Sample} isNoisetrackerInstrument()
Is this a Noistracker instrument (looped samples play differently, they do not start from the loop start, but start from the beginning of the sample and then loop).
Returns:
{weasel.Sample} The Sample belonging to this instrument.

{weasel.Sample} useNoisetrackerLoopQuirk()
Noisetracker introduced a loop quirk (also in protracker) which is an additional loop mode where the entire sample is played first and then the loop is played but this only happens if the loop start point is set at zero. Handle this by copying the loop to the end of the sample data if the loop length is not the whole sample. However TakeTracker & Fasttracker DO NOT have this feature (as its related to the Amiga sound hardware).
Returns:
{weasel.Sample} The Sample belonging to this instrument.

Documentation generated by JsDoc Toolkit 2.4.0 on Mon Mar 05 2018 18:46:32 GMT-0000 (GMT)