Getting GGSound working in a standalone project

vince94

New member
So I'm not part of the demo, but while I wait for August to roll around, I figured I'd try to get a track working in ASM6 based on the tutorial found on this page, and I don't think the python text-to-asm script handled the song in a way ASM6 is expecting. When I run build.bat, it says this:
Code:
pass 1..
goldhat.asm(27): Illegal instruction.

https://pastebin.com/2Bk9pQSE
https://pastebin.com/FxnDZvug
(it won't let me attach files, it says "invalid extension")

Once the full version of NES Maker is out, I'm planning on making a real version of this! (With permission, of course, see the very end of the article.) This song is a cover I made of its title screen.

EDIT: Here's what it sounds like playing back in Famitracker: http://picosong.com/wcmvi
 

gradualgames

New member
Thanks for the bug report. ft_txt_to_asm.py has been fixed so that you can use anything for instrument names (as well as everything else). Please use the latest version (just master branch, not the 1.0 release which is quite old now) from the official github page: https://github.com/gradualgames/ggsound
 

vince94

New member
Wow, thanks for the rapid-fire bugfix! Any chance there'll be vibrato/portamento support in the future...? eheh
(I've worked with SNES sound engine stuff, so I realize that the way trackers do those things is very different than how actual sound engines did them... If it's too complex to implement/not on the radar, that's understandable. Like, N-SPC implements vibrato like [E3 speed start_ticks depth] and [E4] to turn it off, and uses explicit note length values instead of having rows like a tracker.)

Now it says this:
Code:
pass 1..
pass 2..
last try..
demo.asm(216): Unknown label.
demo.asm(229): Unknown label.

I also got some errors in demo.asm that pointed to sound effect-related parts of the code, so I added a sound effect to the project file. I also removed the vibrato and portamento commands... Here's the latest .asm includes:
https://pastebin.com/HDjMhJ4w
https://pastebin.com/sS8exiwG
 

gradualgames

New member
GGSound is feature complete. No further famitracker effects or features will be supported. (but since it is public domain and on github, you're free to fork it and do whatever the heck you want to it) There are other sound engines floating around the nesdev world, including one version of famitone2 which actually includes the full famitracker driver, for developers who want/need that amount of power. I can't comment on whether or not this will be part of nesmaker though, I'm just the guy who made ggsound.

*edit* I should add, you can simulate vibrato and portamento with instruments fairly easily.

As for the errors in demo.asm, you'll have to change a couple of lines of code to play the sound effect you want to play. Just change the following lines to use the equates generated by ft_txt_to_asm.py for your own sfx.


lda #sfx_index_sfx_collide
sta sound_param_byte_0
lda #soundeffect_one
sta sound_param_byte_1
jsr play_sfx

skipa:

lda controller_buffer+buttons_b
and #%00000011
cmp #%00000001
bne skipb

lda #sfx_index_sfx_dpcm
sta sound_param_byte_0
lda #soundeffect_two
sta sound_param_byte_1
jsr play_sfx
 

vince94

New member
I tried using the pitch envelope to simulate vibrato, but even with the smallest possible numbers, it sounds like touch fuzzy, get dizzy.
Pitch: 0 0 0 0 0 0 0 0 0 0 0 | -1 -1 -2 -2 -1 -1 0 0 1 1 2 2 1 1
I've doubled the numbers here because if I leave it as 0 0 0 0 0 0 0 0 0 0 0 | -1 -2 -1 0 1 2 1, it sounds way too fast, like a laser beam sound effect! I don't think I'd want to use this way of doing vibrato in a song...

It looks like those lines are already in demo.asm, should I take them out?
 

gradualgames

New member
Here's a vibrato pitch envelope I use in my songs:

-1 -1 | 1 1 1 1 -1 -1 -1 -1

Here's a portamento (with vibrato loop at end)

92 -12 -12 -12 -12 -12 -12 -12 -8 0 0 0 0 0 0 0 0 | -1 -1 1 1 1 1 -1 -1

Obviously those aren't the only possible ones but you can probably stretch/adapt them to your needs.

As for those lines, no don't take them out, just change sfx_whatever to sfx_yours. Your sfx equates will be listed in the .asm file the script creates.
 

vince94

New member
I dunno, it doesn't sound how I'd like, at least in the context of this song.
I got it to compile! I tried to use a portamento envelope, and it was just throwing the note out of tune, which was a bit infuriating, but I think I figured out how it works. Thanks for the help!
EDIT: It sounds like the volume column isn't having any effect... ;( Is volume another thing that requires duplicated instruments?
 

gradualgames

New member
vince94 said:
I dunno, it doesn't sound how I'd like, at least in the context of this song.
I got it to compile! I tried to use a portamento envelope, and it was just throwing the note out of tune, which was a bit infuriating, but I think I figured out how it works. Thanks for the help!
EDIT: It sounds like the volume column isn't having any effect... ;( Is volume another thing that requires duplicated instruments?
Yes. FamiTone2 has a version floating around by nesdoug which added support for this, but again I cannot comment on whether this will be integrated into NESMaker or not.
 
Top Bottom