About
Software
Services
Ideas
Rants
nklein logo

beatMachine

Overview

This program takes in an input binary Portable Graymap Map to use for a single slap of the ``drum''. It also takes in a stream on standard input. The volume at any point is taken from the average of all columns in the input stream. If the zero-th column of the input stream is dominant (largest), beats will be generated at a specified rate. If the first column of the input stream is dominant, beats will be generated at twice the specified rate. If the second column of the input is dominant, beats will be generated at four times the specified rate. In general, the n-th column being dominant results in beats being generated at 2^n times the specified rate.

The output is a stream that is the width of the input image.

You probably want to keep the width of the input stream small and the length of the input image short.

Options

-file imageFileName
The name of the input image file. This argument is required and has no default.
[-lpb linesPerBeat]
This specifies the number of lines to output between starts of beats while the zero-th coordinate of the input stream is dominant. The default is 128. For example, if the zero-th coordinate is dominant and this parameter is defaulted to 128, a new beat will be started every 128 lines. Thus, if the input image is 64 lines long, there will be 64 lines of image, 64 lines of quiet, 64 lines of of image, 64 lines of quiet, etc.
[-thresh threshold]
If the average input sample (scaled down to [0.0,1.0]) is below this value, no beats will be emitted. The default is 0.01.
[-gain gain]
This is a scaling factor that is applied to the output before it is clipped to [0,1]. The default value is 1.0.

(copyright 2001) (gpg keys)

Valid XHTML 1.0! Valid CSS!