Enumerating exported songsSee original GitHub issue
When exporting to either single-file music code or SFX code, I can’t find a clear way to understand what number is assigned to each exported song. Within FamiStudio I don’t see any way to look at a song and know what number it has, other than just counting down the list? If you have a hundred sound effects, this is not easy to manage.
Aside from displaying a track number within FamiStudio, what I would suggest is for FamiStudio to generate an enumerations file, something we can include to provide named constants instead of having to figure out the numbering. Perhaps an .inc file containing something like the following:
MUSIC_field = 0 MUSIC_shop = 1 MUSIC_lair = 2 MUSIC_COUNT = 3 SFX_jump = 0 SFX_fire = 1 SFX_hit = 2 SFX_COUNT = 3
That way if you need to add a new track, or remove one in the middle, we don’t have to figure out a whole new set of numbers, we can just use the named constants without worry that their changing values will invalidate the code.
In my own project, I am just separately creating an enumeration like this that I have to keep in sync with the FamiStudio file and verify by hand.
Bonus option: you might also provide a string table wrapped in a conditional guard so that, if the user has space for this data, the songs could be named at run-time for a sound test. (This is another thing I am keeping track of separately.)
.if MUSIC_STRINGS music_strings: .asciiz "field" .asciiz "shop" .asciiz "lair" .endif
- Created 3 years ago
- Comments:14 (8 by maintainers)
Top GitHub Comments
One more note: it would be helpful if the SFX export log could display not just warnings but the size of each song SFX exported, that way we could copy and paste it to have stats about the generated data.
Version 3.0.0 was just release. We can now reorder songs! Closing!.
Btw, this version also features 15-30% sound engine compression improvements. Im sure its too little too late for you project, but i tought id let you know.