Class Index | File Index

Classes


Class weasel.ModuleSniffer


Defined in: ModuleSniffer.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Sniff out what type of Sound Tracker Module is present, give a reason if possible.
Field Summary
Field Attributes Field Name and Description
 
Different types of Soundtracker Modules the sniffer can identify.
Method Summary
Method Attributes Method Name and Description
 
createModule(aModuleData, iPlaybackFrequency, iSampleScannerMode)
Make a Module object out of the provided data.
 
As support for more module types has been added the simple getReason() function is not providing enough information about why the module type is unsupported, as it ultimately returns the error message for either a Protracker module or a Doc Soundtracker 2.2 as these are the last sniffed module types.
 
Get the module type that the sniffer thinks its found.
 
Has the sniffer found a Soundtracker module it recognises? Returns the reason if not.
 
sniff(aModuleData, bNotSoStrict)
Sniff module data to find out what type of Soundtracker module it is.
Class Detail
weasel.ModuleSniffer()
Sniff out what type of Sound Tracker Module is present, give a reason if possible.
Author: Warren Willmey 2011..
Field Detail
SupportedModules
Different types of Soundtracker Modules the sniffer can identify.
Method Detail
{weasel.UltimateSoundTracker121|weasel.UltimateSoundTracker18|weasel.DOCSoundTracker9|weasel.DOCSoundTracker22|weasel.TJCSoundTracker2|weasel.DefJamSoundTracker3|weasel.SpreadpointSoundTracker23|weasel.SpreadpointSoundTracker25|weasel.NoiseTracker11|weasel.NoiseTracker20|weasel.ProTrackerMK|weasel.FSTModule} createModule(aModuleData, iPlaybackFrequency, iSampleScannerMode)
Make a Module object out of the provided data.
Parameters:
{Array|Uint8Array} aModuleData
= The Soundtracker module in array format.
{int} iPlaybackFrequency
= The playback frequency in Hertz to use (e.g. 44100 ).
{weasel.Sample.prototype.SampleScannerMode} iSampleScannerMode
= Scan for IFF Header corruption residue?.
Returns:
{weasel.UltimateSoundTracker121|weasel.UltimateSoundTracker18|weasel.DOCSoundTracker9|weasel.DOCSoundTracker22|weasel.TJCSoundTracker2|weasel.DefJamSoundTracker3|weasel.SpreadpointSoundTracker23|weasel.SpreadpointSoundTracker25|weasel.NoiseTracker11|weasel.NoiseTracker20|weasel.ProTrackerMK|weasel.FSTModule} = Soundtracker module object of the correct type, or NULL if not.

{Object} getAllReasons()
As support for more module types has been added the simple getReason() function is not providing enough information about why the module type is unsupported, as it ultimately returns the error message for either a Protracker module or a Doc Soundtracker 2.2 as these are the last sniffed module types. This function returns all the Reasons for each module type sniffed for.
Returns:
{Object} = Contains the reason for failure against each module type sniffed for.

{String} getModuleType()
Get the module type that the sniffer thinks its found.
Returns:
{String} = The Soundtracker module type, 'Unknown' if unable to identify.

{String} getReason()
Has the sniffer found a Soundtracker module it recognises? Returns the reason if not.
Returns:
{String} = 'ok' if Soundtracker module type is identified, else the reason for not identifying it (wrong format etc).

sniff(aModuleData, bNotSoStrict)
Sniff module data to find out what type of Soundtracker module it is.
Parameters:
{Array|Uint8Array} aModuleData
= The suspected Soundtracker module in array format.
{bool} bNotSoStrict
= Don't be so strict about module data (allows playing of some slightly different formats that are not technically DOC Soundtracker 2.2/Protracker modules (different effect numbers) or ones that have corrupted data/bad rips).

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