markcox / game-music-emu

Automatically exported from code.google.com/p/game-music-emu
GNU Lesser General Public License v2.1
0 stars 0 forks source link

[patch] Wave extraction tool #31

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hello! I've written a tool to extract .wav files in a flexible way. It's 
basically an evolution from the basics.c demo program. It takes some command 
line options (run with -h to see) to allow extracting one wav file per track, 
one wav file per voice/channel, and single channel extraction. There are a few 
more options:

Usage: ./rip [options] <input_file> [<output_prefix>]
    -h           Display this help.
    -i           Don't ignore silence at start of file. Default is ignore.
    -s <rate>    Set sample rate of output files. Default is 44100.
    -t <track>   Choose track from multiple-track files. Default is all tracks.
    -c <voice>   Choose voice/channel to limit to. Default is all voices mixed.
    -e           Extract voices to separate wav files.

See attachment for the C file, and add these lines to demo/CMakeLists.txt

add_executable(rip Wave_Writer.cpp rip.c)
target_link_libraries(rip gme z)

Original issue reported on code.google.com by mihai.draghicioiu@gmail.com on 18 Dec 2013 at 8:01

Attachments:

GoogleCodeExporter commented 9 years ago
I also set out to write a tool like this (for a site I'm building), but I'm 
much rustier with C/C++.  My code takes one additional step to yours and tries 
to load an accompanying .m3u file which is crucial for HES (TG-16/PCEngine) 
files (which have great sound tracks by the way :) I'm going to try and merge 
that code with your excellent project.  Here is my code so far: 
https://gist.github.com/jasonsperske/5ce7f90bf591454a08bc

I'd love to see a utility like this get added to Game-Music-Emu :)

Original comment by ja...@sperske.com on 7 May 2014 at 7:22

GoogleCodeExporter commented 9 years ago
I like the idea... I'm going to be going around this upcoming week merging in 
fixes that I can find for a 0.6.1 (or 0.7.0) release and I'll probably include 
this as well as long as you're comfortable with using the same GNU LGPL 2.1 
license as used by game-music-emu (or something compatible, but then you'd have 
to let me know which one).

Original comment by michael....@gmail.com on 23 Jun 2014 at 4:52