Playing SPC files?

Is there any Java code out there that’s lets me play back SPC files or other “emulated” sound files?

(SPC files are music files for Super Nintendo games)

If there isn’t, how would go about doing it? Would I basically have to emulate the hardware to achieve this?

[quote]Would I basically have to emulate the hardware to achieve this?
[/quote]
Yes, that’s what an SPC player is - an SPC 700 emulator. There are several open source players but none that I know of has been written in Java.

As far as I know (I’m not familiar with SPC files), files like these are basically sequences of register updates of the sound hardware.
This means you will need to emulate the SNES’ sound chip(s), but nothing more.

I know there is a plugin for WinAMP to play SPC files, is it possibile to use that in Java? It’s a simple dll, maybe somehow… It should be nice to play SPC musics in Java… :wink:

I was wondering about that myself. I know that non-Java programs can actually hook up to WinAMP and play any files that WinAMP does, but I don’t know how that works or if that would work at all in Java.

As for the plugins, this is a meta-plugin which enables playback of all video game sound formats.

http://www.chipamp.org

I really want to give this a stab (not just for my project but to have the first really well documented music player for this format in Java), but seeing that I have very little knowledge about emulator implementation besides the very basics, I have 3 choices.

  1. Find an existing C++ solution and port it over.
  2. Find a working Java SNES emulator and adapt the sound module.
  3. Create some bindings to a DLL. But this means that the plugin/DLL would have to be available on all platforms, and that’s not likely. :confused:

Are there any working Java SNES emulators in existence? I’ve only found one, and it’s no longer updated nor is the download available.

afaik, there are no publically available java based snes emulators.
I’d go for your first option. Just find an existing open source C based SNES emulator, and port over only the emulation of the sound hw, which is probably not that difficult.

While I haven’t done this yet (too many things have higher priority in the project), I was directed to this as the best place to draw the source from.

http://www.slack.net/~ant/libs/audio.html#Game_Music_Emu

So if anybody is interested in tackling this for fun, that’s the source for all emulated music formats done in a nicely plug-in like way.