MPT 2.4:
********


Well... MPT with digis require a lot 
of processor time. However it's good 
to illustrate titles and/or static 
parts of game/demo.

The handling in MPT is very similar 
to CMC one. The main difference is 
the menu bar (you can enter it by 
pressing Ctrl+Tab. And the column of 
digits in Instr window.

And here it goes:
CODE
00 - first digit - effect*; 
second digit - depth/speed
00 - first digit - frqtable**; 
second digit - effect delay (in 
frames)***
00 - duration of sound (-1 volume 
every [entered_digits] frame)
00 - what's in $D208 register (e.g. 
02 or 04 - synth, 50 - 16-bit bass 
etc.)
00 - arpeggio 1/4
00 - arpeggio 2/4
00 - arpeggio 3/4
00 - arpeggio 4/4


* 0, 6 and 7 - vibratos; 2 and 3 
portamento down; 4 and 5 portamento 
up (3 and 5 - note-jump, very fast); 
1 - finetune

** 0 - normal sound (a), 1 - softbass 
(like e in RMT), 2 - hardbass (like c 
in RMT), 3 - for 1.72-timer

*** when there's 1x in upper value it 
represents finetune of [entered_value]

Here are bootable ATR with some 
examples (mixed quality and without 
samples - don't have anything handy 
right now). To run MPT just type 
MPT- or MPT*.

-----


Description of the Music ProTracker format
mayonnaise
author: mayonnaise

Recently, the reigning music software for our beloved machine is undoubtedly "Music Protracker v.2.4," known as MPT for short. Despite a few annoying flaws, it's a good program, surpassing the sonic capabilities of CMC. Unfortunately, when this program was released, the "Slight" group didn't provide a description of the file formats supported by this program, other than the user manual. Disappointed by this, I did some digging into MPT music and finally figured out the format. Below is a detailed description of the MPT v2.4 file format. I'm describing this format in "Energy Zine" because I realize that most sceners are unfamiliar with it. Knowledge of the MPT format can lead to the development of various converters, etc.

 

At the same time, I realize that MPT's reign on the scene will end with the emergence of new, more advanced music programs using the second Pokey. However, it will be a while before such programs see the light of day. (Editor's note: at the time of writing this article, the author was unaware of TMC's existence.)

 

For now, we'll have to settle for the already excellent MPT, which has become something of a standard on the Scene. But enough of the boring stuff. Let's get down to business.

MPT v2.4 file format:

1. File structure. Header

   offset
   from - to - description
   (HEX)

$0000 - $003F - preset addresses (LSB/MSB) (32 words). Bytes $00 and $00 in this array indicate that the preset is empty.

$0040 - $00BF - pattern addresses (LSB/MSB) (64 words). Bytes $00 , $00 in this array mean that the given pattern is empty

$00C0 - $01BF - four frequency tables (64 bytes each)

$01C0 - $01C3 - lower bytes of track addresses

$01C4 - $01C7 - older track address bytes

$01C8 - $01C8 - pattern length (values - $10 , $20 , $30 or $40 )

$01C9 - $01C9 - song tempo

$01CA -? - track data #1, track data #2, track data #3, track data #4

The amount of data for one track depends on the difference between the addresses of adjacent tracks

?-? - sound data

?-? - pattern data

2. Sound data.

The sound is 48 bytes long if not empty.

The first 32 bytes are arranged in pairs:

BG PN.. (x16)

Where:

B - sound color - 4 bits (older)

G - sound volume - 4 bits (lower)

P - accent parameter numbers multiplied by 2 (second row) - 4 bits (higher)

N - accent numbers (first row) - 4 bits (lower order)

the next 8 bytes are the instrument control parameters (first row from the left)

the next 8 bytes are accent parameters (second row from the left)

3. Pattern Data.

   byte (N) action
   value
   in the scope of:

$0 1- $3E - playing the note (or rather semitone) with number N (e.g. 1=C-1, 2=C#1, 3=D-1)

$40 - $5F - change the wording to a number equal to N- $40

$80 - $BE - set the number of spaces between notes to N- $80

works only after the note is played (from the moment the command occurs, the first space appears after the note)

If a byte equal to $FE occurs immediately after this byte (code), empty positions are set in the pattern. The number of these positions is N - $7F . In this case, empty positions will appear immediately, when the byte $FE appears , e.g., the byte sequence:

$83 $FE $41 $81 $01 $03 $01 $05
 | | | | | | | |
 | | | | --halftone numbers
 | | | |
 | | | 1 space between notes
 | | |
 | | set sound #1
 ----
 |
4 empty positions at the beginning of the pattern

represents the pattern:

--- --
--- --
--- --
--- --
C-1 01
--- --
D-1 01
--- --
C-1 01
--- --
E-1 01
--- --

The volume of sounds has been omitted.

$C0 - $CF - set the note volume to N- $C0

$D0 - $DF - set the playing speed to N- $D0

$Ex - end of pattern (x - any 4 bits)

NOTE!!! - MPT v2.4 saves patterns in a file so that they always have a fixed length, equal to the length set in the header. This is achieved by adding a command to the end of the pattern that creates empty positions, so that each pattern has the same number of positions.

ATTENTION #2!!!

When entering track data in MPT, make sure that the jump or stop command ($FF and $FE, respectively) is on track 0, and that the values on the other tracks are 0. Otherwise, MPT will incorrectly calculate the addresses of sounds and patterns when saving the file. Music saved this way will load correctly into MPT, but when played back using a player, you'll only hear gurgling or silence.

SAMPLE MODULE with MPT v2.4

 

ATTENTION!!! - THIS IS NOT A BINARY (DOS) FILE

from-to description

00-0F - higher bytes of sample start addresses

0F-1F - high bytes of sample end addresses (increased by 1)

1F -? - Sample data

ATTENTION!!! - sample addresses in the header start not from $0000 , but from $9000 (sample buffer address in MPT)

Yes, that's it. I hope the above description of the MPT file format is useful to someone.

File to download:
mpt24s.zip

