Every time I had thoughts about a NES project, during years, I always faced the same problem. Although nowadays there are a lot of NES music tools, to my knowledge there is still no general solution to create and add music in a demo or music and sound effects in a game. I consider sound and music as very important part of any game, and I know very well how demotivating lack of ready-made solutions in this area could be - sound programming is very specific thing, not everyone able to get into, and music/sound code could be large enough project itself. I think, lack of the sound solution has some contribution in slowing down homebrew development on the platform, because everyone have to develop their own solutions, which takes a lot of time and efforts.
So I invite everyone who interested to discuss, think up, and implement such solution. Nothing too fancy, just something working, freely available, and easily usable.
Next my thoughts on this.
The solution should have these features:
- Just plain 2A03 with DPCM, to keep things simple.
- Easy way to make music. No text scripts, no hand coding the data as a lot of hex numbers. Either export from a existing NES music editor or from common music format (MIDI, MOD/XM etc).
- Player should be fast, it is both important for demos and games, and data should be compact, it could be important for small game projects.
- Easy way to make sound effects. They could be made exactly same way as the music (think about them as a short pieces of music), or maybe have dedicated editor. Multichannel effects are preferably.
- Sound effects player in addition to the music player. It should be separate, so demos could use music player alone.
- Versions of source code for few popular assemblers (NESASM, CA65, ?), preferably without assembler-specific features to simplify adaptation to other assemblers.
- Free license, which allow everyone to use the solution in any way for any purposes without restrictions, and will not waste time for reading long licensing text with confusing statements.
Connection between the music and sound players could work this way: the music player does not write to the sound registers directly, but instead creates a buffer in RAM. Then the buffer could be sent to the registers (no sound effects), or modified by the sound effects player, and then sent to the registers. Sound effects player could run up to few (2-4) multichannel effects at once, and decide, which channels should play at a time. Triangle channel of an effect could always replace triangle channel of the music, pulse and noise channel could replace music channels if they are louder.
First step is choosing way of creating the music. There are few options: existing NES music editor with a converter tool, use common music format with a converter, completely new editor (least interesting option, requires a lot of work). All these options could be employed if they will use the same data format.
Honestly, from all the available NES music tools I only consider FamiTracker as a candidate, despite it is Windows only. Why not other tools: NT2 has problems with license (Giftware for non-commercial projects); PornoTracker has no DPCM; Neil Baldwin's sound projects use all the resources for music, gamepad control is unconventional for music editors as well. I suppose that instead of using FamiTracker's output and player, only editable module format (FTM) should be used with a custom converter, in order to produce optimal data. Some limitations should be considered for these purposes, like only one column of effects, and maybe not all the effects supported.
Common music formats has both pros and cons. You can't hear the final sound during editing, and have to use converter tool to add the data which you can't edit in the main editor. However, you can choose the editor from few alternatives, and it is easier for non-NES musicians to get started.
So I invite everyone who interested to discuss, think up, and implement such solution. Nothing too fancy, just something working, freely available, and easily usable.
Next my thoughts on this.
The solution should have these features:
- Just plain 2A03 with DPCM, to keep things simple.
- Easy way to make music. No text scripts, no hand coding the data as a lot of hex numbers. Either export from a existing NES music editor or from common music format (MIDI, MOD/XM etc).
- Player should be fast, it is both important for demos and games, and data should be compact, it could be important for small game projects.
- Easy way to make sound effects. They could be made exactly same way as the music (think about them as a short pieces of music), or maybe have dedicated editor. Multichannel effects are preferably.
- Sound effects player in addition to the music player. It should be separate, so demos could use music player alone.
- Versions of source code for few popular assemblers (NESASM, CA65, ?), preferably without assembler-specific features to simplify adaptation to other assemblers.
- Free license, which allow everyone to use the solution in any way for any purposes without restrictions, and will not waste time for reading long licensing text with confusing statements.
Connection between the music and sound players could work this way: the music player does not write to the sound registers directly, but instead creates a buffer in RAM. Then the buffer could be sent to the registers (no sound effects), or modified by the sound effects player, and then sent to the registers. Sound effects player could run up to few (2-4) multichannel effects at once, and decide, which channels should play at a time. Triangle channel of an effect could always replace triangle channel of the music, pulse and noise channel could replace music channels if they are louder.
First step is choosing way of creating the music. There are few options: existing NES music editor with a converter tool, use common music format with a converter, completely new editor (least interesting option, requires a lot of work). All these options could be employed if they will use the same data format.
Honestly, from all the available NES music tools I only consider FamiTracker as a candidate, despite it is Windows only. Why not other tools: NT2 has problems with license (Giftware for non-commercial projects); PornoTracker has no DPCM; Neil Baldwin's sound projects use all the resources for music, gamepad control is unconventional for music editors as well. I suppose that instead of using FamiTracker's output and player, only editable module format (FTM) should be used with a custom converter, in order to produce optimal data. Some limitations should be considered for these purposes, like only one column of effects, and maybe not all the effects supported.
Common music formats has both pros and cons. You can't hear the final sound during editing, and have to use converter tool to add the data which you can't edit in the main editor. However, you can choose the editor from few alternatives, and it is easier for non-NES musicians to get started.