<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multimedia.cx/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=RepellantMold</id>
	<title>MultimediaWiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multimedia.cx/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=RepellantMold"/>
	<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php/Special:Contributions/RepellantMold"/>
	<updated>2026-04-21T15:43:56Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.5</generator>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=Scream_Tracker_2_Module&amp;diff=16084</id>
		<title>Scream Tracker 2 Module</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=Scream_Tracker_2_Module&amp;diff=16084"/>
		<updated>2025-10-07T16:16:56Z</updated>

		<summary type="html">&lt;p&gt;RepellantMold: correct a minor blip i forgot to fix&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Extension: stm&lt;br /&gt;
A 4-channel module format somewhat similar to [[Protracker_Module|Protracker/Amiga]] for MS-DOS on the PC.&lt;br /&gt;
&lt;br /&gt;
==File Format==&lt;br /&gt;
&lt;br /&gt;
The format is little-endian (least significant byte first). A &amp;quot;byte&amp;quot; is 8 bits, a &amp;quot;word&amp;quot; is 16 bits, and a &amp;quot;dword&amp;quot; (double word) is 32 bits. Hex values will be denoted with &amp;quot;0x&amp;quot;. A parapointer is 16 bits wide, and points to pp*16 in the file due to the DOS nature of the format.&lt;br /&gt;
&lt;br /&gt;
*20 bytes: Module name, NUL-padded.&lt;br /&gt;
*8 bytes: Tracker identifier string. It's best to just check if the entire string is printable ASCII.&lt;br /&gt;
** '''!Scream!''' - The most common tag that's checked for, usually treated as a magic string.&lt;br /&gt;
** '''BMOD2STM''' - A MOD to STM conversion utility&lt;br /&gt;
** '''WUZAMOD!''' - Currently unknown, any searches for references just yields other players supporting the string...&lt;br /&gt;
** '''SWavePro''' - SoundWave Pro&lt;br /&gt;
** '''!Scrvrt!''' - [[User:RepellantMold|RepellantMold's]] [https://codeberg.org/repellantsoftware/Screamverter-DOS S3M to STM converter].&lt;br /&gt;
*Byte: Usually 0x1A, though 2 files were spotted to have 0x02 instead. ST3 checks the field while ST2 doesn't.&lt;br /&gt;
*Byte: File type, 1 is song (no samples) and 2 is module (has samples)&lt;br /&gt;
*Byte: Major file version (x), usually 2&lt;br /&gt;
*Byte: Minor file version (yy), usually 21&lt;br /&gt;
I'll be referring to file version as x.yy from here on out, also note that the file version does ''not'' mean tracker version!&lt;br /&gt;
*Byte: Initial tempo&lt;br /&gt;
*Byte: Pattern count (range 1 &amp;lt;= x &amp;lt;= 63)&lt;br /&gt;
*Byte: Global volume (range 0 &amp;lt;= x &amp;lt;= 64)&lt;br /&gt;
*13 bytes: Reserved&lt;br /&gt;
*31 instruments:&lt;br /&gt;
**12 bytes: DOS File name, NUL-terminated&lt;br /&gt;
**Byte: Reserved (always 0)&lt;br /&gt;
**Byte: Instrument disk (range 0 &amp;lt;= x &amp;lt;= 99)&lt;br /&gt;
**Word: Parapointer to sample data (annoyingly, ST2's TECH.DOC marked this as reserved which no doubt caused a lot of confusion!)&lt;br /&gt;
**Word: Length in bytes&lt;br /&gt;
**Word: Loop start in bytes&lt;br /&gt;
**Word: Loop end in bytes (0xFFFF means to never loop, ST2 also does not sanitize the loop end field so it can go beyond length!)&lt;br /&gt;
**Byte: Default volume (range 0 &amp;lt;= x &amp;lt;= 64 - 0 is undefined behavior in ST2 and will make the parapointer point in a random spot if the length is not blank, which no doubt made tools struggle if they had relied on guessing based on the &amp;quot;guess&amp;quot; method for grabbing samples)&lt;br /&gt;
**Byte: Reserved&lt;br /&gt;
**Word: C speed&lt;br /&gt;
**6 bytes: Reserved&lt;br /&gt;
*128 bytes or 64 bytes if the file version is 2.00: Order list - 99 means no pattern, though a single 255 can also be seen. Any orders that are above the pattern count should be treated as blank patterns, and patterns above 63 are undefined behavior.&lt;br /&gt;
*Pattern data:&lt;br /&gt;
**You read one byte&lt;br /&gt;
***if the byte is 0xFB, 0xFC, or 0xFD then define instrument, volume, effect to be blank values or 0 in the case of 0xFB and skip. If it's any other value then read the next 3 bytes.&lt;br /&gt;
**A regular pattern cell has the format of 4 bytes, represented in bits as oooonnnn iiiiivvv VVVVeeee xxxxyyyy&lt;br /&gt;
***oooo is the notes octave, (0 - 4, all other values play nothing), nnnn is the notes pitch (0 - 11, all other values display as garbage and play nothing).&lt;br /&gt;
***iiiii is instrument, 0 - 31, 0 is a blank cell.&lt;br /&gt;
***VVVVvvv is the volume (0 - 127, 65 means empty, other values overflow ST2's volume table and display as &amp;quot;??&amp;quot;)&lt;br /&gt;
***eeeexxxxyyyy is the effect, eeee is the effect type while xxxx and yyyy is the effect parameter.&lt;br /&gt;
**Rinse and repeat for 4 channels and 64 rows!&lt;br /&gt;
*Signed 8-bit mono sample data, padded to the nearest 16 bytes&lt;br /&gt;
&lt;br /&gt;
==Playback notes==&lt;br /&gt;
&lt;br /&gt;
Tempo is rather bizarre in Scream Tracker 2, as it has speed (ticks per row in other trackers) in the high nibble then then a scaling factor in the low nibble. If the minor file version is &amp;lt;= 20, then this is in decimal, as in the &amp;quot;speed&amp;quot; will be in the tens digit with scale being in the ones digit with a range of 0 to 9.&lt;br /&gt;
Speed gets clamped to 1 if it has a value of 0.&lt;br /&gt;
The actual tempo is also dependent on the mixing rate (which in ST2 will either be 5000, 6500, 8000, 9943, 11932, 13000, 15909, 17045, 19886, or 23863 Hz).&lt;br /&gt;
&lt;br /&gt;
TODO: Either get a table of all possible speeds, or show the formula&lt;br /&gt;
&lt;br /&gt;
==Effects==&lt;br /&gt;
&lt;br /&gt;
All effects are treated as no-op if the parameter is 0x00.&lt;br /&gt;
&lt;br /&gt;
Effects are displayed as letters (A, B, C, ...) rather than numbers (1, 2, 3, ...). The entire range is from A to O but only A and J have any kind of functionality, other values may bug out tools or even Scream Tracker 3!&lt;br /&gt;
&lt;br /&gt;
===Axy===&lt;br /&gt;
Set tempo to x per row with a scale of y. If the file version has a minor version less than 21, e.g. 2.20, then it's in decimal (like 60 rather than 0x60).&lt;br /&gt;
&lt;br /&gt;
===Bxx===&lt;br /&gt;
Set next order, this effect does not break the pattern immediately.&lt;br /&gt;
&lt;br /&gt;
===Cxx===&lt;br /&gt;
Break to the next pattern, parameter is ignored.&lt;br /&gt;
&lt;br /&gt;
===Dxy===&lt;br /&gt;
Volume slide. Identical to Scream Tracker 3, however fine slides do not exist.&lt;br /&gt;
&lt;br /&gt;
===Exx===&lt;br /&gt;
Slide down. Identical to Scream Tracker 3, however fine slides do not exist. It also has the odd quirk of having the ability to underflow to a really high note if &lt;br /&gt;
&lt;br /&gt;
===Fxx===&lt;br /&gt;
Slide up.&lt;br /&gt;
&lt;br /&gt;
===Gxx===&lt;br /&gt;
Slide to note. '''If a sample is specified without volume, the volume does not get reset to its default setting.'''&lt;br /&gt;
&lt;br /&gt;
===Hxy===&lt;br /&gt;
Vibrato. '''Depth is doubled when compared to other trackers!'''&lt;br /&gt;
&lt;br /&gt;
===Ixy===&lt;br /&gt;
Tremor. Identical to Scream Tracker 3, sans effect memory resulting in 0 being very fast.&lt;br /&gt;
&lt;br /&gt;
===Jxy===&lt;br /&gt;
Arpeggio. This effect was implemented rather late, being implemented starting ST2.24. This effect is rather bugged as it skips to y halfway through a row if x is 0.&lt;br /&gt;
&lt;br /&gt;
[[Category: Music Pattern Formats]]&lt;/div&gt;</summary>
		<author><name>RepellantMold</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=Scream_Tracker_3_Module&amp;diff=16064</id>
		<title>Scream Tracker 3 Module</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=Scream_Tracker_3_Module&amp;diff=16064"/>
		<updated>2025-06-20T14:34:38Z</updated>

		<summary type="html">&lt;p&gt;RepellantMold: Add in instrument format, and how SAx works&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Extension: s3m&lt;br /&gt;
A normally 16-channel module format for MS-DOS on the PC, it can also support OPL2 FM synthesis (9 melodic channels). While the format itself can technically support 32 channels, only the 25 mentioned have any meaning assigned to them, and they are usually not all used at the same time.&lt;br /&gt;
&lt;br /&gt;
Aspects which are easy to get wrong with this format are in '''bold text'''.&lt;br /&gt;
&lt;br /&gt;
Unless otherwise specified, this information pertains to Scream Tracker v3.21's play routine.&lt;br /&gt;
&lt;br /&gt;
==File Format==&lt;br /&gt;
&lt;br /&gt;
The format is little-endian (least significant byte first). A &amp;quot;byte&amp;quot; is 8 bits, a &amp;quot;word&amp;quot; is 16 bits, and a &amp;quot;dword&amp;quot; (double word) is 32 bits. Hex values will be denoted with &amp;quot;0x&amp;quot;. A parapointer is 16 bits wide, and points to pp*16 in the file due to the DOS nature of the format.&lt;br /&gt;
&lt;br /&gt;
Note that if some parts of the format are inconsistent, it's usually best to let it slip, as ST3 itself will allegedly for instance load instruments which don't have the &amp;quot;SCRS&amp;quot; / &amp;quot;SCRI&amp;quot; mark.&lt;br /&gt;
&lt;br /&gt;
*28 bytes: module name, NUL-terminated, NUL-padded.&lt;br /&gt;
*Byte: 0x1A.&lt;br /&gt;
*Byte: 16 (0x10) to indicate this is a Scream Tracker 3 module, 17 is (supposedly) song but it gives &amp;quot;ST3S not yet supported&amp;quot;.&lt;br /&gt;
*2 reserved bytes, should be set to 0x00.&lt;br /&gt;
*6 words, denoting the following:&lt;br /&gt;
**Order count&lt;br /&gt;
**Instrument count&lt;br /&gt;
**Pattern count&lt;br /&gt;
**Flags&lt;br /&gt;
***Bit 0: (pre-3.01 ONLY): ST2 vibrato ''(effect unknown)''.&lt;br /&gt;
***Bit 1: (pre-3.01 ONLY): ST2 tempo ''(effect unknown)''.&lt;br /&gt;
***Bit 2: (pre-3.01 ONLY): Amiga slides ''(effect unknown)''.&lt;br /&gt;
***Bit 3: 0-vol optimisations - turn off looping notes which have a zero volume for more than(?) 2 rows.&lt;br /&gt;
***Bit 4: Amiga limits (limit periods to confine to 113 &amp;lt;= x &amp;lt;= 856).&lt;br /&gt;
***Bit 5: (pre-3.01 ONLY): Enable filter / sfx with SB ''(effect unknown)''.&lt;br /&gt;
***Bit 6: ST3.00 volume slides ('''automatically enabled if tracker version is == 0x1300''') - if enabled, ''all'' volume slides occur ''every'' tick.&lt;br /&gt;
***Bit 7: Special custom data in file (uses &amp;quot;Special&amp;quot; field)&lt;br /&gt;
**Tracker version&lt;br /&gt;
***0x1xyy == Scream Tracker x.yy&lt;br /&gt;
***0x2xyy == Imago Orpheus x.yy&lt;br /&gt;
***0x3xyy == Impulse Tracker x.yy&lt;br /&gt;
***0x4xyy == Schism Tracker (version numbering scheme is different)&lt;br /&gt;
***0x5xyy == OpenMPT&lt;br /&gt;
**File format information&lt;br /&gt;
***1 == signed samples (horribly, horribly old)&lt;br /&gt;
***2 == unsigned samples&lt;br /&gt;
***Anything else is invalid and ST3 will not load the file(?).&lt;br /&gt;
*4 byte string: &amp;quot;SCRM&amp;quot;&lt;br /&gt;
*6 bytes, denoting the following:&lt;br /&gt;
**Global volume (range 0 &amp;lt;= x &amp;lt;= 64) which is used in calculating individual channel volumes '''and is nasty.'''&lt;br /&gt;
**Initial speed (ticks per row / TPR) - '''if 0 ''or 255'', it is ignored''' and the previous value used when you loaded the song is used instead. The value of 255 is very unusual as AFF (set speed to 0xFF == 255) still works.&lt;br /&gt;
**Initial tempo - if '''less than 33, it is ignored''' and the previous value used when you loaded the song is used instead.&lt;br /&gt;
**Mixing volume (range 16 &amp;lt;= x &amp;lt;= 127) which is only used for Sound Blaster. '''It is multiplied by 11/8 when stereo is on.'''&lt;br /&gt;
**Ultra-click removal which is only used for Gravis Ultrasound. ST3.21's interface only allows inputting of values 8, 12, or 16. Allegedly this is the number of GUS channels to allocate to guarantee that this value / 2 channels will play w/o clicks.&lt;br /&gt;
**Default pan value flag, if equal to 252 then load the default panning values at the end of the header, otherwise don't bother.&lt;br /&gt;
*8 reserved bytes, should be set to 0x00, although some trackers write stuff in here.&lt;br /&gt;
*1 parapointer: &amp;quot;Special&amp;quot;, used to point to &amp;quot;special custom data&amp;quot; which is not used in ST 3.01 or later. ST3.21's TECH.DOC refers to ExtHead which is not mentioned anywhere else. This should be safe to ignore.&lt;br /&gt;
*32 bytes indicating channel settings, as follows:&lt;br /&gt;
**If bit 8 is set, this channel is enabled.&lt;br /&gt;
**The lower 7 bits indicate the channel type:&lt;br /&gt;
***0 &amp;lt;= x &amp;lt;= 7: Left PCM channel 1-8 (Lx)&lt;br /&gt;
***8 &amp;lt;= x &amp;lt;= 15: Right PCM channel 1-8 (Rx)&lt;br /&gt;
***16 &amp;lt;= x &amp;lt;= 24: Adlib/OPL2 #1 melody (Ax)&lt;br /&gt;
***25 &amp;lt;= x &amp;lt;= 29: Adlib/OPL2 #1 drums (A_, where _ can be one of {''(TODO: look this up''}) - these are unused.&lt;br /&gt;
***Immediately after Adlib/OPL2 #1, there's some provision for a second OPL2 chip, although this does not appear to be supported / used.&lt;br /&gt;
**'''It is possible to map two pattern channels to the same output channel, which allows for some quirks. This is NOT supported by virtually any player other than ST3 itself.''' pys3m supports it, but is very obscure and quite slow. '''WARNING:''' Despite being less useful than you might expect, there ARE reasons why people would do this!&lt;br /&gt;
*Order list: series of bytes indicating pattern indices.&lt;br /&gt;
*Instrument parapointer list: series of parapointers pointing to instruments.&lt;br /&gt;
*Pattern parapointer list: series of parapointers pointing to patterns.&lt;br /&gt;
*OPTIONAL: Panning list: Entries are as follows:&lt;br /&gt;
**Bits 6 and 7 are reserved.&lt;br /&gt;
**Bit 5(?): If set, use the value specified, otherwise use default (7 for mono, 3(L) / C(R) for stereo).&lt;br /&gt;
**Bits 0-3: Specified panning value if default not used.&lt;br /&gt;
&lt;br /&gt;
===Instrument format===&lt;br /&gt;
&lt;br /&gt;
Each instrument is 80 bytes.&lt;br /&gt;
*Byte: a type specifier.&lt;br /&gt;
**type == 0: the sample is a message and contains no data.&lt;br /&gt;
**type == 1: there's PCM data present.&lt;br /&gt;
**type == 2: adlib melody instrument, which makes the bytes have different meanings.&lt;br /&gt;
*12 bytes: DOS file name.&lt;br /&gt;
*35 bytes: See below;&lt;br /&gt;
*28 bytes: Sample name, NUL-terminated, NUL-padded.&lt;br /&gt;
*4 bytes: &amp;quot;SCRS&amp;quot;, changes to &amp;quot;SCRI&amp;quot; for adlib&lt;br /&gt;
&lt;br /&gt;
====PCM====&lt;br /&gt;
&lt;br /&gt;
*3 bytes: Parapointer to sample data.&lt;br /&gt;
*Longword: Length, ST3 only uses the lower 16-bits.&lt;br /&gt;
*Longword: Loop start, ST3 only uses the lower 16-bits.&lt;br /&gt;
*Longword: Loop end, ST3 only uses the lower 16-bits.&lt;br /&gt;
*Byte: Default volume.&lt;br /&gt;
*Byte: Reserved.&lt;br /&gt;
*Byte: Pack type, completely meaningless as there's no explanation for how the only option mentioned (DP30ADPCM) works.&lt;br /&gt;
*Byte: Sample flags.&lt;br /&gt;
**Bit 0: Loop is on if enabled.&lt;br /&gt;
**Bit 1: Unsupported by ST3; The sample is in stereo (left is stored for length bytes and right is stored for the same amount of bytes).&lt;br /&gt;
**Bit 2: Unsupported by ST3; The sample is 16-bit rather than 8-bit.&lt;br /&gt;
*Longword: C frequency, ST3 only uses the lower 16-bits.&lt;br /&gt;
*Longword: Reserved.&lt;br /&gt;
*8 bytes: ST3 does store some information like the position of a sample within GUS memory but it's generally not useful to anyone outside of attempting to detect what sound card was used as some values can have different meaning depending on sound card.&lt;br /&gt;
&lt;br /&gt;
====Adlib====&lt;br /&gt;
&lt;br /&gt;
*3 bytes: Reserved.&lt;br /&gt;
*10 bytes: Adlib registers&lt;br /&gt;
*Byte: Reserved.&lt;br /&gt;
*Byte: Default volume.&lt;br /&gt;
*3 bytes: Reserved.&lt;br /&gt;
*Longword: C frequency, ST3 only uses the lower 16-bits.&lt;br /&gt;
*12 bytes: Reserved.&lt;br /&gt;
&lt;br /&gt;
==Playback Notes==&lt;br /&gt;
&lt;br /&gt;
Note w/o sample results in retriggering the note without resetting the volume.&lt;br /&gt;
&lt;br /&gt;
Sample w/o note results in resetting the volume and ''switching samples'' w/o retriggering the note. If the C4 speeds differ, this could potentially be out of tune as it does not convert the internal period values. If the note is off, it will stay off - it will not retrigger.&lt;br /&gt;
&lt;br /&gt;
Vibrato and tremolo have a full cycle length of 256, though Hxy and Rxy use x*4 and y*4 as their parameters.&lt;br /&gt;
&lt;br /&gt;
Base clock is '''14317456 Hz''' (documentation '''incorrectly says''' 14317056 Hz, correct value is the expected 8363*1712). When calculating a note's period, use the following table:&lt;br /&gt;
&lt;br /&gt;
  C    C#   D    D#   E    F    F#   G    G#   A   A#   A&lt;br /&gt;
 1712,1616,1524,1440,1356,1280,1208,1140,1076,1016,960,907&lt;br /&gt;
&lt;br /&gt;
and calculate the period like so:&lt;br /&gt;
&lt;br /&gt;
 period = 8363 * 16 * (note &amp;gt;&amp;gt; octave) / middle_c_frequency_of_instrument&lt;br /&gt;
&lt;br /&gt;
''Theoretically'', both the period and the volume have &amp;quot;stored&amp;quot; values and &amp;quot;active&amp;quot; values.&lt;br /&gt;
&lt;br /&gt;
'''Volumes actually peak at 63''', and not 64. Setting the volume to 64 will actually make it go to 63.&lt;br /&gt;
&lt;br /&gt;
However, on '''Adlib channels''', if the default volume is 64, it will use 64. Any further operations on the volume will clip it to within the 0-63 range.&lt;br /&gt;
&lt;br /&gt;
Many effects use the '''latest nonzero effect parameter encountered''', as noted a bit further below.&lt;br /&gt;
&lt;br /&gt;
===Multiple channel mapping quirk===&lt;br /&gt;
'''It is possible to map two pattern channels to one output channel.''' However, it is rather quirky, but usable.&lt;br /&gt;
&lt;br /&gt;
Note that '''only the last pattern channel's effects are used'''.&lt;br /&gt;
&lt;br /&gt;
''TODO: document this quirk in detail.''&lt;br /&gt;
&lt;br /&gt;
==Effects==&lt;br /&gt;
&lt;br /&gt;
''TODO the rest''&lt;br /&gt;
&lt;br /&gt;
Effects marked with a % use '''the latest nonzero effect parameter to show up'''. Effects with a * have their own memory.&lt;br /&gt;
&lt;br /&gt;
===Axx===&lt;br /&gt;
Set speed. If the parameter '''is 0''', the effect is '''ignored'''.&lt;br /&gt;
&lt;br /&gt;
===Bxx===&lt;br /&gt;
Order jump.&lt;br /&gt;
&lt;br /&gt;
===Cxy===&lt;br /&gt;
Jump to row x*10 + y. The value provided is in '''decimal'''. If the row number specified '''is 64 or higher, the effect is ignored'''.&lt;br /&gt;
&lt;br /&gt;
===Dxy (%)===&lt;br /&gt;
Volume slide. If one of the values are 0, then we slide on all nonzero ticks. If one of the values are F, then we slide on all zero ticks. That means that '''D0F slides down 15 on all ticks and DF0 slides up 15 on all ticks'''.&lt;br /&gt;
&lt;br /&gt;
However, if fast slides are enabled (if they are set as a flag or the version is &amp;lt;= 0x1300), then, unless we're doing a fineslide, we slide on all ticks.&lt;br /&gt;
&lt;br /&gt;
When we do a volume slide, we slide the active volume '''without modifying the stored volume'''.&lt;br /&gt;
&lt;br /&gt;
The checking order is not the same as ImpulseTracker.&lt;br /&gt;
&lt;br /&gt;
Here's a full detailed description of all possible cases (0x00..0xFF) and how both Scream Tracker and Impulse Tracker handle them:&lt;br /&gt;
*D0x, 1 &amp;lt;= x &amp;lt;= 0xE: slide down by x on all nonzero ticks. Also slide on tick 0, if fast slides are enabled.&lt;br /&gt;
*Dx0, 1 &amp;lt;= x &amp;lt;= 0xE: slide up by x on all nonzero ticks. Also slide on tick 0, if fast slides are enabled.&lt;br /&gt;
*DFx, 1 &amp;lt;= x &amp;lt;= 0xE: slide down by x on tick 0.&lt;br /&gt;
*DxF, 1 &amp;lt;= x &amp;lt;= 0xE: slide up by x on tick 0.&lt;br /&gt;
*DFF: slide up by 15 on tick 0.&lt;br /&gt;
*D0F: slide down by 15 on all ticks. Not affected at all by the fast slides flag.&lt;br /&gt;
*DF0: slide up by 15 on all ticks. Not affected at all by the fast slides flag.&lt;br /&gt;
*Dxy, 1 &amp;lt;= x &amp;lt;= 0xE, 1 &amp;lt;= y &amp;lt;= 0xE: Scream Tracker treats it as a slide down by y, i.e. equivalent to D0y. Impulse Tracker does nothing.&lt;br /&gt;
*D00: Scream Tracker uses the last nonzero effect parameter in the channel. Impulse Tracker uses the last nonzero value used for Dxx, Kxx or Lxx in the channel.&lt;br /&gt;
&lt;br /&gt;
===Exx (%)===&lt;br /&gt;
Slide down.&lt;br /&gt;
&lt;br /&gt;
===Fxx (%)===&lt;br /&gt;
Slide up.&lt;br /&gt;
&lt;br /&gt;
===Gxx (*)===&lt;br /&gt;
Slide to note.&lt;br /&gt;
&lt;br /&gt;
Peculiarities in the Scream Tracker implementation of this effect:&lt;br /&gt;
*If the current note is empty, the destination note is set to the '''last note''' to show up in the channel, '''even if it has occurred without the Gxx effect'''.&lt;br /&gt;
*Gxx '''doesn't clear the target note''' when it is reached, so any future Gxx with no note will keep sliding back to this particular note.&lt;br /&gt;
&lt;br /&gt;
===Hxy (*)===&lt;br /&gt;
Vibrato. This effect '''shares memory''' with '''Uxy'''.&lt;br /&gt;
&lt;br /&gt;
===Ixy (%)===&lt;br /&gt;
Tremor.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;On&amp;quot; time is '''x + 1''' ticks, &amp;quot;off&amp;quot; time is '''y + 1''' ticks&lt;br /&gt;
* This effect is updated on '''every tick'''.&lt;br /&gt;
* Implemented with two decrementing counters per channel - the &amp;quot;on&amp;quot; counter and the &amp;quot;off&amp;quot; counter.&lt;br /&gt;
* On each tick, if the &amp;quot;on&amp;quot; counter is greater than zero, it is decremented and if it reaches zero, the current volume is set to 0 and the &amp;quot;off&amp;quot; counter is set to the &amp;quot;off&amp;quot; time (y + 1). If the &amp;quot;on&amp;quot; counter was zero in the beginning of the update procedure, then the &amp;quot;off&amp;quot; counter is decremented and if it reached zero (or became less than zero), '''the current volume is set to the stored volume''' and the &amp;quot;on&amp;quot; counter is set to the &amp;quot;on&amp;quot; time (x + 1).&lt;br /&gt;
* '''The &amp;quot;on&amp;quot; and &amp;quot;off&amp;quot; counters are never reset''', except in the tremor update procedure described above. Scream Tracker doesn't even reset them on playback start. Only on tracker startup are they reset.&lt;br /&gt;
* If the current volume was 0 at the end of the effect and there is no tremor effect on the next row, '''the current volume stays 0'''. It isn't reset back to the stored volume or its previous value from before the tremor effect.&lt;br /&gt;
* '''The stored volume isn't modified by this effect.'''&lt;br /&gt;
&lt;br /&gt;
===Jxy (%)===&lt;br /&gt;
Arpeggio. ''TODO: this effect is weird.''&lt;br /&gt;
&lt;br /&gt;
===Kxy (%)===&lt;br /&gt;
H00 + Dxy.&lt;br /&gt;
&lt;br /&gt;
The volume slide, performed by this effect differs from Dxy in the following ways:&lt;br /&gt;
* '''The first tick of this effect is ignored.''' This is due to a no-op in the &amp;quot;first tick&amp;quot; pointer table.&lt;br /&gt;
* As a result of the previous point, fine slides do not work. However, '''the &amp;quot;other&amp;quot; effect''' (H00 in case of Kxy; G00 in case of Lxy) ''' is also not performed when a fine volume slide is requested.'''&lt;br /&gt;
&lt;br /&gt;
===Lxy (%)===&lt;br /&gt;
G00 + Dxy.&lt;br /&gt;
&lt;br /&gt;
The volume slide '''differs from Dxy'''. See '''Kxy''' for details.&lt;br /&gt;
&lt;br /&gt;
===Oxx (*)===&lt;br /&gt;
Set sample offset.&lt;br /&gt;
&lt;br /&gt;
===Qxy (%)===&lt;br /&gt;
Retrigger note every y ticks with volume modifier x. '''If the retrig value 'y' is 0, the effect is ignored.'''&lt;br /&gt;
&lt;br /&gt;
This effect uses a counter, that is increased on each tick. When the counter reaches the retrig value 'y' (or becomes greater, which could happen if the retrig value is decreased), the sample is retriggered, the note volume is modified according to the volume modifier 'x' and the counter is reset back to 0. The counter is reset ('''without retriggering the sample''') also in the following cases:&lt;br /&gt;
* before the start of playing the song&lt;br /&gt;
* when a row without the Qxx effect is encountered in the channel&lt;br /&gt;
However, the counter is '''not reset in any other cases''', for example '''playing a new note *with* the Qxy effect does not reset the counter'''. Also, this effect '''is processed on every tick, including tick 0 and is entirely independent of the song speed.''' A retrig of the sample '''can also happen on tick 0, even when playing a new note''' in which case the note volume modification occurs '''immediately after the new note is played'''.&lt;br /&gt;
&lt;br /&gt;
Values for x:&lt;br /&gt;
*0: 0&lt;br /&gt;
*1: -1&lt;br /&gt;
*2: -2&lt;br /&gt;
*3: -4&lt;br /&gt;
*4: -8&lt;br /&gt;
*5: -16&lt;br /&gt;
*6: *2/3&lt;br /&gt;
*7: *1/2&lt;br /&gt;
*8: 0 (documentation says &amp;quot;?&amp;quot;)&lt;br /&gt;
*9: 1&lt;br /&gt;
*A: 2&lt;br /&gt;
*B: 4&lt;br /&gt;
*C: 8&lt;br /&gt;
*D: 16&lt;br /&gt;
*E: *3/2&lt;br /&gt;
*F: *2&lt;br /&gt;
&lt;br /&gt;
'''6 isn't exactly *2/3.''' It seems to use the following table:&lt;br /&gt;
&lt;br /&gt;
  TwoThirds: array [0..63] of Byte =&lt;br /&gt;
  ( 0,  0,  1,  1,  2,  3,  3,  4,  5,  5,  6,  6,  7,  8,  8,  9,&lt;br /&gt;
   10, 10, 11, 11, 12, 13, 13, 14, 15, 15, 16, 16, 17, 18, 18, 19,&lt;br /&gt;
   20, 20, 21, 21, 22, 23, 23, 24, 25, 25, 26, 26, 27, 28, 28, 29,&lt;br /&gt;
   30, 30, 31, 31, 32, 33, 33, 34, 35, 35, 36, 36, 37, 38, 38, 39);&lt;br /&gt;
&lt;br /&gt;
This effect changes only the active volume, '''without modifying the stored volume.'''&lt;br /&gt;
&lt;br /&gt;
===Rxy (%)===&lt;br /&gt;
Tremolo. x*4 is speed, y*4 is depth. This effect is screwy, but not as screwy as previously documented.&lt;br /&gt;
&lt;br /&gt;
*Get xy from the '''latest nonzero effect parameter''' to appear in the channel.&lt;br /&gt;
*'''On tick 1''' (the '''second''' tick of the row) set the active volume to '''the stored volume plus''' (depth * value) / (max_amplitude * 2) (Rxy peaks at 32 in each direction), and for each '''nonzero''' tick increase the tremolo position by the speed. '''The stored volume is untouched.'''&lt;br /&gt;
*'''If the song speed (not tremolo speed, but song speed - ticks per row) is 1, the active volume is also untouched. It is not set to the stored volume!'''&lt;br /&gt;
*'''Tremolo will not work if the stored volume is 0 (or 64 - Adlib only).'''&lt;br /&gt;
&lt;br /&gt;
===Sxy (%)===&lt;br /&gt;
Miscellaneous effects.&lt;br /&gt;
&lt;br /&gt;
====S0x====&lt;br /&gt;
Set filter. Not implemented in Scream Tracker 3.&lt;br /&gt;
&lt;br /&gt;
* '''S00''' performs an Sxy effect with '''the latest nonzero effect parameter to show up''' (note the '%').&lt;br /&gt;
* '''When S00 is repeating a note delay (SDx), the note is triggered twice: once on tick 0 (as if there's no note delay) and again on tick x (as with a normal note delay)'''&lt;br /&gt;
&lt;br /&gt;
====S1x====&lt;br /&gt;
Set glissando control.&lt;br /&gt;
&lt;br /&gt;
====S2x====&lt;br /&gt;
Set finetune.&lt;br /&gt;
&lt;br /&gt;
====S3x====&lt;br /&gt;
Set vibrato waveform.&lt;br /&gt;
&lt;br /&gt;
'''The low 2 bits''' of x (i.e. '''x &amp;amp; 0x03''') set the vibrato waveform:&lt;br /&gt;
*0: Sine wave&lt;br /&gt;
*1: Ramp down&lt;br /&gt;
*2: Square wave&lt;br /&gt;
*3: Random wave&lt;br /&gt;
&lt;br /&gt;
If the '''third bit''' is set (i.e. if '''(x &amp;amp; 0x04) != 0''' ), don't reset waveform when a new note is played.&lt;br /&gt;
&lt;br /&gt;
The 4-th bit (x &amp;amp; 0x08) is '''ignored'''.&lt;br /&gt;
&lt;br /&gt;
E.g. S3E sets a square waveform and disables reset on new note.&lt;br /&gt;
&lt;br /&gt;
====S4x====&lt;br /&gt;
Set tremolo waveform.&lt;br /&gt;
&lt;br /&gt;
====S8x====&lt;br /&gt;
Set panning position. Scream Tracker 3 supports this only on the Gravis Ultrasound.&lt;br /&gt;
&lt;br /&gt;
====SAx====&lt;br /&gt;
Old stereo control. This appears in PANIC.S3M, but may have been removed since Scream Tracker 3.01 BETA. libmodplug, Schism Tracker, and OpenMPT, convert these to S8x effects.&lt;br /&gt;
&lt;br /&gt;
*This effect only works on Sound Blaster.&lt;br /&gt;
*This effect is dependent on what channel type you put it on, put simply...&lt;br /&gt;
**SA0/SA2: Normal panning (L is left, R is right)&lt;br /&gt;
**SA1/SA3: Reversed panning (L is right, R is left)&lt;br /&gt;
**SA4-SA7: Center panning (which adds DC offset to either left or right)&lt;br /&gt;
**SA8-SAF: No effect.&lt;br /&gt;
&lt;br /&gt;
====SBx====&lt;br /&gt;
Loop pattern.&lt;br /&gt;
&lt;br /&gt;
Unlike other trackers, '''the loopback info (i.e. the loopback point and counter) is global''' and not per channel.&lt;br /&gt;
&lt;br /&gt;
====SCx====&lt;br /&gt;
Note cut after x ticks.&lt;br /&gt;
&lt;br /&gt;
*If '''the argument is 0''', the effect '''is ignored'''.&lt;br /&gt;
*When the note is cut, the volume is '''not''' set to 0. Instead playback is temporarily '''frozen''' and may be '''resumed by a following Exx, Fxx, Gxx, Hxx, Jxx, Kxx, Lxx or Uxx command'''.&lt;br /&gt;
&lt;br /&gt;
====SDx====&lt;br /&gt;
Note delay for x ticks.&lt;br /&gt;
&lt;br /&gt;
====SEx====&lt;br /&gt;
Pattern delay for x rows.&lt;br /&gt;
&lt;br /&gt;
====SFx====&lt;br /&gt;
FunkRepeat. Not implemented in Scream Tracker 3.&lt;br /&gt;
&lt;br /&gt;
===Txx===&lt;br /&gt;
Set tempo. If the parameter is '''less than 33''', the effect is '''ignored'''.&lt;br /&gt;
&lt;br /&gt;
===Uxy (*)===&lt;br /&gt;
Fine vibrato. This effect '''shares memory''' with '''Hxy'''.&lt;br /&gt;
&lt;br /&gt;
===Vxx===&lt;br /&gt;
Set global volume. This effect has several quirks:&lt;br /&gt;
&lt;br /&gt;
*Normally, it does not affect events on the same row, where the effect is set. However, '''there are some exceptions to that rule''', read below for details.&lt;br /&gt;
*It does not affect past notes, that are still playing, unless '''their volume is changed''', which '''applies the new global volume to that voice''' as well.&lt;br /&gt;
*This effect '''is actually processed on tick 1 (that is the second tick)''' of the row. This has several consequences:&lt;br /&gt;
**The effect '''doesn't do anything''', if '''the current speed is 1'''.&lt;br /&gt;
**The effect '''is applied to notes on the current row, that have a note delay effect''' (SDx with x &amp;gt;= 1). For notes on the same row '''that have a note delay of 1 tick''', the effect is only applied to '''channels, that are processed after''' the channel with the set global volume effect. For notes on the same row that have a '''note delay of 2 ticks or more''', the effect is applied '''regardless of the relative position of the channel''' in the processing order. ''TODO: Document the processing order, since it isn't very obvious (I think it's L1, L2, ..., L8, R1, R2, ..., R8, but I'm not 100% sure).''&lt;br /&gt;
**The effect '''is also applied''' on the same row if anything updates the note volume '''on tick 1''' or '''tick 2''' (depends on processing order), like the '''Dxx effect''' (when doing a non-fine slide, of course).&lt;br /&gt;
*Vxx with parameter '''values higher than 0x40''' are '''ignored'''.&lt;br /&gt;
&lt;br /&gt;
[[Category: Music Pattern Formats]]&lt;/div&gt;</summary>
		<author><name>RepellantMold</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=Scream_Tracker_2_Module&amp;diff=15855</id>
		<title>Scream Tracker 2 Module</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=Scream_Tracker_2_Module&amp;diff=15855"/>
		<updated>2025-01-22T15:51:35Z</updated>

		<summary type="html">&lt;p&gt;RepellantMold: /* File Format */ - change some wording&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Extension: stm&lt;br /&gt;
A 4-channel module format somewhat similar to [[Protracker_Module|Protracker/Amiga]] for MS-DOS on the PC.&lt;br /&gt;
&lt;br /&gt;
==File Format==&lt;br /&gt;
&lt;br /&gt;
The format is little-endian (least significant byte first). A &amp;quot;byte&amp;quot; is 8 bits, a &amp;quot;word&amp;quot; is 16 bits, and a &amp;quot;dword&amp;quot; (double word) is 32 bits. Hex values will be denoted with &amp;quot;0x&amp;quot;. A parapointer is 16 bits wide, and points to pp*16 in the file due to the DOS nature of the format.&lt;br /&gt;
&lt;br /&gt;
*20 bytes: Module name, NUL-padded.&lt;br /&gt;
*8 bytes: Magic string. It's best to just check if the entire string is printable ASCII.&lt;br /&gt;
** '''!Scream!''' - The most common tag that's checked for&lt;br /&gt;
** '''BMOD2STM''' - A MOD to STM conversion utility&lt;br /&gt;
** '''WUZAMOD!''' - Currently unknown, any searches for references just yields other players supporting the string...&lt;br /&gt;
** '''SWavePro''' - SoundWave Pro&lt;br /&gt;
** '''!Scrvrt!''' - [[User:RepellantMold|RepellantMold's]] [https://codeberg.org/repellantsoftware/Screamverter-DOS S3M to STM converter].&lt;br /&gt;
*Byte: Usually 0x1A, though 2 files were spotted to have 0x02 instead. ST3 checks the field while ST2 doesn't.&lt;br /&gt;
*Byte: File type, 1 is song (no samples) and 2 is module (has samples)&lt;br /&gt;
*Byte: Major file version (x), usually 2&lt;br /&gt;
*Byte: Minor file version (yy), usually 21&lt;br /&gt;
I'll be referring to file version as x.yy from here on out, also note that the file version does ''not'' mean tracker version!&lt;br /&gt;
*Byte: Initial tempo&lt;br /&gt;
*Byte: Pattern count (range 1 &amp;lt;= x &amp;lt;= 63)&lt;br /&gt;
*Byte: Global volume (range 0 &amp;lt;= x &amp;lt;= 64)&lt;br /&gt;
*13 bytes: Reserved&lt;br /&gt;
*31 instruments:&lt;br /&gt;
**12 bytes: DOS File name, NUL-terminated&lt;br /&gt;
**Byte: Reserved (always 0)&lt;br /&gt;
**Byte: Instrument disk (range 0 &amp;lt;= x &amp;lt;= 99)&lt;br /&gt;
**Word: Parapointer to sample data (annoyingly, ST2's TECH.DOC marked this as reserved which no doubt caused a lot of confusion!)&lt;br /&gt;
**Word: Length in bytes&lt;br /&gt;
**Word: Loop start in bytes&lt;br /&gt;
**Word: Loop end in bytes (0xFFFF means to never loop, ST2 also does not sanitize the loop end field so it can go beyond length!)&lt;br /&gt;
**Byte: Default volume (range 0 &amp;lt;= x &amp;lt;= 64 - 0 is undefined behavior in ST2 and will make the parapointer point in a random spot if the length is not blank, which no doubt made tools struggle if they had relied on guessing based on the &amp;quot;guess&amp;quot; method for grabbing samples)&lt;br /&gt;
**Byte: Reserved&lt;br /&gt;
**Word: C speed&lt;br /&gt;
**6 bytes: Reserved&lt;br /&gt;
*128 bytes or 64 bytes if the file version is 2.00: Order list - 99 means no pattern, though a single 255 can also be seen. Any orders that are above the pattern count should be treated as blank patterns, and patterns above 63 are undefined behavior.&lt;br /&gt;
*Pattern data:&lt;br /&gt;
**You read one byte&lt;br /&gt;
***if the byte is 0xFB, 0xFC, or 0xFD then define instrument, volume, effect to be blank values or 0 in the case of 0xFB and skip. If it's any other value then read the next 3 bytes.&lt;br /&gt;
**A regular pattern cell has the format of 4 bytes, represented in bits as oooonnnn iiiiivvv VVVVeeee xxxxyyyy&lt;br /&gt;
***oooo is the notes octave, (0 - 4, all other values play nothing), nnnn is the notes pitch (0 - 11, all other values display as garbage and play nothing).&lt;br /&gt;
***iiiii is instrument, 0 - 31, 0 is a blank cell.&lt;br /&gt;
***VVVVvvv is the volume (0 - 127, 65 means empty, other values overflow ST2's volume table and display as &amp;quot;??&amp;quot;)&lt;br /&gt;
***eeeexxxxyyyy is the effect, eeee is the effect type while xxxx and yyyy is the effect parameter.&lt;br /&gt;
**Rinse and repeat for 4 channels and 64 rows!&lt;br /&gt;
*Signed 8-bit mono sample data, padded to the nearest 16 bytes&lt;br /&gt;
&lt;br /&gt;
==Playback notes==&lt;br /&gt;
&lt;br /&gt;
Tempo is rather bizarre in Scream Tracker 2, as it has speed (ticks per row in other trackers) in the high nibble then then a scaling factor in the low nibble. If the minor file version is &amp;lt;= 20, then this is in decimal, as in the &amp;quot;speed&amp;quot; will be in the tens digit with scale being in the ones digit with a range of 0 to 9.&lt;br /&gt;
Speed gets clamped to 1 if it has a value of 0.&lt;br /&gt;
The actual tempo is also dependent on the mixing rate (which in ST2 will either be 5000, 6500, 8000, 9943, 11932, 13000, 15909, 17045, 19886, or 23863 Hz).&lt;br /&gt;
&lt;br /&gt;
TODO: Either get a table of all possible speeds, or show the formula&lt;br /&gt;
&lt;br /&gt;
==Effects==&lt;br /&gt;
&lt;br /&gt;
All effects are treated as no-op if the parameter is 0x00.&lt;br /&gt;
&lt;br /&gt;
Effects are displayed as letters (A, B, C, ...) rather than numbers (1, 2, 3, ...). The entire range is from A to O but only A and J have any kind of functionality, other values may bug out tools or even Scream Tracker 3!&lt;br /&gt;
&lt;br /&gt;
===Axy===&lt;br /&gt;
Set tempo to x per row with a scale of y. If the file version has a minor version less than 21, e.g. 2.20, then it's in decimal (like 60 rather than 0x60).&lt;br /&gt;
&lt;br /&gt;
===Bxx===&lt;br /&gt;
Set next order, this effect does not break the pattern immediately.&lt;br /&gt;
&lt;br /&gt;
===Cxx===&lt;br /&gt;
Break to the next pattern, parameter is ignored.&lt;br /&gt;
&lt;br /&gt;
===Dxy===&lt;br /&gt;
Volume slide. Identical to Scream Tracker 3, however fine slides do not exist.&lt;br /&gt;
&lt;br /&gt;
===Exx===&lt;br /&gt;
Slide down. Identical to Scream Tracker 3, however fine slides do not exist. It also has the odd quirk of having the ability to underflow to a really high note if &lt;br /&gt;
&lt;br /&gt;
===Fxx===&lt;br /&gt;
Slide up.&lt;br /&gt;
&lt;br /&gt;
===Gxx===&lt;br /&gt;
Slide to note. '''If a sample is specified without volume, the volume does not get reset to its default setting.'''&lt;br /&gt;
&lt;br /&gt;
===Hxy===&lt;br /&gt;
Vibrato. '''Depth is doubled when compared to other trackers!'''&lt;br /&gt;
&lt;br /&gt;
===Ixy===&lt;br /&gt;
Tremor. Identical to Scream Tracker 3, sans effect memory resulting in 0 being very fast.&lt;br /&gt;
&lt;br /&gt;
===Jxy===&lt;br /&gt;
Arpeggio. This effect was implemented rather late, being implemented starting ST2.24. This effect is rather bugged as it skips to y halfway through a row if x is 0.&lt;br /&gt;
&lt;br /&gt;
[[Category: Music Pattern Formats]]&lt;/div&gt;</summary>
		<author><name>RepellantMold</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=User:RepellantMold&amp;diff=15854</id>
		<title>User:RepellantMold</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=User:RepellantMold&amp;diff=15854"/>
		<updated>2025-01-20T16:56:54Z</updated>

		<summary type="html">&lt;p&gt;RepellantMold: create my personal user page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sup, I'm Jade &amp;quot;RepellantMold&amp;quot; Andersen.&lt;br /&gt;
I'm a small name tracker music composer that has taken interest in the more obscure trackers like [[Scream_Tracker_2_Module|Scream Tracker 2]], [[Composer_669|Composer 669]], [[Ultra_Tracker|Ultra Tracker]], and more to come.&lt;br /&gt;
Check my website [https://repellantmold.nekoweb.org/ here] for more information.&lt;/div&gt;</summary>
		<author><name>RepellantMold</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=Scream_Tracker_2_Module&amp;diff=15853</id>
		<title>Scream Tracker 2 Module</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=Scream_Tracker_2_Module&amp;diff=15853"/>
		<updated>2025-01-19T16:41:29Z</updated>

		<summary type="html">&lt;p&gt;RepellantMold: Create the entire page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Extension: stm&lt;br /&gt;
A 4-channel module format somewhat similar to [[Protracker_Module|Protracker/Amiga]] for MS-DOS on the PC.&lt;br /&gt;
&lt;br /&gt;
==File Format==&lt;br /&gt;
&lt;br /&gt;
The format is little-endian (least significant byte first). A &amp;quot;byte&amp;quot; is 8 bits, a &amp;quot;word&amp;quot; is 16 bits, and a &amp;quot;dword&amp;quot; (double word) is 32 bits. Hex values will be denoted with &amp;quot;0x&amp;quot;. A parapointer is 16 bits wide, and points to pp*16 in the file due to the DOS nature of the format.&lt;br /&gt;
&lt;br /&gt;
*20 bytes: Module name, NUL-padded.&lt;br /&gt;
*8 bytes: Magic string. It's best to just check if the entire string is printable ASCII.&lt;br /&gt;
** '''!Scream!''' - The most common tag that's checked for&lt;br /&gt;
** '''BMOD2STM''' - A MOD to STM conversion utility&lt;br /&gt;
** '''WUZAMOD!''' - Currently unknown, any searches for references just yields other players supporting the string...&lt;br /&gt;
** '''SWavePro''' - SoundWave Pro&lt;br /&gt;
** '''!Scrvrt!''' - [[User:RepellantMold|RepellantMolds]] [https://codeberg.org/repellantsoftware/Screamverter-DOS S3M to STM converter].&lt;br /&gt;
*Byte: Usually 0x1A, though 2 files were spotted to have 0x02 instead. ST3 checks the field while ST2 doesn't.&lt;br /&gt;
*Byte: File type, 1 is song (no samples) and 2 is module (has samples)&lt;br /&gt;
*Byte: Major file version (x), usually 2&lt;br /&gt;
*Byte: Minor file version (yy), usually 21&lt;br /&gt;
I'll be referring to file version as x.yy from here on out, also note that the file version does ''not'' mean tracker version!&lt;br /&gt;
*Byte: Initial tempo&lt;br /&gt;
*Byte: Pattern count&lt;br /&gt;
*Byte: Global volume (range 0 &amp;lt;= x &amp;lt;= 64)&lt;br /&gt;
*13 bytes: Reserved&lt;br /&gt;
*31 instruments:&lt;br /&gt;
**12 bytes: DOS File name, NUL-terminated&lt;br /&gt;
**Byte: Reserved (always 0)&lt;br /&gt;
**Byte: Instrument disk (range 0 &amp;lt;= x &amp;lt;= 99)&lt;br /&gt;
**Word: Parapointer to sample data (annoyingly, ST2's TECH.DOC marked this as reserved which no doubt caused a lot of confusion!)&lt;br /&gt;
**Word: Length in bytes&lt;br /&gt;
**Word: Loop start in bytes&lt;br /&gt;
**Word: Loop end in bytes (0xFFFF means to never loop, ST2 also does not sanitize the loop end field so it can go beyond length!)&lt;br /&gt;
**Byte: Default volume (range 1 &amp;lt;= x &amp;lt;= 64, 0 is undefined behavior in ST2 and will make the parapointer point in a random spot)&lt;br /&gt;
**Byte: Reserved&lt;br /&gt;
**Word: C speed&lt;br /&gt;
**6 bytes: Reserved&lt;br /&gt;
*128 bytes or 64 bytes if the file version is 2.00: Order list (99 means no pattern, though 255 can also be seen)&lt;br /&gt;
*Pattern data:&lt;br /&gt;
**You read one byte&lt;br /&gt;
***if the byte is 0xFB, 0xFC, or 0xFD then define instrument, volume, effect to be blank values or 0 in the case of 0xFB and skip. If it's any other value then read the next 3 bytes.&lt;br /&gt;
**A regular pattern cell has the format of 4 bytes, represented in bits as oooonnnn iiiiivvv VVVVeeee xxxxyyyy&lt;br /&gt;
***oooo is the notes octave, (0 - 4, all other values play nothing), nnnn is the notes pitch (0 - 11, all other values display as garbage and play nothing).&lt;br /&gt;
***iiiii is instrument, 0 - 31, 0 is a blank cell.&lt;br /&gt;
***VVVVvvv is the volume (0 - 127, 65 means empty, other values overflow ST2's volume table and display as &amp;quot;??&amp;quot;)&lt;br /&gt;
***eeeexxxxyyyy is the effect, eeee is the effect type while xxxx and yyyy is the effect parameter.&lt;br /&gt;
**Rinse and repeat for 4 channels and 64 rows!&lt;br /&gt;
*Signed 8-bit mono sample data.&lt;br /&gt;
&lt;br /&gt;
==Playback notes==&lt;br /&gt;
&lt;br /&gt;
Tempo is rather bizarre in Scream Tracker 2, as it has speed (ticks per row in other trackers) in the high nibble then then a scaling factor in the low nibble. If the minor file version is &amp;lt;= 20, then this is in decimal, as in the &amp;quot;speed&amp;quot; will be in the tens digit with scale being in the ones digit with a range of 0 to 9.&lt;br /&gt;
Speed gets clamped to 1 if it has a value of 0.&lt;br /&gt;
The actual tempo is also dependent on the mixing rate (which in ST2 will either be 5000, 6500, 8000, 9943, 11932, 13000, 15909, 17045, 19886, or 23863 Hz).&lt;br /&gt;
&lt;br /&gt;
TODO: Either get a table of all possible speeds, or show the formula&lt;br /&gt;
&lt;br /&gt;
==Effects==&lt;br /&gt;
&lt;br /&gt;
All effects are treated as no-op if the parameter is 0x00.&lt;br /&gt;
&lt;br /&gt;
Effects are displayed as letters (A, B, C, ...) rather than numbers (1, 2, 3, ...). The entire range is from A to O but only A and J have any kind of functionality, other values may bug out tools or even Scream Tracker 3!&lt;br /&gt;
&lt;br /&gt;
===Axy===&lt;br /&gt;
Set tempo to x per row with a scale of y. If the file version has a minor version less than 21, e.g. 2.20, then it's in decimal (like 60 rather than 0x60).&lt;br /&gt;
&lt;br /&gt;
===Bxx===&lt;br /&gt;
Set next order, this effect does not break the pattern immediately.&lt;br /&gt;
&lt;br /&gt;
===Cxx===&lt;br /&gt;
Break to the next pattern, parameter is ignored.&lt;br /&gt;
&lt;br /&gt;
===Dxy===&lt;br /&gt;
Volume slide. Identical to Scream Tracker 3, however fine slides do not exist.&lt;br /&gt;
&lt;br /&gt;
===Exx===&lt;br /&gt;
Slide down. Identical to Scream Tracker 3, however fine slides do not exist. It also has the odd quirk of having the ability to underflow to a really high note if &lt;br /&gt;
&lt;br /&gt;
===Fxx===&lt;br /&gt;
Slide up.&lt;br /&gt;
&lt;br /&gt;
===Gxx===&lt;br /&gt;
Slide to note. '''If a sample is specified without volume, the volume does not get reset to its default setting.'''&lt;br /&gt;
&lt;br /&gt;
===Hxy===&lt;br /&gt;
Vibrato. '''Depth is doubled when compared to other trackers!'''&lt;br /&gt;
&lt;br /&gt;
===Ixy===&lt;br /&gt;
Tremor. Identical to Scream Tracker 3, sans effect memory resulting in 0 being very fast.&lt;br /&gt;
&lt;br /&gt;
===Jxy===&lt;br /&gt;
Arpeggio. This effect was implemented rather late, being implemented starting ST2.24. This effect is rather bugged as it skips to y halfway through a row if x is 0.&lt;br /&gt;
&lt;br /&gt;
[[Category: Music Pattern Formats]]&lt;/div&gt;</summary>
		<author><name>RepellantMold</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=Scream_Tracker_3_Module&amp;diff=15852</id>
		<title>Scream Tracker 3 Module</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=Scream_Tracker_3_Module&amp;diff=15852"/>
		<updated>2025-01-18T19:12:01Z</updated>

		<summary type="html">&lt;p&gt;RepellantMold: Fix some inconsistencies with how song flags were laid out&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Extension: s3m&lt;br /&gt;
A normally 16-channel module format for MS-DOS on the PC, it can also support OPL2 FM synthesis (9 melodic channels). While the format itself can technically support 32 channels, only the 25 mentioned have any meaning assigned to them, and they are usually not all used at the same time.&lt;br /&gt;
&lt;br /&gt;
Aspects which are easy to get wrong with this format are in '''bold text'''.&lt;br /&gt;
&lt;br /&gt;
Unless otherwise specified, this information pertains to Scream Tracker v3.21's play routine.&lt;br /&gt;
&lt;br /&gt;
==File Format==&lt;br /&gt;
&lt;br /&gt;
The format is little-endian (least significant byte first). A &amp;quot;byte&amp;quot; is 8 bits, a &amp;quot;word&amp;quot; is 16 bits, and a &amp;quot;dword&amp;quot; (double word) is 32 bits. Hex values will be denoted with &amp;quot;0x&amp;quot;. A parapointer is 16 bits wide, and points to pp*16 in the file due to the DOS nature of the format.&lt;br /&gt;
&lt;br /&gt;
Note that if some parts of the format are inconsistent, it's usually best to let it slip, as ST3 itself will allegedly for instance load instruments which don't have the &amp;quot;SCRS&amp;quot; / &amp;quot;SCRI&amp;quot; mark.&lt;br /&gt;
&lt;br /&gt;
*28 bytes: module name, NUL-terminated, NUL-padded.&lt;br /&gt;
*Byte: 0x1A.&lt;br /&gt;
*Byte: 16 (0x10) to indicate this is a Scream Tracker 3 module.&lt;br /&gt;
*2 reserved bytes, should be set to 0x00.&lt;br /&gt;
*6 words, denoting the following:&lt;br /&gt;
**Order count&lt;br /&gt;
**Instrument count&lt;br /&gt;
**Pattern count&lt;br /&gt;
**Flags&lt;br /&gt;
***Bit 0: (pre-3.01 ONLY): ST2 vibrato ''(effect unknown)''.&lt;br /&gt;
***Bit 1: (pre-3.01 ONLY): ST2 tempo ''(effect unknown)''.&lt;br /&gt;
***Bit 2: (pre-3.01 ONLY): Amiga slides ''(effect unknown)''.&lt;br /&gt;
***Bit 3: 0-vol optimisations - turn off looping notes which have a zero volume for more than(?) 2 rows.&lt;br /&gt;
***Bit 4: Amiga limits (limit periods to confine to 113 &amp;lt;= x &amp;lt;= 856).&lt;br /&gt;
***Bit 5: (pre-3.01 ONLY): Enable filter / sfx with SB ''(effect unknown)''.&lt;br /&gt;
***Bit 6: ST3.00 volume slides ('''automatically enabled if tracker version is == 0x1300''') - if enabled, ''all'' volume slides occur ''every'' tick.&lt;br /&gt;
***Bit 7: Special custom data in file (uses &amp;quot;Special&amp;quot; field)&lt;br /&gt;
**Tracker version&lt;br /&gt;
***0x1xyy == Scream Tracker x.yy&lt;br /&gt;
***0x2xyy == Imago Orpheus x.yy&lt;br /&gt;
***0x3xyy == Impulse Tracker x.yy&lt;br /&gt;
***0x4xyy == Schism Tracker (version numbering scheme is different)&lt;br /&gt;
***0x5xyy == OpenMPT&lt;br /&gt;
**File format information&lt;br /&gt;
***1 == signed samples (horribly, horribly old)&lt;br /&gt;
***2 == unsigned samples&lt;br /&gt;
***Anything else is invalid and ST3 will not load the file(?).&lt;br /&gt;
*4 byte string: &amp;quot;SCRM&amp;quot;&lt;br /&gt;
*6 bytes, denoting the following:&lt;br /&gt;
**Global volume (range 0 &amp;lt;= x &amp;lt;= 64) which is used in calculating individual channel volumes '''and is nasty.'''&lt;br /&gt;
**Initial speed (ticks per row / TPR) - '''if 0 ''or 255'', it is ignored''' and the previous value used when you loaded the song is used instead. The value of 255 is very unusual as AFF (set speed to 0xFF == 255) still works.&lt;br /&gt;
**Initial tempo - if '''less than 33, it is ignored''' and the previous value used when you loaded the song is used instead.&lt;br /&gt;
**Mixing volume (range 16 &amp;lt;= x &amp;lt;= 127) which is only used for Sound Blaster. '''It is multiplied by 11/8 when stereo is on.'''&lt;br /&gt;
**Ultra-click removal which is only used for Gravis Ultrasound. ST3.21's interface only allows inputting of values 8, 12, or 16. Allegedly this is the number of GUS channels to allocate to guarantee that this value / 2 channels will play w/o clicks.&lt;br /&gt;
**Default pan value flag, if equal to 252 then load the default panning values at the end of the header, otherwise don't bother.&lt;br /&gt;
*8 reserved bytes, should be set to 0x00, although some trackers write stuff in here.&lt;br /&gt;
*1 parapointer: &amp;quot;Special&amp;quot;, used to point to &amp;quot;special custom data&amp;quot; which is not used in ST 3.01 or later. ST3.21's TECH.DOC refers to ExtHead which is not mentioned anywhere else. This should be safe to ignore.&lt;br /&gt;
*32 bytes indicating channel settings, as follows:&lt;br /&gt;
**If bit 8 is set, this channel is enabled.&lt;br /&gt;
**The lower 7 bits indicate the channel type:&lt;br /&gt;
***0 &amp;lt;= x &amp;lt;= 7: Left PCM channel 1-8 (Lx)&lt;br /&gt;
***8 &amp;lt;= x &amp;lt;= 15: Right PCM channel 1-8 (Rx)&lt;br /&gt;
***16 &amp;lt;= x &amp;lt;= 24: Adlib/OPL2 #1 melody (Ax)&lt;br /&gt;
***25 &amp;lt;= x &amp;lt;= 29: Adlib/OPL2 #1 drums (A_, where _ can be one of {''(TODO: look this up''}) - these are unused.&lt;br /&gt;
***Immediately after Adlib/OPL2 #1, there's some provision for a second OPL2 chip, although this does not appear to be supported / used.&lt;br /&gt;
**'''It is possible to map two pattern channels to the same output channel, which allows for some quirks. This is NOT supported by virtually any player other than ST3 itself.''' pys3m supports it, but is very obscure and quite slow. '''WARNING:''' Despite being less useful than you might expect, there ARE reasons why people would do this!&lt;br /&gt;
*Order list: series of bytes indicating pattern indices.&lt;br /&gt;
*Instrument parapointer list: series of parapointers pointing to instruments.&lt;br /&gt;
*Pattern parapointer list: series of parapointers pointing to patterns.&lt;br /&gt;
*OPTIONAL: Panning list: Entries are as follows:&lt;br /&gt;
**Bits 6 and 7 are reserved.&lt;br /&gt;
**Bit 5(?): If set, use the value specified, otherwise use default (7 for mono, 3(L) / C(R) for stereo).&lt;br /&gt;
**Bits 0-3: Specified panning value if default not used.&lt;br /&gt;
&lt;br /&gt;
''TODO: ST3.21's TECH.DOC should cover instruments.''&lt;br /&gt;
&lt;br /&gt;
==Playback Notes==&lt;br /&gt;
&lt;br /&gt;
Note w/o sample results in retriggering the note without resetting the volume.&lt;br /&gt;
&lt;br /&gt;
Sample w/o note results in resetting the volume and ''switching samples'' w/o retriggering the note. If the C4 speeds differ, this could potentially be out of tune as it does not convert the internal period values. If the note is off, it will stay off - it will not retrigger.&lt;br /&gt;
&lt;br /&gt;
Vibrato and tremolo have a full cycle length of 256, though Hxy and Rxy use x*4 and y*4 as their parameters.&lt;br /&gt;
&lt;br /&gt;
Base clock is '''14317456 Hz''' (documentation '''incorrectly says''' 14317056 Hz, correct value is the expected 8363*1712). When calculating a note's period, use the following table:&lt;br /&gt;
&lt;br /&gt;
  C    C#   D    D#   E    F    F#   G    G#   A   A#   A&lt;br /&gt;
 1712,1616,1524,1440,1356,1280,1208,1140,1076,1016,960,907&lt;br /&gt;
&lt;br /&gt;
and calculate the period like so:&lt;br /&gt;
&lt;br /&gt;
 period = 8363 * 16 * (note &amp;gt;&amp;gt; octave) / middle_c_frequency_of_instrument&lt;br /&gt;
&lt;br /&gt;
''Theoretically'', both the period and the volume have &amp;quot;stored&amp;quot; values and &amp;quot;active&amp;quot; values.&lt;br /&gt;
&lt;br /&gt;
'''Volumes actually peak at 63''', and not 64. Setting the volume to 64 will actually make it go to 63.&lt;br /&gt;
&lt;br /&gt;
However, on '''Adlib channels''', if the default volume is 64, it will use 64. Any further operations on the volume will clip it to within the 0-63 range.&lt;br /&gt;
&lt;br /&gt;
Many effects use the '''latest nonzero effect parameter encountered''', as noted a bit further below.&lt;br /&gt;
&lt;br /&gt;
===Multiple channel mapping quirk===&lt;br /&gt;
'''It is possible to map two pattern channels to one output channel.''' However, it is rather quirky, but usable.&lt;br /&gt;
&lt;br /&gt;
Note that '''only the last pattern channel's effects are used'''.&lt;br /&gt;
&lt;br /&gt;
''TODO: document this quirk in detail.''&lt;br /&gt;
&lt;br /&gt;
==Effects==&lt;br /&gt;
&lt;br /&gt;
''TODO the rest''&lt;br /&gt;
&lt;br /&gt;
Effects marked with a % use '''the latest nonzero effect parameter to show up'''. Effects with a * have their own memory.&lt;br /&gt;
&lt;br /&gt;
===Axx===&lt;br /&gt;
Set speed. If the parameter '''is 0''', the effect is '''ignored'''.&lt;br /&gt;
&lt;br /&gt;
===Bxx===&lt;br /&gt;
Order jump.&lt;br /&gt;
&lt;br /&gt;
===Cxy===&lt;br /&gt;
Jump to row x*10 + y. The value provided is in '''decimal'''. If the row number specified '''is 64 or higher, the effect is ignored'''.&lt;br /&gt;
&lt;br /&gt;
===Dxy (%)===&lt;br /&gt;
Volume slide. If one of the values are 0, then we slide on all nonzero ticks. If one of the values are F, then we slide on all zero ticks. That means that '''D0F slides down 15 on all ticks and DF0 slides up 15 on all ticks'''.&lt;br /&gt;
&lt;br /&gt;
However, if fast slides are enabled (if they are set as a flag or the version is &amp;lt;= 0x1300), then, unless we're doing a fineslide, we slide on all ticks.&lt;br /&gt;
&lt;br /&gt;
When we do a volume slide, we slide the active volume '''without modifying the stored volume'''.&lt;br /&gt;
&lt;br /&gt;
The checking order is not the same as ImpulseTracker.&lt;br /&gt;
&lt;br /&gt;
Here's a full detailed description of all possible cases (0x00..0xFF) and how both Scream Tracker and Impulse Tracker handle them:&lt;br /&gt;
*D0x, 1 &amp;lt;= x &amp;lt;= 0xE: slide down by x on all nonzero ticks. Also slide on tick 0, if fast slides are enabled.&lt;br /&gt;
*Dx0, 1 &amp;lt;= x &amp;lt;= 0xE: slide up by x on all nonzero ticks. Also slide on tick 0, if fast slides are enabled.&lt;br /&gt;
*DFx, 1 &amp;lt;= x &amp;lt;= 0xE: slide down by x on tick 0.&lt;br /&gt;
*DxF, 1 &amp;lt;= x &amp;lt;= 0xE: slide up by x on tick 0.&lt;br /&gt;
*DFF: slide up by 15 on tick 0.&lt;br /&gt;
*D0F: slide down by 15 on all ticks. Not affected at all by the fast slides flag.&lt;br /&gt;
*DF0: slide up by 15 on all ticks. Not affected at all by the fast slides flag.&lt;br /&gt;
*Dxy, 1 &amp;lt;= x &amp;lt;= 0xE, 1 &amp;lt;= y &amp;lt;= 0xE: Scream Tracker treats it as a slide down by y, i.e. equivalent to D0y. Impulse Tracker does nothing.&lt;br /&gt;
*D00: Scream Tracker uses the last nonzero effect parameter in the channel. Impulse Tracker uses the last nonzero value used for Dxx, Kxx or Lxx in the channel.&lt;br /&gt;
&lt;br /&gt;
===Exx (%)===&lt;br /&gt;
Slide down.&lt;br /&gt;
&lt;br /&gt;
===Fxx (%)===&lt;br /&gt;
Slide up.&lt;br /&gt;
&lt;br /&gt;
===Gxx (*)===&lt;br /&gt;
Slide to note.&lt;br /&gt;
&lt;br /&gt;
Peculiarities in the Scream Tracker implementation of this effect:&lt;br /&gt;
*If the current note is empty, the destination note is set to the '''last note''' to show up in the channel, '''even if it has occurred without the Gxx effect'''.&lt;br /&gt;
*Gxx '''doesn't clear the target note''' when it is reached, so any future Gxx with no note will keep sliding back to this particular note.&lt;br /&gt;
&lt;br /&gt;
===Hxy (*)===&lt;br /&gt;
Vibrato. This effect '''shares memory''' with '''Uxy'''.&lt;br /&gt;
&lt;br /&gt;
===Ixy (%)===&lt;br /&gt;
Tremor.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;On&amp;quot; time is '''x + 1''' ticks, &amp;quot;off&amp;quot; time is '''y + 1''' ticks&lt;br /&gt;
* This effect is updated on '''every tick'''.&lt;br /&gt;
* Implemented with two decrementing counters per channel - the &amp;quot;on&amp;quot; counter and the &amp;quot;off&amp;quot; counter.&lt;br /&gt;
* On each tick, if the &amp;quot;on&amp;quot; counter is greater than zero, it is decremented and if it reaches zero, the current volume is set to 0 and the &amp;quot;off&amp;quot; counter is set to the &amp;quot;off&amp;quot; time (y + 1). If the &amp;quot;on&amp;quot; counter was zero in the beginning of the update procedure, then the &amp;quot;off&amp;quot; counter is decremented and if it reached zero (or became less than zero), '''the current volume is set to the stored volume''' and the &amp;quot;on&amp;quot; counter is set to the &amp;quot;on&amp;quot; time (x + 1).&lt;br /&gt;
* '''The &amp;quot;on&amp;quot; and &amp;quot;off&amp;quot; counters are never reset''', except in the tremor update procedure described above. Scream Tracker doesn't even reset them on playback start. Only on tracker startup are they reset.&lt;br /&gt;
* If the current volume was 0 at the end of the effect and there is no tremor effect on the next row, '''the current volume stays 0'''. It isn't reset back to the stored volume or its previous value from before the tremor effect.&lt;br /&gt;
* '''The stored volume isn't modified by this effect.'''&lt;br /&gt;
&lt;br /&gt;
===Jxy (%)===&lt;br /&gt;
Arpeggio. ''TODO: this effect is weird.''&lt;br /&gt;
&lt;br /&gt;
===Kxy (%)===&lt;br /&gt;
H00 + Dxy.&lt;br /&gt;
&lt;br /&gt;
The volume slide, performed by this effect differs from Dxy in the following ways:&lt;br /&gt;
* '''The first tick of this effect is ignored.''' This is due to a no-op in the &amp;quot;first tick&amp;quot; pointer table.&lt;br /&gt;
* As a result of the previous point, fine slides do not work. However, '''the &amp;quot;other&amp;quot; effect''' (H00 in case of Kxy; G00 in case of Lxy) ''' is also not performed when a fine volume slide is requested.'''&lt;br /&gt;
&lt;br /&gt;
===Lxy (%)===&lt;br /&gt;
G00 + Dxy.&lt;br /&gt;
&lt;br /&gt;
The volume slide '''differs from Dxy'''. See '''Kxy''' for details.&lt;br /&gt;
&lt;br /&gt;
===Oxx (*)===&lt;br /&gt;
Set sample offset.&lt;br /&gt;
&lt;br /&gt;
===Qxy (%)===&lt;br /&gt;
Retrigger note every y ticks with volume modifier x. '''If the retrig value 'y' is 0, the effect is ignored.'''&lt;br /&gt;
&lt;br /&gt;
This effect uses a counter, that is increased on each tick. When the counter reaches the retrig value 'y' (or becomes greater, which could happen if the retrig value is decreased), the sample is retriggered, the note volume is modified according to the volume modifier 'x' and the counter is reset back to 0. The counter is reset ('''without retriggering the sample''') also in the following cases:&lt;br /&gt;
* before the start of playing the song&lt;br /&gt;
* when a row without the Qxx effect is encountered in the channel&lt;br /&gt;
However, the counter is '''not reset in any other cases''', for example '''playing a new note *with* the Qxy effect does not reset the counter'''. Also, this effect '''is processed on every tick, including tick 0 and is entirely independent of the song speed.''' A retrig of the sample '''can also happen on tick 0, even when playing a new note''' in which case the note volume modification occurs '''immediately after the new note is played'''.&lt;br /&gt;
&lt;br /&gt;
Values for x:&lt;br /&gt;
*0: 0&lt;br /&gt;
*1: -1&lt;br /&gt;
*2: -2&lt;br /&gt;
*3: -4&lt;br /&gt;
*4: -8&lt;br /&gt;
*5: -16&lt;br /&gt;
*6: *2/3&lt;br /&gt;
*7: *1/2&lt;br /&gt;
*8: 0 (documentation says &amp;quot;?&amp;quot;)&lt;br /&gt;
*9: 1&lt;br /&gt;
*A: 2&lt;br /&gt;
*B: 4&lt;br /&gt;
*C: 8&lt;br /&gt;
*D: 16&lt;br /&gt;
*E: *3/2&lt;br /&gt;
*F: *2&lt;br /&gt;
&lt;br /&gt;
'''6 isn't exactly *2/3.''' It seems to use the following table:&lt;br /&gt;
&lt;br /&gt;
  TwoThirds: array [0..63] of Byte =&lt;br /&gt;
  ( 0,  0,  1,  1,  2,  3,  3,  4,  5,  5,  6,  6,  7,  8,  8,  9,&lt;br /&gt;
   10, 10, 11, 11, 12, 13, 13, 14, 15, 15, 16, 16, 17, 18, 18, 19,&lt;br /&gt;
   20, 20, 21, 21, 22, 23, 23, 24, 25, 25, 26, 26, 27, 28, 28, 29,&lt;br /&gt;
   30, 30, 31, 31, 32, 33, 33, 34, 35, 35, 36, 36, 37, 38, 38, 39);&lt;br /&gt;
&lt;br /&gt;
This effect changes only the active volume, '''without modifying the stored volume.'''&lt;br /&gt;
&lt;br /&gt;
===Rxy (%)===&lt;br /&gt;
Tremolo. x*4 is speed, y*4 is depth. This effect is screwy, but not as screwy as previously documented.&lt;br /&gt;
&lt;br /&gt;
*Get xy from the '''latest nonzero effect parameter''' to appear in the channel.&lt;br /&gt;
*'''On tick 1''' (the '''second''' tick of the row) set the active volume to '''the stored volume plus''' (depth * value) / (max_amplitude * 2) (Rxy peaks at 32 in each direction), and for each '''nonzero''' tick increase the tremolo position by the speed. '''The stored volume is untouched.'''&lt;br /&gt;
*'''If the song speed (not tremolo speed, but song speed - ticks per row) is 1, the active volume is also untouched. It is not set to the stored volume!'''&lt;br /&gt;
*'''Tremolo will not work if the stored volume is 0 (or 64 - Adlib only).'''&lt;br /&gt;
&lt;br /&gt;
===Sxy (%)===&lt;br /&gt;
Miscellaneous effects.&lt;br /&gt;
&lt;br /&gt;
====S0x====&lt;br /&gt;
Set filter. Not implemented in Scream Tracker 3.&lt;br /&gt;
&lt;br /&gt;
* '''S00''' performs an Sxy effect with '''the latest nonzero effect parameter to show up''' (note the '%').&lt;br /&gt;
* '''When S00 is repeating a note delay (SDx), the note is triggered twice: once on tick 0 (as if there's no note delay) and again on tick x (as with a normal note delay)'''&lt;br /&gt;
&lt;br /&gt;
====S1x====&lt;br /&gt;
Set glissando control.&lt;br /&gt;
&lt;br /&gt;
====S2x====&lt;br /&gt;
Set finetune.&lt;br /&gt;
&lt;br /&gt;
====S3x====&lt;br /&gt;
Set vibrato waveform.&lt;br /&gt;
&lt;br /&gt;
'''The low 2 bits''' of x (i.e. '''x &amp;amp; 0x03''') set the vibrato waveform:&lt;br /&gt;
*0: Sine wave&lt;br /&gt;
*1: Ramp down&lt;br /&gt;
*2: Square wave&lt;br /&gt;
*3: Random wave&lt;br /&gt;
&lt;br /&gt;
If the '''third bit''' is set (i.e. if '''(x &amp;amp; 0x04) != 0''' ), don't reset waveform when a new note is played.&lt;br /&gt;
&lt;br /&gt;
The 4-th bit (x &amp;amp; 0x08) is '''ignored'''.&lt;br /&gt;
&lt;br /&gt;
E.g. S3E sets a square waveform and disables reset on new note.&lt;br /&gt;
&lt;br /&gt;
====S4x====&lt;br /&gt;
Set tremolo waveform.&lt;br /&gt;
&lt;br /&gt;
====S8x====&lt;br /&gt;
Set panning position. Scream Tracker 3 supports this only on the Gravis Ultrasound.&lt;br /&gt;
&lt;br /&gt;
====SAx====&lt;br /&gt;
Old stereo control. This appears in PANIC.S3M, but may have been removed since Scream Tracker 3.01 BETA. libmodplug, and in turn SchismTracker, convert these to S8x effects.&lt;br /&gt;
&lt;br /&gt;
''TODO: work out how SAx converts to S8x effects.''&lt;br /&gt;
&lt;br /&gt;
====SBx====&lt;br /&gt;
Loop pattern.&lt;br /&gt;
&lt;br /&gt;
Unlike other trackers, '''the loopback info (i.e. the loopback point and counter) is global''' and not per channel.&lt;br /&gt;
&lt;br /&gt;
====SCx====&lt;br /&gt;
Note cut after x ticks.&lt;br /&gt;
&lt;br /&gt;
*If '''the argument is 0''', the effect '''is ignored'''.&lt;br /&gt;
*When the note is cut, the volume is '''not''' set to 0. Instead playback is temporarily '''frozen''' and may be '''resumed by a following Exx, Fxx, Gxx, Hxx, Jxx, Kxx, Lxx or Uxx command'''.&lt;br /&gt;
&lt;br /&gt;
====SDx====&lt;br /&gt;
Note delay for x ticks.&lt;br /&gt;
&lt;br /&gt;
====SEx====&lt;br /&gt;
Pattern delay for x rows.&lt;br /&gt;
&lt;br /&gt;
====SFx====&lt;br /&gt;
FunkRepeat. Not implemented in Scream Tracker 3.&lt;br /&gt;
&lt;br /&gt;
===Txx===&lt;br /&gt;
Set tempo. If the parameter is '''less than 33''', the effect is '''ignored'''.&lt;br /&gt;
&lt;br /&gt;
===Uxy (*)===&lt;br /&gt;
Fine vibrato. This effect '''shares memory''' with '''Hxy'''.&lt;br /&gt;
&lt;br /&gt;
===Vxx===&lt;br /&gt;
Set global volume. This effect has several quirks:&lt;br /&gt;
&lt;br /&gt;
*Normally, it does not affect events on the same row, where the effect is set. However, '''there are some exceptions to that rule''', read below for details.&lt;br /&gt;
*It does not affect past notes, that are still playing, unless '''their volume is changed''', which '''applies the new global volume to that voice''' as well.&lt;br /&gt;
*This effect '''is actually processed on tick 1 (that is the second tick)''' of the row. This has several consequences:&lt;br /&gt;
**The effect '''doesn't do anything''', if '''the current speed is 1'''.&lt;br /&gt;
**The effect '''is applied to notes on the current row, that have a note delay effect''' (SDx with x &amp;gt;= 1). For notes on the same row '''that have a note delay of 1 tick''', the effect is only applied to '''channels, that are processed after''' the channel with the set global volume effect. For notes on the same row that have a '''note delay of 2 ticks or more''', the effect is applied '''regardless of the relative position of the channel''' in the processing order. ''TODO: Document the processing order, since it isn't very obvious (I think it's L1, L2, ..., L8, R1, R2, ..., R8, but I'm not 100% sure).''&lt;br /&gt;
**The effect '''is also applied''' on the same row if anything updates the note volume '''on tick 1''' or '''tick 2''' (depends on processing order), like the '''Dxx effect''' (when doing a non-fine slide, of course).&lt;br /&gt;
*Vxx with parameter '''values higher than 0x40''' are '''ignored'''.&lt;br /&gt;
&lt;br /&gt;
[[Category: Music Pattern Formats]]&lt;/div&gt;</summary>
		<author><name>RepellantMold</name></author>
	</entry>
</feed>