Famitracker file to readable file

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

Moderator: Moderators

Post Reply
User avatar
DRW
Posts: 2225
Joined: Sat Sep 07, 2013 2:59 pm

Famitracker file to readable file

Post by DRW »

Is there a tool that converts a famitracker file (ftm) into a text file that can be read easily?

I know of the logging function that can be enabled by recompiling the program. But this log file is really just the raw APU data.

I want to convert the output of a famitracker sound into my own format.
So, I'm looking for a program that shows you, in a neat readable format, which note on which channel was played for how long. This way I could transfer each tune much easier. Otherwise, I would have to write a completely new program just to parse the Famitracker log file.
My game "City Trouble":
Gameplay video: https://youtu.be/Eee0yurkIW4
Download (ROM, manual, artworks): http://www.denny-r-walter.de/city.html
User avatar
dougeff
Posts: 3078
Joined: Fri May 08, 2015 7:17 pm

Re: Famitracker file to readable file

Post by dougeff »

Have you tried the "export text" feature of Famitracker?
nesdoug.com -- blog/tutorial on programming for the NES
User avatar
DRW
Posts: 2225
Joined: Sat Sep 07, 2013 2:59 pm

Re: Famitracker file to readable file

Post by DRW »

O.k., I tried it out, but I don't really know how to read it.

I see the values for the five channels, but there are many open questions, like:
What time unit is a row?
What is a pattern? Is it a sub-section inside a song?
If one row for one channel has the values "E-3 03 C V02 400", what does that mean? E-3 seems to be the note, but what's the other stuff?

Is there a documentation?

Otherwise, I would have preferred a format that is closer to the actual NES APU (since I at least know what the values in the APU mean, unlike the Famitracker GUI). But a format that's a bit more clever than the simple Famitracker log file. The log file shows the whole APU at every frame. I would prefer a format where I see: Which note was sent on which channel for how many frames? And where does a whole section of the song repeat?
My game "City Trouble":
Gameplay video: https://youtu.be/Eee0yurkIW4
Download (ROM, manual, artworks): http://www.denny-r-walter.de/city.html
User avatar
dougeff
Posts: 3078
Joined: Fri May 08, 2015 7:17 pm

Re: Famitracker file to readable file

Post by dougeff »

Is there a documentation?
Other than the 'help' file that comes with it, and the website wiki (which is even less informative). I don't think so.

I'm not the expert. I currently use a special tool called "pencil and paper" to convert my song data to fit my music engine.
nesdoug.com -- blog/tutorial on programming for the NES
User avatar
DRW
Posts: 2225
Joined: Sat Sep 07, 2013 2:59 pm

Re: Famitracker file to readable file

Post by DRW »

dougeff wrote:I currently use a special tool called "pencil and paper" to convert my song data to fit my music engine.
But from which source do you read the data?

I mean, I have two possibilities: I could write a program that reads the APU-formatted log file and that then tells you for how many frames the same note value appeared right after another.
Or I could read the Famitracker GUI.

The first option requires writing a new program, since it would be a hassle to read hex values of a bunch of ports for 60 frames per second.

The second option requires knowing what all those symbold in the Famitracker actually mean and how exactly each of them tranlates to the NES APU.

So, is there a better source in Famitracker that you use to read your notes before you put them into your NES program?
My game "City Trouble":
Gameplay video: https://youtu.be/Eee0yurkIW4
Download (ROM, manual, artworks): http://www.denny-r-walter.de/city.html
User avatar
dougeff
Posts: 3078
Joined: Fri May 08, 2015 7:17 pm

Re: Famitracker file to readable file

Post by dougeff »

I write the songs by sitting at my piano or keyboard and playing. Sometimes I whistle and record it. Sometimes I use a DAW to create DMC samples. In the end it's just me sketching notes onto a piece of paper, and then I spend about 5 minutes writing the codes below each note and 5 minutes typing it into my laptop.

I've tried to write songs with Famitracker, but it just comes more naturally for me to just play it on the piano.
nesdoug.com -- blog/tutorial on programming for the NES
User avatar
Memblers
Site Admin
Posts: 4044
Joined: Mon Sep 20, 2004 6:04 am
Location: Indianapolis
Contact:

Re: Famitracker file to readable file

Post by Memblers »

DRW wrote:O.k., I tried it out, but I don't really know how to read it.

I see the values for the five channels, but there are many open questions, like:
What time unit is a row?
What is a pattern? Is it a sub-section inside a song?
If one row for one channel has the values "E-3 03 C V02 400", what does that mean? E-3 seems to be the note, but what's the other stuff?
'E-3' is the note column, '03' the instrument column, 'C' is the volume setting column (this isn't the NES channel volume, but instead is used to scale the values in the volume envelope), the next 2 are effects columns. 'Vxx' sets the timbre (duty cycle for the pulse wave), '4xx' is the vibrato effect, setting to 0 disables it. All the effects are listed in the help file, under Interface / Effects list.

Yes, a pattern is subsection of the song. The individual channels have their own patterns too, so you can repeat one channel while having variations in the other, etc.

The time unit of the row depends entirely on the speed and tempo settings. One 'measure' of sheet music could be 4 rows, 16, 32, pretty much anything depending on the speed setting.
User avatar
rainwarrior
Posts: 8731
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Famitracker file to readable file

Post by rainwarrior »

DRW wrote:Is there a documentation?
The help file that comes with Famitracker fully documents the text export format. You can reach it just by going to help in the menu in Famitracker.
User avatar
DRW
Posts: 2225
Joined: Sat Sep 07, 2013 2:59 pm

Re: Famitracker file to readable file

Post by DRW »

Memblers wrote:'E-3' is the note column, '03' the instrument column, 'C' is the volume setting column (this isn't the NES channel volume, but instead is used to scale the values in the volume envelope), the next 2 are effects columns. 'Vxx' sets the timbre (duty cycle for the pulse wave), '4xx' is the vibrato effect, setting to 0 disables it. All the effects are listed in the help file, under Interface / Effects list.
O.k., looks like this one is even more complicated than reading the raw log file. Because I, who knows what values the APU expects, but who has no idea about how the Famitracker works, would have massive problems converting "instruments" and xx effects back into the corresponding 11 bit frequency value.
My game "City Trouble":
Gameplay video: https://youtu.be/Eee0yurkIW4
Download (ROM, manual, artworks): http://www.denny-r-walter.de/city.html
Post Reply