Looking for a music/sound effect engine

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems.

Moderator: Moderators

Post Reply
User avatar
Sivak
Posts: 316
Joined: Tue Jul 17, 2007 9:04 am
Location: Somewhere
Contact:

Looking for a music/sound effect engine

Post by Sivak »

Alright. I've used Famitracker for some of my earlier works, but now I want something that's more flexible.

From what I have heard, most engines involve the user typing in the desried music data in hex, which doesn't sound too hard.

The main thing I need is something that's not hard to figure out and that is compatible or can be easily ported to NESASM. Oh, and free. 8)

So, anyone got anything?
User avatar
Bregalad
Posts: 8036
Joined: Fri Nov 12, 2004 2:49 pm
Location: Caen, France

Post by Bregalad »

Why not do your own ? So that way you're sure it will have the possibilities you except. I have a music+SFX engine for my game but I made it space efficient so limited and I don't think it can be easily ported to nesasm (I use WLA-DX).
Useless, lumbering half-wits don't scare us.
User avatar
Dwedit
Posts: 4470
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Post by Dwedit »

Modify famitracker so it writes to "virtual sound registers", then make code that calls famitracker, then passes the code on to the real sound registers.

"Virtual Sound Registers" just means you have variables in memory to store what the sound code would otherwise write.

Then you can make a sound effects engine that reserves a sound channel until a sound effect finishes, then restores playback of what the music would play.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
User avatar
Sivak
Posts: 316
Joined: Tue Jul 17, 2007 9:04 am
Location: Somewhere
Contact:

Post by Sivak »

I've been playing with this some more today. I have added a new routine after the NMI jumps to the NSF's play address.

Right now, I am trying to get a sound for the cursor movement to play and it does indeed play over the NSF now, though it sounds bad and it also makes the NSF sound very bad for a few seconds until the NSF "fixes" itself. Sometimes it'll make a channel be silenced for 3+ seconds for a 6 frame sound effect.

Oddly, it doesn't sound as bad when I write the same thing to the triangle wave...

This is the data I'm writing into $4004-$4007:

Code: Select all

	.db %01001110, %00000000, %01001011, %00001000
	.db %01001000, %00000000, %01001011, %00001000
	.db %01000101, %00000000, %01001011, %00001000
	.db %01000010, %00000000, %01001011, %00001000
	.db %01000001, %00000000, %01001011, %00001000
Each frame, there is a timer that INC's and when it = 5, it stops playing the sound effect.

I don't know if it's what I'm trying to write into the sound registers that's bad or if this is just a bad approach to doing this.
Post Reply