Implementing music

Are you new to 6502, NES, or even programming in general? Post any of your questions here. Remember - the only dumb question is the question that remains unasked.

Moderator: Moderators

Post Reply
User avatar
MS-DOS
Posts: 24
Joined: Wed Sep 20, 2017 1:14 pm
Location: Green Hill Zone

Implementing music

Post by MS-DOS »

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.
User avatar
rainwarrior
Posts: 8732
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Implementing music

Post by rainwarrior »

If you want full support of Famitracker, maybe just use famitracker's NSF driver directly instead of using famitone?
User avatar
MS-DOS
Posts: 24
Joined: Wed Sep 20, 2017 1:14 pm
Location: Green Hill Zone

Re: Implementing music

Post by MS-DOS »

Oh yes, I did not know that famitracker had done a driver. Thank you very much. :)
User avatar
gauauu
Posts: 779
Joined: Sat Jan 09, 2016 9:21 pm
Location: Central Illinois, USA
Contact:

Re: Implementing music

Post by gauauu »

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.
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Implementing music

Post by tepples »

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.
User avatar
MS-DOS
Posts: 24
Joined: Wed Sep 20, 2017 1:14 pm
Location: Green Hill Zone

Re: Implementing music

Post by MS-DOS »

Indeed famitracker driver requires a lot of resources, the musics need 7 instruments, for the effects there are Axx, 4xx and Cxx for now.
User avatar
dougeff
Posts: 3079
Joined: Fri May 08, 2015 7:17 pm

Re: Implementing music

Post by dougeff »

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.
nesdoug.com -- blog/tutorial on programming for the NES
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Implementing music

Post by tepples »

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.
User avatar
MS-DOS
Posts: 24
Joined: Wed Sep 20, 2017 1:14 pm
Location: Green Hill Zone

Re: Implementing music

Post by MS-DOS »

Ah thank you very much for this post, it will help me well. :P
User avatar
Broke Studio
Formerly glutock
Posts: 181
Joined: Sat Aug 15, 2015 3:42 pm
Location: France
Contact:

Re: Implementing music

Post by Broke Studio »

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/messagevie ... did=169473

Works fine for me.
My first game : Twin Dragons available at Broke Studio.
Post Reply