Skip to content

CLI Commands ​

The per-command reference for the sonare CLI: what each command does, its options and defaults, and what it prints. Global options, exit codes, stereo handling and the list of which CLI carries which command are on the CLI Reference. Whole shell workflows are on CLI Examples. Editing, generators, silence splitting, hpss and stem separation, voice presets and tune-to-midi are on CLI Editing Commands, and the mastering and repair commands on CLI Mastering and Repair. The utility commands and the numeric helpers close this page.

Which command for which task ​

I want to...CommandWhere
Get tempo, key and a full summaryanalyze, bpm, key, beatsAnalysis Commands
Find verses, choruses and other sectionssections, boundariessections, boundaries
Read the chord progressionchordschords
Measure loudnesslufs, dynamics, meterMore analysis
Summarize spectral featuresmel, chroma, spectralFeature Commands
Track a melody or list a singer's notespitch, vocal-notespitch, Scale correction and vocal notes
Split a mix into partshpss, decompose-stemshpss, decompose-stems
Turn audio into a MIDI filetranscribeCLI Examples
Fix a damaged recordingrepairrepair
Master a track for deliverymastering, eqMastering and Repair
Change pitch, tempo or level of a filepitch-shift, time-stretch, normalize, trim-silenceEditing
Generate a test tone, sweep or click tracktone, chirp, clicksGenerators
Cut a take at its silencessplit-silencesplit-silence
Estimate or simulate a roomacoustic, estimate-room, synthesize-rir, room-morphRoom commands
Mix stems into a scenesuggest-mix, mix, mix-stripMixing Workflow
Render a project or MIDI through the synthproject bounce, midi-renderSynthesis
Render movie audio to speakers or headphonesplaybackPlayback Renderer
Check a number or a conversionpower-to-db, frames-to-samples, ...Numeric Helpers

Analysis Commands ​

analyze ​

Full music analysis including BPM, key, time signature, and beats.

bash
sonare analyze music.mp3
sonare analyze music.mp3 --json
OptionDefaultDescription
--with-seventhoffSearch the full chord template set instead of triads only
--hpssoffEnable harmonic-percussive separation
--chroma-high-pass-hz80.0High-pass cutoff for chroma analysis in Hz (0 or above)
--meter-candidates3,4,6Comma-separated meter numerators to score
--meter-denominator4Beat unit reported for the detected meter: a power of two in [1, 32] (another value is refused after the audio is read, exit 3)

Without --with-seventh, chord recognition matches against major, minor, diminished, and augmented triads only. With it, the full template set is in play — the sevenths and ninths, the sixths, 7sus4, the elevenths and thirteenths, and the altered dominants.

The meter search only ever reports a numerator it was asked to score, and the default set is 3,4,6 — so a 5/4, 7/8, or 11/8 piece comes back as one of those three unless you widen the set with --meter-candidates 3,4,5,7. The list takes 1 to 16 entries, each between 2 and 32; a list outside that is refused after the audio is read (exit 3). --meter-denominator sets the beat unit the result is reported in and does not affect the search. See Meter and grouping for what the two numbers mean.

Output:

  > Estimated BPM : 119.78 BPM  (conf 100.0%)
  > Estimated Key : C major  (conf 91.6%)
  > Time Signature: 4/4
  > Beats: 23

The text layout of a report differs between sonare and sonare-cli; the sample output on this page is from sonare. --json is the layout both front-ends share.

With --json, analyze prints one object holding every result above plus timbre, dynamics, rhythm and form; its fields are walked through under The analyze JSON.

bpm ​

Detect tempo (BPM) only.

bash
sonare bpm music.mp3
sonare bpm music.wav --json

Output:

  BPM: 119.78

key ​

Detect musical key.

bash
sonare key music.mp3
sonare key music.mp3 --json
sonare key music.mp3 --candidates 5 --profile temperley --modes major-minor

Output:

  Key: C major (confidence: 91.6%)

JSON Output:

json
{"root": 0, "mode": 0, "confidence": 0.9161276817321777, "name": "C major"}

Useful options:

OptionUse
--candidates NShow the top N ranked key candidates, not only the winner
--hpssAnalyze harmonic content for cleaner key detection on drum-heavy material
--loudness-weightedWeight chroma frames by RMS so quieter passages contribute less
--high-pass-hz FREQIgnore low-frequency energy before key analysis (default 80.0; 0 disables)
--n-fft NAnalysis window (default 2048, 1 or above)
--hop-length NAnalysis hop (default 512)
--modes NAMELimit candidate modes (default major-minor)
--profile NAMEChoose the key-profile family (default: chosen by --genre-hint)
--genre-hint HINTLet the CLI choose a profile from a genre hint: auto (default), edm, electronic, dance, pop, classical or jazz
What are key profiles, genre hints, and --high-pass-hz?
  • Key profile — a template of how prominent each of the 12 pitch classes tends to be in a given key. The detector compares your song's chroma against these templates and picks the best match. Different families (ks / krumhansl, temperley, shaath / keyfinder, the Faraldo EDM profiles, bellman / bellman-budge) were tuned on different material, so one may fit your genre better than another.
  • Genre hint — instead of naming a profile directly, you tell the CLI the rough style and it picks a matching profile for you (e.g. an EDM hint selects an EDM-tuned profile).
  • --high-pass-hz — a high-pass filter removes energy below the given frequency before key analysis, so bass rumble or sub kick doesn't skew the chroma. The default is 80 Hz; 80–120 Hz is typical.
  • Tuning — key, chords and analyze measure the recording's tuning from the audio; there is no tuning flag.

beats ​

Detect beat times.

bash
sonare beats music.mp3
sonare beats music.mp3 --json

Output:

  Beat times (23 beats):
      1. 0.464s
      2. 0.975s
      3. 1.486s
      ...

onsets ​

Detect onset times (note attacks).

bash
sonare onsets music.mp3
sonare onsets music.mp3 --json

sections ​

Split a song into sections (intro, verse, chorus and so on) and name its overall form. See Section structure for what the labels mean.

bash
sonare sections music.mp3
sonare sections music.mp3 --json
OptionDefaultDescription
--min-duration-sec4.0Shortest section to keep, in seconds (0 or above)
--threshold0.22Boundary detection threshold (0 or above)
--n-fft, --hop-length2048, 512Analysis framing

JSON Output:

json
{"form": "??", "count": 2, "sections": [{"type": "unknown", "start": 0.0, "end": 5.967528343200684, "energy": 1.0, "confidence": 0.0, "group": 0}, ...]}

form is the overall pattern as letters, or ? when no repeated structure was found. count is the number of entries in sections, each with its type, start and end in seconds, energy, confidence and group.

Feature Commands ​

mel ​

Compute a Mel spectrogram and print its dimensions.

bash
sonare mel music.mp3
sonare mel music.mp3 --n-mels 80
sonare mel music.mp3 --fmin-hz 40 --fmax-hz 16000 --htk
OptionDefaultDescription
--n-mels128Number of Mel bands
--fmin-hz FREQ0.0Lowest Mel-band frequency in Hz (0 or above)
--fmax-hz FREQthe Nyquist frequencyHighest Mel-band frequency in Hz (above 0)
--htkoffUse the HTK Mel scale instead of the Slaney scale
--n-fft, --hop-length2048, 512Analysis framing

Output:

  Mel Spectrogram:
    Shape: 128 mels x 1034 frames

chroma ​

Compute chromagram (pitch class distribution).

bash
sonare chroma music.mp3
sonare chroma music.mp3 --json

Output:

  Chromagram: 12 bins x 1034 frames
  Mean energy per pitch class:
    C  0.7236 ##################################################
    C# 0.4157 ############################
    D  0.1901 #############
    ...

spectral ​

Compute spectral features: centroid, bandwidth, rolloff, flatness, ZCR (zero-crossing rate), and RMS (root mean square level).

bash
sonare spectral music.mp3
sonare spectral music.mp3 --json

Output:

  Spectral Features:
  Feature               Mean        Std        Min        Max
  centroid            2496.8     3637.4      228.0    10735.8
  bandwidth           2367.0     2908.1      393.9     7441.4
  rolloff             5033.7     7486.0      258.4    18970.8
  flatness            0.0368     0.0963     0.0000     0.4707
  zcr                 0.0488     0.0766     0.0078     0.3438
  rms                 0.0913     0.0127     0.0721     0.1402

pitch ​

Track pitch over time with the YIN or pYIN fundamental-frequency estimator.

bash
sonare pitch vocal.wav
sonare pitch vocal.wav --algorithm yin
OptionDefaultDescription
--algorithmpyinPitch algorithm: yin or pyin
--threshold0.1YIN threshold (> 0 and <= 1)
--f0-min-hz65.0Minimum tracked frequency in Hz (above 0)
--f0-max-hz2093.0Maximum tracked frequency in Hz (above 0)
--hop-length512Hop length in samples (1 or above)
--framesoffWith --json, add the per-frame times, f0, voiced_flag and voiced_prob arrays to the summary

Output:

  Pitch Tracking (pyin):
    Frames:    1034
    Median F0: 329.5 Hz
    Mean F0:   330.1 Hz

More Commands ​

Beyond the core set above, both CLIs carry every command below with one option contract. Audio-file analysis and feature commands take --json and a file argument, plus --n-fft and --hop-length where they frame the signal. Listing and preset-inspection commands have their own smaller option sets. Editing commands write a WAV to -o/--output.

More analysis ​

Room-acoustic command terms

Equivalent room means a useful model inferred from audio, not exact measured geometry. RIR means room impulse response. Room morphing is a creative room effect, not dereverberation.

The metrics these commands report are decay and clarity descriptors: RT60 is the reverberation time, EDT the early decay time, C50 and C80 clarity ratios, and DRR the direct-to-reverberant ratio. Each field is defined in Room Acoustics.

CommandDescriptionNotable options
sonare downbeats music.mp3Downbeat times (seconds)—
sonare chords music.mp3Chord progressionSee chords
sonare rhythm music.mp3Rhythm primitives (syncopation, groove, regularity)--start-bpm (120.0), --bpm-min (60.0), --bpm-max (200.0), each above 0
sonare dynamics music.mp3Dynamics / loudness summary--window-sec (0.4, above 0), --hop-length (512)
sonare timbre music.mp3Timbre / spectral-shape summary--n-mels (128)
sonare lufs music.mp3EBU R128 loudness in LUFS (Loudness Units relative to Full Scale, the standard perceptual loudness unit — see Delivery targets)--series (also emit momentary/short-term series)
sonare acoustic room.wavRoom-acoustic estimate (RT60/EDT/C50/C80)See acoustic and estimate-room
sonare estimate-room room.wavEquivalent room estimate: volume, dimensions, absorption, DRR, confidenceSee acoustic and estimate-room
sonare synthesize-rir --length 7 --width 5 --height 3 -o rir.wavMono RIR from shoebox geometrySee synthesize-rir and room-morph
sonare room-morph dry.wav --length 12 --width 9 --height 4 -o wet.wavCreative room-character morph toward a target roomSee synthesize-rir and room-morph
sonare boundaries music.mp3Structural transitions plus the novelty curve they were picked fromSee boundaries
sonare melody vocal.wavMelody contour summary: whether a melody was found, pitch range in octaves, mean frequency, pitch stability, vibrato rate, and the pitch-point count--threshold (0.1, above 0), --hop-length (256), --f0-min-hz (65.0), --f0-max-hz (2093.0)
sonare meter music.wavBasic level meters: peak, RMS, crest, true peak, clipping ratio, silence ratio, DC offset--clip-threshold-db (the level of a linear 0.999; -120 to 0), --oversample (4; one of 1, 2, 4, 8, 16)
sonare clipping music.wavClipped sample and region detection--threshold-db (the level of a linear 0.999; -120 to 0), --min-region (1)
sonare dynamic-range music.wavPercentile RMS dynamic range--window-sec (3.0), --hop-sec (1.0), --low-percentile (0.1), --high-percentile (0.95); the percentiles are 0 to 1
sonare stereo left.wav --reference right.wavStereo correlation and width from left/right files--reference, the second channel's file; without it the command exits 3
sonare phase left.wav --reference right.wavPhase-scope summary from left/right files--reference, the second channel's file; without it the command exits 3

chords ​

Chord progression as timed chord symbols. The defaults suit most pop and rock material; reach for the key-context option, or leave HMM decoding on, when a progression flickers between neighboring chords.

bash
sonare chords music.mp3 --json
sonare chords music.mp3 --key-context --key-root C --key-mode major
OptionDefaultDescription
--min-duration-sec0.3Shortest chord kept, in seconds
--smoothing-window2.0Chroma smoothing window, in seconds (above 0)
--threshold0.5Chord detection confidence threshold
--with-seventhoffSearch the full chord template set instead of triads only
--chroma-methodcqtChroma source: cqt, stft or nnls
--no-beat-syncoffDisable beat-synchronous chroma pooling
--no-hmmoffSkip the hidden Markov model decoding of the chord sequence
--hmm-beam-width24HMM decoder beam width; 0 keeps the full search
--key-contextoffBias detection with a key context
--key-rootCRoot pitch class for --key-context (for example F#)
--key-modemajorMode for --key-context (for example minor)
--detect-inversionsoffReport inversions (bass note)
--n-fft, --hop-length2048, 512Analysis framing

boundaries ​

boundaries exposes the whole structural-boundary detector, so it reports the novelty curve along with the boundaries picked from it.

OptionDefaultDescription
--threshold0.3Relative threshold: share of the largest novelty event within --reference-window (0 or above)
--absolute-threshold0.005Absolute floor on novelty (0 or above)
--kernel-size64Novelty kernel size in frames (above 0)
--n-mfcc13MFCC coefficients in the feature stream (above 0)
--n-chroma12Chroma bins in the feature stream (above 0)
--peak-distance2.0Minimum spacing between boundaries, in seconds (0 or above)
--reference-window60.0One-sided span for the relative threshold, in seconds; 0 disables the relative threshold
--no-mfcc, --no-chromaoffDrop one feature stream
--n-fft, --hop-length2048, 512Analysis framing

The two thresholds do different jobs. --threshold is relative, so it cannot ask whether anything changed at all; --absolute-threshold is the floor that can. detectBoundaries(request) explains the pair and what lowering the floor will and will not recover. Giving both --no-mfcc and --no-chroma is refused after the audio is read (exit 3), because the two streams are combined frame for frame and neither leaves nothing to combine.

acoustic and estimate-room ​

acoustic measures decay and clarity from a recording. estimate-room goes one step further and infers an equivalent room.

OptionDefaultDescription
--iroffacoustic: treat the input as an impulse response
--n-octave-bands6acoustic: number of octave bands reported
--min-decay-db30.0acoustic: minimum decay depth, in dB
--noise-floor-margin-db10.0acoustic: margin above the noise floor, in dB
--aspect-lw1.0estimate-room: length-to-width prior
--aspect-lh1.0estimate-room: length-to-height prior
--reference-absorption0.15estimate-room: absorption prior
--sabineoffestimate-room: use the Sabine model instead of the default Eyring model
--n-octave-bandslibrary defaultestimate-room: analyzer octave-band count (1 or above)

Room-acoustic fields such as RT60, EDT, C50, C80, D50, volume, dimensions, absorption bands, DRR, generated RIR error state, and confidence are explained in Room Acoustics.

synthesize-rir and room-morph ​

synthesize-rir builds a mono room impulse response from shoebox geometry. room-morph moves a dry recording toward a target room as a creative effect. Both take the same room options.

OptionDefaultDescription
--length, --width, --height7.0, 5.0, 3.0Room dimensions in metres; a non-positive or out-of-bounds dimension is refused with exit 3
--absorption0.2Uniform wall absorption, 0 to 1
--source-x, --source-y, --source-zscaled to the roomSource position in metres; the default sits at 1.0, 1.0, 1.2 in the default room and scales with larger ones
--listener-x, --listener-y, --listener-zscaled to the roomListener position in metres; the default sits at 5.0, 4.0, 1.7 in the default room and scales with larger ones
--ism-order3Image-source reflection order
--seed1Seed for the late tail, so a render repeats exactly (0 or above)
--max-secnatural lengthCap on the RIR or tail length in seconds (above 0)
--sabineoffUse the Sabine late-reverb model instead of the default Eyring model
--sample-rate48000synthesize-rir only: output sample rate, 8000 to 384000
--wet0.5room-morph only: target-room mix, 0 to 1
--suppression0.5room-morph only: how strongly the source room's tail is suppressed, 0 to 1
--receiver-spacingfitted to the roomroom-morph only: metres between the two receivers (above 0 up to 4); omitted, it is 0.5 where the pair fits around the listener and otherwise the largest spacing that fits. Used for a two-channel file, which is morphed as a stereo pair and written as a stereo file

More features ​

CommandDescriptionNotable options
sonare onset-strength music.mp3Onset strength envelope (how strongly notes attack over time); --json carries count, peak_time, stats and the full values array--n-fft (2048), --hop-length (512), --n-mels (128)
sonare tempogram music.mp3Autocorrelation tempogram--n-fft, --hop-length, --n-mels, --win-length (384)
sonare fourier-tempogram music.mp3Fourier tempogram--win-length (384), --hop-length (512)
sonare tempogram-ratio music.mp3Tempo-ratio features--win-length (384), --hop-length (512)
sonare plp music.mp3Predominant local pulse--n-fft, --hop-length, --n-mels, --win-length (384), --bpm-min, --bpm-max (both above 0, no default)
sonare nnls-chroma music.mp3NNLS chromagram--hop-length (512; 1 to 65536)
sonare tonnetz music.mp3Tonal centroid features--n-fft, --hop-length
sonare cqt music.mp3Constant-Q transform summary; refuses when the highest bin reaches Nyquist, with must be less than sample_rate / 2 in both CLI front ends--n-bins (84), --bins-per-octave (12), --hop-length (512; 1 to 65536), --fmin-hz (the library default, 32.7 Hz)
sonare vqt music.mp3Variable-Q transform summary--n-bins (84), --bins-per-octave (12), --gamma (derived from the ERB bandwidths; 0 or above), --filter-scale (1.0), --hop-length (512; 1 to 65536), --fmin-hz (the library default)
sonare mel-to-audio music.mp3 -o recon.wavReconstruct audio from a computed Mel spectrogram with Griffin-Lim--n-iter (32), --n-fft, --hop-length, --n-mels, --fmin-hz (0.0), --fmax-hz (the Nyquist frequency)
sonare mfcc-to-audio music.mp3 -o recon.wavReconstruct audio from computed MFCCs via Mel + Griffin-Lim--n-mfcc (20), --n-iter (32), --n-fft, --hop-length, --n-mels, --fmin-hz (0.0), --fmax-hz (the Nyquist frequency)
sonare pcen --values 1,2,3,4,5,6 --n-bins 2 --n-frames 3Per-channel energy normalization over a flattened matrix. Takes --values like the numeric helpers--n-bins, --n-frames (both required), --sample-rate (22050), --time-constant (0.4), --gain (0.98), --bias (2.0), --power (0.5), --eps (1e-06), --hop-length (512)

The matrix-feature commands print summaries rather than dumping full arrays. For full feature matrices, use the Python API or the JavaScript API.

Playback ​

playback renders movie audio (mono, stereo, 5.1 or 7.1) to speaker layouts or binaural headphones, and is the only command that keeps 5.1 and 7.1 channels. Options: --target (headphones, stereo, 5.1, 7.1; headphones), --input-layout (auto, mono, stereo, 5.1, 7.1; auto), --config FILE, --no-upmix, --night (0 to 1; 0.0), --dialogue-db (-12 to 12; 0.0), --program-lufs (-70 to 0; measured from the whole input when omitted), --target-lufs (-40 to -5; -24.0), --room (none, living-room, home-theater, screening-room) and --hrtf FILE; -o is required. Both CLIs render through an existing renderer's offline path, so the output matches the library's renderOffline for the same configuration. The stages, config keys and examples are on Playback Renderer. Duplicate document keys in --config are refused before applying flag overrides. The command exits with code 5.

Utility Commands ​

info ​

Display audio file information; --json prints the same fields for a script.

bash
sonare info music.mp3
  Duration:    0:12 (12.0s)
  Sample Rate: 44100 Hz
  Samples:     529200

version ​

Display version information: sonare version, sonare version --json or sonare --version.

libsonare 2.0.0 (Python CLI)

doctor ​

Report what this build can actually do — the first command to run when a feature seems missing or a file will not decode. Both CLIs have it, and it prints the build-diagnostics report the bindings expose as capabilities. The --json fields match across the two CLIs; the native text layout differs (it starts with libsonare Doctor and prints Version: and ABI: project 3, engine 4), and the sample below is the Python CLI's.

bash
sonare doctor          # or --json
libsonare 2.0.0
  Library:              /path/to/libsonare.dylib
  Platform:             darwin-arm64
  ABI:                  project=3, engine=4
  Features:             mastering=True, mixing=True, fx=True, ffmpeg=True
  Decode (built-in):    wav, mp3
  Decode (FFmpeg):      m4a, aac, flac, ogg, opus, wma
  SIMD:                 neon
  Hardware concurrency: 18

The --json result also lists every feature flag (mastering, mixing, mixingAssistant, arrangement, pitchEditor, voiceChanger, acousticSim, playback, and others). An ffmpeg=false build explains an M4A/AAC/FLAC/OGG decode failure, and the feature flags tell you which command groups were compiled in.

system-info ​

system-info prints what the machine offers and what this build's parallel scheduler will do with it: the logical and physical core counts, total and available memory, and whether parallel execution is enabled, with the worker count and strategy it derived from the core count. It takes no arguments.

bash
sonare system-info
sonare system-info --json

Output (from one machine; the values are that machine's):

System Information
  CPU Cores: 18 logical, 18 physical
  Memory: 128.0 GB total, 58.7 GB available

Parallel Configuration
  Parallel Enabled: yes
  Workers: 16
  Strategy: aggressive_parallel

The strategy is one of sequential_only, conservative_parallel, balanced_parallel, and aggressive_parallel, picked at 1, 2, 4, and 8 logical cores. The --json form nests the same values under cpu (logical_cores, physical_cores), memory (total_gb, available_gb), and parallel (enabled, workers, strategy). Run it when a batch is slower than expected, or before deciding how many sonare processes to run side by side; doctor is the command for what the build can decode and which feature groups were compiled in.

Numeric Helpers ​

The twelve numeric helpers mirror librosa.util and the librosa conversion functions: frame/sample conversion, the four decibel conversions, framing, padding, length fixing, peak picking and vector normalization. They let a script ported from librosa check a number against the engine without a binding call, so their reader is someone reproducing a calculation, not analyzing a song. They take no audio file. Two take a single integer, frames-to-samples --frames N and samples-to-frames --samples N; the other ten take a comma-separated list through --values, which is required. (pcen also takes --values but is a feature command, listed under More features.) A missing --values is a usage error (exit 2), and so is an empty list or an element that is not a finite number (argument --values: must be a comma-separated list of finite numbers). Plain output is the result as one comma-separated line, and --json prints a bare JSON array, except where a table below says otherwise. --json spells floating-point numbers differently on the two CLIs (1.0 against 1); the values are the same.

Frame and sample conversion ​

CommandResultOptions
sonare frames-to-samples --frames 10Sample index of frame N: N * hop, plus n_fft / 2 when --n-fft is given--frames (required), --n-fft (no centring offset; at least 1), --hop-length (512; at least 1)
sonare samples-to-frames --samples 6144Frame index holding sample N: floor(N / hop), or floor((N - n_fft / 2) / hop) when --n-fft is given--samples (required), --n-fft (no centring offset; at least 1), --hop-length (512; at least 1)

Without --n-fft the conversion is the plain N * hop, as librosa's n_fft argument defaults to none; give --n-fft 2048 for the centring offset of a centred STFT. --json wraps the number as {"samples": N} or {"frames": N} rather than printing a bare array.

bash
sonare frames-to-samples --frames 10                  # 5120
sonare frames-to-samples --frames 10 --n-fft 2048     # 6144
sonare samples-to-frames --samples 6144 --n-fft 2048 --json    # {"frames": 10}

Decibel conversion ​

CommandResultOptions
sonare power-to-db --values 1,0.110 * log10(max(v, amin)) - 10 * log10(max(ref, amin)), then floored at max - top_db--ref (1.0), --amin (1e-10), --top-db (80.0)
sonare amplitude-to-db --values 1,0.1The same on squared input, so 20 * log10 of the amplitude--ref (1.0), --amin (1e-5), --top-db (80.0)
sonare db-to-power --values 0,-10ref * 10^(v / 10)--ref (1.0)
sonare db-to-amplitude --values 0,-20ref * 10^(v / 20)--ref (1.0)

A zero or negative --ref uses the largest magnitude in the list as the reference, so the loudest entry comes out as 0 dB. A negative --top-db turns the floor off. --amin must be finite and positive; the library refuses anything else (exit 3). The two --amin defaults differ on purpose: the amplitude floor is the square root of the power floor, which is what makes amplitude-to-db agree with power-to-db on squared values.

bash
sonare amplitude-to-db --values 1,0.1          # 0,-20
sonare db-to-amplitude --values 0,-20 --json   # [1.0, 0.10000000149011612]

Framing, padding, and length ​

CommandResultOptions
sonare frame-signal --values ... --frame-length 4 --hop-length 2Overlapping frames of the list, flattened row by row: frame i copies input entries [i * hop, i * hop + L) and occupies output positions [i * L, (i + 1) * L)--frame-length (required), --hop-length (required)
sonare pad-center --values 1,2,3 --size 7The list centred in size entries, with (size - n) / 2 of padding on the left--size (required, at least 1 and at least the list length), --pad-value (0.0)
sonare fix-length --values 1,2,3 --size 5Exactly size entries: cropped from the right, or padded on the right--size (required, at least 1), --pad-value (0.0)
sonare fix-frames --values 0,3,3,7 --x-max 6Integer frame indices with entries outside [x-min, x-max] dropped, the bounds inserted, and duplicates removed--x-min (0), --x-max (no upper bound; 0 or more), --no-pad (do not insert the bounds)

frame-signal follows librosa.util.frame: the frame count is floor((n - L) / hop) + 1, and a list shorter than the frame length yields nothing. Its --json is an object, {"n_frames": N, "frames": [...]}, rather than the bare array the other helpers print. Neither --frame-length nor --hop-length has a default, because the library takes none.

fix-frames is the one helper that reads integers, and the one place this CLI departs from librosa: the list must be non-decreasing, and a negative entry is refused whenever --x-min is not negative (both exit 3). An empty list is refused as a --values usage error rather than padded to [x-min], because a frame at 0 that no detector produced is indistinguishable from a real one.

bash
sonare frame-signal --values 1,2,3,4,5,6 --frame-length 4 --hop-length 2 --json
# {"n_frames": 2, "frames": [1.0, 2.0, 3.0, 4.0, 3.0, 4.0, 5.0, 6.0]}
sonare pad-center --values 1,2,3 --size 7        # 0,0,1,2,3,0,0
sonare fix-length --values 1,2,3 --size 5        # 1,2,3,0,0
sonare fix-frames --values 0,3,3,7 --x-max 6     # 0,3,6

Peak picking and normalization ​

CommandResultOptions
sonare peak-pick --values ...Indices of local maxima, as librosa.util.peak_pick: x[i] is the maximum over [i - pre_max, i + post_max), is at least the mean over [i - pre_avg, i + post_avg) plus delta, and lies at least wait entries after the previous peak--pre-max, --post-max, --pre-avg, --post-avg, --delta, --wait (all required)
sonare vector-normalize --values 3,4 --norm-type 2The list divided by its norm--norm-type (0): 0 max-abs, 1 L1, 2 L2, 3 power (sum of squares); --threshold (0.0)

peak-pick has no defaults, because the library takes none for any of its six parameters. It prints integer indices, so its --json is an integer array. A --norm-type outside 0 to 3 is a usage error (exit 2) rather than a fall back to the max-abs norm. --threshold is the norm at or below which the list comes back unchanged instead of being divided by something near zero, which is librosa's fill=None behavior; at the default 0.0 only an all-zero list is returned as it is.

bash
sonare peak-pick --values 0,1,0,3,0,2,0,1,0 --pre-max 1 --post-max 1 --pre-avg 1 --post-avg 1 --delta 0.5 --wait 0   # 1,3,5,7
sonare peak-pick --values 0,1,0,3,0,2,0,1,0 --pre-max 2 --post-max 2 --pre-avg 1 --post-avg 1 --delta 0.5 --wait 0   # 1,3
sonare vector-normalize --values 3,4 --norm-type 2   # 0.6,0.8