GGSound: a lightweight sound engine for games

Discuss NSF files, FamiTracker, MML tools, or anything else related to NES music.

Moderator: Moderators

tepples
Posts: 22705
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: GGSound: a lightweight sound engine for games

Post by tepples »

GradualGames wrote:Also: "Fixed" arpeggios are hard-coded to the noise channel, "Absolute" arpeggios are hard coded to all other channels. I do not use arpeggios myself---if anyone runs into issues with using arpeggios, please use this thread to report bugs and provide a sample song which causes your issue so that I can fix it.

Does anyone know how common it is to use absolute/relative/fixed with arpeggios on different channels?
Almost all my triangle arp sequences are fixed. Here's why:

My drum kit in FamiTracker 0.4.x and 0CC-FamiTracker uses an absolute arpeggio sequence so that the same instrument can serve as kick and snare, though that could easily be redone with fixed arp using one additional instrument.

Kick (noise part)
note: 0-#
volume: 12 10 8 6 4 3 2 2 1 1 1 0
arpeggio: absolute 10 0
duty: 0

Snare (noise part)
note: A-#
volume: 12 10 8 6 4 3 2 2 1 1 1 0
arpeggio: absolute 10 0
duty: 0

Volume, arpeggio, and duty sequences are identical for the two. (This volume sequence may vary between modules based on the rest of the mix.) It relies on the modulo 16 nature of arpeggio sequences in FamiTracker to act as both kick (whose fixed arpeggio would be 10 0) and snare (whose fixed arpeggio would be 4 10).

Since this post by rainwarrior, kick and snare also have a triangle part that uses fixed arpeggio so that the drum can share the channel with the bass.

Kick (triangle part)
arpeggio: fixed 40 36 33 (E-3 C-3 A-2)

Snare (triangle part)
arpeggio: fixed 47 45 (B-3 A-3)

The remainder of my stock drums, for completeness:

Hi-hat (noise)
note: C-#
volume: 6 4 2 1 1 0
arpeggio: none
duty: | 0 1

Open hi-hat (noise)
note: C-#
volume: 7 6 5 4 3 2 2 1
arpeggio: none
duty: | 0 1

Here, duty is looped to combine hiss noise (duty 0) with buzz noise (duty 1) to simulate a cymbal.

I've attached a FamiTracker port of the drum and bass from the 3 AM music in Thwaite.

Frame 0: Contrasting noise-only drums with tri+noise drums
Frame 1-2: Combining drum and bass
Frame 3: Mute the noise to hear only the bass and the triangle portion of the drum
Attachments
triangle drums sample.ftm
(2.75 KiB) Downloaded 370 times
User avatar
GradualGames
Posts: 1106
Joined: Sun Nov 09, 2008 9:18 pm
Location: Pennsylvania, USA
Contact:

Re: GGSound: a lightweight sound engine for games

Post by GradualGames »

tepples wrote:
GradualGames wrote:Also: "Fixed" arpeggios are hard-coded to the noise channel, "Absolute" arpeggios are hard coded to all other channels. I do not use arpeggios myself---if anyone runs into issues with using arpeggios, please use this thread to report bugs and provide a sample song which causes your issue so that I can fix it.

Does anyone know how common it is to use absolute/relative/fixed with arpeggios on different channels?
Almost all my triangle arp sequences are fixed. Here's why:

My drum kit in FamiTracker 0.4.x and 0CC-FamiTracker uses an absolute arpeggio sequence so that the same instrument can serve as kick and snare, though that could easily be redone with fixed arp using one additional instrument.

Kick (noise part)
note: 0-#
volume: 12 10 8 6 4 3 2 2 1 1 1 0
arpeggio: absolute 10 0
duty: 0

Snare (noise part)
note: A-#
volume: 12 10 8 6 4 3 2 2 1 1 1 0
arpeggio: absolute 10 0
duty: 0

Volume, arpeggio, and duty sequences are identical for the two. (This volume sequence may vary between modules based on the rest of the mix.) It relies on the modulo 16 nature of arpeggio sequences in FamiTracker to act as both kick (whose fixed arpeggio would be 10 0) and snare (whose fixed arpeggio would be 4 10).

Since this post by rainwarrior, kick and snare also have a triangle part that uses fixed arpeggio so that the drum can share the channel with the bass.

Kick (triangle part)
arpeggio: fixed 40 36 33 (E-3 C-3 A-2)

Snare (triangle part)
arpeggio: fixed 47 45 (B-3 A-3)

The remainder of my stock drums, for completeness:

Hi-hat (noise)
note: C-#
volume: 6 4 2 1 1 0
arpeggio: none
duty: | 0 1

Open hi-hat (noise)
note: C-#
volume: 7 6 5 4 3 2 2 1
arpeggio: none
duty: | 0 1

Here, duty is looped to combine hiss noise (duty 0) with buzz noise (duty 1) to simulate a cymbal.

I've attached a FamiTracker port of the drum and bass from the 3 AM music in Thwaite.

Frame 0: Contrasting noise-only drums with tri+noise drums
Frame 1-2: Combining drum and bass
Frame 3: Mute the noise to hear only the bass and the triangle portion of the drum
Thanks tepples. I've added support for all 3 arpeggio types for all channels now, and I am going to try out your example song to see if it executes properly. However, ggsound does not support Sxx. Should it be possible to imitate this effect by other means such as a volume envelope?
tepples
Posts: 22705
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: GGSound: a lightweight sound engine for games

Post by tepples »

Yes. For an engine known not to support Sxx or overlay drums, I'd make separate instruments for use with and without a following pitch, one with a volume envelope that terminates and one without.
Attachments
triangle drums sample noSxx.ftm
(3.43 KiB) Downloaded 353 times
User avatar
GradualGames
Posts: 1106
Joined: Sun Nov 09, 2008 9:18 pm
Location: Pennsylvania, USA
Contact:

Re: GGSound: a lightweight sound engine for games

Post by GradualGames »

tepples wrote:Yes. For an engine known not to support Sxx or overlay drums, I'd make separate instruments for use with and without a following pitch, one with a volume envelope that terminates and one without.
The only additional thing I had to change so this sample would work with ggsound is every instrument must specify a volume envelope, so I added one for the triangle instruments which lacked one (with a single value of "1").

Would you mind if I included this sample in GGSound's test songs? Worked perfectly with the new arpeggio implementation, happy to say. I will credit you for the contribution in the README.md.

Also, are arpggios ever used with DPCM?
tepples
Posts: 22705
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: GGSound: a lightweight sound engine for games

Post by tepples »

GradualGames wrote:The only additional thing I had to change so this sample would work with ggsound is every instrument must specify a volume envelope, so I added one for the triangle instruments which lacked one (with a single value of "1").
Pently also needs a volume envelope on all instruments, but it defaults to 8 because I've found that more musically useful when pulse and triangle instruments share a volume envelope.
GradualGames wrote:Would you mind if I included this sample in GGSound's test songs?
Go ahead. I'll provide a more fleshed out version later.

EDIT: Now
GradualGames wrote:Also, are arpggios ever used with DPCM?
I haven't seen it used.
Attachments
Thwaite OST.ftm
FamiTracker version of the music from Thwaite
(11.75 KiB) Downloaded 360 times
Post Reply