Mercurial > hg > aim92
comparison man/man1/ramp.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 RAMP 1 "1 September 1993" | |
2 | |
3 .SH NAME | |
4 ramp \- generate an exponential sawtooth waveform | |
5 | |
6 .SH SYNTAX | |
7 ramp [options] | |
8 | |
9 .SH DESCRIPTION | |
10 Generate samples of an exponential sawtooth waveform at a given sample rate. | |
11 Samples are written on the stdout in binary shorts or floats according to | |
12 the `type' option. | |
13 | |
14 .SH OPTIONS | |
15 | |
16 1. period, amplitude, duration. | |
17 | |
18 The `period' option sets the period of repetition of the waveform in samples. | |
19 The `duration' option sets the total duration of the output waveform in | |
20 samples. | |
21 Both may be given with time units (s or ms) in which case the time is converted to | |
22 samples using the given `samplerate' option. | |
23 The `amplitude' option sets the height of the waveform. | |
24 | |
25 2. polarity | |
26 | |
27 The `polarity' option is used to set the direction of the ramp: | |
28 | |
29 .nf | |
30 polarity=ramp growing exponential: A.exp(t-T) 0<=t<=T | |
31 polarity=damp decaying exponential: A.exp(-t) 0<=t<=T | |
32 .fi | |
33 | |
34 3. decay | |
35 | |
36 The argument of the exponential is calibrated so that the decay factor is | |
37 a half-life period. | |
38 The wave grows/decays to half its given amplitude in the given decay time. | |
39 | |
40 .SH EXAMPLES | |
41 | |
42 1. Growing exponentials | |
43 | |
44 .nf | |
45 ramp polarity=ramp dec=1ms | |
46 .fi | |
47 | |
48 2. Decaying exponentials | |
49 | |
50 .nf | |
51 ramp polarity=damp dec=1ms | |
52 .fi | |
53 | |
54 3. Half a cycle of an 8ms decaying exponential. | |
55 | |
56 .nf | |
57 ramp polarity=damp dec=1ms dur=4ms | |
58 .fi | |
59 | |
60 4. Modulating a tone with a damped exponential. | |
61 Note: modulating can be done in floating point using a ramp with unit | |
62 amplitude, or it can be done in integer arithmetic as below. | |
63 The scale factor in the `merge' program is used to avoid 16-bit overflow. | |
64 | |
65 .nf | |
66 tone period=.5ms > foo1 | |
67 ramp pol=damp dec=1ms > foo2 | |
68 merge op=mult factor=0.01 foo1 foo2 > foo3 | |
69 .fi | |
70 | |
71 5. Modulating a tone with a ramped exponential. | |
72 The 800Hz tone is modulated with a unit ramped exponential with a 25ms | |
73 repetition rate and a 4ms half life. | |
74 | |
75 .nf | |
76 tone freq=800Hz amp=10000 type=float > foo1 | |
77 ramp pol=ramp period=25ms dec=4ms amp=1 type=float > foo2 | |
78 merge op=mult type=float foo1 foo2 | ftos > foo3 | |
79 .fi | |
80 | |
81 6. Modulating a tone with a damped exponential, and half-wave rectifying to | |
82 generate damped pulses. | |
83 | |
84 .nf | |
85 tone period=.5ms amp=500 type=float > foo1 | |
86 ramp pol=damp dec=1ms amp=1 type=float > foo2 | |
87 merge op=mult type=float foo1 foo2 | ftos | gate range=min-0 op=0 > foo3 | |
88 .fi | |
89 | |
90 7. Modulating white noise with a ramped exponential. | |
91 | |
92 .nf | |
93 noise type=float > foo1 | |
94 ramp pol=ramp dec=1ms amp=1 type=float > foo2 | |
95 merge op=mult type=float foo1 foo2 | ftos > foo3 | |
96 .fi | |
97 | |
98 .SH "SEE ALSO" | |
99 options tone ptrain noise | |
100 | |
101 .SH COPYRIGHT | |
102 .LP | |
103 Copyright (c) Applied Psychology Unit, Medical Research Council, 1995 | |
104 .LP | |
105 Permission to use, copy, modify, and distribute this software without fee | |
106 is hereby granted for research purposes, provided that this copyright | |
107 notice appears in all copies and in all supporting documentation, and that | |
108 the software is not redistributed for any fee (except for a nominal | |
109 shipping charge). Anyone wanting to incorporate all or part of this | |
110 software in a commercial product must obtain a license from the Medical | |
111 Research Council. | |
112 .LP | |
113 The MRC makes no representations about the suitability of this | |
114 software for any purpose. It is provided "as is" without express or | |
115 implied warranty. | |
116 .LP | |
117 THE MRC DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING | |
118 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL | |
119 THE A.P.U. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES | |
120 OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, | |
121 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, | |
122 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS | |
123 SOFTWARE. | |
124 |