Composing Music for NES Hardware: Homebrew games and ROM Hacks

General discussion about tracking, help and support.
User avatar
AlexE
Posts: 4
Joined: Wed Jan 27, 2016 6:56 pm
Location: York, PA
Contact:

Composing Music for NES Hardware: Homebrew games and ROM Hacks

Postby AlexE » Wed Jan 27, 2016 7:28 pm

I understand that I can use Famitracker to create music that can be played using NES/Famicom hardware.

  • 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 but on some kind of "clock" (whatever that means; my knowledge of NES hardware/software is limited). Would changing the Speed or Tempo in the settings affect how the game is programmed? This includes the Fxy function.
  • Expansion audio (e.g. VRC6, FDS, Namco 163) can only be used on Famicom games, right? 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? I presume that any music with DPCM is playable on the 2A03, no expansion needed.
  • How should I export the music data to the programmer? I presume BIN and ASM would work.

Say for instance, I would use this FTM file for a Metal Gear NES/Famicom game.
METAL GEAR.ftm
Some Metal Gear songs.
(67.51 KiB) Downloaded 129 times

Would that be able to be played on a NES and/or Famicom?

Thank you for your help!

Alex E.

This forum also appears here: http://chipmusic.org/forums/topic/17605 ... rom-hacks/

User avatar
HertzDevil
Posts: 475
Joined: Thu Apr 23, 2015 7:39 pm
Location: Hong Kong SAR
Contact:

Re: Composing Music for NES Hardware: Homebrew games and ROM Hacks

Postby HertzDevil » Wed Jan 27, 2016 7:42 pm

AlexE wrote:What steps can I take to make sure that the music is more usable for the programmer(s) to implement into their development?

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.
refactoring 0cc-famitracker

User avatar
AlexE
Posts: 4
Joined: Wed Jan 27, 2016 6:56 pm
Location: York, PA
Contact:

Re: Composing Music for NES Hardware: Homebrew games and ROM Hacks

Postby AlexE » Wed Jan 27, 2016 7:50 pm

HertzDevil wrote:
AlexE wrote:What steps can I take to make sure that the music is more usable for the programmer(s) to implement into their development?

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.


Hmm... That seems pretty complicated; I've never heard of any of those programs. I'll look into it.

kulor
Posts: 7
Joined: Sun May 31, 2015 7:49 pm

Re: Composing Music for NES Hardware: Homebrew games and ROM Hacks

Postby kulor » Sat Feb 06, 2016 4:04 am

I have quite a bit of experience doing music for Shiru's FamiTone2 engine actually. The way it's worked for me, the programmer put together the entire game with some space leftover for music, and I ended up having to fit the whole soundtrack into that leftover space. Both instances it was less than 10KB, and that's for all the tracks/instruments/samples in the game. Different tracks were created as different songs within the same FTM, so the instrument pool was the same for all the tracks...and you have a max of 64 (used to be 32!) to work with. What's more, you're not allowed to use the volume column or the effects column, so every patch at every different volume you wanted to use it at, any pitch sliding, arpeggios etc. had to be in separate instruments. The duty envelope is also ignored past the first frame, so you can't do duty sweeps at all.
But primarily the biggest concern was always trying to get everything to fit in the small amount of space. I wouldn't suggest trying to write any music for homebrew projects until you know exactly how much space you'll have to work with, because more than likely it's some tiny pittance of KB.
Some of your other questions...
Sound effects: The programmer dictates a channel that the SFX will play on, the FamiTone2 engine handles playing both simultaneously. SFX were in some weird format that isn't made in Famitracker to my knowledge, I wasn't ever in charge of putting together SFX.
Tempo/Rows/Frames: Tempo must always be 150, only speed is acknowledged. Dxx and Bxx are both supported, being some of the only effects that are supported (Zxx and Fxx IIRC are the others).
Expansion audio: You're basically on your own, I don't think any of the homebrew music engines out there support expansions. Expansions require the programmer to use the mappers that those expansions were paired with, which increases the complexity of programming the game, so not many people use them AFAIK.
Exporting: Shiru did the first game so he just took the FTM from me. The 2nd time I think there was an FTM to assembly converter that was used, so once again I just gave the FTM.

I've attached the FTMs for both homebrew projects I did music for. Alter Ego was back when FamiTone2 only supported up to 32 instruments and I had to write more tracks in something like 7KB, so the sound quality suffered quite a bit. Super Painter I had something like 9KB and could use 64 instruments, so I was actually able to squeeze a DPCM sample in there. Also the size I'm talking about is the post-export size, which I would have to get from the programmer after they converted the FTM -- hence why these files are 40-some and 60-some KB!
Attachments
againplor4show.ftm
Super Painter OST
(68.62 KiB) Downloaded 87 times
Simpl0r.ftm
Alter Ego OST
(44.43 KiB) Downloaded 111 times


Return to “General Talk”

Who is online

Users browsing this forum: No registered users and 1 guest