Thanks to zxdplay for using GGSound in StarKeeper, this inspired me to keep improving my sound engine and continue to make it available for others.
GGSound can be cloned or downloaded from the Github repository.
There is also a snapshot available on this post, but from now on please use the Github repository.
-Exporter for FamiTracker text exports
-Works with nesasm3, asm6 and ca65
-Square 1, 2, Triangle, Noise, and DPCM channels
-Volume, Arpeggio, Pitch and Duty envelopes
-Looping envelopes at an arbitrary loop point
-Speed and Tempo
-Looping with the Bxx (must be present in all channels, in unique patterns) command
-Tempo and pitch adjustment for NTSC, PAL, and Dendy
-Sound effects on two channels
-All 87 audible notes in FamiTracker
-No FamiTracker channel effects can be used, only envelopes/macros
-128 of each type of envelope
-128 sound effects
-256 byte long envelopes
You can watch a short intro video for how to use GGSound in a NESASM3 program here:
- (147.46 KiB) Downloaded 245 times
I'm coming very close to having a nice new version of my sound engine ready. Updates include:
-1:1 tempo mapping between FamiTracker and my sound engine
-Loop point implementation for envelopes.
-Support for NTSC and PAL, including tempo adjustment from the converter script and correct pitch values for each region
-Multi song export with the converter script, including a facility which interprets all tracks prefixed as sfx_ to be a sound effect, and modifies them accordingly to terminate after the longest envelope finishes (so, loops are ignored for sound effects by default).
-Better song compression. Repeated patterns are re-used.
-Shared envelopes for your entire song/sound effect collection for more efficient ROM space usage.
-support for B00 to loop your song at a point other than the end of your last frame
-sound effects temporarily cancel the playing note on the channel that they overlay, to help reduce ugly volume shifts
Still no arpeggios or DPCM---primarily because I do not intend to use either in my own projects. If you try out GGSound and enjoy its features and ease of use, but would like these features, please post in this thread and I will add them.
Given that there are already several nice solutions around such as FamiTone2, would there be any interest in yet another sound solution, including versions for nesasm and asm6?
The only substantial advantage that I know of between my sound engine and FamiTone2, is that FamiTone2's converter (with my own music anyway) frequently outputs a note range error, which does not happen with my converter script or engine. I assume this was due to a design decision for efficient packing of data on Shiru's part rather than a flaw, but this particular quirk of FamiTone2 pushed me to update my engine to support the features I wanted from FamiTone2.
Another advantage I've learned about from reading others' posts is that it is a little trickier to use sound effects with FamiTone2. GGSound makes this very easy. Just prefix your song name with sfx_ and the converter does the rest.
If there seems to be any interest out there I'll go ahead and prepare a public version of the engine.
Code: Select all
nsf_play: jsr sound_update jsr sound_upload rts nsf_init: sta current_song ;initialize modules lda #0 ; region, don't care sta sound_param_byte_0 lda #<(song_list) sta sound_param_word_0 lda #>(song_list) sta sound_param_word_0+1 lda #<(sfx_list) sta sound_param_word_1 lda #>(sfx_list) sta sound_param_word_1+1 jsr sound_initialize ;load a song lda current_song sta sound_param_byte_0 jsr play_song rts
NSF format works by specifying 3 addresses, load, init and play. Load is just where the file is loaded in memory, init gets called with the song number in A, then the play address gets called at the frame rate. It shouldn't be possible for the play address to run first, and NSF format doesn't include NMI or IRQ support (usually the vectors aren't even in the file).
I added it to my NSF benchmarking thread. It looks at CPU usage only.
Thanks for sharing, it never hurts to have more sound options.
I've tried changing both the song default tempo and using the tempo command... nothing works!
Thanks for the tip, much appreciated!rainwarrior wrote:If the version of python is critical, you might want to check for that in the script, e.g.
Code: Select all
#!/usr/bin/env python3 import sys assert sys.version_info >= 3, "Python 3 required."
The assert you can put anywhere you want it to check, but probably want that near the top as well.
After looking it up, this
Code: Select all
Yeah, the /usr/bin/env version should work on Windows too, that page I linked mentions that the Windows python launcher should simulate them in some way, so I guess it is the better way to do it. Kind of annoying how many established ways there are; but it's also kind of annoying that we're stuck with the Python 2 / 3 schism in the first place.