GAPCM
Eternal Blue PCM converter.
Downloads
Release packages and supplements.
Supplements
- [Sample PCM]To get you started in stereo.
- [Vibraphone]Digital instrument sample.
- [GAMplay]Playback helper script. Requires [FFplay].
Usage
Basic instructions.
Decoder
$ ./gamdec --help
GAMdec u0r6 by Brendon 03/06/2024.
——Eternal Blue PCM decoder. https://ed7n.github.io/gapcm
Usage: -o <path> [<override>|<option>]... <file>
Where:
-o, --output <path> Path to output headerless, unsigned 8-bit PCM file.
`-` for pipe.
Header Overrides:
-c, --channels {1|2} 1: mono, 2: stereo.
-m, --mark <blocks> Loop start position.
-n, --length <frames> Length between stream start and loop end. `-1` for
maximum.
-p, --pregap <blocks> Artificial silence length.
Options:
-i, --info Prints the header in a friendly format.
-l, --loop <count> Write the given count of loops. `0` to stop at the
mark; no loop. `-1` for 65535. Default is `2`.
-t, --trail Include samples after the loop end.
Echo, fade, and gain features are not supported; get their parameters with
the prober and apply them elsewhere. Also look there for details on units.
Program Arguments:
-h, --help Display this help message.
-- Stop parsing options.
Example
$ ./gamdec -i -l 1 -p 0 -o rp040.raw lunar2/rp040.pcm
Encoder
$ ./gamenc --help
GAMenc u0r6 by Brendon 03/06/2024.
——Eternal Blue PCM encoder. https://ed7n.github.io/gapcm
Usage: -o <path> [<field>|<option>]... <file>
Where:
-o, --output <path> Path to output game PCM file. `-` for pipe.
Header Fields:
-c, --channels {1|2} 1: mono (default), 2: stereo.
-ea, --echo-pans <levels[6]>
Echo pans for channels 3 to 8. Low nibble: left,
high nibble: right.
-ed, --echo-delay <ticks> Echo delay.
-el, --echo-levels <levels[3]>
Echo levels for channel pairs 3 and 4 to 7 and 8.
-ep, --echo-pregap <ticks>
First echo delay.
-m, --mark <blocks> Loop start position. Default follows the length for
the shortest possible loop.
-n, --length <frames> Length between stream start and loop end. `-1` for
maximum. Default is automatic.
-p, --pregap <blocks> Artificial silence length. Default is `0`.
Options:
-t, --trail Include samples after the loop end.
The input file must be headerless, unsigned 8-bit PCM. Echo header fields
default to zero which disables the feature. See the prober for details on
units.
Program Arguments:
-h, --help Display this help message.
-- Stop parsing options.
Example
$ ./gamenc -m 11 -n 345122 -o rp040.pcm rp040.raw
Prober
$ ./gaminfo --help
GAMinfo u0r6 by Brendon 03/06/2024.
——Eternal Blue PCM header prober. https://ed7n.github.io/gapcm
Usage: ([<field>] <file>) | -bf
Header Fields:
-c, --channels 1: mono, 2: stereo.
-ea, --echo-pans Echo pans for channels 3 to 8. Low nibble: left, high
nibble: right.
-ed, --echo-delay Echo delay in ticks.
-el, --echo-levels Echo levels for channel pairs 3 and 4 to 7 and 8.
-ep, --echo-pregap First echo delay in ticks.
-m, --mark Loop start position in blocks.
-n, --length Length between stream start and loop end in frames.
-p, --pregap Artificial silence length in blocks.
If none is given, then it prints the header in a friendly format.
Build Information:
-bf, --build-flags 1: 16-bit extension enabled, 0: otherwise.
A block spans 1024 samples, a frame spans one sample for mono, two for stereo.
Program Arguments:
-h, --help Display this help message.
-- Stop parsing options.
Guide
- [Using GAPCM]Supplementary guide.
About
- [About GAPCM]Some information about this project.
- [Specifications]Prose description of the file format in question.
- [History]The post-postgame chapter.
- [License]GAPCM is licensed under the MIT.
For information about GAPCM's 16-bit extension and playback helper script, see [Reusing Paddings As Supplements].
Source
This project is free and open-source. Its source can be found in its [Git repository] on GitHub.