TSRIFF(1) TSRIFF(1) NAME tsriff - construct a time series from a RIFF/WAVE file from a music CD SYNOPSIS tsriff [-H headerfile] [-p] [-v] [infile.wav [outfile.txt]] DESCRIPTION Tsriff is a RIFF WAVE translator-translates a RIFF file from a music CD, into a time series of numbers-each record in the output time series is two tab delimited numbers; the first number is the PCM magnitude for stereo channel one, the second number is the PCM magnitude for stereo channel two. Tsriff is a RIFF WAVE translator-translates a RIFF file from a music CD, on STDIN, into a time series of numbers on STDOUT-each record in the output time series is a tab delimited file of two numbers; the first number is stereo channel one, the second number is stereo channel two. Programmers note: the program makes some very basic assumptions about the construction of a RIFF/WAVE CD music file; it is assumed that the header is 56 Bytes, (the program just skips it,) and the music data follows the header, (to the end of the file,) in 2 Byte short integers per PCM sample, interleaved between stereo channel 1 and channel 2. The program uses a standard ANSI "C" union to read 2 Bytes, (as unsigned characters,) which is then interpreted as a short signed integer, (e.g, 2 Bytes,) in the Intel/IBM architecture Byte order. User's note: the file is tab/table delimited between channel 1 and channel 2 stereo; to get channel 1, use the Unix cut(1) command, "cut -f1 ..." and "cut -f2 ..." for channel 2. OPTIONS -H headerfile Output header filename, contains the 56 Byte RIFF/WAVE header from a CD music track. -p Print data about PCM values. -v Print the version and copyright banner of the program. infile.wav Input RIFF/WAVE filename, from a CD music track, (defaults to STDIN). outfile.txt Output filename of text PCM data, from a CD music track, (defaults to STDOUT). WARNINGS There is little or no provision for handling numerical exceptions. SEE ALSO tsriff(1), tsunriff(1), tsheadphone(1) DIAGNOSTICS Error messages for incompatible arguments, failure to allocate memory, inaccessible files, and opening and closing files. AUTHORS ---------------------------------------------------------------------- A license is hereby granted to reproduce this software source code and to create executable versions from this source code for personal, non-commercial use. The copyright notice included with the software must be maintained in all copies produced. THIS PROGRAM IS PROVIDED "AS IS". THE AUTHOR PROVIDES NO WARRANTIES WHATSOEVER, EXPRESSED OR IMPLIED, INCLUDING WARRANTIES OF MERCHANTABILITY, TITLE, OR FITNESS FOR ANY PARTICULAR PURPOSE. THE AUTHOR DOES NOT WARRANT THAT USE OF THIS PROGRAM DOES NOT INFRINGE THE INTELLECTUAL PROPERTY RIGHTS OF ANY THIRD PARTY IN ANY COUNTRY. Copyright (c) 1994-2005, John Conover, All Rights Reserved. Comments and/or bug reports should be addressed to: john@email.johncon.com (John Conover) ---------------------------------------------------------------------- January 19, 2005 TSRIFF(1)