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 (@[email protected]) 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):
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).
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.
Ah yes, the sound driver build(s) you debuted in Super Famicompo 3! Oh, and this little project of yours from C3 Summer 2020 is directly linked to this, as that was presumably the very beginning of your journey. I caught it via a sound driver signature lookup.
This sounds more interesting as some insertion for a Fire Emblem: Monshou no Nazo hack project, but I still congratulate you on your reveal! I actually knew about the project (keeping it a secret), but I dropped out in the long run because of my work with AddmusicKFF (combined with me feeling like this is the equivalent of inserting a different sound driver into the game, which means the entire thing has to be adapted for a brand new protocol, or the sound driver itself has to be modified for the original protocol).
Although at least I find this understandable... I think of AddmusicM and Addmusic405 when music was being submitted for both of these, except unlike the two having the same base, this particular scenario would be between two completely different N-SPC variants (the VCMD IDs don't even match!). I will admit I'm already dealing with a massive amount of getting things tied together just to get things working consistently, including proper restorations of the older AddmusicM and Addmusic405 songs. Plus, memory strip shortages (as well as memory constraints in general, since I have to keep optimizing the code repeatedly) are the main reason why some of the new features have not made their way into AddmusicK, as I have had to do massive fixes to a variety of bugs and problems, as well as replicating original behavior. I highly recommend preparing some dynamic compilation flags, 'lest you run into memory constraints caused by feature creep. In my case, I limited the amount of new stuff SPC-side to add in because of this problem, and I need to actually generate these on the fly when we get there if they need to be forced on.
To put things simply... I'm sensing a split between my own fork (AddmusicKFF, of which AddmusicK 1.0.9 is being prepared off of it) and AddMusicFR, probably caused initially by AddmusicK itself mostly not really being maintained for several years other than a few minor fixes here and there (the original developer last worked on it with version 1.0.2 to my knowledge, and I showed up on 1.0.7, with me working on a 1.0.9, which is taking a long time due to the massive number of fixes that I'm doing on it).
I'm sad to see you're keeping hex commands, as Addmusic should never have had that raw syntax exposed in the first place (makes changing engines in updates without ruining backwards compatibility imopssible after a certain point, effectively requiring an entire new tool all over again... nobody wants this). Other than that though, I'm happy to see so many people putting in a great effort to improve on Addmusic's legacy!
In terms of excitement, tremolo/panbrello retrigger being optional is something that got me. That, and the gain sequencing. That especially is a feature I desperately wanted to add when I was still working on AddmusicX. Glad it's there now, can't wait to put it to good use.
Dare I ask?
...OK, I'll ask.
Originally posted by LMPuny
Alcaro: Parser coder.
Please... please tell me, does it parse with AST (abstract syntax tree)?
Wow, there's SO MUCH stuff in it I want right now:
Loop break
GAIN sequences
Guitar vibrato
Staccato selector
Linear volume
4 loop layers
No integer restriction for panning
Tempo as BPM value
Easier legato deactivation
For me this is by far the coolest entry in this C3!
I'm sad to see you're keeping hex commands, as Addmusic should never have had that raw syntax exposed in the first place (makes changing engines in updates without ruining backwards compatibility imopssible after a certain point, effectively requiring an entire new tool all over again... nobody wants this).
Please note that the post indeed says the parser contains new syntax for some commands:
Originally posted by LMPuny
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!
This was done for ease of use with the dynamic commands system, in case the user wants to change the command ID so they don't have to update every instance of the command in the song. Macro labels also can do that work in case some commands don't have that syntax.
Hex syntax is being kept for people that prefer it that way, which I expect will be many. Though for the reasons above, I encourage using the new syntax.
Originally posted by exodustx0
Dare I ask?
...OK, I'll ask.
Originally posted by LMPuny
Alcaro: Parser coder.
Please... please tell me, does it parse with AST (abstract syntax tree)?
maybe
Originally posted by KungFuFurby
Ah yes, the sound driver build(s) you debuted in Super Famicompo 3! Oh, and this little project of yours from C3 Summer 2020 is directly linked to this, as that was presumably the very beginning of your journey. I caught it via a sound driver signature lookup.
Yep, effectively that driver debuted in SFC3 in Cover23 and Cover50, by Pinci and me, and earlier on that thread.
Originally posted by KungFuFurby
This sounds more interesting as some insertion for a Fire Emblem: Monshou no Nazo hack project
Possibly, but I aimed it at Super Mario World for a user demographic reason: I don't think much people hack FE3 compared to Super Mario World which is argualy one of the most hacked games (possibly the most hacked), so the tool wouldn't see much use. Thanks for your inquiry!
-------------------- Userbar by Green Jerry
Also a Fortaleza Reznor user. If you... digo, si hablas español, hackeas, buscas ayuda, o simplemente se te da conocer gente, únete, somos puerta abierta.
This is absolutely stunning...
There's just so much STUFF here and a whole lot of QOL changes it's unbelievable!
Really looking forward to the gain sequencing thing, because that means you could port songs from Mario is Missing!, DOOM and other such titles with greater accuracy. =P
Very solid stuff!
Wow, now this is the love the snes music scene needs! For real, I've wanted to try disabling staccato gap, using guitar vibrato, selectively including commands, and sample/gain sequences. And all of that is here? I used to think I was crazy for wishing for such things, but now I'm starting to wonder if I'm the crazy one here.
Seriously though, I'm way too excited for my own good. Some of the reason why I haven't ported as much lately is because hacking various musical effects out of amk is becoming pretty commonplace for me. I admit there's a joy in it, but it's also kind of demotivating too. Almost every port feels like I'm bending over backwards at some stage, sometimes to really painful amounts. And then if it's something I want to submit, I feel bad for the music mod who claims the port. The possibilities presented by amfr though are getting me motivated to port again!
I'm normally really skeptical when projects like this are announced and are seeming too good to be true. But the demo spcs speak volumes for me, and show the potential and functionality that is already here. This is what happens when a tool is made by porters for porters. I do hope, though, that amfr can evolve and be equally useful for romhackers as planned. That way the flashy music made by us nerdy porters can actually be used!
Speaking of romhacking, I do wonder what will happen as amfr and amkff compete. In a perfect world, both would coexist and play nicely together, and I suspect that is the goal? But the pessimist in me is worried it won't work out.
Needless to say though, I'll be keeping a close eye on this. Wishing you guys the best for development and a happy, productive 2022!
-------------------- Make more of less, that way you won't make less of more!
Speaking of romhacking, I do wonder what will happen as amfr and amkff compete. In a perfect world, both would coexist and play nicely together, and I suspect that is the goal? But the pessimist in me is worried it won't work out.
Unlike how AddmusicM and Addmusic405 were integrated into AddmusicK (helped in that they used the same base)... this one's going to be a good deal harder, if it even happens. I myself only recognize this as a N-SPC sound driver, and not even a modded copy of the original game's...
Unfortunately, I don't know how well this is going to handle the old stuff if this tool chooses that route. I already know it's a massive effort to begin with to get everything working correctly, and I also know when the support lines for the old stuff sometimes try to get cut as well... tough calls.
Wow incredible! The new features and potential this tool has! This will probably get me back into porting bigger projects like I use to! I'd definitely love to play with porter mode of the tool to just make SNES music. I've always wanted to redo some of my Foster The People ports and with a more optimize engine and no SNES side to clog up space, I may be able to make better hq sounding ports (Jurassic Park here we come?)!
That's great! Finally, an Addmusic that has so many features we looking for several years. I am really want to do something great with this tool and SPC engine.
...I am already aware of the remoderation that happened the first go round, and I am explicitly working on avoiding another one as much as possible with my own fork.
The amount of songs that have been submitted with the stock AddmusicK build is rapidly increasing: thus, the archives are that much more massive to convert over.
The amount of conversion you may have to handle, including all of those quirks that the other people have come to know and account for (Fire Emblem's readahead code in the original build in particular actually accounts for subroutines and automatically keys off on return. I already know that this behavior could break existing songs, as the readahead of AddmusicK skips over subroutines by default), is probably going to be larger than the amount I am going through. Plus... the SFX code is not included in the disassembly for Fire Emblem - Monshou no Nazo, meaning you have an entirely new format to work with (and so do we)!
Plus... the SFX code is not included in the disassembly for Fire Emblem - Monshou no Nazo, meaning you have an entirely new format to work with (and so do we)!
Oh I have completed the disassembly myself actually by disassembling the SFX part, although I might have to cut some stuff from it as it's too much for the simplicity of SFX in SMW. Some stuff might be ported though as some SFX VCMDs are cool (there's a random pitch offset VCMD) and the other stuff are from FE3's real-time controls over audio.
I'd have to check myself how many songs get broken with AMFR's readahead; if it's considerable, I'll have a global flag that skips the loop's part in the readahead when the user desires to.
-------------------- Userbar by Green Jerry
Also a Fortaleza Reznor user. If you... digo, si hablas español, hackeas, buscas ayuda, o simplemente se te da conocer gente, únete, somos puerta abierta.
There are other engines out there that actually use the exact same format as a stock N-SPC build for their SFX... I'd have to check them again, though.
And the global flag would work... however, I'm taking a "hot patch" approach to this, and am preparing a VCMD or two for this exact situation, as well as several other quirks that you will have to replicate if they're no longer present in the build you selected. There are a huge list of them scattered out there...
Follow Us On