
This program listens to an audio device, and when a sample greater than the specified
magnitude is received, it saves the surrounding second of samples to a text file
named eventXXXX.dat (where XXXX is the number of the event).

The sensor attached to the mic input is a generic photo-transistor I found in my
junk^H^H^H^H parts box.  No amplifier or anything.  NPN, with the emitter to GND I
think. (reverse it if it doesn't work. :-)

The format of the dat file is a simple text file, the first column is the timestamp
in samples (default 48 kHz), the second column is the audio sample, 16 bits linear
signed.

Its intended to be plotted with gnuplot.  Use the command
plot "eventXXXX.dat" with line .

There are a couple of other scripts for pondering the event files:

makeslopes - takes all the event files, and makes event.slope files, where the
audio sample is replaced with the delta from the last audio sample.  (the first
one is 0.)

makegraphs - takes all the event files, finds the distribution of the samples, and
generates three files:
	mins (containing the minimum samples for each event)
	maxs (containing the maximum samples) 
	stddevs (containing the standard deviations)

stats - used by makegraphs, spits out the min, mean, standard deviation, and max of its stdin.
(this is one of my usual tools...)

decode - This one doesn't actually work.  Its a half-baked attempt to decode the
hour meter of a 315M laser.

This is known to work under FreeBSD 8.0.  I haven't tested it under anything else.  It
should work on any OS which has the OSS API.

I may be reached at tjohnson@bobdbob.com

Copyright (C) 2011 Tommy Johnson

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or (at
your option) any later version.

This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

