From b7fc4aa9a6bd15ce9780d46a425971d523c10b92 Mon Sep 17 00:00:00 2001 From: skal Date: Thu, 5 Mar 2026 22:20:27 +0100 Subject: fix(spectool): rename --wav flag to wav subcommand for consistency Co-Authored-By: Claude Sonnet 4.6 --- doc/HOWTO.md | 2 +- doc/TOOLS_REFERENCE.md | 2 +- doc/TRACKER.md | 6 +++--- tools/spectool.cc | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/HOWTO.md b/doc/HOWTO.md index cc43e7c..bfb47fd 100644 --- a/doc/HOWTO.md +++ b/doc/HOWTO.md @@ -262,7 +262,7 @@ Requires `ffmpeg` for `.aif` input files. Output uses v2 format (OLA, Hann, hop= To verify or inspect a `.spec` file as audio: ```bash -./build/spectool --wav input.spec output.wav +./build/spectool wav input.spec output.wav ``` Produces a mono 16-bit PCM WAV at 32 kHz using IDCT-OLA synthesis (no synthesis window — diff --git a/doc/TOOLS_REFERENCE.md b/doc/TOOLS_REFERENCE.md index 6315a17..8614463 100644 --- a/doc/TOOLS_REFERENCE.md +++ b/doc/TOOLS_REFERENCE.md @@ -32,7 +32,7 @@ cmake --build build -j4 ./build/spectool analyze input.wav output.spec --normalize 0.20 # custom RMS target # Decode .spec → mono 16-bit WAV (32 kHz, IDCT-OLA synthesis) -./build/spectool --wav input.spec output.wav +./build/spectool wav input.spec output.wav # Play .spec file via audio device ./build/spectool play input.spec diff --git a/doc/TRACKER.md b/doc/TRACKER.md index e2c21aa..75d6455 100644 --- a/doc/TRACKER.md +++ b/doc/TRACKER.md @@ -28,13 +28,13 @@ SAMPLE , , , , , , [OFFSET [OFFSET ] # ASSET_* from assets.txt # Asset samples (MP3, non-STRIP_ALL only): -# MP3 is detected by magic bytes and decoded to spectrogram at tracker_init(). -# Add to assets.txt: NAME, NONE, music/file.mp3, "description" +# Add to assets.txt with MP3 type: NAME, MP3, music/file.mp3, "description" +# Decoded to spectrogram at tracker_init(). SAMPLE ASSET_NAME [OFFSET ] # Decoded at init; same syntax as .spec # .spec format: SPEC_VERSION_V2_OLA (version=2). Synthesis uses IDCT-OLA # (Hann analysis window, 50% overlap, hop=256 samples at 32 kHz). -# Decode a .spec to WAV for inspection: spectool --wav input.spec out.wav +# Decode a .spec to WAV for inspection: spectool wav input.spec out.wav # Auto-generated notes (no SAMPLE declaration needed): # NOTE_C4, NOTE_A#3, NOTE_Eb2, etc. diff --git a/tools/spectool.cc b/tools/spectool.cc index 59a56b5..a9d2bd1 100644 --- a/tools/spectool.cc +++ b/tools/spectool.cc @@ -439,7 +439,7 @@ void print_usage() { " test_gen Generate a test " "spectrogram.\n"); printf( - " --wav Decode spectrogram to mono " + " wav Decode spectrogram to mono " "WAV.\n"); printf("\nOptions for 'analyze':\n"); printf( @@ -499,9 +499,9 @@ int main(int argc, char** argv) { return 1; } return test_gen(argv[2]); - } else if (strcmp(command, "--wav") == 0) { + } else if (strcmp(command, "wav") == 0) { if (argc < 4) { - printf("Error: '--wav' requires input .spec and output .wav files.\n"); + printf("Error: 'wav' requires input .spec and output .wav files.\n"); print_usage(); return 1; } -- cgit v1.2.3