The Definitive Guide to Composing NESmaker-Compatible Music and Sound

User avatar
CutterCross
Posts: 394
Joined: Sat Apr 28, 2018 9:42 pm
Contact:

The Definitive Guide to Composing NESmaker-Compatible Music and Sound

Post by CutterCross » Sat Aug 10, 2019 6:41 pm

INTRODUCTION:



Okay, this is going to be a big one.

I've seen a ton of information about NESmaker's sound capabilities scattershot all over the forum. Some of it is outdated/incorrect, and I wanted to make this topic to be a sort of definitive list of limitations/quirks and rules to follow creating music and SFX with NESmaker. I have learned a lot composing all sorts of music/SFX for this software and optimizing the music for Mystic Searches. Keep in mind that this list is for NESmaker 4.1.5, so older versions may not have exactly the same limitations as this list. So with all that out of the way, let's get started.

For more information regarding Music and SFX for NESmaker projects, watch the official "Zero to 8-Bit Hero" tutorial on Music and SFX by The New 8-Bit Heroes:



NESmaker uses a modified version of the Gradual Games Sound Engine, AKA GGsound. The following list of features come from GGsound's official webpage.



GGSOUND'S FEATURES (STRAIGHT FROM THE OFFICIAL GGSOUND WEBPAGE):



- Square [Pulse] 1, 2, Triangle, Noise, and DPCM channels *
- Volume, Arpeggio, Pitch and Duty envelopes
- Hi-Pitch envelopes are NOT supported
- Looping envelopes at an arbitrary loop point
- Speed and Tempo
- Looping with the Bxx (must be present in all channels, using unique patterns) command **
- Note cuts
- Tempo and pitch adjustment for NTSC, PAL and Dendy
- Multi-song export
- Sound effects on two channels
- Pause/unpause
- All 87 audible notes in FamiTracker
- 128 of each type of envelope ***
- 128 songs ***
- 128 sound effects ***
- 256 byte long envelopes ***

Source: http://www.gradualgames.com/p/sound-engine.html

It's important to note that GGsound does NOT support note effects (aside from Bxx) or the channel volume column in FamiTracker. Anything written there will be ignored in the compiled ROM.
Also keep in mind that Releasing envelopes at an arbitrary loop point is NOT supported.

ALSO NOTE: This should be obvious, but GGsound does NOT support famicom expansion audio of any kind. The North American and PAL region NES (unmodified) systems cannot take advantage of expansion audio in the first place, and VERY few famicom games even took advantage of expansion audio (aside from FDS).



NESMAKER-SPECIFIC QUIRKS/LIMITATIONS:



* DPCM channel is NOT supported by default
** Bxx effect is NOT supported
*** Limited to 64 instruments by default
*** The amount of songs/SFX you will be able to use will be limited by the ROM space you have to work with, and how complex/long your songs and SFX are.



BEST PRACTICES FOR COMPOSING MUSIC/SFX:



- It's been reported by The New 8-Bit Heroes that putting a Pulse channel SFX only on Pulse Channel 1 can cause some issues with playback. It's recommended that any single-channel Pulse SFX be located on Pulse channel 2.
- It's recommended to keep the Tempo setting at 150 BPM, while instead using the Speed setting to change how fast/slow the song plays.
- While note cuts are supported, it's also a good idea to create a "silent" instrument (an instrument with a volume envelope of 0) to act as a note cut, in case any issues arise with using regular note cuts.
- For SFX, it is a good idea to add a "silent" instrument note before the note cut to make sure the SFX ends properly.
- Do NOT delete instruments in the middle of your instrument bank without replacing them! If there is a gap in the instrument numbers such as this: (00, 01, 02, 04,) NESmaker will go haywire and will prevent the file from importing.
- Make sure your frames for each channel in the frame editor go in order. (For one channel, something like this: 00, 01, 02, 03... will work. Or if you're repeating frames, something like this: 00, 00, 01, 01... will also work. Do NOT do something like 00, 02, 01, 03...)



BEST PRACTICES FOR SAVING ROM SPACE:



- Putting more notes in your song will take up more ROM space, but keep in mind that blank spaces do NOT count towards ROM space!
- It's best to create instruments with longer envelopes (putting fewer notes down as a result) than it is to create instruments with simpler envelopes (putting more notes down as a result). More notes take up more ROM space than longer envelopes.
- More instruments DO take up more ROM space, but the amount is trivial compared to the amount of space taken up by more note data.
- Repeat frames as much as you can. The small amount of ROM space it takes to repeat another frame is trivial compared to the massive amount of ROM space taken by creating a new frame with new notes.
- Cram your notes together if you can, and run the song at a slower speed to keep the same tempo. This can save the tiny amount of ROM space taken up by adding/repeating a frame, but it's rare that you'll have to resort to this method to free up space.



OTHER THINGS OF NOTE (AS OF NESMAKER 4.1.5):



- The 09 ORDER limitation that NESmaker had in the past has appeared to be gone. You can write songs longer than 10 frames now.
- Noise channel arpeggios don't seem to be inverted anymore.
- NESmaker can be fickle with filenames and song names when trying to import. Make sure that your filenames and song names only use letters (combinations of uppercase or lowercase is fine) and numbers, and don't use spaces or weird characters.
- Instruments can have spaces, but should otherwise adhere to the previous naming rules.
- For naming SFX, make sure to label them as "sfx_" followed by the SFX name. Use the same naming rules as previously stated.
- Older versions of NESmaker can have some different quirks/limitations than what's been shown here.



If any of this information is incorrect/outdated, or if there is anything additional you've found regarding NESmaker's music quirks/limitations, please let me know.
Last edited by CutterCross on Mon Aug 12, 2019 8:32 pm, edited 3 times in total.
Music Man:
The Tower of Turmoil: http://www.nesmakers.com/viewtopic.php?f=12&t=1348
When the Clock Hands Stall: http://www.nesmakers.com/viewtopic.php?f=52&t=2723
User avatar
Raftronaut
Posts: 216
Joined: Mon Sep 03, 2018 4:47 pm

Re: The Definitive Guide to Composing NESmaker-Compatible Music and Sound

Post by Raftronaut » Sat Aug 10, 2019 8:47 pm

Great Work Cutter! Very thorough breakdown of the engine.

I'm still hesitant to make any long volume or pitch envelopes after some advice I got from Frankegraphics about modularizing my instruments, but I have never done any file size testing to back up my current working theories on saving space. I am at the point in file size where every decision is a balancing act, so it's good to have these things clarified. I'd always like more space for more detail in the music if possible, solos, drum fills etc....

Thanks for taking the time to lay this out
Space Raft 2.0 Demo: [url] http://nesmakers.com/viewtopic.php?f=52&t=2867 [/url]

Chiptune: [url] https://soundcloud.com/user-634230995-350638590 [/url]
User avatar
Dirk
Posts: 281
Joined: Fri Mar 09, 2018 5:30 am

Re: The Definitive Guide to Composing NESmaker-Compatible Music and Sound

Post by Dirk » Sat Aug 10, 2019 8:53 pm

This comes just in time as I've just downloaded Famitracker and started to play around with it. Thank you!
-----
Disclaimer: English is not my first language, so mistakes are bound to happen.
User avatar
CutterCross
Posts: 394
Joined: Sat Apr 28, 2018 9:42 pm
Contact:

Re: The Definitive Guide to Composing NESmaker-Compatible Music and Sound

Post by CutterCross » Sat Aug 10, 2019 9:51 pm

Raftronaut wrote:
Sat Aug 10, 2019 8:47 pm
Great Work Cutter! Very thorough breakdown of the engine.

I'm still hesitant to make any long volume or pitch envelopes after some advice I got from Frankegraphics about modularizing my instruments, but I have never done any file size testing to back up my current working theories on saving space. I am at the point in file size where every decision is a balancing act, so it's good to have these things clarified. I'd always like more space for more detail in the music if possible, solos, drum fills etc....

Thanks for taking the time to lay this out
I feel I should clarify further. What my style typically does is create many instruments with a very short set volume envelope. (One is set at 10, another at 8, another at 6, and so forth.) So if I wanted to fade out a note I would make a string of instruments with the same note to pull off the fade effect, and I used that method so I could reuse envelopes and instruments as much as possible. But when I started optimizing the music for Mystic Searches, I found that the long strings of notes ate up much more ROM space than what was saved by reusing the instruments and envelopes across the whole soundtrack. So using a specifically made instrument with a longer envelope to do the fade effect, while not as flexible as the other method, saved a bunch of ROM space in the long run by not having to plot down as many notes.

Of course, it's all something to consider in moderation to get the results you want. You don't want to have TOO long of envelopes, but enough to save a good chunk of note data. And really, this should only be considered if you're trying to cram a TON of music into your project (like Mystic Searches, which has 16+ songs to cram in!). I've never really had that problem outside of that scenario.

Bottom line: Prioritize reducing the amount of note data over all else.

Sorry if that explanation seems a bit incoherent. It's a lot easier for me to do it rather than explain it, haha.
Music Man:
The Tower of Turmoil: http://www.nesmakers.com/viewtopic.php?f=12&t=1348
When the Clock Hands Stall: http://www.nesmakers.com/viewtopic.php?f=52&t=2723
User avatar
dale_coop
Posts: 3945
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: The Definitive Guide to Composing NESmaker-Compatible Music and Sound

Post by dale_coop » Sat Aug 10, 2019 9:55 pm

Love you CutterCross <3 Very interesting topic.
So talented... I wish I would know about music like you do.
-----
Sorry about my poor english
All I need: A Damn Fine Cup of Coffee
My games: PRESS START GAME / UNDERGROUND ADVENTURE / UNDERGROUND ADVENTURE (Arcade version - Byte-Off-2019)
User avatar
Raftronaut
Posts: 216
Joined: Mon Sep 03, 2018 4:47 pm

Re: The Definitive Guide to Composing NESmaker-Compatible Music and Sound

Post by Raftronaut » Sun Aug 11, 2019 3:07 am

CutterCross wrote:
Sat Aug 10, 2019 9:51 pm
Raftronaut wrote:
Sat Aug 10, 2019 8:47 pm
Great Work Cutter! Very thorough breakdown of the engine.

I'm still hesitant to make any long volume or pitch envelopes after some advice I got from Frankegraphics about modularizing my instruments, but I have never done any file size testing to back up my current working theories on saving space. I am at the point in file size where every decision is a balancing act, so it's good to have these things clarified. I'd always like more space for more detail in the music if possible, solos, drum fills etc....

Thanks for taking the time to lay this out
I feel I should clarify further. What my style typically does is create many instruments with a very short set volume envelope. (One is set at 10, another at 8, another at 6, and so forth.) So if I wanted to fade out a note I would make a string of instruments with the same note to pull off the fade effect, and I used that method so I could reuse envelopes and instruments as much as possible. But when I started optimizing the music for Mystic Searches, I found that the long strings of notes ate up much more ROM space than what was saved by reusing the instruments and envelopes across the whole soundtrack. So using a specifically made instrument with a longer envelope to do the fade effect, while not as flexible as the other method, saved a bunch of ROM space in the long run by not having to plot down as many notes.

Of course, it's all something to consider in moderation to get the results you want. You don't want to have TOO long of envelopes, but enough to save a good chunk of note data. And really, this should only be considered if you're trying to cram a TON of music into your project (like Mystic Searches, which has 16+ songs to cram in!). I've never really had that problem outside of that scenario.

Bottom line: Prioritize reducing the amount of note data over all else.

Sorry if that explanation seems a bit incoherent. It's a lot easier for me to do it rather than explain it, haha.
I appreciate the insight on your Arp instruments, I've always found your Arps to be very expressive and elegant in design. My application of them at the moment is much more brutish, adding additional volume envelopes to them is something I hoped to add in further revisions. so this gives me something to chew on, wondering now how I can re-purpose existing volume envelopes into the Arps I already have notated. That shouldn't eat up too much memory since they're already in the notation.


Also, It might be worth noting HERE, constant sound effect loops still need to be capped by a blank instrument row. I created a static noise channel sound effect loop over the past week. It would only work when the conditions were being met to start the sound effect and would only cut back to the music if the said conditions were no longer met AND the sound effect ended in a blank instrument. If you don't cap your SFX with a blank instrument, the effect will play indefinitely until something else triggers an event on that channel. I think this seems to work on ALL the channels.

Maybe another topic of discussion is how best to optimize SFX in general. Tempo, Row length, etc..... What are the most efficient ways to set them up to get cut IN and OUT as quickly as possible.
Space Raft 2.0 Demo: [url] http://nesmakers.com/viewtopic.php?f=52&t=2867 [/url]

Chiptune: [url] https://soundcloud.com/user-634230995-350638590 [/url]
User avatar
CutterCross
Posts: 394
Joined: Sat Apr 28, 2018 9:42 pm
Contact:

Re: The Definitive Guide to Composing NESmaker-Compatible Music and Sound

Post by CutterCross » Sun Aug 11, 2019 3:23 am

Raftronaut wrote:
Sun Aug 11, 2019 3:07 am
I appreciate the insight on your Arp instruments, I've always found your Arps to be very expressive and elegant in design. My application of them at the moment is much more brutish, adding additional volume envelopes to them is something I hoped to add in further revisions. so this gives me something to chew on, wondering now how I can re-purpose existing volume envelopes into the Arps I already have notated. That shouldn't eat up too much memory since they're already in the notation.


Also, It might be worth noting HERE, constant sound effect loops still need to be capped by a blank instrument row. I created a static noise channel sound effect loop over the past week. It would only work when the conditions were being met to start the sound effect and would only cut back to the music if the said conditions were no longer met AND the sound effect ended in a blank instrument. If you don't cap your SFX with a blank instrument, the effect will play indefinitely until something else triggers an event on that channel. I think this seems to work on ALL the channels.

Maybe another topic of discussion is how best to optimize SFX in general. Tempo, Row length, etc..... What are the most efficient ways to set them up to get cut IN and OUT as quickly as possible.
Well, I wasn't really talking about my Arp instruments, I was more talking about the volume envelopes for EVERY kind of sound, but thanks!

Does it matter or not if your looping SFX also ends with a note cut after the silent instrument note? Because otherwise I'm pretty sure what you're talking about is already in the main post. I know it's sort of a different application, but the general idea is still mentioned.

"For SFX, it is a good idea to add a "silent" instrument note before the note cut to make sure the SFX ends properly."
Music Man:
The Tower of Turmoil: http://www.nesmakers.com/viewtopic.php?f=12&t=1348
When the Clock Hands Stall: http://www.nesmakers.com/viewtopic.php?f=52&t=2723
User avatar
Raftronaut
Posts: 216
Joined: Mon Sep 03, 2018 4:47 pm

Re: The Definitive Guide to Composing NESmaker-Compatible Music and Sound

Post by Raftronaut » Sun Aug 11, 2019 2:10 pm

CutterCross wrote:
Sun Aug 11, 2019 3:23 am

Does it matter or not if your looping SFX also ends with a note cut after the silent instrument note? Because otherwise I'm pretty sure what you're talking about is already in the main post. I know it's sort of a different application, but the general idea is still mentioned.

"For SFX, it is a good idea to add a "silent" instrument note before the note cut to make sure the SFX ends properly."
Yes, you are correct, looping instruments require the silent instrument note before the note cut as well. In fact, I have omitted ALL note cuts from my sound effects and replaced them solely with the Silent Instrument, This seemed to work the best as far as creating the quickest sfx interrupts during gameplay.

Is there any added benefit to using both the silent instrument AND the note cut? Or is the note cut a redundancy as I suspected?


Also, One more thing that has been on mind recently and that has not been addressed on the forums for easy reference is SFX priority.
Can anyone here explain how GGsound organizes bit values for sound effects priority? It would be incredibly helpful to know how to choose the importance of a sound effects.

This video was posted on the FB forum back in April, and it's been ruminating in my brain since I saw it. In the forums Joe indicated that GGsound should organize the bits similarly. Though I am uncertain how to investigate.
[url][/url]
Space Raft 2.0 Demo: [url] http://nesmakers.com/viewtopic.php?f=52&t=2867 [/url]

Chiptune: [url] https://soundcloud.com/user-634230995-350638590 [/url]
User avatar
CutterCross
Posts: 394
Joined: Sat Apr 28, 2018 9:42 pm
Contact:

Re: The Definitive Guide to Composing NESmaker-Compatible Music and Sound

Post by CutterCross » Mon Aug 12, 2019 8:20 pm

Raftronaut wrote:
Sun Aug 11, 2019 2:10 pm
Is there any added benefit to using both the silent instrument AND the note cut? Or is the note cut a redundancy as I suspected?
Using both the silent instrument and the note cut is a redundancy, you are correct. But it's a sort of "catch all" solution to make sure all the SFX ends properly. I just wanted to be safe with this sort of thing.
Raftronaut wrote:
Sun Aug 11, 2019 2:10 pm
Also, One more thing that has been on mind recently and that has not been addressed on the forums for easy reference is SFX priority.
Can anyone here explain how GGsound organizes bit values for sound effects priority? It would be incredibly helpful to know how to choose the importance of a sound effects.
That might be something to bring up to the creator of GGsound on NintendoAge or something. That's far beyond my expertise (and many others' here).
Music Man:
The Tower of Turmoil: http://www.nesmakers.com/viewtopic.php?f=12&t=1348
When the Clock Hands Stall: http://www.nesmakers.com/viewtopic.php?f=52&t=2723
User avatar
Raftronaut
Posts: 216
Joined: Mon Sep 03, 2018 4:47 pm

Re: The Definitive Guide to Composing NESmaker-Compatible Music and Sound

Post by Raftronaut » Mon Aug 12, 2019 9:04 pm

Raftronaut wrote:
Sun Aug 11, 2019 2:10 pm
Also, One more thing that has been on mind recently and that has not been addressed on the forums for easy reference is SFX priority.
Can anyone here explain how GGsound organizes bit values for sound effects priority? It would be incredibly helpful to know how to choose the importance of a sound effects.
That might be something to bring up to the creator of GGsound on NintendoAge or something. That's far beyond my expertise (and many others' here).
Good to know, I've considered emailing Derek at GG to see what I can learn about this, I would think that having the ability to set the SFX priority would be a terrific boon to any nesmakers looking to add sound design polish to their game.
Space Raft 2.0 Demo: [url] http://nesmakers.com/viewtopic.php?f=52&t=2867 [/url]

Chiptune: [url] https://soundcloud.com/user-634230995-350638590 [/url]
Post Reply