Ym2413+instrumentsbin -
Understanding the YM2413 and "instruments.bin" , also known as the
(FM Operator Type-LL), is a classic FM synthesis sound chip produced by Yamaha in the mid-1980s . It was famously used in the standard, the Japanese Sega Master System
, and various arcade machines to provide rich, multi-channel sound. In the context of modern emulation and software, instruments.bin ym2413_instruments.bin ) is a critical ROM file required by emulators like to accurately replicate the chip's unique sound. The Role of "instruments.bin"
Unlike more powerful FM chips, the YM2413 was designed as a cost-reduced version of the YM3812 (OPL2). To save on manufacturing costs, Yamaha hard-coded 15 specific instrument profiles directly into the chip's internal ROM. instruments.bin
file is a digital dump of this internal ROM. It contains the preset data for the 15 "hard-wired" instruments that game developers and musicians used for decades. Without this file, an emulator may be unable to produce any sound for games or applications that rely on these built-in presets. The YM2413 Instrument List The chip supports 16 instrument slots in total. is the only user-programmable slot, while slots 1 through 15 are the fixed presets found in the instruments.bin Acoustic Guitar Synthesizer Harpsichord Vibraphone Synth Bass Acoustic Bass Electric Guitar Additionally, the chip features a Rhythm Mode
that provides five fixed percussion sounds: Bass Drum, Snare Drum, Tom-tom, Top Cymbal, and Hi-hat. Technical Context in Emulation ym2413_instruments.bin (ym2413) - Not Found - Noobs
This article provides a comprehensive overview of the YM2413 sound chip, specifically focusing on the instruments.bin file format used to define its FM instrument sounds.
Understanding YM2413 instruments.bin: Unlocking OPLL Sound Synthesis
The Yamaha YM2413, often referred to as the OPLL (FM Operator Type-LL), is a legendary sound chip that defined the audio landscape of 8-bit and early 16-bit computing, most notably in the Sega Master System, MSX computers, and various arcade machines.
While the chip provides 9 channels of FM synthesis or 6 FM channels plus 5 percussion instruments, its true power lies in its capability for instrument customization. The data defining these sounds—patches, operator settings, and envelope behaviors—is often stored in a binary format known as instruments.bin.
This article explores what instruments.bin is, its structure, and how it is used to customize the sound of the YM2413. What is the YM2413 (OPLL)?
Before diving into the data structure, it is essential to understand what the chip does. The YM2413 is a 2-operator FM synthesis chip. Unlike later, more complex chips (like the YM2612), the YM2413 is designed to be inexpensive and easy to implement.
9 channels: Can be used as 9 melodic channels or 6 melodic + 5 rhythm. 2 Operators per channel: One carrier and one modulator. ym2413+instrumentsbin
Internal ROM/RAM: It has 15 pre-set instrument sounds in its ROM, but it allows for one user-defined instrument (user patch) to be loaded into RAM to replace one of the fixed sounds [1]. The instruments.bin Format
The instruments.bin file is a direct, byte-for-byte representation of the registry data required to program the YM2413's user instrument slot. Typically, this file is small, representing 8 bytes of data per patch, as defined by the OPLL's internal registers (often addresses Structure of a YM2413 Instrument
An instrument on the YM2413 is defined by 8 bytes, which control the two operators: Operator 1 (Modulator): Controls character/timber. Operator 2 (Carrier): Controls volume and envelope. The 8 bytes define:
Amplitude Modulation (AM) / Vibrato (VIB) / Sustaining (SUS) / Key Scaling (KSR) / Frequency Multiplier (MULT): These set the basic envelope behavior and harmonics.
Key Scale Level (KSL) / Total Level (TL): Controls volume and how it changes across the keyboard.
Attack Rate (AR) / Decay Rate (DR): Sets how quickly the sound starts and fades.
Sustain Level (SL) / Release Rate (RR): Sets how long the sound lingers.
Feedback (FB) / Algorithm: Determines how the modulator affects the carrier. Anatomy of instruments.bin
When dealing with a instruments.bin file, it usually contains a specific number of patches arranged sequentially. A single instrument entry might look like this in raw hex: 00 00 00 00 00 00 00 00 (A default, silent patch)
A user-defined brass sound might look like:41 61 74 18 83 82 51 01
Bytes 0-1: Frequency Multiplier and Envelope settings for Operator 1.
Bytes 2-3: Key Scale Level and Total Level (Volume) for Operator 1. Bytes 4-5: Attack/Decay Rate for Operator 1/2. Bytes 6-7: Sustain/Release Rate for Operator 1/2. Working with instruments.bin Understanding the YM2413 and "instruments
Several tools exist to create or edit instruments.bin files, allowing developers and musicians to create custom sounds for game development or emulation.
OPLLEdit: Often used in emulator development to modify the instruments.bin file [1].
VGM Tools: Files can be embedded into VGM (Video Game Music) logs for playback on original hardware. Loading and Emulation
When running in an emulator (like MESS or Fusion), the emulator looks for a file named ym2413.bin or instruments.bin to initialize the user patch slot, replacing the default instrument ( ) with the custom sound defined in the file. Why Customize instruments.bin?
Sound Variety: The built-in 15 sounds are iconic but limited. Custom instruments can create complex pads, percussive sounds, or sharper basslines.
Music Composition: Using tracker software, composers can create unique soundbanks to make their music stand out from standard YM2413 compositions. Conclusion
The instruments.bin file is the gateway to unlocking custom audio on the Yamaha YM2413. By understanding how the 8 bytes of register data control the 2-operator FM synthesis, users can significantly expand the sonic capabilities of the OPLL, pushing the boundaries of 8-bit sound design. To better assist you, are you:
Developing for an emulator and need help locating where to place the file?
Creating music for a tracker (like DefleMask) and looking for pre-made patch sets? Trying to write software to generate this binary data?
GitHub search for instruments.bin often yields MSX, SMS, or PC-Engine (YM2413) projects.
For chiptune artists, the true power of the YM2413 is not playing preset instruments, but designing your own. If you cannot find a instruments.bin online, you can build one.
The YM2413 was labeled "Low Cost" for a reason. Unlike full FM chips that allowed programmers to tweak every parameter of a sound wave, the YM2413 was more rigid. It offered: For chiptune artists, the true power of the
However, the magic of the YM2413 lay in its one "User Instrument" slot. This allowed programmers to define one custom instrument at a time, injecting a unique personality into the standard preset palette. This custom instrument definition is where the digital file format enters the picture.
When you search for ym2413+instruments.bin, you are looking for a specific binary configuration file used primarily by emulators, trackers (like Furnace or DefleMask), and VST plugins (like the infamous FMDrive or Plogue’s chipsynth).
The name breaks down simply:
However, there is nuance here. In the wild, you will find two distinct types of instruments.bin files associated with the YM2413.
Here's a C code to write a custom YM2413 instrument into an 8‑byte binary file:
#include <stdio.h>typedef struct unsigned char op1_AM_VIB_EGT_KSR_MULT; // $30 unsigned char op1_KSL_TL; // $31 unsigned char op1_AR_DR; // $32 unsigned char op1_SL_RR; // $33 unsigned char op2_AM_VIB_EGT_KSR_MULT; // $34 unsigned char op2_KSL_TL; // $35 unsigned char op2_AR_DR; // $36 unsigned char op2_SL_RR; // $37 OpllVoice;
int main() // Example: a "bright piano" patch (just as demo) OpllVoice voice = 0x01, // op1: MULT=1, no AM/VIB, EGT=0, KSR=0 0x22, // KSL=2, TL=34 (decimal) → 0x22 0x9C, // AR=15, DR=12 → 0x9C 0x17, // SL=2, RR=7 0x01, // op2 same MULT 0x00, // op2 KSL=0, TL=0 0xFC, // AR=15, DR=12 0x37 // SL=3, RR=7 ;
FILE *f = fopen("instruments.bin", "wb"); fwrite(&voice, 1, sizeof(voice), f); fclose(f); return 0;
Compile, run → get an 8‑byte instruments.bin.
But many tools expect 48‑byte (e.g., MSX PLAYER), so you can repeat or combine patches.
The YM2413 is a cost-reduced FM synthesis chip by Yamaha. Unlike fully programmable FM chips (e.g., YM2612), the YM2413 operates in two modes: Melody mode (9 channels) and Percussion mode (6 channels + 5 percussion). It contains a fixed set of 15 predefined instrument presets, plus one user-programmable slot. The instruments.bin file, commonly found in emulators and tools like OPL3 Bank Editor or VGM Music Maker, stores custom patch parameters for that user slot. This paper examines the chip’s architecture, the binary structure of instrument patches, and the role of instruments.bin in retro game music.
Use VGMPlay (by Valley Bell) with the command line:
vgmplay -opll_custom ym2413_instruments.bin my_tune.vgm
If your instrument sounds like a duck being stepped on, adjust the "Feedback" and "EG" (Envelope Generator) values. The most common mistake is setting the "Total Level" to 0, which produces maximum volume but clips horribly.