TSUNRIFF(1) TSUNRIFF(1) NAME tsunriff - construct a RIFF/WAVE file for a music CD from a time series SYNOPSIS tsunriff [-p] [-v] headerfile [infile.txt [outfile.wav]] DESCRIPTION Tsriff is a RIFF WAVE translator-translates a file consisting of a time series of numbers-each record in the 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; the out- put is a RIFF file for a music CD track. Tsunriff does the exact opposite of tsriff(1), it takes the time series output of tsriff(1) and makes a RIFF/WAVE file out of it. For example: tsriff myfile.wav | tsunriff myfile.wav new.wav where the files, myfile.wav and new.wav, should be identical-the header for the file, new.wav, was copied from the original, myfile.wav by the tsunriff program, (however, the -H option to the tsriff(1) program could be used if the header needs to be manipulated.) Other programs may be placed in the "pipe" for digital filtering, etc. The output file size of the tsriff(1) program is very large, (some- times, hundreds of MB,) and a Unix "pipe" is an attractive alternative methodology for dealing with large files. There is one mandatory argument, the name of the header file. The header file contains the first 56 Bytes of the RIFF/WAVE music file, and could have been made with the tsriff(1) program, or copied from the original RIFF/WAVE CD track. 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 copies it, and the music data fol- lows 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. OPTIONS -p Print data about PCM values. -v Print the version and copyright banner of the program. headerfile Header filename, contains the 56 Byte RIFF/WAVE header from a CD music track, (required argument.) infile.txt Input filename of text PCM data, (defaults to STDIN). outfile.wav Output RIFF/WAVE filename for 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 TSUNRIFF(1)