<html><head><meta http-equiv="Content-type" content="text/html; charset=iso-8859-1">
<title>Audio stream mixing tools</title>
<style type="text/css"><!--
TABLE.toc {border:0px}
A:link,A:visited{text-decoration:none;color:#2A3B83}
A:hover{text-decoration:underline;color:#002040}
A:active{text-decoration:underline;color:#004060;background:#CCD8FF}
TD.toc {font-size:80%; font-family:Tahoma; text-align:left}
H1 {font-size:250%; font-weight:bold} .level1 {text-align:center}
H2 {font-size:200%; font-weight:bold} .level2 {margin-left:1%}
H3 {font-size:160%; font-weight:bold} .level3 {margin-left:2%}
H4 {font-size:145%; font-weight:bold} .level4 {margin-left:3%}
H5 {font-size:130%; font-weight:bold} .level5 {margin-left:4%}
H6 {font-size:110%; font-weight:bold} .level5 {margin-left:5%}
BODY{background:white;color:black}
CODE{font-family:lucida console,courier new,courier;color:#105000}
PRE.smallerpre{font-family:lucida console,courier new,courier;font-size:80%;color:#500010;margin-left:30px}
SMALL {font-size:70%}
.nonmail { visibility:hidden;position:absolute; top:0px;left:0px }
.ismail { font-weight:normal }
--></style></head>
<body>
<h1>Audio stream mixing tools</h1>
<h2 class=level2> 0. Contents </h2>
This is the documentation of streamixer-1.19.2. <div class=toc><table cellspacing=0 cellpadding=0 class=toc><tr><td width="50%" valign=middle align=left nowrap class=toc> 1. <a href="h0">Program list</a><br> 1.1. <a href="mixer">mixer</a><br> 1.2. <a href="mixmon">mixmon</a><br> 1.3. <a href="mixwrite">mixwrite</a><br> 1.4. <a href="resample">resample</a><br> 1.5. <a href="mixeridle">mixeridle</a><br></td> <td width="50%" valign=middle align=left nowrap class=toc> 1.6. <a href="ecat">ecat</a><br> 1.7. <a href="mixerscript">mixerscript</a><br> 2. <a href="h1">Requirements</a><br> 3. <a href="h2">Installation</a><br> 4. <a href="h3">Copying</a><br> 5. <a href="download">Downloading</a><br></td> </tr></table></div><H2 id="h0" class="level2"><a name="h0"></a>1. Program list</H2><div class="level2" id="divh0">
This package contains several audio stream tool programs
for little-endian systems.
<p>
Note that none of these programs (except <a href="#ecat">ecat</a>)
talk directly with a soundcard. They only handle raw audio streams.
</div><H3 id="mixer" class="level3"><a name="mixer"></a>1.1. mixer</H3><div class="level3" id="divmixer">
A stream mixing server. It accepts <a href="mixwrite">mixwrite</a> and <a href="mixmon">mixmon</a> -connections. <br>Provides a server for audio stream mixing.<br> Meant to be a replacement for esd, with much more features and much less cpu usage.
</div><H3 id="mixmon" class="level3"><a name="mixmon"></a>1.2. mixmon</H3><div class="level3" id="divmixmon">
Monitors the mixer over a tcp connection, reading whatever is being mixed to it.
</div><H3 id="mixwrite" class="level3"><a name="mixwrite"></a>1.3. mixwrite</H3><div class="level3" id="divmixwrite">
Sends stream to the mixer over a tcp connection.
</div><H3 id="resample" class="level3"><a name="resample"></a>1.4. resample</H3><div class="level3" id="divresample">
Resamples audio stream from one format to another format, trying to not produce resampling artifacts.
<pre class=smallerpre>resample v1.19.1 - Copyright (C) 1992,2003 Bisqwit (http://iki.fi/bisqwit/) Portions copyright (C) 2001 ImageMagick Studio. This program is under GPL. streamixer-1.19.1.tar.{gz,bz2} are available at the homepage of the author.
Usage: /usr/local/bin/resample <inputspec> <outputspec> [<options> ...]
Reads stdin, writes stdout.
input- and outputspec:
b=8-bit, m=mono, rxxx=xxx Hz, examples:
"" = 16-bit 44100 Hz stereo
m = 16-bit 44100 Hz mono
b = 8-bit 44100 Hz stereo
mb = 8-bit 44100 Hz mono
mr22050 = 16-bit 22050 Hz mono
br22050 = 8-bit 22050 Hz stereo
etc. '-' is optional.
- Options
- -V, --version Version information
-b, --blur <num> blur: 0=normal, >0=blur
(note: blurring requires cpu power.) -f, --filter <filter> Select filter of the following:
none, linear (default), triangle, hermite, hanning, hamming, blackman, gaussian, quadratic, cubic, catrom, mitchell, lanczos, bessel, sinc -h, --help Help -s, --sharpen <num> sharpen: 0=normal, >0=sharper
(note: blurring and sharpening are exclusive.) --lflip Flip left channel --rflip Flip right channel --ldouble Multiply left channel amplitude by 2 --rdouble Multiply right channel amplitude by 2 </pre>
</div><H3 id="mixeridle" class="level3"><a name="mixeridle"></a>1.5. mixeridle</H3><div class="level3" id="divmixeridle">
Generates idle stream for the mixer, if there are readers for the mixer but no writers.<br> Actually has been hardcoded to play something nasty... you should probably customize it :)<br> <em>Note that if mixeridle fails to produce anything, mixer will hang waiting.</em>
</div><H3 id="ecat" class="level3"><a name="ecat"></a>1.6. ecat</H3><div class="level3" id="divecat">
Outputs its stdin to the audio device (/dev/dsp for example)
with the specified bitness, stereo and sampling rate. Useful
backend to the mixer (with mixmon).<br>
This finally obsoletes my previous hack to do the same:
<pre class=smallerpre>... | <a href="http://www.sulaco.org/mp3/"
>lame</a> -rxdh -b 128 - - | <a href="http://www.mpg123.org/"
>mpg123</a> -q -</pre>
<p>
Here's a nice experiment to lower music pitch:
<pre class=smallerpre
>$ <a href="http://bisqwit.iki.fi/get/src/spcplay-1.39bisq.tar.gz"
>spcplay</a> -r60000 -uao- ff5-world2.spc |ecat
File: <a href="http://bisqwit.iki.fi/get/kala/spc/ff5/ff5-world2.spc"
>ff5-world2.spc</a>
Song: Unknown Lands Game: Final Fantasy V
Comments: http://members.xoom.com/oksam_ff Author: Nobuo Uematsu, Squaresoft
Dumper: AtLaS Playtime: 0 Fadetime: 0 Emulator: Unknown (102) Rate 70 Volume 100 12345678</pre>
And this plays two songs at the same time:
<pre class=smallerpre
>$ mixer &
$ mixmon|ecat &
$ mpg123 -s 01-Trust.mp3 |mixwrite &
$ mpg123 -s 14-DesperateFeelings.mp3 |mixwrite &</pre>
(total CPU load being around 25% with my 233 MHz laptop)
<p>
Hint: Sound card usually can't play arbitrary sampling rates.
Use <a href="#resample">resample</a> together with ecat to help.
<pre class=smallerpre
>$ <a href="http://www.mpg123.org/">mpg123</a> -r34500 -qvvs /mp3/OwaranaiNatsu.mp3 |ecat
Using memory mapped IO for this stream.
No supported rate found!
$ mpg123 -qvvs /mp3/OwaranaiNatsu.mp3 |resample r44100 r34500 -f lanczos|ecat Using memory mapped IO for this stream. Audio: 1:1 conversion, rate: 44100, encoding: signed 16 bit, channels: 2 128 kb/s - frame# 4215 [ 6300], Time: 01:50.10 [02:44.57], </pre> This example upsampled 44.1 kHz stream a happy 28% and played it with 44.1 kHz sampling rate, still not damaging the sound hearably. Try "none" as the filter (that's what most programs do) and you really do hear the difference. Try "linear" as the filter (that's what most programs do when they are "interpolating") and it's still not as good as it is when more modern filters are being used.
</div><H3 id="mixerscript" class="level3"><a name="mixerscript"></a>1.7. mixerscript</H3><div class="level3" id="divmixerscript">
Mixes 16-bit stereo streams together in a predefined exact way.<br> Useful if you want to mix some wavs together.<br> A time offset may be defined.
<pre class=smallerpre>mixerscript v1.19.1 - Copyright (C) 1992,2003 Bisqwit (http://iki.fi/bisqwit/) This program is under GPL. streamixer-1.19.1.tar.{gz,bz2} are available at the homepage of the author.
Usage: /usr/local/bin/mixerscript {<option> | <command>}
Writes stdout.
Note: All streams must be 16-bit stereo.
Pipe the stream with resample program if this isn't the case... Specify streams as commands which output the data.
Example: mixerscript -t0 'sox tmp.wav -t raw -' \
-t0.2 'mpg123 -s test.mp3' > test.raw
- Options
- -V, --version Version information -b, --blocksize <float> Set maxblocksize (default: 0.2) - experts only -h, --help Help -r, --rate <int> Set global sampling rate in hertz (defalt: 44100) -t, --at <float> Set time offset of the next element (default: 0) -v, --volume <float> Set mixing volume of the next element (default: 1) </pre>
</div><H2 id="h1" class="level2"><a name="h1"></a>2. Requirements</H2><div class="level2" id="divh1">
GNU make is probably required.<br>
</div><H2 id="h2" class="level2"><a name="h2"></a>3. Installation</H2><div class="level2" id="divh2">
<pre class=smallerpre
>$ make
$ su
# make install</pre>
If you do not want to install
<a href="http://oktober.stc.cx/source/libargh.html">libargh</a>
(included in the archive), do not use "make install" and edit
Makefile and enable the STATIC linking instead of DYNAMIC.
</div><H2 id="h3" class="level2"><a name="h3"></a>4. Copying</H2><div class="level2" id="divh3">
These tools have been written by Joel Yliluoma, a.k.a. <a href="http://iki.fi/bisqwit/">Bisqwit</a>,<br> and are distributed under the terms of the <a href="http://www.gnu.org/licenses/licenses.html#GPL">General Public License</a> (GPL).
<p>
Note: If you want to look at earlier versions, have a look at
<a href="http://oktober.stc.cx/source/wavegenerator.html">wavegenerator</a>.
The earlier versions were together in a same archive.
</div><H2 id="download" class="level2"><a name="download"></a>5. Downloading</H2><div class="level2" id="divdownload">
The official home page of streamixer
is at <a href="http://iki.fi/bisqwit/source/streamixer.html">http://iki.fi/bisqwit/source/streamixer.html</a>.<br>
Check there for new versions.
</div> <p align=right><small>Generated from
<tt>progdesc.php</tt> (last updated: Thu, 06 Mar 2003 15:27:09 +0200)<br>
with <tt>docmaker.php</tt> (last updated: Sat, 22 Jan 2005 05:01:19 +0200)<br>
at Tue, 31 May 2005 18:47:32 +0300</small>
</p>
</body>
</html>
