Page 1 of 4

.VGM Music format

Posted: Sat May 23, 2009 4:13 pm
by StrikerMan780
See as how we already have the SNES SPC format supported in ZDoom, which is completely awesome, use that a lot btw... I was hoping that ZDoom could support the .VGM format, which is a combination Sega Master System and Sega Genesis music format.

This would be really nice for WADs themed after Genesis games, or, hell, even normal wads as well since there is such a huge collection of Genesis Tracks out there. I would definitely use this if it were supported.

A Playback library and source:
http://code.google.com/p/game-music-emu/ (This looks extremely promising, it's a library that has GYM, VGZ/VGM, SPC, and NSF Support, among others, also made by Blargg, who made SNES_SPC that is currently being used in ZDoom)

Code: Select all

    
    * Can be used in C and C++ code
    * High emphasis has been placed on making the library very easy to use
    * One set of common functions work with all emulators the same way
    * Several code examples, including music player using SDL
    * Portable code for use on any system with modern or older C++ compilers
    * Adjustable output sample rate using quality band-limited resampling
    * Uniform access to text information fields and track timing information
    * End-of-track fading and automatic look ahead silence detection
    * Treble/bass and stereo echo for AY/GBS/HES/KSS/NSF/NSFE/SAP/VGM
    * Tempo can be adjusted and individual voices can be muted while playing
    * Can read music data from file, memory, or custom reader function/class
    * Can access track information without having to load into full emulator
    * M3U track listing support for multi-track formats
    * Modular design allows elimination of unneeded emulators/features 
Huge VGM/VGZ Archive here.
http://project2612.org/

:3:

EDIT: Dunno if these will be useful, but what the hell.
http://jiggawatt.org/muzak/xpmck/

http://www.smspower.org/music/vgmtools.shtml#players
Source Code to the WinAmp Plugin there.

Re: .VGM Music format

Posted: Sat May 23, 2009 4:35 pm
by TheDarkArchon
This has been no'd before

Re: .VGM Music format

Posted: Sat May 23, 2009 4:41 pm
by StrikerMan780
You sure? I did 6 searches for things like VGM, GYM, Genesis music, and whatnot, not a single result showed up.

Re: .VGM Music format

Posted: Sat May 23, 2009 4:49 pm
by TheDarkArchon
It predated the feature suggestions forum and it was rejected on the grounds that it's too processor heavy and that there wasn't an equivilent of snesapu.dll for VGM files, IIRC.

Re: .VGM Music format

Posted: Sat May 23, 2009 5:05 pm
by StrikerMan780
Well, if it predated that forum, that would have been shitloads of years ago when the CPUs might have not been strong enough. Now, even on a P2 400mhz, it only takes maybe 10% CPU on the most intensive Songs. Hell, ran fine on my 233mhz Laptop, though the CPU usage was way higher.

Even right now, in WinAMP, by looking at the task manager, the CPU indicator is jumping between 00 and 01. (Listening to a VGM song right now.) Staying on 00 almost all of the time. The other 01 is probably just for WinAmp's GUI and Spectrum Analyzer. I am running on a single core CPU, 2ghz flat.

The SNESApu.dll equivalent thing is irrelevant now, since ZDoom is on on FMODEx now, and SNES SPC Support is coded right into ZDoom, without need for an external DLL.

I am pretty sure all that would be needed is to know the specs of the VGM format, and get ZDoom to be able to read it, and feed the audio output to FMODEx.

/me goes to run ZDoom while playing the music and sees how the CPU Fares...

Re: .VGM Music format

Posted: Sat May 23, 2009 5:21 pm
by Gez
StrikerMan780 wrote:The SNESApu.dll equivalent thing is irrelevant now, since ZDoom is on on FMODEx now, and SNES SPC Support is coded right into ZDoom, without need for an external DLL.
Really? Delete the snes_spc.dll file from your zdoom folder, run zdoom, and tell me what happens.

Re: .VGM Music format

Posted: Sat May 23, 2009 5:23 pm
by StrikerMan780
That's skulltag you are thinking of. Last time I recall, ZDoom didn't have it external, unless that changed very recently.

I guess I am right. \o/ I went to download ZDoom 2.3.1 SNES_SPC.dll isn't in there. It's skulltag-only.(Because of the License it had to be externalized. Depending on the License of this music format, VGM Support might not have to be externalized for ST)

EDIT: By the way, running ZDoom with the music going in WinAmp, CPU Didn't break a sweat. Got my old laptop here too.

Re: .VGM Music format

Posted: Sat May 23, 2009 5:30 pm
by Enjay
rh-log.txt wrote:March 11, 2008
- Switched SPC playback from the external SNESAPU.DLL to Blargg's LGPL
snes_spc library. I've compiled it with the fast DSP rather than the
highly accurate one, since I didn't notice a meaningful difference between
the two in my limited testing. In short: SPC playback is now built in to
ZDoom. You don't need to download anything extra to make it work, and it
also works on Linux as well as Windows (though building with Linux is
currently untested).
It's been tweaked since then, but it is part of Zdoom rather than a separate dll these days.

Re: .VGM Music format

Posted: Sat May 23, 2009 5:52 pm
by StrikerMan780
Just as I thought.

Btw, I added links to the first post, it appears Blargg also made a library supporting Genesis Music, among other really good formats as well. Looks extremely promising.

Re: .VGM Music format

Posted: Sun May 24, 2009 10:30 am
by HotWax
This sounds promising, and if it can be implemented as easily as the SNES music, I see no reason why ZDoom couldn't support more music formats for added variety and utility. If this was no'd way back before the feature request forum existed, then it's definitely time for the devs to take another look at it.

Re: .VGM Music format

Posted: Sun May 24, 2009 10:31 am
by Mario123311relay
LOL WUT? :surprise:

Re: .VGM Music format

Posted: Sun May 24, 2009 12:33 pm
by Tubers
Mario123311relay wrote:LOL WUT? :surprise:
Are you going to contribute or are you just acting like a troll?

On topic: This is a good feature suggestion IMO, hope this can be implemented :)

Re: .VGM Music format

Posted: Sun May 24, 2009 1:56 pm
by Graf Zahl
HotWax wrote:This sounds promising, and if it can be implemented as easily as the SNES music, I see no reason why ZDoom couldn't support more music formats for added variety and utility. If this was no'd way back before the feature request forum existed, then it's definitely time for the devs to take another look at it.

Last time it was mentioned it came without anything of real use. But this library looks promising.

Question: Implement this as an FMod codec like the SPC code or as a generic sound stream (which would also work with the OpenAL code - which the current SPC code doesn't.)

Re: .VGM Music format

Posted: Sun May 24, 2009 6:35 pm
by StrikerMan780
Whichever is best to you. There would be no audible difference, would there?

Re: .VGM Music format

Posted: Mon May 25, 2009 12:43 am
by Graf Zahl
No. The codec method would only be FMod-exclusive.