Is a good think make my own Sound Engine?

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems.

Moderator: Moderators

User avatar
dougeff
Posts: 2772
Joined: Fri May 08, 2015 7:17 pm
Location: DIGDUG
Contact:

Re: Is a good think make my own Sound Engine?

Post by dougeff » Mon Mar 04, 2019 2:56 pm

kikutano wrote:I'm using famitone2 and NESASM3 without any problems, the music is played well and sound effects are ok. I'm using Famitracker to play some samples but when I try to convert a text file or nsf with famitone tool "text2data" or "nsf2data" it give me ALWAYS some error: Error: effect is too long, Cxx at end of the effect may be missing or Parsing error (row 394,col 10): Note is out of supported range (C-1..D-6). I've no idea how to find some .ftm or .nsf that can convert in sfx or music. This is really frustrating, I can't compose, so I need to find pre cooked samples and use it. So, what's the best way to find a sound fx, music archive that I can use for my game? Famitracker had a lot of samples, but nothing that I can convert to famitone :roll: . There is a way to rip the sound from other game and reuse it?

Thanks a lot for any suggests!
You can find samples of making sound effects and songs in Shiru's Chase source code (and probably others)

https://shiru.untergrund.net/software.shtml

And on my github...

https://github.com/nesdoug/18_Music/tree/master/MUSIC
https://github.com/nesdoug/19_SFX/tree/master/MUSIC

And you can probably find some examples in the MojonTwins github (in ogt folders)

https://github.com/mojontwins?tab=repositories
nesdoug.com -- blog/tutorial on programming for the NES

User avatar
Banshaku
Posts: 2393
Joined: Tue Jun 24, 2008 8:38 pm
Location: Japan
Contact:

Re: Is a good think make my own Sound Engine?

Post by Banshaku » Mon Mar 04, 2019 6:28 pm

kikutano wrote:I agree, but as I said before, I prefer to spend the time to develop the gameplay and the graphics, maybe someday I will try to develop my own sound engine. But sometime I prefer to not reinvent the wheel, and the sound programming is not my favorite part when I develop games for work. To be honest, now I use Famitone so I can focus my self on the bank switching.
Wise choice, like mentioned before ;) There is no right or wrong but more about what are "your" goals. If you want to make a game first to learn the rope, making a sound engine will grind your project to an halt. You can make one later if you feel the need to do so. Keep in mind that making your sound driver will require a way to make music later, which means more things to define too (music format, how can the music be composed etc).

@tokumaru

Yes, it's fun to make your own code but if I would have made my own sound driver and had no editor for the music, there wouldn't have been a complete soundtrack for my project ;) So sometime, it depends of your goal. In his case, he just started nesdev so it's not the most important point to work on now. Once he will be confortable with code, he will be able to decide if making a sound engine is something he wants to do. As for myself, nope, don't want to make one, I want to make games :lol:

User avatar
Bregalad
Posts: 7988
Joined: Fri Nov 12, 2004 2:49 pm
Location: Chexbres, VD, Switzerland

Re: Is a good think make my own Sound Engine?

Post by Bregalad » Tue Mar 05, 2019 12:25 am

Most existing sound engines (famitracker, NT2, etc..) were targetted at playing music and not actually be included in a game which means the following :
  • Poor sound effect support (often not at all)
  • Music format wasteful in ROM
  • Sound engine wasteful in RAM and CPU time
  • Supports features you might never use (such as DPCM), wasting ROM and RAM
I know that thanks to famitone and perhaps other concurrent projects this isn't true anymore, but until recently this was enough reasons to make your own engine.
Last edited by Bregalad on Tue Mar 05, 2019 1:07 am, edited 1 time in total.

User avatar
Banshaku
Posts: 2393
Joined: Tue Jun 24, 2008 8:38 pm
Location: Japan
Contact:

Re: Is a good think make my own Sound Engine?

Post by Banshaku » Tue Mar 05, 2019 12:50 am

You are right, a lot of those driver, especially if you take the full fledged famitracker with famitone will be wasteful if you are not careful while composing music and I can confirms it since my current project has more than 100k of it :lol: Since my goal was faithful reproduction of the soundtrack, I didn't mind the size and I'm fine with it (cannot tell more details for now, sorry!).

Still, if you write taking care of the limitation like famitone 2 and are careful about what effect you use, you could make music that would be a lot more smaller then what I have right now. Tracker made music has a tendency to creates more data so you have to be careful. Still, it make it easier to make music to so you have to decide were to make a compromise.

User avatar
kikutano
Posts: 115
Joined: Sat May 26, 2018 6:14 am
Location: Italy

Re: Is a good think make my own Sound Engine?

Post by kikutano » Tue Mar 05, 2019 1:40 am

dougeff wrote:
kikutano wrote:I'm using famitone2 and NESASM3 without any problems, the music is played well and sound effects are ok. I'm using Famitracker to play some samples but when I try to convert a text file or nsf with famitone tool "text2data" or "nsf2data" it give me ALWAYS some error: Error: effect is too long, Cxx at end of the effect may be missing or Parsing error (row 394,col 10): Note is out of supported range (C-1..D-6). I've no idea how to find some .ftm or .nsf that can convert in sfx or music. This is really frustrating, I can't compose, so I need to find pre cooked samples and use it. So, what's the best way to find a sound fx, music archive that I can use for my game? Famitracker had a lot of samples, but nothing that I can convert to famitone :roll: . There is a way to rip the sound from other game and reuse it?

Thanks a lot for any suggests!
You can find samples of making sound effects and songs in Shiru's Chase source code (and probably others)

https://shiru.untergrund.net/software.shtml

And on my github...

https://github.com/nesdoug/18_Music/tree/master/MUSIC
https://github.com/nesdoug/19_SFX/tree/master/MUSIC

And you can probably find some examples in the MojonTwins github (in ogt folders)

https://github.com/mojontwins?tab=repositories
Thanks but I can't convert any of those with famitone2 :/ .

User avatar
dougeff
Posts: 2772
Joined: Fri May 08, 2015 7:17 pm
Location: DIGDUG
Contact:

Re: Is a good think make my own Sound Engine?

Post by dougeff » Tue Mar 05, 2019 6:23 am

Yes. You can. Maybe you need some coaching.

I'm using Famitracker version 0.4.6 and famitone2 version 1.15.

From my github, the 18_Music repository, in the MUSIC folder,

-TestMusic3.ftm is the famitracker file for the songs.
-in famitracker, open the file and export text
(you can see TestMusic3.txt already exists, this is what you would get)
-then, move that .txt file to the famitone2 folder "tools"...you would type in the command prompt...
>text2data TestMusic3.txt -nesasm

and it will output a "TestMusic3.asm" file

You import that file into your nesasm project.


----------

We can talk about sound effects once you clear this hurdle.
nesdoug.com -- blog/tutorial on programming for the NES

User avatar
kikutano
Posts: 115
Joined: Sat May 26, 2018 6:14 am
Location: Italy

Re: Is a good think make my own Sound Engine?

Post by kikutano » Tue Mar 05, 2019 7:30 am

dougeff wrote:Yes. You can. Maybe you need some coaching.

I'm using Famitracker version 0.4.6 and famitone2 version 1.15.

From my github, the 18_Music repository, in the MUSIC folder,

-TestMusic3.ftm is the famitracker file for the songs.
-in famitracker, open the file and export text
(you can see TestMusic3.txt already exists, this is what you would get)
-then, move that .txt file to the famitone2 folder "tools"...you would type in the command prompt...
>text2data TestMusic3.txt -nesasm

and it will output a "TestMusic3.asm" file

You import that file into your nesasm project.


----------

We can talk about sound effects once you clear this hurdle.
Ok it works! My error was to download the file .ftm with "Save As" button and not with the "Download" button of Githut, for some reason the file was corrupt. Anyway I converted the SoundFx too, thanks!

Pokun
Posts: 1564
Joined: Tue May 28, 2013 5:49 am
Location: Hokkaido, Japan

Re: Is a good think make my own Sound Engine?

Post by Pokun » Wed Mar 06, 2019 5:25 am

tepples wrote: use a tracker which is probably easier to understand
MML aside, I don't agree that a tracker is easier to understand than traditional methods. I have no idea how you translate a piece of sheet music to a tracker. Last time I was fiddling with one I couldn't even input all the required characters with my keyboard. Piece of shit software that required obscure keys.
tokumaru wrote:A big part of the fun in coding for the NES is doing everything myself.
Yes this is definitely one of the reasons I wanted to learn how to make my own sound routine.
Bregalad wrote:Most existing sound engines (famitracker, NT2, etc..) were targetted at playing music and not actually be included in a game which means the following :
  • Poor sound effect support (often not at all)
  • Music format wasteful in ROM
  • Sound engine wasteful in RAM and CPU time
  • Supports features you might never use (such as DPCM), wasting ROM and RAM
I know that thanks to famitone and perhaps other concurrent projects this isn't true anymore, but until recently this was enough reasons to make your own engine.
These are other reasons.

I did find an MML-based sound driver that was made for making games called NSD.Lib, but it required cc65 if I remember correctly so I ditched it.

Post Reply