1 /** 2 * This file is part of the Web Enabled Audio and Sound Enhancement Library (aka the Weasel audio library) Copyright 2011 - 2013 Warren Willmey. It is covered by the GNU General Public License version 3 as published by the Free Software Foundation, you should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. 3 */ 4 5 if( undefined == window.weasel ) window.weasel = {}; 6 7 // --------------------------------------------------------------------------- 8 /** Object containing constants that a Spreadpoint Soundtracker 2.3/2.4 module requires, in 9 * addition to those defined in FormatUltimateSoundTracker121, FormatDOCSoundTracker9 & FormatDOCSoundTracker22. 10 * The main changes in Spreadpoint Soundtracker 2.4 are in the Editor, the only changes in the replay routine are bug fixes. 11 * 12 * @constructor 13 * @const 14 */ 15 weasel.FormatSpreadpointSoundTracker23 = 16 { 17 /** The supported effects in a Spreadpoint Soundtracker 2.3 module in addition to those in DOC Soundtracker 2.2 & DOC Soundtracker 9. 18 * 19 * @const 20 * @enum {int} 21 */ 22 Effects: { 23 VolumeSlide: 10 24 } 25 , MKFingerPrint : 1080 // The Michael Kleps ID "M.K." which indicates a 31 sample module. 26 27 // Note period range is the same as DOC Soundtracker 2.2, although there is a typo in the 28 // replay for Spreadpoint Soundtracker 2.3 in that the max period is allowed to be 0x538 29 // but the editor uses 0x358 (which is the correct value, same as DOC Soundtracker 2.2). 30 // 31 32 /** The offset in bytes, from the beginning of the module, to the Song Length. 33 * Which is the number of patterns listed in the Pattern Sequence Table before 34 * the song restarts back to Pattern Sequence Table entry 0. It should be noted 35 * that there may be other unused patterns listed pasted the end of the song. 36 * 37 * @const 38 * @enum {int} 39 */ 40 , SongLength: 950 //470 41 42 /** The offset in bytes, from the beginning of the module, to where the Song Speed 43 * (also refered to as the BPM, Beats Per Minute) is stored. The Song Speed 44 * has a range of 0-220, this limit was set down in Ultimate Soundtracker 1.8. 45 * However the ability to change this value was removed in The New Masters Soundtracker 1.0 46 * and has been missing ever since. Modules saved from DOC Soundtracker 2.0 & 2.2 Spreadpoint 2.3,2.4 & 2.5 47 * all save the default value of 120. Noisetracker decided to reuse this byte as the 48 * song sequence restart position. And the Protracker series (1.0c, 2.1a) 49 * marks its Soundtracker files with 127. 50 * 51 * @const 52 * @enum {int} 53 */ 54 , SongSpeed: 951 55 56 /** The offset in bytes, from the beginning of the module, to the Pattern Sequence 57 * Table. This table contains the order that each pattern is play in. 58 * 59 * @const 60 * @enum {int} 61 */ 62 , PatternSequenceTable: 952 63 64 /** The offset in bytes, from the beginning of the module, to the first pattern. 65 * 66 * @const 67 * @enum {int} 68 */ 69 , PatternData: 1084 70 71 /** The size of the M.K. Soundtracker header plus the first pattern (which 72 * is always present). This represents the bare minimum amount of data needed for a M.K. Soundtracker module. 73 * 74 * @const 75 * @type {int} 76 */ 77 , MinimumHeaderSize: 2108 78 79 /** The number of instruments in a Ultimate Soundtracker module. 80 * @const 81 * @type {int} 82 */ 83 , NumberOfInstruments: 31 84 85 /** The size in byte of the M.K. 31 instrument Soundtracker module header, after this the pattern data appears. 86 * @const 87 * @type {int} 88 */ 89 , ModuleHeaderSize: 1084 90 91 92 /** The maximum size of a sample (in bytes) in a Spreadpoint Soundtracker 2.3/2.4 module. 93 * @const 94 * @type {int} 95 */ 96 , MaxSampleSize: 32768 97 };