sndinfo utility displays detailed information about audio files including format, sample rate, bit depth, duration, and optional instrument/broadcast metadata.
Syntax
Arguments
soundfile- One or more sound files to examine
Options
| Option | Description |
|---|---|
-i | Display instrument information (sample loops, base note, velocity) |
-i<N> | Display instrument information with detail level N |
-b | Display broadcast wave (BWF) information |
-b<N> | Display broadcast information with detail level N |
-j <N> | (Ignored, for compatibility) |
Examples
Display basic file information
Examine multiple files
Show instrument information
Show broadcast wave information
Information displayed
Basic information (always shown)
- Sample rate: Samples per second (e.g., 44100, 48000)
- Channel configuration: Mono, stereo, quad, hex, oct, or N-channel
- Bit depth: 8, 16, 24, or 32 bits per sample
- File format: WAV, AIFF, FLAC, etc.
- Duration: Length in seconds
- Sample frames: Total number of sample frames
Instrument information (-i flag)
For sampler-compatible files:
- Gain: Overall gain adjustment
- Base note: MIDI note number (middle C = 60)
- Velocity range: Minimum to maximum velocity values
- Key range: MIDI key range for sample mapping
- Loop points: Number of defined loops
- Loop details: For each loop:
- Mode: none, forward, backward, or alternating
- Start point: Sample frame number
- End point: Sample frame number
- Count: Number of times to repeat
Broadcast wave information (-b flag)
For BWF (Broadcast Wave Format) files:
- Description: Content description
- Originator: Creator/recording engineer
- Origination reference: Unique identifier
- Origination date: Recording date (YYYY-MM-DD)
- Origination time: Recording time (HH:MM:SS)
- BWF version: Broadcast Wave Format version
- UMID: Unique Material Identifier
- Coding history: Processing history
Supported file formats
sndinfo supports all formats readable by libsndfile:
Common formats
- WAV: Microsoft Wave (PCM, float, compressed)
- AIFF/AIFC: Apple Audio Interchange File Format
- FLAC: Free Lossless Audio Codec
- OGG: Ogg Vorbis (if libsndfile built with support)
Professional formats
- CAF: Apple Core Audio Format
- RF64: 64-bit extended WAV
- W64: Sony Wave64
- BWF: Broadcast Wave Format
Legacy formats
- AU/SND: Sun/NeXT audio
- IRCAM: IRCAM soundfile
- VOC: Creative Voice
- PAF: Paris Audio File
- SVX: Amiga IFF/SVX
Channel configurations
| Channels | Description |
|---|---|
| 1 | Monaural |
| 2 | Stereo |
| 4 | Quad (quadraphonic) |
| 6 | Hex (5.1 surround) |
| 8 | Oct (7.1 surround) |
| N | N-channel |
Sample formats
| Format | Description |
|---|---|
| 8-bit | Unsigned or signed char |
| 16-bit | Signed short integer (CD quality) |
| 24-bit | Signed 24-bit integer (high quality) |
| 32-bit | Signed long integer or float |
| 64-bit | Double precision float |
Usage patterns
Check file before processing
Batch file examination
Verify sample rate
Find files with loops
Error handling
File not found
- File path is correct
- File exists in current directory or SFDIR path
- File permissions allow reading
Not a sound file
Environment variables
SFDIR: Semicolon-separated list of directories to search for sound filesSSDIR: Additional search directory for sound files