home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast2.iso / windows3 / mtlabsnd.zip / SOX.MAN < prev    next >
Text File  |  1993-04-26  |  11KB  |  397 lines

  1. .de Sh
  2. .br
  3. .ne 5
  4. .PP
  5. \fB\\$1\fR
  6. .PP
  7. ..
  8. .de Sp
  9. .if t .sp .5v
  10. .if n .sp
  11. ..
  12. .TH SOX 1
  13. .SH NAME
  14. sox - SOund eXchange - universal sound sample translator
  15. .SH SYNOPSIS
  16. .B sox \fIinfile outfile \fB
  17. .br
  18. .B sox \fIinfile outfile \fB[ \fIeffect\fR 
  19. .B [ \fIeffect options ...\fB ] ]
  20. .br
  21. .B sox \fIinfile \fB-e \fIeffect\fR 
  22. .B [ \fIeffect options ...\fB ]
  23. .br
  24. .B sox
  25. [\fI general options \fB ]
  26. [ \fIformat options \fB ]
  27. \fIifile\fB 
  28. [ \fIformat options \fB ]
  29. \fIofile\fB 
  30. [ \fIeffect\fR [ \fIeffect options ...\fB ] ]
  31. .br
  32. \fIGeneral options:\fB
  33. [ -V ]
  34. [ -v \fIvolume\fB ]
  35. .br
  36. \fIFormat options:\fB
  37. [ \fB-t \fIfiletype\fB ]
  38. [ -r \fIrate\fB ]
  39. [ -s/-u/-U/-A ]
  40. [ -b/-w/-l/-f/-d/-D ]
  41. [ -c \fIchannels\fB ]
  42. [ -x ]
  43. .br
  44. \fIEffects:\fB
  45. .br
  46.     copy 
  47. .br
  48.     rate 
  49. .br
  50.     avg 
  51. ." .br
  52. ."     resample
  53. ." .br
  54. ."     check 
  55. .br
  56.     stat 
  57. .br
  58.     echo \fIdelay volume\fB [ \fIdelay volume ... \fB]
  59. .br
  60.     vibro \fIspeed \fB[ \fIdepth\fB ]
  61. .br
  62.     lowp \fIcenter\fB
  63. .br
  64.     band \fB[ \fI-n \fB] \fIcenter \fB[ \fIwidth\fB ]
  65. .SH DESCRIPTION
  66. .I Sox
  67. translates sound files from one format to another,
  68. possibly doing a sound effect.
  69. .SH OPTIONS
  70. The option syntax is a little grotty, but in essence:
  71. .br
  72.     sox file.au file.voc 
  73. .br
  74. translates a sound sample in SUN Sparc .AU format 
  75. into a SoundBlaster .VOC file, while
  76. .br
  77.     sox -v 0.5 file.au -rate 12000 file.voc rate
  78. .br
  79. does the same format translation but also 
  80. lowers the amplitude by 1/2 and changes
  81. the sampling rate from 8000 hertz to 12000 hertz via
  82. the
  83. .B rate
  84. \fIsound effect\fR loop.
  85. .PP
  86. File type options:
  87. .TP 10
  88. \fB-t\fI filetype
  89. gives the type of the sound sample file.
  90. .TP 10
  91. \fB-r \fIrate\fR
  92. Give sample rate in Hertz of file.
  93. .TP 10
  94. \fB-s/-u/-U/-A\fR
  95. The sample data is signed linear (2's complement),
  96. unsigned linear, U-law (logarithmic), or A-law (logarithmic).
  97. U-law and A-law are the U.S. and international
  98. standards for logarithmic telephone sound compression.
  99. .TP 10
  100. \fB-b/-w/-l/-f/-d/-D\fR
  101. The sample data is in bytes, 16-bit words, 32-bit longwords,
  102. 32-bit floats, 64-bit double floats, or 80-bit IEEE floats.
  103. Floats and double floats are in native machine format.
  104. .TP 10
  105. \fB-x\fR
  106. The sample data is in XINU format; that is,
  107. it comes from a machine with the opposite word order 
  108. than yours and must
  109. be swapped according to the word-size given above.
  110. Only 16-bit and 32-bit integer data may be swapped.
  111. Machine-format floating-point data is not portable.
  112. IEEE floats are a fixed, portable format. ???
  113. .TP 10
  114. \fB-c \fIchannels\fR
  115. The number of sound channels in the data file.
  116. This may be 1, 2, or 4; for mono, stereo, or quad sound data.
  117. .PP
  118. General options:
  119. .TP 10
  120. \fB-e\fR
  121. after the input file allows you to avoid giving
  122. an output file and just name an effect.
  123. This is only useful with the 
  124. .B stat
  125. effect.
  126. .TP 10
  127. \fB-v \fIvolume\fR
  128. Change amplitude (floating point); 
  129. less than 1.0 decreases, greater than 1.0 increases.
  130. Note: we perceive volume logarithmically, not linearly.
  131. Note: see the
  132. .B stat
  133. effect.
  134. .TP 10
  135. \fB-V\fR
  136. Print a description of processing phases.
  137. Useful for figuring out exactly how
  138. .I sox
  139. is mangling your sound samples.
  140. .PP
  141. The input and output files may be standard input and output.
  142. This is specified by '-'.
  143. The 
  144. .B -t\ \fItype
  145. option must be given in this case,
  146. else 
  147. .I sox 
  148. will not know the format of the given file.
  149. The
  150. .B -t,
  151. .B -r,
  152. .B -s/-u/-U/-A,
  153. .B -b/-w/-l/-f/-d/-D
  154. and
  155. .B -x
  156. options refer to the input data when given before the
  157. input file name.  After, they refer to the output data.
  158. .PP
  159. If you don't give an output file name,
  160. .I sox
  161. will just read the input file.
  162. This is useful for validating structured file formats;
  163. the 
  164. .B stat 
  165. effect may also be used
  166. via the 
  167. .B -e
  168. option.
  169. .SH FILE TYPES
  170. .I Sox
  171. needs to know the formats of the input and output files.
  172. File formats which have headers are checked, 
  173. if that header doesn't seem right,
  174. the program exits with an appropriate message.
  175. Currently, the raw (no header), IRCAM Sound Files,
  176. Sound Blaster, SPARC .AU (w/header), Mac HCOM,
  177. PC/DOS .SOU, Sndtool, and Sounder, NeXT .SND,
  178. Windows 3.1 RIFF/WAV,
  179. and Amiga/SGI AIFF and 8SVX formats are supported.
  180. .PP
  181. .TP 10
  182. .B .aiff
  183. AIFF files used on Amiga and SGI.
  184. Note: the AIFF format supports only one SSND chunk.
  185. It does not support multiple sound chunks, 
  186. or the 8SVX musical instrument description format.
  187. AIFF files are multimedia archives and
  188. and can have multiple audio and picture chunks.
  189. You may need a separate archiver to work with them.
  190. .TP 10
  191. .B .au
  192. SUN Microsystems AU files.
  193. There are apparently many types of .au files;
  194. DEC has invented its own with a different magic number
  195. and word order.  
  196. The .au handler can read these files but will not write them.
  197. Some .au files have valid AU headers and some do not.
  198. The latter are probably original SUN u-law 8000 hz samples.
  199. These can be dealt with using the 
  200. .B .ul
  201. format (see below).
  202. .TP 10
  203. .B .hcom
  204. Macintosh HCOM files.
  205. These are (apparently) Mac FSSD files with some variant
  206. of Huffman compression.
  207. The Macintosh has wacky file formats and this format
  208. handler apparently doesn't handle all the ones it should.
  209. Mac users will need your usual arsenal of file converters
  210. to deal with an HCOM file under Unix or DOS.
  211. .br
  212. .TP 10
  213. .B .raw
  214. Raw files (no header).
  215. .br
  216. The sample rate, size (byte, word, etc), 
  217. and style (signed, unsigned, etc.)
  218. of the sample file must be given.
  219. The number of channels defaults to 1.
  220. .TP 10
  221. .B ".ub, .sb, .uw, .sw, .ul"
  222. These are several suffices which serve as
  223. a shorthand for raw files with a given size and style.
  224. Thus, \fBub, sb, uw, sw,\fR and \fBul\fR
  225. correspond to "unsigned byte", "signed byte",
  226. "unsigned word", "signed word", and "ulaw" (byte).
  227. The sample rate defaults to 8000 hz if not explicitly set,
  228. and the number of channels (as always) defaults to 1.
  229. There are lots of Sparc samples floating around in u-law format
  230. with no header and fixed at a sample rate of 8000 hz.
  231. (Certain sound management software cheerfully ignores the headers.)
  232. Similarly, most Mac sound files are in unsigned byte format with
  233. a sample rate of 11025 or 22050 hz.
  234. .TP 10
  235. .B .sf
  236. IRCAM Sound Files.
  237. .br
  238. SoundFiles are used by academic music software 
  239. such as the CSound package, and the MixView sound sample editor.
  240. .TP 10
  241. .B .voc
  242. Sound Blaster VOC files.
  243. .br
  244. VOC files are multi-part and contain silence parts, looping, and
  245. different sample rates for different chunks.
  246. On input, the silence parts are filled out, loops are rejected,
  247. and sample data with a new sample rate is rejected.
  248. Silence with a different sample rate is generated appropriately.
  249. On output, silence is not detected, nor are impossible sample rates.
  250. .TP 10
  251. .B .wav
  252. Windows 3.1 .WAV RIFF files.
  253. .br
  254. These appear to be very similar to IFF files,
  255. but not the same.  
  256. They are the native sound file format of Windows 3.1.
  257. Obviously, Windows 3.1 is of such incredible importance
  258. to the computer industry that it just had to have its own 
  259. sound file format.
  260. .SH EFFECTS
  261. Only one effect from the palette may be applied to a sound sample.
  262. To do multiple effects you'll need to run 
  263. .I sox 
  264. in a pipeline.
  265. .TP 30
  266. copy
  267. Copy the input file to the output file.
  268. This is the default effect if both files have the same 
  269. sampling rate, or the rates are "close".
  270. .TP 30
  271. rate
  272. Translate input sampling rate to output sampling rate
  273. via linear interpolation to the Least Common Multiple
  274. of the two sampling rates.
  275. This is the default effect 
  276. if the two files have different sampling rates.
  277. This is fast but noisy.
  278. ." Lerp-ing is acceptable for cheap 8-bit sound hardware,
  279. ." but for CD-quality sound you should instead use:
  280. ." .TP 30
  281. ." resample
  282. ." Translate input sampling rate to output sampling rate
  283. ." via simulated analog filtration.
  284. ." This method is slow and uses lots of RAM,
  285. ." but gives much better results then
  286. ." .B rate.
  287. .TP 30
  288. avg
  289. Mix 4- or 2-channel sound file into 2- or 1-channel file
  290. by averaging the samples for different speakers.
  291. ." .TP 30
  292. ." check
  293. ." Do a format check on the input file,
  294. ." and print any errors on the standard error file.
  295. ." Write no output.
  296. ." If you give no output file, 
  297. ." you need to specify either this effect or the following:
  298. .TP 30
  299. stat
  300. Do a statistical check on the input file,
  301. and print results on the standard error file.
  302. .B stat
  303. may copy the file untouched from input to output,
  304. if you select an output file.  
  305. The "Volume Adjustment:" field in the statistics
  306. gives you the argument to the
  307. .B -v
  308. .I number
  309. which will make the sample as loud as possible.
  310. .TP 30
  311. echo [ \fIdelay volume ... \fB ]
  312. Add echoing to a sound sample.
  313. Each delay/volume pair gives the delay in seconds
  314. and the volume (relative to 1.0) of that echo.
  315. If the volumes add up to more than 1.0,
  316. the sound will melt down instead of fading away.
  317. .TP 30
  318. vibro \fIspeed \fB [ \fIdepth\fB ]
  319. Add the world-famous Fender Vibro-Champ sound
  320. effect to a sound sample by using
  321. a sine wave as the volume knob.
  322. .B Speed 
  323. gives the Hertz value of the wave.
  324. This must be under 30.
  325. .B Depth
  326. gives the amount the volume is cut into
  327. by the sine wave,
  328. ranging 0.0 to 1.0 and defaulting to 0.5.
  329. .TP 30
  330. lowp \fIcenter
  331. Apply a low-pass filter.
  332. The frequency response drops logarithmically with 
  333. .I center
  334. frequency in the middle of the drop.
  335. The slope of the filter is quite gentle.
  336. .TP 30
  337. band \fB[ \fI-n \fB] \fIcenter \fB[ \fIwidth\fB ]
  338. Apply a band-pass filter.
  339. The frequency response drops logarithmically
  340. around the
  341. .I center
  342. frequency.
  343. The
  344. .I width
  345. gives the slope of the drop.
  346. The frequencies at 
  347. .I "center + width"
  348. and
  349. .I "center - width"
  350. will be half of their original amplitudes.
  351. .B Band
  352. defaults to a mode oriented to pitched signals,
  353. i.e. voice, singing, or instrumental music.
  354. The 
  355. .I -n
  356. (for noise) option uses the alternate mode
  357. for un-pitched signals.
  358. .B Band
  359. introduces noise in the shape of the filter,
  360. i.e. peaking at the 
  361. .I center
  362. frequency and settling around it.
  363. .P
  364. .I Sox
  365. enforces certain effects.
  366. If the two files have different sampling
  367. rates, the requested effect must be one of
  368. .B copy,
  369. or
  370. .B rate,
  371. ." or
  372. ." .B resample.
  373. If the two files have different numbers of channels,
  374. the 
  375. .B avg
  376. ." or other channel mixing
  377. effect must be requested.
  378. .SH BUGS
  379. The syntax is horrific.
  380. It's very tempting to include a default system that allows
  381. an effect name as the program name
  382. and just pipes a sound sample from standard input 
  383. to standard output, but the problem of inputting the
  384. sample rates makes this unworkable.
  385. .SH FILES
  386. .SH SEE ALSO
  387. .SH NOTICES
  388. The echoplex effect is:
  389.     Copyright (C) 1989 by Jef Poskanzer.
  390.     
  391.     Permission to use, copy, modify, and distribute this software and its
  392.     documentation for any purpose and without fee is hereby granted, provided
  393.     that the above copyright notice appear in all copies and that both that
  394.     copyright notice and this permission notice appear in supporting
  395.     documentation.  This software is provided "as is" without express or
  396.     implied warranty.
  397.