Maj7 is a toolchain for writing size-optimized "executable music".
Maj7 is a fork of WaveSabre. It is a software synthesizer and effect library, with toolchain for size-optimized executable music.
Maj7 has a slightly different intended use than WaveSabre. While WS is specifically for 64kb demos, Maj7 is intended to write 32kb Executable music. Here we care more about audio quality and musical expression in a standalone executable, with no intention of integrating into a 64kb demo. Therefore Maj7 fills more space than WS, but is intended to be just the right size for high quality music.
With Maj7 you can expect some advantages over WS:
- Higher quality audio effects. Everything from the anti-aliased oscillators, phase-coherent crossovers, meticulously crafted compression algorithms, have been improved from the WaveSabre stock devices.
- More conventional workflow. Param curves and ranges, modulation options, visual feedback, have all been tweaked in the favor of usability familiar to musicians working with NI Massive, FabFilter effects, etc.
And disadvantages:
- Consumes more space (though still comfortably fits in a 32kb EXE music entry)
NOTE: A divergent branch, prepfor64kb, has been created which removes the less-used or bloaty luxury features, which is a lot smaller (~5kb smaller)
In general, the workflow is like this:
- Write a song in your DAW of choice using only the
Maj7VST plugins. - Use
Project Managerto convert to a.hppfile - Drop in the
hppand build the executable music project.
Please see our docs for prerequisites, building, etc
It's quite robust and usable, however because it's a 1-man show, there's no announcements of fixes / breaking changes or anything. Feel free to contact tenfour for questions / whatever:
- SizeBench is best for profiling. build min-size-rel-with-debug-info
- see
WaveSabreCoreFeatures.hppto disable features in the code. it's not always clear from the VST editors which things are disabled. - use directives in track names to elide data (like
#fixedvelocity,#oneshot,#fixednote)
#fixedvelocityindicates that the track's midi data doesn't require including velocity info. useful for sfx, arps... often it's optimal to not use velocity (that gets serialized with every note), and instead use a parameter automation lane for things like sfx.#oneshotindicates that note duration is not musically important for the track. duration data is omitted and the player synthesizes a short fixed release.#fixednotethings like snare drums, kick drums, may not need note value info.
enum class ... : uint8_tdoes not usually save space. code is spent on widening/narrowing args; storage padding is not that critical
- the
msvcrtproject is a tiny shim that compensates for the fact that we areNODEFAULTLIB. - the
build-msvcrtproject generates a.libfrom a.defso we can minimally link against the OS msvcrt.dll