Mercurial > hg > aim92
comparison man/man1/tone.1 @ 0:5242703e91d3 tip
Initial checkin for AIM92 aimR8.2 (last updated May 1997).
author | tomwalters |
---|---|
date | Fri, 20 May 2011 15:19:45 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:5242703e91d3 |
---|---|
1 .TH TONE 1 "1 September 1993" | |
2 | |
3 .SH NAME | |
4 tone \- generate a pure tone. | |
5 | |
6 .SH SYNTAX | |
7 tone [options] | |
8 | |
9 .SH DESCRIPTION | |
10 Generate samples of a sine wave at a given sample rate. | |
11 Specify wave amplitude, and frequency (in Hz or kHz), or alternatively | |
12 period (in s, ms, or p (sample points) ). If both period and frequency | |
13 are specified, then the given period takes precedence. | |
14 If S is the given samplerate so that Ts=1/S is the sample interval, | |
15 and phi is the given phase (in samples or time units), | |
16 then each sample of a sine wave of frequency f [Hz] is given by: | |
17 | |
18 .nf | |
19 sin( TWOPI.f ( n.Ts + phi ) ) , n = 0,1,2,... | |
20 .fi | |
21 | |
22 Write samples to the stdout in the given datatype for the given waveform duration. | |
23 | |
24 | |
25 .SH OPTIONS | |
26 | |
27 1. period, frequency | |
28 | |
29 The frequency (in Hz or kHz) and the period (in s, ms, or p (sample points) ) | |
30 of the output waveform. Either may be specified, but if both period and frequency | |
31 are specified, then the given period takes precedence. | |
32 | |
33 2. amplitude | |
34 | |
35 The amplitude of the output waveform. | |
36 | |
37 3. phase | |
38 | |
39 The phase offset of the output sine wave with respect to the origin. | |
40 This may be specified as a time (with units s or ms) or as a number of | |
41 samples (with units p or no units), or in degrees (with units deg), | |
42 or the following strings are recognised | |
43 (and may be abbreviated provided this is unambiguous): | |
44 sine (0 phase offset), cosine (1/4 cycle phase offset), | |
45 antisine (1/2 cycle phase offset), anticosine (3/4 cycle phase offset). | |
46 | |
47 4. type | |
48 | |
49 The datatype of the output waveform. The following strings are recognised | |
50 types: char, short, int, float, double, ascii (meaning one ascii number per | |
51 line). | |
52 | |
53 .SH EXAMPLES | |
54 | |
55 1. Sine wave with period 10ms sampled at 10kHz, (100 sample points per period) | |
56 | |
57 .nf | |
58 tone period=10ms samplerate=10kHz | |
59 .fi | |
60 | |
61 2. Sine wave with frequency 100Hz sampled at 20kHz | |
62 | |
63 .nf | |
64 tone frequency=100Hz | |
65 .fi | |
66 | |
67 3. Sine wave with period 100 sample points, with dc-offset set equal to | |
68 amplitude of 500 so that waveform is just non-negative. | |
69 | |
70 .nf | |
71 tone period=100p amplitude=500 offset=500 | |
72 .fi | |
73 | |
74 4. Quarter cycle of a sine wave with 8ms period. | |
75 | |
76 .nf | |
77 tone period=8ms duration=2ms | |
78 .fi | |
79 | |
80 5. Cosine wave with 8ms period. | |
81 | |
82 .nf | |
83 tone period=8ms phase=cos | |
84 .fi | |
85 | |
86 This is equivalent to: | |
87 | |
88 .nf | |
89 tone period=8ms phase=2ms | |
90 .fi | |
91 | |
92 | |
93 | |
94 | |
95 .SH "SEE ALSO" | |
96 options ptrain | |
97 | |
98 .SH COPYRIGHT | |
99 .LP | |
100 Copyright (c) Applied Psychology Unit, Medical Research Council, 1995 | |
101 .LP | |
102 Permission to use, copy, modify, and distribute this software without fee | |
103 is hereby granted for research purposes, provided that this copyright | |
104 notice appears in all copies and in all supporting documentation, and that | |
105 the software is not redistributed for any fee (except for a nominal | |
106 shipping charge). Anyone wanting to incorporate all or part of this | |
107 software in a commercial product must obtain a license from the Medical | |
108 Research Council. | |
109 .LP | |
110 The MRC makes no representations about the suitability of this | |
111 software for any purpose. It is provided "as is" without express or | |
112 implied warranty. | |
113 .LP | |
114 THE MRC DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING | |
115 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL | |
116 THE A.P.U. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES | |
117 OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, | |
118 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, | |
119 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS | |
120 SOFTWARE. | |
121 |