Convert Note Length from Dn-Famitracker to other formats

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

Moderator: Moderators

Post Reply
arcangeldemerida
Posts: 21
Joined: Wed Jun 22, 2022 7:00 am

Convert Note Length from Dn-Famitracker to other formats

Post by arcangeldemerida »

I'm working on a Hack ROM of a NES game with custom music.
A person is composing the songs for me on Dn-Famitracker and I am adapting the music to the game format.

However, I ran into a problem regarding note lengths.
How do I convert the Dn-famitracker note lengths to the format of the game I'm working on?

Excuse me, but I've never worked with this type of program before, so far I'm just seeing how it works.
User avatar
TakuikaNinja
Posts: 89
Joined: Mon Jan 09, 2023 6:42 pm
Location: New Zealand
Contact:

Re: Convert Note Length from Dn-Famitracker to other formats

Post by TakuikaNinja »

That would depend on the sound driver you are using. Is it from the original game, or have you implemented some other sound driver?
arcangeldemerida
Posts: 21
Joined: Wed Jun 22, 2022 7:00 am

Re: Convert Note Length from Dn-Famitracker to other formats

Post by arcangeldemerida »

TakuikaNinja wrote: Fri Mar 17, 2023 7:54 pm That would depend on the sound driver you are using. Is it from the original game, or have you implemented some other sound driver?
Yes, I'm using the original game's sound driver, and it has note length commands.
User avatar
TakuikaNinja
Posts: 89
Joined: Mon Jan 09, 2023 6:42 pm
Location: New Zealand
Contact:

Re: Convert Note Length from Dn-Famitracker to other formats

Post by TakuikaNinja »

Okay. Which game, then? Note length commands can be implemented in a few different ways. Ultimately, you need to have a good understanding of how this particular game handles them.
arcangeldemerida
Posts: 21
Joined: Wed Jun 22, 2022 7:00 am

Re: Convert Note Length from Dn-Famitracker to other formats

Post by arcangeldemerida »

TakuikaNinja wrote: Sat Mar 18, 2023 6:21 pm Okay. Which game, then? Note length commands can be implemented in a few different ways. Ultimately, you need to have a good understanding of how this particular game handles them.
I'm working on a Tetris NES Hack ROM, and it works with a sound engine that is also used in other games like Dr Mario and Mother 1.

This engine has very simple note length commands (Actually it's almost a single command)

It only consists of 1 byte:

Code: Select all

$BX ; (%1011XXXX)
X can have any value from 0 to F that can correspond to a specific note length, this byte must go before one or several note bytes.
This is easy to understand.

The problem is that, How are the note lengths in Dn-Famitracker?
And sorry, as I said at the beginning, I have never used both this program and the original Famitracker to compose before.
Last edited by arcangeldemerida on Sat Mar 18, 2023 7:04 pm, edited 1 time in total.
User avatar
TakuikaNinja
Posts: 89
Joined: Mon Jan 09, 2023 6:42 pm
Location: New Zealand
Contact:

Re: Convert Note Length from Dn-Famitracker to other formats

Post by TakuikaNinja »

FamiTracker doesn't really have a notion of note lengths - the note keeps going until it encounters a new note. However, most sound drivers which convert from FT (possibly including the official NSF driver) tend to use the number of rows between notes as the note length.
So how does the Nintendo one (let's just call it that for now) measure note lengths, then?
arcangeldemerida
Posts: 21
Joined: Wed Jun 22, 2022 7:00 am

Re: Convert Note Length from Dn-Famitracker to other formats

Post by arcangeldemerida »

TakuikaNinja wrote: Sat Mar 18, 2023 7:02 pm So how does the Nintendo one (let's just call it that for now) measure note lengths, then?
There if I don't know how to explain it well, but basically it is that byte in this following example:

Code: Select all

$B1 ; $1 is the value of an eighth note.
A1 ; This is an A-1 note.
This should sound an A-1 eighth note.
Here there is a notion of the duration of the notes.
User avatar
TakuikaNinja
Posts: 89
Joined: Mon Jan 09, 2023 6:42 pm
Location: New Zealand
Contact:

Re: Convert Note Length from Dn-Famitracker to other formats

Post by TakuikaNinja »

I figured it would be something based on sheet music notation. That makes this a bit tricky. You basically need to determine the fraction of a bar (4 quavers in common time) the note takes up. Some proper documentation for the driver would help here.
Bavi_H
Posts: 193
Joined: Sun Mar 03, 2013 1:52 am
Location: Texas, USA
Contact:

Re: Convert Note Length from Dn-Famitracker to other formats

Post by Bavi_H »

TakuikaNinja wrote: Sat Mar 18, 2023 8:01 pmSome proper documentation for the driver would help here.
The documentation below says Tetris's music format is the same as Mother's music format but using different data tables.

Tetris (NES) Music Format Addendum: GitHub, ROMhacking.net

Mother Music Format: GitHub, ROMhacking.net
arcangeldemerida
Posts: 21
Joined: Wed Jun 22, 2022 7:00 am

Re: Convert Note Length from Dn-Famitracker to other formats

Post by arcangeldemerida »

Bavi_H wrote: Sun Mar 19, 2023 6:59 am The documentation below says Tetris's music format is the same as Mother's music format but using different data tables.

Tetris (NES) Music Format Addendum: GitHub, ROMhacking.net

Mother Music Format: GitHub, ROMhacking.net
Thank you, I already knew of the existence of these documents.
However, I was able to solve my problem on my own, doing experiments with the NSFimport tool plus the explanation that @TakuikaNinja gave me about rows as note lengths in Famitracker.
Post Reply