AddMusicFR - The Flashy Reveal
AddMusicFR is a future SNES music insertion tool that aims to improve over what's currently possible in Super Mario World hacking in regards to the audio department, including music and SFX. It's largely based on N-SPC code: it was built over Fire Emblem 3's N-SPC engine, with some added optimization.
One of its main goals, besides adding new features, is to allow more real-time audio control over music and SFX, allowing for effects such as muting channels, pan SFX depending on input (i.e. position on screen), etc. It was also designed in a way that is familiar for AMK users so the transition shouldn't be hard: the syntax is almost the same, having all of the old AMK features plus new syntax that's based on AMK's.
Two builds are planned for AddMusicFR: general, and music-only; the latter is aimed for users who only want the tool for music production, so it has all of its SFX, SNES communication and Super Mario World insertion features cut. In its current state, only the music-only build is being developed and it's close to completion. The general build should start development soon. However, in this thread we'll show you a few example SPCs done during the span of 2021 to show you how powerful the tool is, in regards to the music department, all done by Fortaleza Reznor users (Michael/Masterlink, Pinci and LMPuny), as well as some .txts so the users can check by themselves the syntax's similarity with AMK.
Features
- A very optimized driver code, in regards to both space and CPU usage.
- Features percussion notes (up to 11), in both the old format (@21-@28) and a new format where you put the octave as 9 (i.e. o9 c4 c+4 c8c8 c+4).
You can override the vanilla percussion notes with custom percussion notes via #percussion, which uses a similar format to #instruments. #percussion allows you to set the following data for the percussive note:
- ADSR and GAIN
- Pitch multiplier (note is o4c)
- Volume (if 0, it assumes the current channel volume)
- Panning and surround bits (if $FF, it assumes the current channel panning and surround bits)
- Echo.
- BRAND NEW COMMANDS.
- IMPROVED OLD COMMANDS:
- Dynamic commands.
Commands now are treated like samples: with #commands, you may define the hex ID ($D6-$FF), parameter length and file name to include all the commands you may need in your song, potentially excluding the ones you don't use to save ARAM. There are also command groups just like there are sample groups so you don't have to manually include the most commonly used commands!
$D5, $DA, $DB, $DD and $E9 are fixed slots and forbidden to use and change in #commands, as they need to be global. Parameter length may be deprecated in the final release as the .asm files already contain the length in a define. - Support for decimal/binary values in hex command parameters.
It is now possible to use non-hex values for hex parameters. For example:
$E8 $60 100
instead of$E8 $60 $64
$EF %01100101 $15 $15
instead of$EF $65 $15 $15
- Custom NSPCs tables.
At the start of a song, you may put #tables, and start defining your own velocity, staccato, panning and the 2 echo FIR tables for your song. - NSPC pattern support.
Divide songs in sections and save some space. You define it as#patterns {00,01,02,01}
, where each number is the pattern number for every channel, and each pattern is divided by a/
, for example,c / d / c
. Individual patterns with repeated data get optimized. If you use/
for patterns in the MML, you define the song's loop point with a/
inside#patterns
(i.e.#patterns {00/01,02,01}
). - Easier legato deactivation.
Just input $D5 right next to the last note you want legato in; that $D5 will run in the same tick after that note gets triggered and will disable legato! No need to split your note in 2 and inserting a legato off command anymore, which saves space. - Supports 2 more notes compared to AMK: (o6a+ and o6b).
- Syntax is based off the original AMK syntax, in an attempt to make things retrocompatible with AMK songs, which means that you can do stuff like replacing the third parameter of $DD with a note (or +x or -x for the relative pitch bend feature). There's also new syntax for most hex commands; we'll go in detail about it in the future!
- Are you just too lazy to change notes manually? Then this is your lucky day! - and + are now stackable!
c c+ c++ c+++ c++++ e- e-- e---
- Fades now always make sure they end at their desired value. This is more noticeable with quick fades, where AMK would make the end value different than the one defined in the command; AMFR doesn't have this issue.
Future features
- Real-time control features for sound effects:
- Panning control, to create effects such as the SFX coming from different parts of the screen. SFX itself, independent of the control input, can also opt to have a default panning and ignore the control input.
- Echo. The SFX itself can also ignore the input so it can always force echo on or off.
- Real-time control features for music:
- Fade-out and fade-in, without messing up with global volume unlike AMK, by having a second "secret global volume" and fading that instead.
- Mute certain channels.
- Force centered panning for all channels.
- Force echo on or off for all channels.
- Make GAIN sequences actually multi-purpose: each sequence point, they'll trigger a one-parameter long command defined at the start of the sequence, overriding the parameter with the value at the sequence point, allowing for custom vibratos by using tuning, sample swaps (done in examples by using a custom build that replaces one byte in the GAIN sequence code), etc.
- Multi-samples, by creating a command that reads a multi-sample table and assigns a sample ID based on the current note, and putting it inside a -1 type remote command. This will allow you to automatically change samples depending on the notes for Pianos, Guitars and the like.
- Better Echo Lvl control and automation! No more directly editing the DSP registers.
- SMAS LFSR (wind) effect
Example SPCs (click to play on web player)
The songs included to showcase are (in order of creation date):
- Mother 3 - Showertime Ballad, by Pinci. Panbrello example.
- Romancing SaGa 3 - Four Noble Devils 2, by LMPuny. PWM, custom percussion, decimal panning and staccato selector example.
- Wario Land 4 - Monsoon Jungle, by LMPuny. Panned bongos version.
- Bunny Must Die! - Knightmare Again, by Masterlink. Guitar vibrato, custom percussion and decimal panning example.
- Under Summer Skies, by Pinci. Panbrello, custom percussion and PWM example.
- Sonic Colors - Aquarium Park Act 1, by LMPuny. Done with many of AMFR's own features.
- Etrian Odyssey III - The First Campaign, by Pinci. Sample sequence (modified GAIN sequence), custom percussion and ARAM edit example (to downsample the PWM base sample and change the start point of the muted guitar sample).
- Super Tennis - Circuit, by Pinci. Sample sequence example.
- Golden Sun - Saturos Battle, by Masterlink. PWM, custom percussion, #patterns, staccato table modification, base pitch relative bends, direct BPM tempo, decimal panning and loop breaks example.
- Some sample sequence tests by Pinci.
- A GAIN sequence test by LMPuny.
Extra.
TXT files for:
- Bunny Must Die! - Knightmare Again
- Golden Sun - Saturos Battle (most commented example)
- Sonic Colors - Aquarium Park Act 1
Credits
These beautiful people are to thank for this project to come to fruition.
- LMPuny: Engine coder and project lead.
- Alcaro: Parser coder.
- LX5: Coded the provisional GUI that's being used for testing.
- Masterlink: Ideas and testing.
- Pinci: Ideas and testing.
- Maxodex: Ideas and testing.
- KungFuFurby: Help with fixing a few bugs.
- loveemu: Disassemblies for many NSPC drivers, including the engine this tool is based on.