About MD Synth DAW
A standalone DAW for the Sega Mega Drive's sound hardware, written in Haxe and compiled to C++. The chip cores, the interface and the FLAC encoder are all written in this project.
What it deliberately is not
- Not a general-purpose DAW. No reverb, no filters, no parameter that does not correspond to a register on one of the two chips. The one pole at twenty hertz on the output is the coupling capacitor the real board has.
- Not a plugin. This is an application, and the reason it is one is that a plugin could not be it.
- Not a second front end on somebody else's interface toolkit.
- Not an emulator. No 68000, no Z80, no VDP. It produces and consumes a register stream, and does not pretend to be a console.
Chip accuracy
The FM core is written from the part documentation and then measured against a known-good YM2612
rather than approximated by ear. mdd gate chip renders 1032 register scripts through both and
compares them sample for sample.
The reference is built as a separate program and only the samples it produces ever cross over, so its LGPL licence never reaches this repository and the cores stay this project's own work.
The SN76489 has no fixture suite behind it, so mdd gate psg stands in for one: its documented
behaviour written out as assertions instead.
Everything the chips do here comes from documentation or from measurement against that reference. Nothing was taken by reading somebody else's emulator and transcribing what it does, because a number lifted out of one arrives with no way to tell a measurement from an approximation somebody settled for.
mdd gate is the only claim of working that counts. It exits nonzero on any failure, and every
check from the render path onward has an offline half, because a host being right is not the same as
an engine being right.
Languages
Pick one on the first run, or change it later in preferences. The interface falls back to English for anything a language does not carry.
Japanese, Simplified Chinese and Korean each need a font of their own: 9 MB, 17 MB and 10 MB. The installer includes all three unless you clear them. If you pick one that isn't installed, the application downloads its font from the exact commit the build ships, checks it against the SHA-256 pinned in the build, and switches once it's in place. Every other language needs no extra font and is always installed.
| Language | Code | Translated by |
|---|---|---|
| English (United Kingdom) | en-GB | written here, and the language every other one is measured against |
| English (United States) | en-US | written here |
| Svenska | sv-SE | machine translated |
| Deutsch | de-DE | machine translated |
| Español | es-ES | machine translated |
| Français | fr-FR | machine translated |
| Polski | pl-PL | machine translated |
| Português (Brasil) | pt-BR | machine translated |
| Português (Portugal) | pt-PT | machine translated |
| Русский | ru-RU | machine translated |
| 日本語 | ja-JP | machine translated |
| 简体中文 | zh-CN | machine translated |
| 한국어 | ko-KR | machine translated |
Eleven of these were translated by an AI and have not been read by a native speaker. They
were written to the terms each language's own music software uses rather than word by word
from the English, and the wording is checked for nothing worse than that. Expect some of it to
read oddly, and a few terms to be wrong outright. If one of them is your language, corrections
are welcome and are a single file: assets/lang/<code>.json, one string per line, no code to
touch and no build to understand. The sheet that asks for a language on the first run says
which of the two the one you pick is.
References and credits
Everything below was read, measured against, or shipped. Where a licence binds what may be done with a source, that is noted.
Hardware documentation
| Source | What it settled |
|---|---|
| Sega Genesis Technical Manual, YM2612 section | The part's own documentation, and the starting point for the FM core. Quoted in the notes both where it agrees with measurement and where it does not, because on the oscillator frequencies and on which register drives which operator it is wrong |
| SGDK | How a real driver treats the busy bit, and the XGM format the importer and exporter read and write |
| VGM format specification | The register log format, its commands and its timing |
The reference core
| Source | Licence | How it is used |
|---|---|---|
| Nuked-OPN2 | LGPL-2.1 | The known-good YM2612 the FM core is measured against, and a reverse engineering of the die that settled several behaviours in minutes that curve fitting never would. Built as a program of its own. Only the samples it produces cross over, and it is never linked into anything shipped |
Libraries
| Source | Licence | Role |
|---|---|---|
| SDL3 | zlib | Window, events and rendering. Shipped unaltered |
| miniaudio | public domain or MIT-0 | The audio device, called directly |
| stb_truetype | public domain or MIT | Glyph rasterising |
| stb_image | public domain or MIT | Reading PNG and JPEG pictures |
| libogg | BSD-3-Clause | Ogg framing |
| libvorbis | BSD-3-Clause | Ogg Vorbis encoding |
| libopus | BSD-3-Clause | Opus encoding |
| libvpx | BSD-3-Clause, with a patent grant | VP9 encoding for the video export |
| libwebm | BSD-3-Clause, with a patent grant | Writing the WebM the video goes in |
FLAC and WAV have no library behind them. Both are written in this repository.
There is no MP3 encoder, and that is the same decision that keeps Nuked-OPN2 at arm's length. LAME and shine are both LGPL, which would put the whole application under obligations it does not want. Vorbis and Opus carry no such condition.
Typefaces
| Faces | Licence | From |
|---|---|---|
| Go, Go Mono | BSD-3-Clause | go.googlesource.com/image |
| IBM Plex Sans and Mono, Inter, JetBrains Mono, Barlow Semi Condensed, Source Sans 3, Source Code Pro, Noto Sans and Noto Sans Mono, Fira Sans, Fira Code, Work Sans, Roboto Mono, Open Sans | SIL OFL 1.1 | google/fonts |
| Noto Sans JP, Noto Sans SC, Noto Sans KR | SIL OFL 1.1 | google/fonts, for the CJK ranges the interface falls back to |
Icons
The interface icons come from Qlementine Icons under MIT, fetched as SVG at a
recorded commit and rasterised into atlases at build time, with the upstream licence shipped
alongside. Its instrument category is what made it the right set. A couple of icons a general set
has no reason to carry, wave-saw and wave-noise, are drawn in this repository.
The shipped preset banks
67 of the Default bank's FM presets are by ulalume, from ym2612-patches, released under CC0 1.0 and included here with thanks. Pianos, guitars, basses, brass, strings, organs, pipes, tuned percussion, synth leads and pads, each kept under the name and the family its author gave it. CC0 asks for nothing in return, so this credit is given rather than owed.
The other bundled FM presets were read out of VGM recordings of the soundtracks of Sonic the Hedgehog, Sonic the Hedgehog 2, Sonic the Hedgehog 3 and Mickey Mania. A preset here is the value of a register at a key on: an algorithm, a feedback, and ten numbers for each of four operators, so forty two bytes of parameters that a chip is set to. They were read from recordings of the hardware rather than copied from anybody's source. This repository records where they came from and claims nothing beyond that.
Licence
MIT. See LICENSE.
Vendored sources are fetched by mdd setup and are not part of this repository. Their licences are
listed under References And Credits.
Contact
Project link: https://github.com/MeguminBOT/md-synth-daw
Found a security problem? Please report it privately as SECURITY.md describes
rather than in a public issue. Everyone taking part is asked to follow the
code of conduct.