Amount of music in a game a function of...?

User avatar
stevenshepherd
Posts: 186
Joined: Sun Feb 18, 2018 5:25 pm

Amount of music in a game a function of...?

Post by stevenshepherd » Tue Jun 05, 2018 4:34 pm

what exactly contributes to the amount of space music takes up and thus how many tracks are possible to include? Is it the density of information in a song (hypothetical example, a 20 second loop with a handful of whole notes vs. all 1/8 notes and instrument effects)? Is it just the length of the track? Just trying to wrap my head around how the NES handles this. Thanks! :)
User avatar
CutterCross
Posts: 197
Joined: Sat Apr 28, 2018 9:42 pm

Re: Amount of music in a game a function of...?

Post by CutterCross » Tue Jun 05, 2018 5:19 pm

stevenshepherd wrote:
Tue Jun 05, 2018 4:34 pm
what exactly contributes to the amount of space music takes up and thus how many tracks are possible to include? Is it the density of information in a song (hypothetical example, a 20 second loop with a handful of whole notes vs. all 1/8 notes and instrument effects)? Is it just the length of the track? Just trying to wrap my head around how the NES handles this. Thanks! :)
From what I've experimented with each song can be no longer than ORDER 09. I haven't experimented with how many songs NESmaker can hold or how many rows each frame/ORDER can be. (By default each frame/ORDER is 64 rows.)

Oh by the way, you can't use note effects with NESmaker. Just a quick refresher. :) I've already listed a list of GGsound constraints on the forum.
The Tower of Turmoil: viewtopic.php?f=13&t=227
User avatar
Mihoshi20
Posts: 417
Joined: Tue Mar 06, 2018 11:47 pm

Re: Amount of music in a game a function of...?

Post by Mihoshi20 » Wed Jun 06, 2018 4:40 am

CutterCross wrote:
Tue Jun 05, 2018 5:19 pm
stevenshepherd wrote:
Tue Jun 05, 2018 4:34 pm
what exactly contributes to the amount of space music takes up and thus how many tracks are possible to include? Is it the density of information in a song (hypothetical example, a 20 second loop with a handful of whole notes vs. all 1/8 notes and instrument effects)? Is it just the length of the track? Just trying to wrap my head around how the NES handles this. Thanks! :)
From what I've experimented with each song can be no longer than ORDER 09. I haven't experimented with how many songs NESmaker can hold or how many rows each frame/ORDER can be. (By default each frame/ORDER is 64 rows.)

Oh by the way, you can't use note effects with NESmaker. Just a quick refresher. :) I've already listed a list of GGsound constraints on the forum.
Hmm, I'll have to do some experimenting. Making a blank project with only what's in it to get the game to boot, assemble it and look at what banks are empty, then simple just fill up the project with song and assemble and see what bank/banks fill up and keep adding songs until it overflows. Thankfully the export file from famitracker is so well laid out and organized that it's nearly a copy and paste job.
User avatar
TheNew8bitHeroes
Posts: 324
Joined: Fri Feb 16, 2018 9:24 pm
Location: Sarasota, FL
Contact:

Re: Amount of music in a game a function of...?

Post by TheNew8bitHeroes » Wed Jun 06, 2018 3:11 pm

If I understand the question correctly, the amount of music will completely depend on how complex the music is. Four notes takes four times the amount of bytes as one note. An instrument with a one value volume envelope takes up less data than an instrument with a 50 value volume envelope. Etc, etc, etc.

Right now, there is sort of a hard coded 16 song limit, however this was due to how we pulled index songs, not space constraints...with the redux to the collision data, that will be changed. It MAY also be possible to fetch data from other banks, which means that if you have stray banks you want to store more music in, that may increase the amount of music your game can hold (by sacrificing something else that could go there).

Does this help?
User avatar
CutterCross
Posts: 197
Joined: Sat Apr 28, 2018 9:42 pm

Re: Amount of music in a game a function of...?

Post by CutterCross » Wed Jun 06, 2018 3:21 pm

TheNew8bitHeroes wrote:
Wed Jun 06, 2018 3:11 pm
If I understand the question correctly, the amount of music will completely depend on how complex the music is. Four notes takes four times the amount of bytes as one note. An instrument with a one value volume envelope takes up less data than an instrument with a 50 value volume envelope. Etc, etc, etc.

Right now, there is sort of a hard coded 16 song limit, however this was due to how we pulled index songs, not space constraints...with the redux to the collision data, that will be changed. It MAY also be possible to fetch data from other banks, which means that if you have stray banks you want to store more music in, that may increase the amount of music your game can hold (by sacrificing something else that could go there).

Does this help?
That actually helps a lot for me! I just have another question. Say I had 8 different volume envelopes, 6 different pitch envelopes, and 3 different duty cycle envelopes. All of those envelopes are really small, only about 1-4 values each. Does it take up any additional space if I mix-and-match those envelopes across, say 50 instruments? Do instruments by themselves (without any envelope data) take up space? Or are they just labels to assign instrument data to?

Sorry if that question sounds a bit confusing.
The Tower of Turmoil: viewtopic.php?f=13&t=227
User avatar
TheNew8bitHeroes
Posts: 324
Joined: Fri Feb 16, 2018 9:24 pm
Location: Sarasota, FL
Contact:

Re: Amount of music in a game a function of...?

Post by TheNew8bitHeroes » Wed Jun 06, 2018 4:55 pm

To judge for yourself, you can get GradualGames sound engine and run famitracker text through it. The resulting ASM file is almost exactly what our tool will spit out. So any particular question you might have should be easy enough for you to investigate, even if you don't yet have access to the beta :-)
User avatar
Mihoshi20
Posts: 417
Joined: Tue Mar 06, 2018 11:47 pm

Re: Amount of music in a game a function of...?

Post by Mihoshi20 » Wed Jun 06, 2018 5:52 pm

TheNew8bitHeroes wrote:
Wed Jun 06, 2018 4:55 pm
To judge for yourself, you can get GradualGames sound engine and run famitracker text through it. The resulting ASM file is almost exactly what our tool will spit out. So any particular question you might have should be easy enough for you to investigate, even if you don't yet have access to the beta :-)
Experimenting with the song CutterCross made for Mermay's Den and padding the song out to Order 09 length then copy and pasting it into the import file until an assembly fails. It seems the importer in NESmaker will allow you to load in more songs then will fit into the song bank 1B but will assemble with an error Value out of Range because of the full bank.

Using this method I got 7 songs with a full order 09 length in and 1 song of order 08, and then the 1 order 00 SFX, and 1 order 00 waves song into the tool and assembled successfully into a rom. Results may vary as I don't know much about Famitracker and if adding notes and keeping silence changes the size needed. These are just the results of the experiment.
User avatar
TheNew8bitHeroes
Posts: 324
Joined: Fri Feb 16, 2018 9:24 pm
Location: Sarasota, FL
Contact:

Re: Amount of music in a game a function of...?

Post by TheNew8bitHeroes » Wed Jun 06, 2018 7:17 pm

Yes. You can download Shiru's NES Space Checker, and when you successfully compile a game, you can drag the ROM onto the tool and see the banks and how much space is used. If you get the value out of range in the assign banks script, it means that a bank has overflowed. Eventually we'd like to have a memory watcher inside the tool for quick and easy checking. :-)
User avatar
stevenshepherd
Posts: 186
Joined: Sun Feb 18, 2018 5:25 pm

Re: Amount of music in a game a function of...?

Post by stevenshepherd » Thu Jun 07, 2018 2:15 am

Thanks for the replies! This is all very helpful. Might need to rethink songs if the limit is around 16 :)
User avatar
Mihoshi20
Posts: 417
Joined: Tue Mar 06, 2018 11:47 pm

Re: Amount of music in a game a function of...?

Post by Mihoshi20 » Thu Jun 07, 2018 11:21 am

TheNew8bitHeroes wrote:
Wed Jun 06, 2018 7:17 pm
Yes. You can download Shiru's NES Space Checker, and when you successfully compile a game, you can drag the ROM onto the tool and see the banks and how much space is used. If you get the value out of range in the assign banks script, it means that a bank has overflowed. Eventually we'd like to have a memory watcher inside the tool for quick and easy checking. :-)
Yeah, I've been using the NES Space Checker a lot. It's been a life saver especially when I was manually shuffling banks around to cramming it down for my ports to Playchoice 10 and Vs. System MAME constraints. Though I noticed the program doesn't scale well to certain resolutions so I have to use it on a dedicated NESmaker machine with higher res to see the full bank report.

The problem though with the space checker though is that you can only use it after the fact. Assembling a successful rom and then checking it. I conducted my experiment to get at least a rough idea of the constraints I have to work with before hand. Though having even a rudimentary space watcher/checker beforehand in the tool would be kickass.
Post Reply