FamiTone - audio library (release)

Discuss NSF files, FamiTracker, MML tools, or anything else related to NES music.

Moderator: Moderators

Shiru
Posts: 1161
Joined: Sat Jan 23, 2010 11:41 pm

FamiTone - audio library (release)

Post by Shiru »

FamiTone is an open source audio library for NES/Famicom. It is designed to provide easy way of adding music and sound effects into homebrew games and demos for NES/Famicom. It is not meant to be the best, the fastest, or the most powerful thing, it is pretty simple but it does the job.

The library allows to create both music and sound effects using popular music cross editor FamiTracker, and then export them into library's internal formats. It supports all the standart channels of 2A03: two pulse, triangle, noise, and DPCM. Expansion sound chips are not supported.

The library is open source and released into the Public Domain. This means you can use it for any purposes without restrictions: redistribute, modify, use for commercial and non-commercial projects. You could provide credits for the author, inform the author about your project, donate, etc, but nothing is obligatory, you could do it at free will. Obviously, the library provided AS IS without any warranties, the author is not responsible for anything.

Download FamiTone (latest version for NESASM, CA65, Asm6)

Ports of older versions made by other people also available:

CA65 port by ManicGenius
Asm6 port by UncleSporky

Warning: you should use FamiTracker version 0.3.6 or higher to be able to use exporter plugin!

(this thread is continuation of two previous, new thread is to separate unrelated and obsolete information, so the release could be found easily)
Last edited by Shiru on Sun Jan 29, 2012 2:03 am, edited 6 times in total.
Wave
Posts: 110
Joined: Mon Nov 16, 2009 5:59 am

Post by Wave »

So good! Music is always my worst, I'll try to adapt it to NESHLA and include it on the framework, hope it works :)
User avatar
neilbaldwin
Posts: 481
Joined: Tue Apr 28, 2009 4:12 am
Contact:

Post by neilbaldwin »

Superb job Shiru.

It's not something I'll make use of but I can appreciate how you've put the whole thing together into a nice tidy package.

Anyone want the source converting to CA65?
Shiru
Posts: 1161
Joined: Sat Jan 23, 2010 11:41 pm

Post by Shiru »

I actually liked tepples's idea about a tool that would automatically create a source for few assemblers from a single master source. I'm thinking about something like this, but that would require to learn details about some popular assemblers first (voting shows that there are three the most popular), and I would like to work on other things now, so it goes to future plans.

Another part of problem of support for other assemblers is that text2data and nsf2data tools generate assembler listings (that is needed to allow easy relocation of data at compile-time, there are absolute addresses in the data), and it has NESASM syntax. Currently you have to use Replace function of a text editor for other assemblers, and as general solution, I think a parameter should be added to these tools, so they could produce output for few assemblers.
User avatar
clueless
Posts: 496
Joined: Sun Sep 07, 2008 7:27 am
Location: Seatlle, WA, USA

Post by clueless »

neilbaldwin wrote:Superb job Shiru.
Anyone want the source converting to CA65?
I would like the source in ca65. I will convert it myself if I need to. I'm not ready to add the sound engine to my game yet, but when I am I will try Shiru's first.

Shiru, if I convert your code to ca65, I'll send my changes back to you. I really appreciate the work that you've put into this project, and that you are releasing it with such a liberal license (commercial use allowed). If I use your engine in any of my games, you'll surely get your name in the credits, and I'll return any changes that I make to the community.
User avatar
GradualGames
Posts: 1106
Joined: Sun Nov 09, 2008 9:18 pm
Location: Pennsylvania, USA
Contact:

Post by GradualGames »

It may be too late to switch out my own sound engine, but I might look into using this one in future games. Good work Shiru!
Shiru
Posts: 1161
Joined: Sat Jan 23, 2010 11:41 pm

Post by Shiru »

I've updated the archive without changing version number, but the update is important. First, sound effects converter was broken (altough it wasn't noticeable in the demo). Second, text exporter plugin was recompiled to work with FamiTracker 0.3.6, which was released recently. Third, short demo 'song' with DPCM (just few quickly made patterns) was replaced with actual song.
Denine
Posts: 397
Joined: Wed Feb 17, 2010 5:42 pm

Post by Denine »

Wow!
This is superb.
It even supprots sounds.
Any chances for VRC7 and Tempo feature?
Shiru
Posts: 1161
Joined: Sat Jan 23, 2010 11:41 pm

Post by Shiru »

No chances for VRC7. Tempo - maybe, however I don't consider it as important feature for a simple demo/game sound engine, and I'm lazy to figure out it's exact behaviour in FamiTracker.
ManicGenius
Posts: 42
Joined: Fri Jul 09, 2010 5:37 pm

CA65 Famitone

Post by ManicGenius »

CA65 Famitone Download

Ported to CA65 today. I just wanted to get this thing working, so it still uses the whole "=" format for defining RAM variables. For my own edition I'm going to switch that over to RAM segments instead. Just wanted to get this out there before I forgot.

Also didn't port the code that generates from Famitracker, so you'll need to do some regex wizardry like I did to convert a file (or you could port the thing instead).

I stuck the notetable in a odd segment at the end near vectors and banktable.

Thanks Shiru!
User avatar
clueless
Posts: 496
Joined: Sun Sep 07, 2008 7:27 am
Location: Seatlle, WA, USA

Post by clueless »

I have a mostly completed tool that will directly convert FTM into ca65 syntax to feed into famitone. But I began changing the data and famitone to suit my own tastes. However, my code can be changed back.

I've decided that I'm not going to use a traditional tracker to make music in my current project, so I've put the FTM->ca65 converter on hold. If anyone wants to finish it, I'll post the C code somewhere. Its a single source file.
ManicGenius
Posts: 42
Joined: Fri Jul 09, 2010 5:37 pm

Post by ManicGenius »

Honestly the format is not that different...

All it needs is the .db -> .byte, .dw -> .word
and every .whatever after the first label to use @ instead of .

It's a pain in the ass but it does work.
User avatar
thefox
Posts: 3134
Joined: Mon Jan 03, 2005 10:36 am
Location: 🇫🇮
Contact:

Post by thefox »

I hadn't actually checked this out until now and now that I did, great job Shiru. You might want to add a small note about how to use the TextExporter plugin though... the "Plugins" directory had to be created manually for example. And the exporter is under "Create NSF" menu, not so obvious. :)
Shiru
Posts: 1161
Joined: Sat Jan 23, 2010 11:41 pm

Post by Shiru »

I've made a minor update, without changing version number. Now text2data and nsf2data can output files in NESASM, CA65, and Asm6 formats. More details about TextExporter usage added into readme.txt, as thefox suggested.
User avatar
clueless
Posts: 496
Joined: Sun Sep 07, 2008 7:27 am
Location: Seatlle, WA, USA

Post by clueless »

Shiru wrote:I've made a minor update, without changing version number. Now text2data and nsf2data can output files in NESASM, CA65, and Asm6 formats. More details about TextExporter usage added into readme.txt, as thefox suggested.
That's really cool (supporting the syntax of multiple assemblers). If I ever resume work on my FTM -> ca65 converter, it would also target Famitone using the syntax of those three main assemblers.
Post Reply