diff --git a/VAG/README.md b/VAG/README.md new file mode 100644 index 0000000..e45ff2e --- /dev/null +++ b/VAG/README.md @@ -0,0 +1,44 @@ +# VAG files + +> VAG is the PlayStation single waveform data format for ADPCM-encoded data of sampled sounds, such as +piano sounds, explosions, and music. The typical extension in DOS is “.VAG”. + +See [http://psx.arthus.net/sdk/Psy-Q/DOCS/FileFormat47.pdf](FileFormat47.pdf), p.209 + + +## WAV creation + +Use ffmpeg to create a 16-bit ADPCM mono WAV file - change -ar to reduce filesize (and quality) + +```bash +$ ffmpeg -i input.mp3 -acodec pcm_s16le -ac 1 -ar 44100 output.wav +``` + +You can use Audacity to edit sound. + +## WAV to VAG convertion using WAV2VAG + +Get here : [https://github.com/ColdSauce/psxsdk/blob/master/tools/wav2vag.c](WAV2VAG) + +Change -freq according to the -ar setting above + +```bash +$ wav2vag input.wav output.vag -sraw16 -freq=44100 (-L) +``` + +### Bug ? + +After conversion with WAV2VAG, the resulting VAG will sometimes have a pop at the very beginning and/or end of the file. + +You can check (and delete) this with PsyQ's VAGEDIT.EXE. + +You can also force the sampling frequency of an existing VAG file. + +## VAG & SPU Docs + +See + * libformat47.pdf p.209 + * libover47.pdf, p.271 + * libref47.pdf, p.980 + + * [http://psx.arthus.net/code/VAG/](http://psx.arthus.net/code/VAG) diff --git a/VAG/hello.vag b/VAG/hello.vag new file mode 100644 index 0000000..e333b19 Binary files /dev/null and b/VAG/hello.vag differ diff --git a/VAG/poly.vag b/VAG/poly.vag new file mode 100644 index 0000000..74a6505 Binary files /dev/null and b/VAG/poly.vag differ