Music program/replayer?

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems. See the NESdev wiki for more information.

Moderator: Moderators

User avatar
oRBIT2002
Posts: 687
Joined: Sun Mar 19, 2006 3:06 am
Location: Gothenburg/Sweden

Music program/replayer?

Post by oRBIT2002 »

What musicprogram/replayer should I use for use in my possible future NES-"productions" and it's easy to use? FamiStudio looks awesome but doesn't seem to come with a replayer that I can include in my own source (the way we did it back in the Amiga-days...). What stuff does people use for music in non-game related projects on the NES?
Pokun
Posts: 2681
Joined: Tue May 28, 2013 5:49 am
Location: Hokkaido, Japan

Re: Music program/replayer?

Post by Pokun »

To make music in NSF format PPMCK is popular. It's not made to be included in NES programs/games though, it's mainly for making NSF files. It uses NESASM and is quite easy to use as there are tutorials for it.

Otherwise I think people just use whatever they use for games. Many code their own sound driver like myself, others uses one of the available alternatives. Famistudio is the most popular one I think, but there are also Tepple's Pently and other ones as well. I don't know what a replayer is, but coding a music player wouldn't be harder than coding anything else that uses sound in your NES program. You mainly call the right subroutines for picking a song and playing it.

If you want to make your own sound driver I highly recommend the Nerdy Nights sound tutorial.
User avatar
Dwedit
Posts: 4924
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Re: Music program/replayer?

Post by Dwedit »

Is this for the end users who want to listen to the soundtrack, separately from playing the game? Like how Cave Story had ORGVIEW?

If I was just listening to NES music, I'd use my NSF player of choice, normally Winamp with an NSF plugin.

But if you want to distribute a preconfigured NSF player, you could use an open-source program, or ask permission to distribute the player along with the music.

A list of NSF players is available here: http://famitracker.com/wiki/index.php?t ... SF_players

I suggest creating a stub EXE or script to run the NSF file with the player. Put the Player in a subdirectory, and the launcher stub EXE and NSF in the same directory. I was suggesting Shortcuts earlier, but shortcuts stop working after you move any files between computer, or even somewhere else on the same computer.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
User avatar
oRBIT2002
Posts: 687
Joined: Sun Mar 19, 2006 3:06 am
Location: Gothenburg/Sweden

Re: Music program/replayer?

Post by oRBIT2002 »

I don't want to create an NSF, I simply want to play NES-music (preferable composed in some kind of tracker) in a possible NES-intro/demo.
User avatar
rainwarrior
Posts: 8732
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Music program/replayer?

Post by rainwarrior »

If the music was made in Famitracker, that has its own "driver" source that you can put in an NES ROM with the exported data to play the music. It's great for if you just want a demo. The reason people don't use that one so much in games is that it doesn't have SFX and it's a bit "heavy" with features.

If you just want to make a music cart, I made EZNSF (simpler) and ZENSF (advanced) for that purpose. You could use either of those as a starting point to build a demo into, but their primary goal was just a music player ROM.
User avatar
oRBIT2002
Posts: 687
Joined: Sun Mar 19, 2006 3:06 am
Location: Gothenburg/Sweden

Re: Music program/replayer?

Post by oRBIT2002 »

Feature request to all NES tracker coders in the future: Provide a replayer source so people actually can use their music in anything else than a pure .NSF/such. It would also be nice if the RAM needed by the replayer is "relocatable" aswell (not requires a specific memory address but just any specific memory area).
If I want to use a Famistudio song in my demo/whatever, do I really have to reverse engineer an NSF-exported ROM and extract the source myself?
User avatar
rainwarrior
Posts: 8732
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Music program/replayer?

Post by rainwarrior »

oRBIT2002 wrote: Sat Dec 26, 2020 2:23 pm Feature request to all NES tracker coders in the future: Provide a replayer source so people actually can use their music in anything else than a pure .NSF/such. It would also be nice if the RAM needed by the replayer is "relocatable" aswell (not requires a specific memory address but just any specific memory area).
That's already true of Famitracker and PPMCK, and I think also MUSE. Dunno anything about Famistudio, but why don't you feature request that to its author more directly, if that's the one you're having a problem with?

Edit: it's also a feature of Famistudio (there's a 6502 driver source link on its website) so who are you requesting it of? I think Deflemask is the only one I've seen that doesn't have driver source.
User avatar
oRBIT2002
Posts: 687
Joined: Sun Mar 19, 2006 3:06 am
Location: Gothenburg/Sweden

Re: Music program/replayer?

Post by oRBIT2002 »

Does Famitracker actually have a replayer? I only see an "NSF driver source" on the website?
User avatar
rainwarrior
Posts: 8732
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Music program/replayer?

Post by rainwarrior »

You'll have to define the word "replayer", because I don't know what you mean if that driver isn't already exactly what you're asking for.
User avatar
oRBIT2002
Posts: 687
Joined: Sun Mar 19, 2006 3:06 am
Location: Gothenburg/Sweden

Re: Music program/replayer?

Post by oRBIT2002 »

A "replayer" (in my "Amiga-"world") is a piece of sourcecode that you include in your production that plays back your music. That was how it worked on the Amiga anyway.
The replayer usually had three functions relevant to the user:
1) Init music
2) A play-function that was called every vblank
3) Stop music
The replayer usually consisted of sourcecode, (or a binary, for easy implementation in your code, that could run from any memory location, that'd be hard to implement for a NES-version I guess though..)
User avatar
rainwarrior
Posts: 8732
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Music program/replayer?

Post by rainwarrior »

Yes that's exactly what the mentioned drivers are.
User avatar
Dwedit
Posts: 4924
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Re: Music program/replayer?

Post by Dwedit »

One time I did something super-hasty and ugly, and just built a program on top of a FamiTracker generated NES ROM, using different memory addresses than the player engine.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
Pokun
Posts: 2681
Joined: Tue May 28, 2013 5:49 am
Location: Hokkaido, Japan

Re: Music program/replayer?

Post by Pokun »

OK so a replayer is just a sound driver.

I'm sorry I said Famistudio but I probably meant FamiTone which is a driver/replayer made for Famitracker. Haven't used it though so I don't know anything about it.

There is also something called GGSound which I think is based on the driver example that the Nerdy Nights sound tutorial, that I mentioned before, teach you to make. I've never tried GGSound, but since my own driver is also based on the Nerdy Nights example, I can say that it's easy to use and easy to integrate in your project. It's made to plug in neatly wherever you want using subroutine calls and a single page of RAM (that you can easily change to whatever you want in the source). It's also not bloated, and suitable for games, demos and NSF alike. It might not have a tracker though.
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Music program/replayer?

Post by tepples »

Like FamiTone2/FamiTone4 and Pently, GGSound has a converter from FamiTracker's text export format.

See also "Audio drivers" on the wiki.
Pokun
Posts: 2681
Joined: Tue May 28, 2013 5:49 am
Location: Hokkaido, Japan

Re: Music program/replayer?

Post by Pokun »

I see.
Post Reply