PlayStation (PS1) SEQ Format Overview

This document describes the summary of PlayStation SEQ format. If you want to read an official document, search the user reference of "Net Yaroze!".

Summary

PlayStation has standard music formats as follows:

  • SEQ (*.seq) - Sequence data
  • SEP (*.sep) - SEQ package, a file contains multiple SEQs
  • VAG (*.vag) - Single waveform data
  • VAB (*.vh; *.vb) - Sound source data, VB can have 254 VAGs at maximum, VH is header data for them

SEQ is very similar to SMF Format 0, except some small differences.

Header

SEQ Header
Name Size Description
ID 4 bytes Signature: "pQES"
Version 4 bytes 1
Resolution of quarter note 2 bytes TPQN
Tempo 3 bytes Tempo (length of quarter note in microseconds)
Rhythm (Numerator) 1 byte Numerator of time signature (n)
Rhythm (Denominator) 1 byte Denominator of time signature (2n)
SEP (Sequence Package) Header
Name Size Description
ID 4 bytes Signature: "pQES"
Version 2 bytes 0?
SEQ number 2 bytes 0
Resolution of quarter note 2 bytes TPQN
Tempo 3 bytes Tempo (length of quarter note in microseconds)
Rhythm (Numerator) 1 byte Numerator of time signature (n)
Rhythm (Denominator) 1 byte Denominator of time signature (2n)
Data size (including SEQ end) 4 bytes

Messages & Differences

Setting VAB Attribute Data Using NRPN
Attribute Data1 (CC99) Data2 (CC98) Data3 (CC06)
Priority Tone Number 0 0~127
Mode Tone Number 1 0~4
Limit low Tone Number 2 0~127
Limit high Tone Number 3 0~127
ADSR (AR-L) Tone Number 4 0~127
ADSR (AR-E) Tone Number 5 0~127
ADSR (DR) Tone Number 6 0~127
ADSR (SL) Tone Number 7 0~127
ADSR (SR-L) Tone Number 8 0~127
ADSR (SR-E) Tone Number 9 0~127
ADSR (RR-L) Tone Number 10 0~127
ADSR (RR-E) Tone Number 11 0~127
ADSR (SR-±) Tone Number 12 0~64:+ 65~127:-
Vibrate time Tone Number 13 0~255 (not supported?)
Portamento depth Tone Number 14 0~127 (not supported?)
Reverb type 16 15 0~9
Reverb depth 16 16 0~127
Echo feedback 16 17 0~127
Echo delay time 16 18 0~127
Delay delay time 16 19 0~127
Vibrate depth Tone Number 21 0~127 (not supported?)
Portamento time Tone Number 22 0~255 (not supported?)
Using NRPN 20 & 30 to Set Repeating Loops within Music

SEQ specifies loop position by NRPN MSB. Value 20 (decimal) means Loop Start, and 30 means Loop End.

Attribute data 1 (CC 99) data 2 (CC 06)
Loop 1 (start) 20 Loop count (127=infinite loop)
Loop 2 (end) 30

Note that loop events cannot be nested. Also, only single channel should have those messages.

Marking Function Using NRPN 40

NRPN data can be used to mark places in a song. When a library function detects one of these marks, it calls the function registered for the mark. The marking format is shown below.

Attribute Data1 (CC99) Data2 (CC06)
Mark 40 Any value from 0~127 (Passed to callback function registered via SsSetMarkCallback)

Note: Please set the reverb and repeat at only one point in the music score data. There is no need to set them in each channel (track).

VAB Switching Using Bank Changes

Using bank change (CC 0) makes switching to any VAB possible. The CC 0 must be able to use a VAB ID. Entering an incorrect VAB ID can cause malfunctions such as no
sound production. Although a bank change generally sets CC 0 and CC 32, CC 32 can be omitted since it is ignored in libsnd.

Tempo

Tempo message starts with FF 51, that is the same as SMF. However, there are several differences between SMF and SEQ. See an example below (Tales of Phantasia: Good-by Friends):

SMF: 14 FF 51 03 0A A5 4A  14 FF 51 03 0A E6 2D  0C FF 51 03 0B 07 CB
SEQ: 14 FF 51    0A A5 4A  14    51    0A E6 2D  0C    51    0B 07 CB

Differences:

  • SMF has data length before data, but SEQ does not
  • SMF does not apply the running-status rule to events 0xFn, but SEQ does

Available messages

The details may depend on each drivers if customized.

  • note on (8n)
  • note off (9n)
  • program change (Cn)
  • pitch bend (En)
  • control change (Bn)
    • data entry (6)
    • volume (7)
    • panpot (10)
    • expression (11)
    • NRPN data (98, 99)
  • meta event (FF)
    • tempo (FF 51)

Tools

Rippers & Converters