Hi! I'm Alex. I'm a music composer for video games and movies (as well as an animator, writer, etc.).
FOR NES
I have used FamiTracker (a music tracker designed to perfectly emulate the 2A03 audio chip of the NES/Famicom) for many years and I've always been fascinated by the fact that whatever music made in that program can be played on original hardware. That had me thinking about homebrew and ROM hack development, looking to improve my freelance music composition repertoire by expanding into the homebrew and ROM hack scene. I then found this site which deals specifically with retro game dev and so I figure that I would be able to get clear and more follow-able answers here.
FamiTracker is able to export NSF, .NES, PRG, BIN, ASM, and tracker text formats. Here are my questions:
According to HertzDevil on the FamiTracker forum, he said this.
"Do not use FamiTracker BIN export, especially if there are going to be sound effects at all. FamiTracker's own NSF driver is never designed to allow fast playback; instead, leverage existing drivers like Shiru's FamiTone2 or Gradualore's sound driver, or create an intermediate format yourself, either with the text exporter output or with the (not very usable) CFamiTrackerDocInterface class. You are on your own when designing sound drivers that are compact yet sufficiently expressive."
After looking into it, FamiTone2 by Shiru allows for converting FamiTracker (v 0.3.6 and higher) music —
including DPCM — into NESASM, CA65, and ASM6 formats. Gradualore's GGSound was used in Super Bat Puncher (which is an outstanding game with outstanding music) and in Star Keeper (which I haven't played yet). I am not interested in developing my own program to convert FamiTracker data into usable code AND the actual implementation of that code into the game as my knowledge in these fields are very limited. If necessary, I will look into those things further.
Unlike the SNES where the RAM for the audio and the RAM for the rest of the game are separate, the NES shares it. The largest official games for the NES were Kirby's Adventure at 6 megabits and Uncharted Waters at 5 megabits and most other games were at around 4 megabits. The largest Famicom game was Metal Slader Glory at 1 megabyte (or 8 megabits). I know they are capable of more, though it requires additional hardware for the cart (apparently the Nintendo 64 can handle a 4-GB cart! Resident Evil 2 was the largest game released at 64 megabytes). At any rate, I'm wondering how much of the RAM on the cartridge can be used for audio and read by NES and Famicom hardware? How much can be used for an NES emulator?
I also found some neat things like this NES programming tutorial.
FOR SNES
In addition to NES music, I'm also interested in learning how to create SNES music so that it can be implemented into a SNES homebrew/ROM hack. I did a great deal of research into how the SNES handles audio in order to accurately create fakebit SNES music from scratch.
The audio chip of the 16-bit Super NES/Super Famicom (Sony SPC700 via 65816 RAM(?)) has 8 adaptive differential pulse-code modulation (ADPCM) channels for bitrate reduction- (BRR) compressed samples. All the samples had to be compressed with ADPCM/BRR formats at a ratio of around 3.5:1 (32:9?) to less than 64 Kilobytes to fit on the discrete audio chip’s RAM. This means that for every 32 bytes of 16-bit PCM there are 9 bytes of BRR. The size of the samples should in total not exceed more than 150 kilobytes. The raw samples of the instruments are tweaked for downsampling, then downsampled to 8 to 22 kHz, and cut into small loops that are then truncated to 8 bits. Equalizing to retain brightness can occur before or after downsampling. Samples are often no larger than 2 kilobytes, having 16 samples to be looped.
The DSP also allowed for echo effects. Impressively enough, the SNES is capable of Dolby Surround Sound, albeit it was pseudo-surround sound using stereo Q-Sound.
I later learned that Shiru made a SNES music tracker that does all that busy work for me (except for the chorus effect). The tracker is more basic and less intuitive than FamiTracker, but it gets the job done. I don't know how I would go about exporting that data to be used for SNES development.
FOR GAME BOY
I have only been able to find a few ways to create Game Boy (and Game Boy Color) music: mGB (a hardware mod that allows for MIDI signals from a MIDI controller, effectively making the Game Boy a basic polyphonic synthesizer), Little Sound DJ (a music tracker cartridge for the Game Boy itself), and Deflemask (a tracker that emulates the Game Boy audio chip as well as the YM2612, YM2515, 2A03, MOS 8651 and 8580, and more). To my knowledge, only Deflemask allows me to create Game Boy music from the computer instead of from the Game Boy itself and in such a streamlined way. However, I don't know if it is able to export the tracker data to be used in Game Boy dev. It is able to export VGM format.
FOR SEGA GENESIS / MEGA DRIVE
The same for the Game Boy goes for the Genesis. I am aware of VGM Maker, a Genesis music tracker, but it is nowhere as clean looking and as streamlined as Deflemask. It is also able to export VGM format. I'll keep the rest of this topic in the Sega dev forum.
This forum post was also posted to AssemblerGames.com
FOR NES
I have used FamiTracker (a music tracker designed to perfectly emulate the 2A03 audio chip of the NES/Famicom) for many years and I've always been fascinated by the fact that whatever music made in that program can be played on original hardware. That had me thinking about homebrew and ROM hack development, looking to improve my freelance music composition repertoire by expanding into the homebrew and ROM hack scene. I then found this site which deals specifically with retro game dev and so I figure that I would be able to get clear and more follow-able answers here.
FamiTracker is able to export NSF, .NES, PRG, BIN, ASM, and tracker text formats. Here are my questions:
- What steps can I take to make sure that the music is more usable for the programmer(s) to implement into their development?
Are there size limits to individual tracks? I know that FamiTracker allows for limitless frames, but how much space can be used on a NES game to be used for audio? - How do I sort out sound effects? Should they be separate songs in FamiTracker or in one song? Is there something I can do in FamiTracker that would allow for the sound effect to return back to the background music after the sound effect is finished playing?
- Are there specific Song Settings I should use (e.g. Speed, Tempo, Rows, Frames)? I understand that the NES does not build its tempo on BPM like the SNES does but on some kind of "clock" timer. Would changing the Speed or Tempo in the settings affect how the game performs? This includes the Fxy function which I use for ritardando and accelerando.
- Expansion audio (e.g. VRC6, FDS, Namco 163) can only be used on Famicom hardware with the physical chip on the game cartridge (and on NES emulators, of course). Would a Famicom Everdrive/flash cart remove that problem?
- If the ROM of a game with expansion audio implemented were to be played on the 2A03-only NES, would the expansion audio simply not play or would that lead to complications?
- How should I export the music data to the programmer?
- Will FamiTracker's "New Style" of vibrato (modulating the pitch up and down instead of the "Old Style" where it is just down) cause problems? Will having a very effect-heavy and musically busy soundtrack cause errors?
According to HertzDevil on the FamiTracker forum, he said this.
"Do not use FamiTracker BIN export, especially if there are going to be sound effects at all. FamiTracker's own NSF driver is never designed to allow fast playback; instead, leverage existing drivers like Shiru's FamiTone2 or Gradualore's sound driver, or create an intermediate format yourself, either with the text exporter output or with the (not very usable) CFamiTrackerDocInterface class. You are on your own when designing sound drivers that are compact yet sufficiently expressive."
After looking into it, FamiTone2 by Shiru allows for converting FamiTracker (v 0.3.6 and higher) music —
including DPCM — into NESASM, CA65, and ASM6 formats. Gradualore's GGSound was used in Super Bat Puncher (which is an outstanding game with outstanding music) and in Star Keeper (which I haven't played yet). I am not interested in developing my own program to convert FamiTracker data into usable code AND the actual implementation of that code into the game as my knowledge in these fields are very limited. If necessary, I will look into those things further.
Unlike the SNES where the RAM for the audio and the RAM for the rest of the game are separate, the NES shares it. The largest official games for the NES were Kirby's Adventure at 6 megabits and Uncharted Waters at 5 megabits and most other games were at around 4 megabits. The largest Famicom game was Metal Slader Glory at 1 megabyte (or 8 megabits). I know they are capable of more, though it requires additional hardware for the cart (apparently the Nintendo 64 can handle a 4-GB cart! Resident Evil 2 was the largest game released at 64 megabytes). At any rate, I'm wondering how much of the RAM on the cartridge can be used for audio and read by NES and Famicom hardware? How much can be used for an NES emulator?
I also found some neat things like this NES programming tutorial.
FOR SNES
In addition to NES music, I'm also interested in learning how to create SNES music so that it can be implemented into a SNES homebrew/ROM hack. I did a great deal of research into how the SNES handles audio in order to accurately create fakebit SNES music from scratch.
The audio chip of the 16-bit Super NES/Super Famicom (Sony SPC700 via 65816 RAM(?)) has 8 adaptive differential pulse-code modulation (ADPCM) channels for bitrate reduction- (BRR) compressed samples. All the samples had to be compressed with ADPCM/BRR formats at a ratio of around 3.5:1 (32:9?) to less than 64 Kilobytes to fit on the discrete audio chip’s RAM. This means that for every 32 bytes of 16-bit PCM there are 9 bytes of BRR. The size of the samples should in total not exceed more than 150 kilobytes. The raw samples of the instruments are tweaked for downsampling, then downsampled to 8 to 22 kHz, and cut into small loops that are then truncated to 8 bits. Equalizing to retain brightness can occur before or after downsampling. Samples are often no larger than 2 kilobytes, having 16 samples to be looped.
The DSP also allowed for echo effects. Impressively enough, the SNES is capable of Dolby Surround Sound, albeit it was pseudo-surround sound using stereo Q-Sound.
I later learned that Shiru made a SNES music tracker that does all that busy work for me (except for the chorus effect). The tracker is more basic and less intuitive than FamiTracker, but it gets the job done. I don't know how I would go about exporting that data to be used for SNES development.
FOR GAME BOY
I have only been able to find a few ways to create Game Boy (and Game Boy Color) music: mGB (a hardware mod that allows for MIDI signals from a MIDI controller, effectively making the Game Boy a basic polyphonic synthesizer), Little Sound DJ (a music tracker cartridge for the Game Boy itself), and Deflemask (a tracker that emulates the Game Boy audio chip as well as the YM2612, YM2515, 2A03, MOS 8651 and 8580, and more). To my knowledge, only Deflemask allows me to create Game Boy music from the computer instead of from the Game Boy itself and in such a streamlined way. However, I don't know if it is able to export the tracker data to be used in Game Boy dev. It is able to export VGM format.
FOR SEGA GENESIS / MEGA DRIVE
The same for the Game Boy goes for the Genesis. I am aware of VGM Maker, a Genesis music tracker, but it is nowhere as clean looking and as streamlined as Deflemask. It is also able to export VGM format. I'll keep the rest of this topic in the Sega dev forum.
This forum post was also posted to AssemblerGames.com