2011-03-17 02:43:36 -05:00
|
|
|
.\" $OpenBSD$
|
2010-08-19 15:38:45 -05:00
|
|
|
.\"
|
|
|
|
.\" Copyright (c) 2006 Alexandre Ratchov <alex@caoua.org>
|
|
|
|
.\"
|
|
|
|
.\" Permission to use, copy, modify, and distribute this software for any
|
|
|
|
.\" purpose with or without fee is hereby granted, provided that the above
|
|
|
|
.\" copyright notice and this permission notice appear in all copies.
|
|
|
|
.\"
|
|
|
|
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
|
|
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
|
|
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
|
|
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
|
|
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
|
|
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
|
|
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
|
|
.\"
|
2011-03-17 02:43:36 -05:00
|
|
|
.Dd $Mdocdate$
|
2010-08-19 15:38:45 -05:00
|
|
|
.Dt AUCAT 1
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
2012-12-03 10:37:08 -06:00
|
|
|
.Nm aucat
|
|
|
|
.Nd audio/MIDI stream manipulation tool
|
2010-08-19 15:38:45 -05:00
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Nm aucat
|
|
|
|
.Bk -words
|
2012-12-03 10:37:08 -06:00
|
|
|
.Op Fl dMn
|
2010-08-19 15:38:45 -05:00
|
|
|
.Op Fl C Ar min : Ns Ar max
|
|
|
|
.Op Fl c Ar min : Ns Ar max
|
|
|
|
.Op Fl e Ar enc
|
|
|
|
.Op Fl f Ar device
|
|
|
|
.Op Fl h Ar fmt
|
|
|
|
.Op Fl i Ar file
|
|
|
|
.Op Fl j Ar flag
|
|
|
|
.Op Fl m Ar mode
|
|
|
|
.Op Fl o Ar file
|
2011-10-05 06:21:01 -05:00
|
|
|
.Op Fl q Ar port
|
2010-08-19 15:38:45 -05:00
|
|
|
.Op Fl r Ar rate
|
2011-12-09 16:49:26 -06:00
|
|
|
.Op Fl t Ar mode
|
|
|
|
.Op Fl v Ar volume
|
|
|
|
.Op Fl w Ar flag
|
|
|
|
.Op Fl x Ar policy
|
2010-08-19 15:38:45 -05:00
|
|
|
.Ek
|
|
|
|
.Sh DESCRIPTION
|
2011-12-09 16:49:26 -06:00
|
|
|
The
|
2012-12-03 10:37:08 -06:00
|
|
|
.Nm
|
|
|
|
utility can play, record, mix, and convert audio files.
|
2012-04-04 06:32:53 -05:00
|
|
|
During playback,
|
2012-12-03 10:37:08 -06:00
|
|
|
.Nm
|
|
|
|
reads audio data concurrently from all played files, mixes it and sends
|
|
|
|
the result to the device.
|
2012-04-06 02:51:56 -05:00
|
|
|
Similarly, during recording it duplicates audio data recorded
|
2012-12-03 10:37:08 -06:00
|
|
|
from the device and stores it into corresponding files.
|
|
|
|
It can process audio data on the fly:
|
2012-04-04 06:32:53 -05:00
|
|
|
.Pp
|
|
|
|
.Bl -bullet -offset indent -compact
|
|
|
|
.It
|
2012-12-03 10:37:08 -06:00
|
|
|
Change the sound encoding.
|
2012-04-04 06:32:53 -05:00
|
|
|
.It
|
|
|
|
Route the sound from one channel to another,
|
|
|
|
join stereo or split mono.
|
|
|
|
.It
|
2012-12-03 10:37:08 -06:00
|
|
|
Control the per-file playback volume.
|
2012-04-04 06:32:53 -05:00
|
|
|
.It
|
2012-12-03 10:37:08 -06:00
|
|
|
Monitor the sound being played, allowing to playback mix
|
|
|
|
to be record.
|
2012-04-04 06:32:53 -05:00
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
Finally,
|
2012-12-03 10:37:08 -06:00
|
|
|
.Nm
|
|
|
|
can accept MIDI messages usable for:
|
2012-04-04 06:32:53 -05:00
|
|
|
.Pp
|
|
|
|
.Bl -bullet -offset indent -compact
|
|
|
|
.It
|
|
|
|
Volume control.
|
|
|
|
.It
|
2012-12-03 10:37:08 -06:00
|
|
|
Start, stop and relocate playback and recording.
|
2012-04-04 06:32:53 -05:00
|
|
|
.El
|
|
|
|
.Pp
|
2012-12-03 10:37:08 -06:00
|
|
|
For historic reasons
|
2012-04-04 06:32:53 -05:00
|
|
|
.Nm
|
2012-12-03 10:37:08 -06:00
|
|
|
has the same audio server capability as
|
|
|
|
.Xr sndiod 1 ,
|
|
|
|
enabled when no files to play or record are provided.
|
2012-04-04 06:32:53 -05:00
|
|
|
Both operate the same way, except that the former processes audio data stored
|
2012-04-25 16:50:29 -05:00
|
|
|
in files, while the latter processes audio data provided or consumed by
|
2012-04-04 06:32:53 -05:00
|
|
|
programs.
|
2012-12-03 10:37:08 -06:00
|
|
|
Hence it has the same server-centric options described in
|
|
|
|
.Xr sndiod 1 .
|
2010-08-19 15:38:45 -05:00
|
|
|
.Pp
|
|
|
|
The options are as follows:
|
|
|
|
.Bl -tag -width Ds
|
|
|
|
.It Xo
|
|
|
|
.Fl C Ar min : Ns Ar max ,
|
|
|
|
.Fl c Ar min : Ns Ar max
|
|
|
|
.Xc
|
|
|
|
The range of stream channel numbers for recording and playback directions,
|
|
|
|
respectively.
|
|
|
|
The default is 0:1, i.e. stereo.
|
|
|
|
.It Fl d
|
|
|
|
Increase log verbosity.
|
|
|
|
.It Fl e Ar enc
|
|
|
|
Encoding of the playback or recording stream (see below).
|
|
|
|
The default is signed, 16-bit, native byte order.
|
|
|
|
.It Fl f Ar device
|
2012-12-03 10:37:08 -06:00
|
|
|
Use this
|
2010-08-19 15:38:45 -05:00
|
|
|
.Xr sndio 7
|
2012-12-03 10:37:08 -06:00
|
|
|
audio device.
|
|
|
|
Preceding per-device options apply to this device.
|
2011-10-10 07:19:33 -05:00
|
|
|
Streams
|
2012-12-03 10:37:08 -06:00
|
|
|
.Pq Fl io
|
2011-10-05 06:21:01 -05:00
|
|
|
and control MIDI ports
|
2011-10-10 07:19:33 -05:00
|
|
|
.Pq Fl q
|
|
|
|
that are applied after will be attached to this device.
|
2010-08-19 15:38:45 -05:00
|
|
|
Device mode and parameters are determined from streams
|
|
|
|
attached to it.
|
|
|
|
.It Fl h Ar fmt
|
|
|
|
File format of the playback or record stream (see below).
|
|
|
|
The default is auto.
|
|
|
|
.It Fl i Ar file
|
|
|
|
Add this file to the list of streams to play.
|
|
|
|
If the option argument is
|
|
|
|
.Sq -
|
|
|
|
then standard input will be used.
|
|
|
|
.It Fl j Ar flag
|
|
|
|
Control whether stream channels are joined or expanded if
|
|
|
|
the stream number of channels is not equal to the device number of channels.
|
|
|
|
If the flag is
|
|
|
|
.Va off
|
|
|
|
then stream channels are routed to the corresponding
|
|
|
|
device channel, possibly discarding channels not present in the device.
|
|
|
|
If the flag is
|
|
|
|
.Va on ,
|
|
|
|
then a single stream channel may be sent on multiple device channels,
|
|
|
|
or multiple stream channels may be sent to a single device channel.
|
|
|
|
For instance, this feature could be used to request mono streams to
|
|
|
|
be sent on multiple outputs or to record a stereo input into a mono stream.
|
|
|
|
The default is
|
|
|
|
.Ar on .
|
2011-10-05 06:21:01 -05:00
|
|
|
.It Fl M
|
|
|
|
Create a MIDI thru box
|
2011-10-10 07:19:33 -05:00
|
|
|
.Pq i.e. MIDI-only pseudo device .
|
2011-10-05 06:21:01 -05:00
|
|
|
It merges any number of MIDI inputs and broadcasts the result
|
|
|
|
to any number of MIDI outputs, similarly to a hardware MIDI thru box.
|
|
|
|
Only MIDI ports
|
|
|
|
.Pq Fl q
|
|
|
|
and MIDI files
|
|
|
|
.Po
|
|
|
|
.Fl io
|
|
|
|
preceded by
|
|
|
|
.Fl m Ar midi
|
|
|
|
.Pc
|
|
|
|
can be attached to it.
|
2010-08-19 15:38:45 -05:00
|
|
|
.It Fl m Ar mode
|
|
|
|
Set the stream mode.
|
|
|
|
Valid modes are
|
|
|
|
.Ar play ,
|
|
|
|
.Ar rec ,
|
|
|
|
.Ar mon ,
|
2011-10-05 06:21:01 -05:00
|
|
|
and
|
|
|
|
.Ar midi ,
|
|
|
|
corresponding to playback, recording, monitoring and MIDI control.
|
2010-08-19 15:38:45 -05:00
|
|
|
A monitoring stream is a fake recording stream corresponding to
|
|
|
|
the mix of all playback streams.
|
|
|
|
Multiple modes can be specified, separated by commas,
|
|
|
|
but the same stream cannot be used for both recording and monitoring.
|
|
|
|
The default is
|
2011-10-05 06:21:01 -05:00
|
|
|
.Ar play , Ns Ar rec , Ns Ar midi
|
|
|
|
(i.e. full-duplex with MIDI control enabled).
|
2010-08-19 15:38:45 -05:00
|
|
|
.It Fl n
|
2011-10-05 06:21:01 -05:00
|
|
|
Create a loopback pseudo audio device.
|
|
|
|
Send input streams
|
2010-08-19 15:38:45 -05:00
|
|
|
to the output, processing them on the fly.
|
2011-10-10 07:19:33 -05:00
|
|
|
This pseudo-device is useful to mix, demultiplex, resample or re-encode
|
2010-08-19 15:38:45 -05:00
|
|
|
audio files offline.
|
2011-10-05 06:21:01 -05:00
|
|
|
It requires at least one input
|
|
|
|
.Pq Fl i
|
|
|
|
and one output
|
|
|
|
.Pq Fl o .
|
2010-08-19 15:38:45 -05:00
|
|
|
.It Fl o Ar file
|
|
|
|
Add this file to the list of recording streams.
|
|
|
|
If the option argument is
|
|
|
|
.Sq -
|
|
|
|
then standard output will be used.
|
2011-10-05 06:21:01 -05:00
|
|
|
.It Fl q Ar port
|
2012-12-03 10:37:08 -06:00
|
|
|
Allow audio device properties to be controlled
|
|
|
|
through this MIDI port.
|
2010-08-19 15:38:45 -05:00
|
|
|
This includes per-stream volumes and the ability to
|
|
|
|
synchronously start, stop and relocate streams created in
|
|
|
|
MIDI Machine
|
|
|
|
Control (MMC) slave mode
|
|
|
|
.Pq Fl t .
|
|
|
|
.It Fl r Ar rate
|
|
|
|
Sample rate in Hertz of the stream.
|
2012-03-22 03:32:51 -05:00
|
|
|
The default is 48000.
|
2010-08-19 15:38:45 -05:00
|
|
|
.It Fl t Ar mode
|
|
|
|
Select the way streams are controlled by MIDI Machine Control (MMC)
|
|
|
|
messages.
|
|
|
|
If the mode is
|
|
|
|
.Va off
|
|
|
|
(the default), then streams are not affected by MMC messages.
|
|
|
|
If the mode is
|
|
|
|
.Va slave ,
|
2012-12-03 10:37:08 -06:00
|
|
|
then streams are started synchronously by MMC start messages.
|
2010-08-19 15:38:45 -05:00
|
|
|
.It Fl v Ar volume
|
|
|
|
Software volume attenuation of the playback stream.
|
|
|
|
The value must be between 1 and 127,
|
2011-05-26 09:16:47 -05:00
|
|
|
corresponding to \-42dB and \-0dB attenuation in 1/3dB steps.
|
|
|
|
The default is 127 i.e. no attenuation.
|
2011-05-13 06:38:34 -05:00
|
|
|
.It Fl w Ar flag
|
2011-05-26 01:57:55 -05:00
|
|
|
Control
|
|
|
|
.Nm
|
|
|
|
behaviour when the maximum volume of the hardware is reached
|
|
|
|
and a new stream is connected.
|
|
|
|
This happens only when stream volumes
|
|
|
|
are not properly set using the
|
|
|
|
.Fl v
|
|
|
|
option.
|
2011-05-13 06:38:34 -05:00
|
|
|
If the flag is
|
|
|
|
.Va on ,
|
2011-05-26 01:57:55 -05:00
|
|
|
then the master volume (corresponding to the mix of all playback streams)
|
|
|
|
is automatically adjusted to avoid clipping.
|
|
|
|
Using
|
2011-05-26 09:16:47 -05:00
|
|
|
.Va off
|
2011-05-26 01:57:55 -05:00
|
|
|
makes sense when all streams are recorded or produced with properly lowered
|
|
|
|
volumes.
|
2011-05-13 06:38:34 -05:00
|
|
|
The default is
|
|
|
|
.Va on .
|
2010-08-19 15:38:45 -05:00
|
|
|
.It Fl x Ar policy
|
|
|
|
Action when the output stream cannot accept
|
|
|
|
recorded data fast enough or the input stream
|
|
|
|
cannot provide data to play fast enough.
|
|
|
|
If the policy
|
|
|
|
is
|
|
|
|
.Dq ignore
|
|
|
|
(the default) then samples that cannot be written are discarded
|
|
|
|
and samples that cannot be read are replaced by silence.
|
|
|
|
If the policy is
|
|
|
|
.Dq sync
|
|
|
|
then recorded samples are discarded,
|
|
|
|
but the same amount of silence will be written
|
|
|
|
once the stream is unblocked, in order to reach the right position in time.
|
|
|
|
Similarly silence is played, but the same amount of samples will be discarded
|
|
|
|
once the stream is unblocked.
|
|
|
|
If the policy is
|
|
|
|
.Dq error
|
|
|
|
then the stream is closed permanently.
|
|
|
|
.Pp
|
|
|
|
If a stream is created with the
|
|
|
|
.Fl t
|
|
|
|
option,
|
|
|
|
the
|
|
|
|
.Dq ignore
|
|
|
|
action is disabled for any stream connected to it
|
|
|
|
to ensure proper synchronization.
|
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
On the command line,
|
2012-12-03 10:37:08 -06:00
|
|
|
per-device parameters must precede the device definition
|
2011-10-05 06:21:01 -05:00
|
|
|
.Pq Fl fMn ,
|
2010-08-19 15:38:45 -05:00
|
|
|
and per-stream parameters
|
|
|
|
.Pq Fl Ccehjmrtvx
|
|
|
|
must precede the stream definition
|
2012-12-03 10:37:08 -06:00
|
|
|
.Pq Fl io .
|
2010-08-19 15:38:45 -05:00
|
|
|
MIDI ports
|
|
|
|
.Pq Fl q
|
2011-04-05 10:42:38 -05:00
|
|
|
and stream definitions
|
2012-12-03 10:37:08 -06:00
|
|
|
.Pq Fl io
|
2011-10-05 06:21:01 -05:00
|
|
|
must follow the definition of the device
|
|
|
|
.Pq Fl fMn
|
2010-08-19 15:38:45 -05:00
|
|
|
to which they are attached.
|
|
|
|
.Pp
|
|
|
|
If no audio devices
|
2011-10-05 06:21:01 -05:00
|
|
|
.Pq Fl fMn
|
2010-08-19 15:38:45 -05:00
|
|
|
are specified,
|
|
|
|
settings are applied as if
|
2011-10-05 06:21:01 -05:00
|
|
|
the default device is specified.
|
2010-08-19 15:38:45 -05:00
|
|
|
.Pp
|
|
|
|
If
|
2011-12-09 16:49:26 -06:00
|
|
|
.Nm aucat
|
2010-08-19 15:38:45 -05:00
|
|
|
is sent
|
|
|
|
.Dv SIGHUP ,
|
|
|
|
.Dv SIGINT
|
|
|
|
or
|
|
|
|
.Dv SIGTERM ,
|
|
|
|
it terminates recording to files.
|
|
|
|
.Pp
|
|
|
|
File formats are specified using the
|
|
|
|
.Fl h
|
|
|
|
option.
|
|
|
|
The following file formats are supported:
|
|
|
|
.Bl -tag -width s32lexxx -offset indent
|
|
|
|
.It raw
|
|
|
|
Headerless file.
|
|
|
|
This format is recommended since it has no limitations.
|
|
|
|
.It wav
|
|
|
|
Microsoft WAVE file format.
|
|
|
|
There are limitations inherent to the file format itself:
|
|
|
|
not all encodings are supported,
|
|
|
|
file sizes are limited to 2GB,
|
|
|
|
and the file must support the
|
|
|
|
.Xr lseek 2
|
|
|
|
operation (e.g. pipes do not support it).
|
|
|
|
.It auto
|
|
|
|
Try to guess, depending on the file name.
|
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
Encodings are specified using the
|
|
|
|
.Fl e
|
|
|
|
option.
|
|
|
|
The following encodings are supported:
|
|
|
|
.Pp
|
|
|
|
.Bl -tag -width s32lexxx -offset indent -compact
|
|
|
|
.It s8
|
|
|
|
signed 8-bit
|
|
|
|
.It u8
|
|
|
|
unsigned 8-bit
|
|
|
|
.It s16le
|
|
|
|
signed 16-bit, little endian
|
|
|
|
.It u16le
|
|
|
|
unsigned 16-bit, little endian
|
|
|
|
.It s16be
|
|
|
|
signed 16-bit, big endian
|
|
|
|
.It u16be
|
|
|
|
unsigned 16-bit, big endian
|
|
|
|
.It s24le
|
|
|
|
signed 24-bit, stored in 4 bytes, little endian
|
|
|
|
.It u24le
|
|
|
|
unsigned 24-bit, stored in 4 bytes, little endian
|
|
|
|
.It s24be
|
|
|
|
signed 24-bit, stored in 4 bytes, big endian
|
|
|
|
.It u24be
|
|
|
|
unsigned 24-bit, stored in 4 bytes, big endian
|
|
|
|
.It s32le
|
|
|
|
signed 32-bit, little endian
|
|
|
|
.It u32le
|
|
|
|
unsigned 32-bit, little endian
|
|
|
|
.It s32be
|
|
|
|
signed 32-bit, big endian
|
|
|
|
.It u32be
|
|
|
|
unsigned 32-bit, big endian
|
|
|
|
.It s24le3
|
|
|
|
signed 24-bit, packed in 3 bytes, little endian
|
|
|
|
.It u24le3
|
|
|
|
unsigned 24-bit, packed in 3 bytes, big endian
|
|
|
|
.It s24be3
|
|
|
|
signed 24-bit, packed in 3 bytes, little endian
|
|
|
|
.It u24be3
|
|
|
|
unsigned 24-bit, packed in 3 bytes, big endian
|
|
|
|
.It s20le3
|
|
|
|
signed 20-bit, packed in 3 bytes, little endian
|
|
|
|
.It u20le3
|
|
|
|
unsigned 20-bit, packed in 3 bytes, big endian
|
|
|
|
.It s20be3
|
|
|
|
signed 20-bit, packed in 3 bytes, little endian
|
|
|
|
.It u20be3
|
|
|
|
unsigned 20-bit, packed in 3 bytes, big endian
|
|
|
|
.It s18le3
|
|
|
|
signed 18-bit, packed in 3 bytes, little endian
|
|
|
|
.It u18le3
|
|
|
|
unsigned 18-bit, packed in 3 bytes, big endian
|
|
|
|
.It s18be3
|
|
|
|
signed 18-bit, packed in 3 bytes, little endian
|
|
|
|
.It u18be3
|
|
|
|
unsigned 18-bit, packed in 3 bytes, big endian
|
|
|
|
.El
|
|
|
|
.Sh MIDI CONTROL
|
|
|
|
.Nm
|
2012-12-03 10:37:08 -06:00
|
|
|
can be controlled through MIDI
|
2010-08-19 15:38:45 -05:00
|
|
|
.Pq Fl q
|
2012-12-03 10:37:08 -06:00
|
|
|
as follows:
|
|
|
|
a MIDI channel is assigned to each stream, and the volume
|
2010-08-19 15:38:45 -05:00
|
|
|
is changed using the standard volume controller (number 7).
|
|
|
|
Similarly, when the audio client changes its volume,
|
|
|
|
the same MIDI controller message is sent out; it can be used
|
|
|
|
for instance for monitoring or as feedback for motorized
|
|
|
|
faders.
|
|
|
|
.Pp
|
2012-03-23 08:32:29 -05:00
|
|
|
The master volume can be changed using the standard master volume
|
|
|
|
system exclusive message.
|
|
|
|
.Pp
|
2010-08-19 15:38:45 -05:00
|
|
|
Streams created with the
|
|
|
|
.Fl t
|
|
|
|
option are controlled by the following MMC messages:
|
|
|
|
.Bl -tag -width relocateXXX -offset indent
|
|
|
|
.It relocate
|
2012-12-03 10:37:08 -06:00
|
|
|
Files are relocated to the requested time position.
|
2010-08-19 15:38:45 -05:00
|
|
|
If the requested position is beyond the end of file,
|
2012-12-03 10:37:08 -06:00
|
|
|
playback of the file is temporarly disabled until a valid
|
|
|
|
position is requested.
|
2010-08-19 15:38:45 -05:00
|
|
|
.It start
|
2012-12-03 10:37:08 -06:00
|
|
|
Files are started.
|
2010-08-19 15:38:45 -05:00
|
|
|
.It stop
|
2012-12-03 10:37:08 -06:00
|
|
|
Files are stopped and rewound back to the starting position.
|
2010-08-19 15:38:45 -05:00
|
|
|
.El
|
|
|
|
.Pp
|
2012-12-03 10:37:08 -06:00
|
|
|
MIDI control is intended to be used together with
|
|
|
|
.Xr sndiod 1 .
|
2010-08-19 15:38:45 -05:00
|
|
|
For instance, the following command will create two devices:
|
|
|
|
the default
|
2011-11-14 01:52:48 -06:00
|
|
|
.Va snd/0
|
2012-12-03 10:37:08 -06:00
|
|
|
and a MMC-controlled one
|
2011-11-14 01:52:48 -06:00
|
|
|
.Va snd/0.mmc :
|
2010-08-19 15:38:45 -05:00
|
|
|
.Bd -literal -offset indent
|
2011-12-09 16:49:26 -06:00
|
|
|
$ sndiod -r 48000 -z 400 -s default -t slave -s mmc
|
2010-08-19 15:38:45 -05:00
|
|
|
.Ed
|
|
|
|
.Pp
|
2012-12-03 10:37:08 -06:00
|
|
|
Programs using
|
2011-11-14 01:52:48 -06:00
|
|
|
.Va snd/0
|
2012-12-03 10:37:08 -06:00
|
|
|
behave normally, while programs using
|
2011-11-14 01:52:48 -06:00
|
|
|
.Va snd/0.mmc
|
2010-08-19 15:38:45 -05:00
|
|
|
wait for the MMC start signal and start synchronously.
|
2012-12-03 10:37:08 -06:00
|
|
|
Then, the following command will play a file on the
|
2011-11-14 01:52:48 -06:00
|
|
|
.Va snd/0.mmc
|
2012-12-03 10:37:08 -06:00
|
|
|
audio device, giving full control to MIDI software or hardware
|
2010-08-19 15:38:45 -05:00
|
|
|
connected to the
|
2012-12-03 10:37:08 -06:00
|
|
|
.Va midithru/0
|
2011-10-17 17:29:58 -05:00
|
|
|
MIDI port:
|
2010-08-19 15:38:45 -05:00
|
|
|
.Bd -literal -offset indent
|
2011-11-14 01:52:48 -06:00
|
|
|
$ aucat -f snd/0.mmc -t slave -q midithru/0 -i file.wav
|
2010-08-19 15:38:45 -05:00
|
|
|
.Ed
|
|
|
|
.Pp
|
|
|
|
At this stage,
|
|
|
|
.Nm
|
|
|
|
will start, stop and relocate automatically following all user
|
2012-12-03 10:37:08 -06:00
|
|
|
actions in the MIDI sequencer, assuming it's configured to
|
|
|
|
transmit MMC on
|
|
|
|
.Va midithru/0 .
|
|
|
|
Furthermore, the MIDI sequencer could be configured to use the
|
2011-11-14 01:52:48 -06:00
|
|
|
.Va snd/0
|
2012-12-03 10:37:08 -06:00
|
|
|
port as MTC clock source, assured to be synchronous to playback of
|
|
|
|
.Pa file.wav .
|
2010-08-19 15:38:45 -05:00
|
|
|
.Sh EXAMPLES
|
2011-05-03 02:10:45 -05:00
|
|
|
Mix and play two stereo streams,
|
2010-08-19 15:38:45 -05:00
|
|
|
the first at 48kHz and the second at 44.1kHz:
|
|
|
|
.Bd -literal -offset indent
|
|
|
|
$ aucat -r 48000 -i file1.raw -r 44100 -i file2.raw
|
|
|
|
.Ed
|
|
|
|
.Pp
|
2011-05-03 02:10:45 -05:00
|
|
|
Record channels 2 and 3 into one stereo file and
|
2010-08-19 15:38:45 -05:00
|
|
|
channels 6 and 7 into another stereo file using a 96kHz sampling rate for
|
|
|
|
both:
|
|
|
|
.Bd -literal -offset indent
|
2011-06-03 04:07:16 -05:00
|
|
|
$ aucat -j off -r 96000 -C 2:3 -o file1.raw -C 6:7 -o file2.raw
|
2010-08-19 15:38:45 -05:00
|
|
|
.Ed
|
|
|
|
.Pp
|
2011-05-03 02:10:45 -05:00
|
|
|
Split a stereo file into two mono files:
|
2010-08-19 15:38:45 -05:00
|
|
|
.Bd -literal -offset indent
|
2011-10-13 06:32:32 -05:00
|
|
|
$ aucat -n -j off -i stereo.wav -C 0:0 -o left.wav -C 1:1 \e
|
|
|
|
-o right.wav
|
2010-08-19 15:38:45 -05:00
|
|
|
.Ed
|
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr audioctl 1 ,
|
|
|
|
.Xr cdio 1 ,
|
|
|
|
.Xr mixerctl 1 ,
|
2012-12-03 10:37:08 -06:00
|
|
|
.Xr sndiod 1 ,
|
2010-08-19 15:38:45 -05:00
|
|
|
.Xr audio 4 ,
|
|
|
|
.Xr sndio 7
|
|
|
|
.Sh BUGS
|
|
|
|
Resampling is low quality; down-sampling especially should be avoided
|
|
|
|
when recording.
|
|
|
|
.Pp
|
|
|
|
Processing is done using 16-bit arithmetic,
|
|
|
|
thus samples with more than 16 bits are rounded.
|
|
|
|
16 bits (i.e. 97dB dynamic) are largely enough for most applications though.
|