Implementing music

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
Implementing music
by on (#205293)
Hi everybody, I program a game with cc65, the music composer writes his music on famitracker. So I tried famitone to implement the music but a lot of effects are not compatible with famitone, so text2data does not want to create my .s file. :?

So how could I implement it without famitone?
(I did not find information by searching on google, even in assembler.)

Thank you for your answers.
Re: Implementing music
by on (#205295)
If you want full support of Famitracker, maybe just use famitracker's NSF driver directly instead of using famitone?
Re: Implementing music
by on (#205297)
Oh yes, I did not know that famitracker had done a driver. Thank you very much. :)
Re: Implementing music
by on (#205304)
MS-DOS wrote:
Oh yes, I did not know that famitracker had done a driver. Thank you very much. :)


What you have to watch out for is that famitracker's driver uses a lot more resources (more cpu time, etc). That may be fine for a small game, but may not be appropriate for a bigger project.
Re: Implementing music
by on (#205307)
Two big drawbacks of using the FamiTracker driver straight up are ROM size and lack of sound effects.

Which effects are used, and how many instruments are used? I may be able to recommend a way to shoehorn the effects into FamiTone2 or another driver that supports other effects.
Re: Implementing music
by on (#205310)
Indeed famitracker driver requires a lot of resources, the musics need 7 instruments, for the effects there are Axx, 4xx and Cxx for now.
Re: Implementing music
by on (#205313)
Quote:
the musics need 7 instruments


I hope you don't mean 7 simultaneous voices. Though, you seem familiar with Famitracker, so maybe you mean 7 "Famitracker instruments", which is fine.

When someone talks about a MIDI file with 7 instruments, they mean simultaneous play, that is why I'm confused.
Re: Implementing music
by on (#205315)
Here's my advice for each of the effects you mentioned.

Pently:
  • 45y (vibrato at rate 5, depth y) is supported for musically sensible values of y.
  • A0x (volume decrease) can be baked into an instrument's volume envelope, especially its decay phase.
  • C00 (stop playback) is supported.

FamiTone2, GGSound:
  • 4xy (vibrato at rate x, depth y) can be baked into an instrument's pitch envelope.
  • A0x (volume decrease) can be baked into an instrument's volume envelope.
  • C00 (stop playback) should be supported; if not, use D00 (pattern break) and loop on a silent pattern.
Re: Implementing music
by on (#205318)
Ah thank you very much for this post, it will help me well. :P
Re: Implementing music
by on (#205324)
If you really want to use the famitracker driver and have SFX support, you can use it with Shiru's SFX part of famitone.

Here's the topic : http://nintendoage.com/forum/messageview.cfm?catid=22&threadid=169473

Works fine for me.