soundgrab1
Interactively select and save sections of an audio file
Usage
soundgrab [option] ...
[file]
Overview
soundgrab is a perl script which runs the rawrec and sox and possibly the oggenc and flac executables to let the user play back a raw audio file and interactively select and export portions of the file to other files. By default, the input file should contain 2 interleaved channels of signed 16 bit little endian raw audio data sampled at 44.1 kHz. A variety of output formats are available (some depend on the presence of certain encoder binaries in the users path).
Options and arguments
-bKBITRATE,--ogg-kbitrate=KBITRATE-
Files exported in the Ogg Vorbis lossy compression format should use approximately KBITRATE kilobits per second encoding.
--ogg-bitrate=KBITRATE-
Deprecated. Use
--ogg-kbitrateinstead.
-cICHANNELS,--channels=CHANNELS-
The file on which soundgrab is to operate contains CHANNELS-channel data. One channel is mono, two is stereo. Modern sound cards may support 4 or more channels. The default is 2.
-d, DEVICE,--audio-device=DEVICE-
Use DEVICE instead of the default /dev/dsp.
-f, OFMT,--outpuf-file-format=OFMT-
The arguments to the export command (see online help) that do not end in a known dot extension should be saved in format OFMT in a file with the appropriate dot extension appended. OFMT may be one of the following strings:
cdr-
CD Mastering format. This is two channel unsigned sixteen bit little endian data with some blocking and padding.
flac-
FLAC lossless compressed format.
ogg-
Ogg vorbis lossy compressed format.
raw-
Raw data samples in the format specified with the
input-sample-formatoption at the sampling rate specified with thesampling-rateoption and containing the number of channels specified with thechannelsoption. If any of these options were not specied the default for that option is used.
The default for this option is
cdr. The flac and ogg formats are only available if the appropriate encoder is present on the system.
-iIFMT,--input-sample-format=IFMT-
The samples for the individual channels in the argument file are in format IFMT, where IFMT is one of the following strings:
s16_le-
Signed sixteen bit little endian format.
u8-
Unsigned eight bit.
-sSPEED,--sampling-rate=SPEED-
The data in the argument file was sampled at SPEED samples per second.
-tTIME,--time-of-start=TIME-
Recording of the volume to be dissected was begun at time TIME. If this option is used, it will be possible to jump to 'times' in the volume. The format of the time string is the same as the format described in the output of the online command 'help jump', except day offsets are not allowed.
-v,--verbose-
Enable verbose operation.
--version-
Print version information and exit.
The single optional argument file indicates the file name of the volume to be dissected.
Interactive commands
soundgrab acts like a tape player with almost instantaneous fast forward and rewind, the capability to jump to a particular point in the tape, and the capability to name and save sections of the tape to other files. You can also browse through large volumes of audio, playing only some number of seconds and then skipping some number of seconds. The few commands required to do all these things are all documented online, just fire up soundgrab on an appropriate file of raw audio data and type 'help'.
Examples
Use the at and rawrec programs to record your hour long two oclock radio show which airs March 5, go to work, then come home later and save your favorite bits with soundgrab:
# Set mixer parameters to record from line in.aumix -f ~/.my_line_rec_settings -Lecho 'rawrec -t 3600 two_oclock_show.raw' ⎪ at 14:00 Mar 5# I just wanna bang on the drum all day...# Set mixer parameters to allow playback of dsp data,# probably just by setting the gain for the line input# to 0.aumix -f ~/.my_dsp_play_settings -L# and dissect with soundgrab.soundgrab two_oclock_show.raw
Of course you have to have a working /dev/dsp (sound driver), appropriate mixer settings (I recommend the aumix program), enough disk space, and a tuned receiver plugged into your sound card. But remember that setting that stuff up isn't work 'cause nobody is making you do it.
History
- Debian 3.1 (Sarge): the text shown here
- Debian 3.0 (Woody)
--audio-device until Debian 3.0 (Woody);
--bitrate until Debian 3.0 (Woody);
--channels until Debian 3.0 (Woody);
--input-sample-format until Debian 3.0 (Woody);
--output-file-format until Debian 3.0 (Woody);
--sampling-rate until Debian 3.0 (Woody);
--time-of-start until Debian 3.0 (Woody);
--verbose until Debian 3.0 (Woody);
--version until Debian 3.0 (Woody);
-b until Debian 3.0 (Woody);
-c until Debian 3.0 (Woody);
-d until Debian 3.0 (Woody);
-f until Debian 3.0 (Woody);
-i until Debian 3.0 (Woody);
-s until Debian 3.0 (Woody);
-t until Debian 3.0 (Woody);
-v until Debian 3.0 (Woody).