DAT2WAV
Section: User Commands (1)
Updated: July 2012
Index
Return to Main Contents
NAME
dat2wav - convert data file to audio file
SYNOPSIS
This reads in a data-file (containing one or more columns of int/float data), and selects any specified column, or all, or sum.
The data is normalised (or with gain), the DC-level is removed, it loops (optionally), defines the samplerate, and saves to 32-bit wav file.
DESCRIPTION
dat2wav: read in a data-file, and convert it to a 32-bit WAV file.
USAGE: dat2wav.py [OPTS] infile.dat outfile.wav
OPTIONS: -f, --samplefreq FREQ define the (integer) sampling frequency in Hz. [default: 10,000].
-g, --gain G,normalise apply a signal gain of G, (or normalise). [default: normalise].
-c, --column N,sum,all use Nth column's data (N is 0-based). [default: all].
-d, --keepdc keep the DC offset. [default: subtract offset].
-l, --loop N loop N times, concatenating result. [default: 1].
-x, --overwrite allow overwriting an existing output file [default: no].
-h, --help show help.
INPUT: Input file, infile.dat ('-' for stdin) should be columns of (int/float) data, separated by
whitespace, with optional #comments, i.e. the standard form for numpy.loadfile(). cf. genffttest.
(compressed files (.gz/.bz2) can also be read transparently, no need to uncompress first.)
NOTES: * This is useful to view the output in a wav editor, (e.g. 'audacity') or hear it (e.g. 'play').
* It's also much easier to *hear* certain types of noise than to see it in an FFT spectrum.
* The sample frequency should be chosen to optimise listening, not necessarily the original value.
* Normalisation sets the peak to 0.707, rather than to 1, so as to avoid distortion during playback.
* To see the raw data, use '-d -g 1'.
AUTHOR
The author of dat2wav and this manual page is Richard Neill, <maths#AT(spamblock)#richardneill.org>
Copyright July 2012; this is Free Software (GPL v3+), see the source for copying conditions.
SEE ALSO
fftplot(1),
linregplot(1),
cam2dat(1),
audacity(1),
ni4462_test(1)
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- AUTHOR
-
- SEE ALSO
-
This document was created by
man2html,
using the manual pages.
Time: 18:34:19 GMT, November 11, 2013