AUCAT(1)
π AUCAT(1) π
okay bestie, welcome to aucat β the audio file manipulation tool from the General Commands Manual, section 1. she's giving main character energy and she does a LOT, so grab a strawberry drink and let's go πβ¨
β¨ SYNOPSIS β¨
aucat [-dn] [-b size] [-c channels] [-e enc] [-f device] [-g position]
[-h fmt] [-i file] [-m min:max/min:max] [-o file] [-p position]
[-q port] [-r rate] [-v volume]
πΈ DESCRIPTION πΈ
so like, aucat can play, record, mix, and process audio files on the fly. no cap. π₯
When she's playing back, aucat reads audio data from all the played files at the same time, mixes it all together, and plays the result on the device. And when she's recording, she takes the audio data coming off the device and stores it into the corresponding files. twin behavior fr fr π
There's also an off-line mode you can use to process audio files without involving any audio hardware at all β iconic, no device required.
Processing includes:
- Change the sound encoding.
- Route the sound from one channel to another.
- Control the per-file playback volume.
And finally, aucat can accept MIDI messages, which are usable for:
- Volume control.
- Start, stop and relocate playback and recording.
The options are as follows π
π OPTIONS π
-bsize β the buffer size of the audio device, in frames. default is7680.-cchannels β the audio file channels count. the default is2, i.e. stereo. π§-dβ increase log verbosity. (she's chatty now π¬)-eenc β encoding of the audio file. the default iss24. the encoding names use this scheme: signedness (soru) followed by the precision in bits, then the byte-order (leorbe), then the number of bytes per sample, and then the alignment (msborlsb). only the signedness and the precision are mandatory. examples:u8,s16le,s24le3,s24le4lsb.-fdevice β use thissndio(7)audio device. the device mode and parameters are determined from audio files. default isdefault.-gposition β go to the given time position and start playback or recording there. this option is equivalent to an incoming MMC relocate message with the same position. the position is expressed as the number of samples (at device sample rate).-hfmt β audio file type. these are the supported file types:rawβ headerless file.wavβ Microsoft WAV file format.aiffβ Apple's audio interchange file format.auβ Sun/NeXT audio file format.autoβ try to guess, depending on the file name. this is the default.
-ifile β play this audio file. if the option argument is-then standard input will be used. π-mmin:max/min:max β map the given range of source channels into the given range of destination channels.-nβ off-line mode. read input files and store the result in the output files, processing them on the fly. this mode is useful to mix, demultiplex, resample or re-encode audio files off-line. it requires at least one input (-i) and one output (-o). β οΈ-ofile β record into this audio file. if the option argument is-then standard output will be used.-pposition β time offset where the beginning of the file belongs. the first sample of the file will be played or recorded when the device reaches the given position. the position is expressed as the number of samples (at device sample rate).-qport β control audio device properties through this MIDI port. this includes per-stream volumes and the ability to synchronously start, stop and relocate audio files.-rrate β sample rate in Hertz of the audio file. the default is48000.-vvolume β software volume attenuation of the file to play. the value must be between1and127, corresponding to-42dBand-0dBattenuation in1/3dBsteps. the default is127, i.e. no attenuation. (full volume, as she deserves π)
okay so important ordering lore: on the command line, per-file parameters (-cehmrv) must precede the file definition (-io). don't fight the order, she will not forgive you π
And if aucat is sent SIGHUP, SIGINT or SIGTERM, she terminates recording to files. bye bestie π
πΉ MIDI CONTROL πΉ
aucat can be controlled through MIDI (-q) like this: a MIDI channel is assigned to each stream, and the volume is changed using the standard volume controller (number 7). the master volume can be changed using the standard master volume system exclusive message.
All audio files are controlled by the following MMC messages:
relocateβ all files are relocated to the requested time position. if it is beyond the end of a file, the file is temporarily disabled until a valid position is requested.startβ playback and/or recording is started.stopβ playback and/or recording is stopped and all files are rewound back to the starting position.
MIDI control is intended to be used together with sndiod(8). for instance, the following command will create two devices: the default snd/default and a MMC-controlled one snd/default.mmc:
$ sndiod -r 48000 -z 480 -s default -t slave -s mmc
Programs using snd/default behave normally, while programs using snd/mmc wait for the MMC start signal and start synchronously. then, the following command will play a file on the snd/mmc audio device, giving full control to MIDI software or hardware connected to the midithru/0 MIDI port:
$ aucat -f snd/mmc -q midithru/0 -i file.wav
At this stage, aucat will start, stop and relocate automatically following all user actions in the MIDI sequencer, assuming it's configured to transmit MMC on midithru/0 and snd/mmc. furthermore, the MIDI sequencer could be configured to use the snd/mmc port as MTC clock source, assured to be synchronous to playback of file.wav. the way she syncs up?? obsessed π¦
π EXAMPLES π
Mix and play two files while recording a third file:
$ aucat -i file1.wav -i file2.wav -o file3.wav
Record channels 2 and 3 into one stereo file and channels 6 and 7 into another stereo file using a 44.1kHz sampling rate for both:
$ aucat -r 44100 -m 2:3/0:1 -o file1.wav -m 6:7/0:1 -o file2.wav
Split a stereo file into two mono files:
$ aucat -n -i stereo.wav -c 1 -m 0:0/0:0 -o left.wav \
-m 1:1/0:0 -o right.wav
π SEE ALSO π
cdio(1), audio(4), sndio(7), audioctl(8), mixerctl(8), sndiod(8)
π BUGS π
Resampling is low quality. (ngl she said it herself, don't @ me π)
There are limitations inherent to the wav, aiff, and au file formats: not all encodings are supported, file sizes are limited to 2GB, and the files must support the lseek(2) operation (e.g. pipes do not support it). so no pipe shenanigans for those formats, periodt. π
and that's the whole page bestie!! this one shipped from Debian, and her version stamp is $Mdocdate$, with the page sitting right there at AUCAT(1). slay, go process some audio, ily π«Άβ¨
π¦ where this page comes from
- alpine 3.24: sndio-doc 1.10.0-r4 Β· ISC
- arch rolling: sndio 1.10.0-1 Β· ISC
- debian trixie: sndio-tools 1.10.0-0.1 Β· ISC
- nixos 26.05: sndio 1.10.0
- nixpkgs unstable: sndio 1.10.0
- opensuse-leap 16.0: sndio 1.10.0-bp160.1.7 Β· ISC
- opensuse-leap 16.0: sndio 1.10.0-bp160.1.7 Β· ISC
- opensuse-leap 16.0: sndio 1.10.0-bp160.1.7 Β· ISC
- opensuse-leap 16.0: sndio 1.10.0-bp160.1.7 Β· ISC
- ubuntu resolute: sndio-tools 1.10.0-0.2 Β· ISC
- ubuntu stonking: sndio-tools 1.10.0-0.2 Β· ISC
- Copyright (c) 2006 Alexandre Ratchov <alex@caoua.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms