FamiTone - audio library (release)

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

Moderator: Moderators

unregistered
Posts: 1318
Joined: Thu Apr 23, 2009 11:21 pm
Location: cypress, texas

Post by unregistered »

Shiru wrote:This question is not related to FamiTone, it is related to NESASM and answered in its docs. In short, .bank selects 8K bank in a ROM file, number of banks defined through .ines*** defines in the beginning of the source file.
ah ok i got it now, the FamiTone code is NESASM. :oops: Thank you. :)

Have another question and hope it is related to FamiTone. :) How can I get FamiToneUpdate to run on every frame.................................. wait that's probably answered in demo.asm... yes it is! :oops: Thanks though. :)
Shiru
Posts: 1161
Joined: Sat Jan 23, 2010 11:41 pm

Post by Shiru »

It is related to NES programming in general, and actually it is not the simplest question. You need to call it after VRAM updates, so the most common way is to put sound update call in the NMI handler, after all the video related code.
unregistered
Posts: 1318
Joined: Thu Apr 23, 2009 11:21 pm
Location: cypress, texas

Post by unregistered »

Shiru, have you ever recieved a small bunch of Unknown label. errors followed by a lot of Can't determine address. errors? These errors have been reported by asm6 while trying to build my nes file to test with. All of the errors have been reported from music32101.asm, the first music file created by famitone. I did add the -asm6 before its creation.
Shiru
Posts: 1161
Joined: Sat Jan 23, 2010 11:41 pm

Post by Shiru »

No, I haven't got any mails regarding FamiTone at all.

I don't know anything about asm6.
unregistered
Posts: 1318
Joined: Thu Apr 23, 2009 11:21 pm
Location: cypress, texas

!!! :D

Post by unregistered »

Made progress... yes. All of the errors dissappeared and the rom build successfully once I recieved some understanding and so we figured out that all of the

Code: Select all

.env_default
things needed to be changed to

Code: Select all

@env_default
. I guess something needs to be changed in the text2data program? Remember I'm using asm6. :)

The rom kind of works... there is a lot of wierd things... I think it's my code problem somewhere, but Shiru, do you think you could help me with some hints as to why the song doesn't play? Have to look at the code now... help if you can. :D
Shiru
Posts: 1161
Joined: Sat Jan 23, 2010 11:41 pm

Post by Shiru »

text2data supports asm6 syntax, so you did something wrong. Old version of the tool, -asm6 in a wrong place, etc.

Sorry, I don't like to figure out what is wrong with other's code, I always have megabytes of my own code to work with. If you have problems with NES programming in general, ask on NESdev section of this forum, other people could help. In this thread I only answer to questions related to FamiTone usage, issues, bugs, not obvious things (not mentioned in docs), etc.
Shiru
Posts: 1161
Joined: Sat Jan 23, 2010 11:41 pm

Post by Shiru »

I had thoughts about native multiple assemblers support in FamiTone for long time, similar to the idea tepples once suggested. Ports by ManicGenius and UncleSporky gave me idea how it should look, so here is my attempt to solve the problem: a tool that converts NESASM source code to CA65 and ASM6 source code (not arbitrary code, just FamiTone).

As I'm not a user of these assemblers, try it and tell me if anything is wrong. CA65 output compiles without errors, at least.

Edit: now included into the main archive

Additionally, text2data and nsf2data tools were updated to produce correct ca65 output.
Last edited by Shiru on Mon Jun 06, 2011 8:17 am, edited 2 times in total.
Shiru
Posts: 1161
Joined: Sat Jan 23, 2010 11:41 pm

Post by Shiru »

FamiTone is updated. Many minor fixes, some optimizations, code to work correctly in situation when you call update in NMI and start sound effects from the main code.

ca65 version converted with the tool is tested, it works correctly.
Shiru
Posts: 1161
Joined: Sat Jan 23, 2010 11:41 pm

Post by Shiru »

Fixed a bug in text2data with incorrect RLE compression in envelopes (encoded 3+ as 5+ frames).
Shiru
Posts: 1161
Joined: Sat Jan 23, 2010 11:41 pm

Post by Shiru »

Another update. Fixes some things in text2data, and also adds two switches -onlyins and -noins. Using these switches you can export instrument and music data separately, it is useful when you need to save some space by using the same instruments data with few songs.

Warning: text2data don't like songs with patterns of different weird lengths (with effects D00 and Bxx), in some cases it can create wrong music data. Needs to be fixed.
User avatar
Hamtaro126
Posts: 818
Joined: Thu Jan 19, 2006 5:08 pm

Post by Hamtaro126 »

I went to Shiru's website, It seems to be down, Maybe permanently.

Just thought I'd let you know.
AKA SmilyMZX/AtariHacker.
Shiru
Posts: 1161
Joined: Sat Jan 23, 2010 11:41 pm

Post by Shiru »

Thanks to my hoster for my new signature. Just wait a day, it will work again. FTP links works always, though.
User avatar
thefox
Posts: 3134
Joined: Mon Jan 03, 2005 10:36 am
Location: 🇫🇮
Contact:

Post by thefox »

FYI, I've added FamiTone text export option in Pornotracker.
sdwave
Posts: 27
Joined: Mon Feb 13, 2012 1:20 am

Awesome work!

Post by sdwave »

I just wanted to say Famitone is a really nice library/package. I've got my Famitracker music running (with DPCM drums) and multichannel tri/noise sound effects I made from .ftm->.nsf->famitone data.

One small possible bug report, I'm using ca65, and I had to fix one small bug to get my sound effects working. I needed to change

.if(~FT_SFX_ENABLE)

from using bitwise not "~" to logical not "!"

.if( !FT_SFX_ENABLE)

Expected, or something else I should have done?
Shiru
Posts: 1161
Joined: Sat Jan 23, 2010 11:41 pm

Post by Shiru »

In my version it is logical not, and it haven't change for long time, so maybe you got some older version (current is 1.24)?
Post Reply