1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>
sndfile-tools
</TITLE>
<META NAME="Author" CONTENT="Erik de Castro Lopo (erikd AT mega-nerd DOT com)">
<META NAME="Version" CONTENT="sndfile-tools-1.5">
<LINK REL=StyleSheet HREF="libsndfile.css" TYPE="text/css" MEDIA="all">
</HEAD>
<BODY>
<!-- pepper -->
<H1><BR>sndfile-tools</H1>
<!-- pepper -->
<P>
Sndfile-tools is a small collection of programs that use libsndfile and other
libraries to do useful things.
The collection currently includes the following programs:
</P>
<!-- pepper -->
<UL>
<LI><a href="#generate-chirp">sndfile-generate-chirp</a>
<LI><a href="#jackplay">sndfile-jackplay</a>
<LI><a href="#spectrogram">sndfile-spectrogram</a>
<LI><a href="#mix-to-mono">sndfile-mix-to-mono</a>
</UL>
<p>
The sndfile-tools package is released under the terms of the
<A HREF="http://www.gnu.org/copyleft/gpl.html">
GNU General Public License</a>
(version 2 or version 3).
</p>
<p>
The latest version is 1.5 and it can be downloaded here:
<A HREF="https://github.com/libsndfile/sndfile-tools/releases/download/1.5/sndfile-tools-1.5.tar.bz2">
sndfile-tools-1.5.tar.bz2</a>
(<A HREF="https://github.com/libsndfile/sndfile-tools/releases/download/1.5/sndfile-tools-1.5.tar.bz2.sig">
GPG signature</a>).
</p>
<p>
It should be trivial to compile on Linux and relatively easy to compile on
other Unices (including Mac OSX).
Its probably possible to compile it on windows, but why would anyone bother?
</p>
<!-- pepper -->
<br /><br />
<A NAME="generate-chirp"></a>
<H3><B>sndfile-generate-chirp</B></H3>
<p>
Create a sound file containing a swept sine wave (ie a chirp).
</p>
<pre>
sndfile-generate-chirp [options] <sample rate> <length in seconds> <sound file>
Options include:
-from <start> Sweep start frequency in Hz (default 200Hz).
-to <end> Sweep end frequency in Hz (default fs/2).
-amp <value> Amplitude of generated sine (default 1.0).
<sweep type> One of (default -log):
-log logarithmic sweep
-quad quadratic sweep
-linear linear sweep
The output file will contain floating point samples in the range [-1.0, 1.0].
The output file type is determined by the file name extension which should be one
of 'wav', 'aifc', 'aif', 'aiff', 'au', 'caf' and 'w64'.
</pre>
<!-- pepper -->
<br /><br />
<A NAME="jackplay"></a>
<H3><B>sndfile-jackplay</B></H3>
<p>
Play a sound file via the JACK Audio Connect Kit daemon.
</p>
<pre>
sndfile-jackplay <filename>
</pre>
<!-- pepper -->
<br /><br />
<A NAME="spectrogram"></a>
<H3><B>sndfile-spectrogram</B></H3>
<P>
Generate a spectrogram as a PNG file from a given sound file.
</P>
<!-- pepper -->
<pre>
sndfile-spectrogram <sound file> <img width> <img height> <png name>
</pre>
<!-- pepper -->
<p>
This program (in conjunction with sndfile-generate-chirp) is particularly useful
for evaluating the quality of sample rate converters.
For instance, a chirp can be generated at 96kHz, passed through the converter
and a spectrogram generated for the converter output file. For example:
</p>
<br/>
<!-- pepper -->
<center>
<img src="sweep.png" alt="Example spectrogram" />
</center>
<!-- pepper -->
<br /><br />
<A NAME="mix-to-mono"></a>
<H3><B>sndfile-mix-to-mono</B></H3>
<!-- pepper -->
<P>
Convert a multi-channel input file to a mono output file, by mixing all input
channels into one.
</P>
<!-- pepper -->
<PRE>
sndfile-mix-to-mono <input file> <output file>
</PRE>
<!-- pepper -->
</BODY>
</HTML>
|