Skip to content

BFBNK File Format

Yannik Marchand edited this page May 5, 2023 · 14 revisions

NW > Sound Files > Bank File (FBNK)

This file contains instrument definitions. Every instrument references a wave file in a wave archive. Bank files are used by sequence sounds.

Block id Description
0x5800 Info block

Info Block

Offset Size Description
0x0 4 Identifier ("INFO")
0x4 4 Block size
0x8 8 Reference to wave id table (0x0100)
0x10 8 Reference to instrument reference table (0x0101)

Instrument Reference Table

Offset Size Description
0x0 4 Number of entries
0x4 References to instruments (0x5900)

Instrument

Offset Size Description
0x0 8 Reference table for key regions (0x5901)

Key Region

Offset Size Description
0x0 8 Reference table for velocity regions (0x5902)

Velocity Region

Offset Size Description
0x0 4 Unknown
0x4 4 Flags. This field specifies which of the following fields is present.

Every optional field takes up exactly 4 bytes (if present).

Flag Description
0x1 Original key
0x2 Volume
0x4 Pan
0x8 Pitch
0x10 0x00XXYYZZ: XX = Interpolation type, YY = Key group, ZZ = Ignore note off
0x200 Offset to reference to adshr curve (0x0000)

Region Reference Table

Every instrument has a bunch of key regions which are further divided into velocity regions. All note commands in a sequence sound specify a 'key' and 'velocity' value, which ultimately decide which key region and velocity region are chosen.

Offset Size Description
0x0 8 Reference to region info (0x6000, 0x6001 or 0x6002)

Type 0x6000 is stored as follows:

Offset Size Description
0x0 8 Reference to region

Type 0x6001 is stored as follows:

Offset Size Description
0x0 1 Region number 1
0x1 1 Region number 2
...
Padding to align to 8 bytes
8 Reference to region 1
8 Reference to region 2
...

Type 0x6002 is stored as follows:

Offset Size Description
0x0 1 First region number
0x1 1 Last region number
0x2 6 Padding
0x8 References to regions
Clone this wiki locally