[audacity4blind] Re: Noise Generator

  • From: Steve the Fiddle <stevethefiddle@xxxxxxxxx>
  • To: audacity4blind@xxxxxxxxxxxxx
  • Date: Fri, 23 Oct 2015 17:30:24 +0100

The "table" parameter of FMOS

On 23 October 2015 at 17:22, Annabelle Susan Morison
<foristnights@xxxxxxxxxxx> wrote:

And you can make this with any waveform? I remember trying something similar
with a square wave, but for some reason, I heard this wavy wiggly sound when
it would rise and fall. I could be wrong, but I think that's aliasing. Is that
some kind of change in sound quality?

-----Original Message-----
From: audacity4blind-bounce@xxxxxxxxxxxxx
[mailto:audacity4blind-bounce@xxxxxxxxxxxxx] On Behalf Of Steve the Fiddle
Sent: Friday, October 23, 2015 8:45 AM
To: audacity4blind@xxxxxxxxxxxxx
Subject: [audacity4blind] Re: Noise Generator

If you are using the current 2.1.1 version of Audacity, you can make
the code run in the Nyquist Prompt behave as if it is a "generator"
plug-in rather than an "Effect". Plug-ins that appear in the "Effect"
menu are "process" type plug-ins.

To make the code run as if it was a generate type plug-in, the
following line is added before the code:

;type generate

Note that the semicolon is important.

An important difference between "generate" and "process" type plug-ins
is that for "generate" type, will treat one unit of time as one
second, whereas a "process" type treats one unit of time as equal to
the length of the selection. For example the following code will
generate 2 seconds of noise:

;type generate
(noise 2)

Whereas this code will produce noise that is twice the length of the
selection:

;type process
(noise 2)

Taking our earlier siren code:

(setf start-hz 1320)
(setf end-hz 440)
(setf start-amp 0.1)
(setf end-amp 0.8)
(setf mod (pwev start-hz 1 end-hz))
(setf envelope (pwlv start-amp 1 end-amp))
(mult envelope (fmosc 0 mod *saw-table*))

The "envelope" term controls the amplitude of the generated noise.
That has a length of "one unit", which as a process type effect will
be equal to the length of the selection, or as a generate type effect
will be one second.

Similarly, the length of our generated tone is one unit, , which as a
process type effect will be equal to the length of the selection, or
as a generate type effect will be one second. The factor that
determines the length of the generated tone is the length of the "mod"
parameter.

Looking at how we create "mod" and "envelope", we can see that they
are made in very similar ways:

(setf mod (pwev start-hz 1 end-hz))
(setf envelope (pwlv start-amp 1 end-amp))

In both cases we use "piece-wise approximation" functions. See here in
the manual for full details of all the piece-wise functions:
http://www.cs.cmu.edu/~rbd/doc/nyquist/part8.html#index389

In both PWEV and PWLV, the parameters are in "time / value" pairs,
where the initial time value is assumed to be 0.
Thus, (PWEV start-hz 1 end-hz) creates a control signal that has a
value of "start-hz" at time = 0, and a value of "end-hz" at time = 1.

If we run the code as a generator, then "time = 1" means "1 second".

To change the length to, say, 2 seconds, we simply change the time for
the end-hz value:

(setf mod (pwev start-hz 2 end-hz))

More generally, we could set a variable to specify the end time, then
use that variable in the PWEV command:

(setf end-time 2.0)
(setf mod (pwev start-hz end-time end-hz))

We would want our envelope to have the same length as the generated
sound. To do that, we can use the same "end-time" in the envelope
code:

(setf end-time 2.0)
(setf envelope (pwlv start-amp end-time end-amp))
(setf mod (pwev start-hz end-time end-hz))


Putting this altogether so that it runs as a generator:

;type generate
(setf start-hz 1320)
(setf end-hz 440)
(setf end-time 2.0)
(setf start-amp 0.1)
(setf end-amp 0.8)
(setf mod (pwev start-hz end-time end-hz))
(setf envelope (pwlv start-amp end-time end-amp))
(mult envelope (fmosc 0 mod *saw-table*))


At the moment we only specify two "time / value" pairs. One at time=0
(which is implied) and one at time=end-time (which we specify).
Piece-wise approximations allow multiple time/value pairs to be used.
For example, to create a control signal that goes from 100 at time=0
to 200 at time=5 and to zero at time=6, the code could be:

(PWLV 100 5 200 6 0)

or

(PWEV 100 5 200 6 0)

The difference between PWLV and PWEV is that the former is "linear" (a
straight line) between the specified points, whereas the latter is
"exponential" between the specified points.

The following code generates a rising tone from 440 Hz to 1320 Hz over
a period of 1 second, then hold that frequency for half a second, then
falls back to 44- Hz over another 2 seconds. The total duration being
3.5 seconds. The amplitude rises from 0.1 at the start, to 0.8 at 1
second, then stays at that level for half a second, then falls to 0.1
at the end:

;type generate
(setf hz1 440)
(setf hz2 1320)
(setf amp1 0.1)
(setf amp2 0.8)
(setf t1 1.0)
(setf t2 1.5)
(setf t3 3.5)
(setf mod (pwev hz1 t1 hz2 t2 hz2 t3 hz1))
(setf envelope (pwlv amp1 t1 amp2 t2 amp2 t3 amp1))
(mult envelope (fmosc 0 mod *saw-table*))


Steve



On 23 October 2015 at 14:27, Annabelle Susan Morison
<foristnights@xxxxxxxxxxx> wrote:
How do I select a shorter passage? Better yet, how do I make the end
frequency
(1320 Hz) last longer?

-----Original Message-----
From: audacity4blind-bounce@xxxxxxxxxxxxx
[mailto:audacity4blind-bounce@xxxxxxxxxxxxx] On Behalf Of Steve the Fiddle
Sent: Tuesday, October 20, 2015 5:08 AM
To: audacity4blind@xxxxxxxxxxxxx
Subject: [audacity4blind] Re: Noise Generator

The recently posted Nyquist scripts, when run in the Nyquist Prompt,
take their duration from the length of the selection. This is normal
for an "Effect". The Nyquist Prompt is an "Effect". So to make the
tone rise (or fall) more quickly, use a shorter selection.

Steve

On 20 October 2015 at 11:12, Mr. Wong Chi Wai <cwwong.pro@xxxxxxxxx> wrote:
well, I have tried making something like that by stretching some tones.




Annabelle Susan Morison ? 20/10/2015 2:31 ??:

How would I make a fast wind-up, like that on an emergency vehicle?

-----Original Message-----
From: audacity4blind-bounce@xxxxxxxxxxxxx
[mailto:audacity4blind-bounce@xxxxxxxxxxxxx] On Behalf Of Steve the Fiddle
Sent: Monday, October 19, 2015 11:25 AM
To: audacity4blind@xxxxxxxxxxxxx
Subject: [audacity4blind] Re: Noise Generator

You could just apply the Audacity "Reverse" effect to the "siren-up"
sound, or try the attached code.

Steve

On 19 October 2015 at 18:49, Annabelle Susan Morison
<foristnights@xxxxxxxxxxx> wrote:

I wonder what the code for siren-down would look like.

-----Original Message-----
From: audacity4blind-bounce@xxxxxxxxxxxxx
[mailto:audacity4blind-bounce@xxxxxxxxxxxxx] On Behalf Of Steve the
Fiddle
Sent: Monday, October 19, 2015 8:43 AM
To: audacity4blind@xxxxxxxxxxxxx
Subject: [audacity4blind] Re: Noise Generator

The first line of the debug shows the error:

error: unbound variable - HI-FREQ

For some reason Nyquist is not seeing the first line of the code,
which is where "hi-freq" is set.
I suspect that the problem is due to copy/paste from e-mail, so I've
attached that code as a plain text file. Copy the entire contents of
the text file into the Nyquist Prompt and it should work.

Steve

On 19 October 2015 at 15:16, Annabelle Susan Morison
<foristnights@xxxxxxxxxxx> wrote:

Here's what I got with the Debug Button.


error: unbound variable - HI-FREQ
if continued: try evaluating symbol again
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ1
(MIN LOW-FREQ HI-FREQ)
1> error: unbound variable - HI-FREQ
if continued: try evaluating symbol again
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ2
(MAX LOW-FREQ HI-FREQ)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ1
(MIN LOW-FREQ HI-FREQ)
2> error: unbound variable - INITIAL-AMP
if continued: try evaluating symbol again
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
IAMP
(MAX (MIN INITIAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ2
(MAX LOW-FREQ HI-FREQ)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ1
(MIN LOW-FREQ HI-FREQ)
3> error: unbound variable - FINAL-AMP
if continued: try evaluating symbol again
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
FAMP
(MAX (MIN FINAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
IAMP
(MAX (MIN INITIAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ2
(MAX LOW-FREQ HI-FREQ)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ1
(MIN LOW-FREQ HI-FREQ)
4> error: illegal character - -62
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
FAMP
(MAX (MIN FINAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
IAMP
(MAX (MIN INITIAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ2
(MAX LOW-FREQ HI-FREQ)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ1
(MIN LOW-FREQ HI-FREQ)
5> error: illegal character - -96
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
FAMP
(MAX (MIN FINAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
IAMP
(MAX (MIN INITIAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ2
(MAX LOW-FREQ HI-FREQ)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ1
(MIN LOW-FREQ HI-FREQ)
6> error: illegal character - -62
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
FAMP
(MAX (MIN FINAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
IAMP
(MAX (MIN INITIAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ2
(MAX LOW-FREQ HI-FREQ)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ1
(MIN LOW-FREQ HI-FREQ)
7> error: illegal character - -96
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
FAMP
(MAX (MIN FINAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
IAMP
(MAX (MIN INITIAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ2
(MAX LOW-FREQ HI-FREQ)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ1
(MIN LOW-FREQ HI-FREQ)
8> error: illegal character - -62
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
FAMP
(MAX (MIN FINAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
IAMP
(MAX (MIN INITIAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ2
(MAX LOW-FREQ HI-FREQ)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ1
(MIN LOW-FREQ HI-FREQ)
9> error: illegal character - -96
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
FAMP
(MAX (MIN FINAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
IAMP
(MAX (MIN INITIAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ2
(MAX LOW-FREQ HI-FREQ)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ1
(MIN LOW-FREQ HI-FREQ)
10> error: illegal character - -62
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
FAMP
(MAX (MIN FINAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
IAMP
(MAX (MIN INITIAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ2
(MAX LOW-FREQ HI-FREQ)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ1
(MIN LOW-FREQ HI-FREQ)
11> error: illegal character - -96
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
FAMP
(MAX (MIN FINAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
IAMP
(MAX (MIN INITIAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ2
(MAX LOW-FREQ HI-FREQ)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ1
(MIN LOW-FREQ HI-FREQ)
12> error: illegal character - -62
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
FAMP
(MAX (MIN FINAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
IAMP
(MAX (MIN INITIAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ2
(MAX LOW-FREQ HI-FREQ)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ1
(MIN LOW-FREQ HI-FREQ)
13> error: illegal character - -96
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
FAMP
(MAX (MIN FINAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
IAMP
(MAX (MIN INITIAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ2
(MAX LOW-FREQ HI-FREQ)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ1
(MIN LOW-FREQ HI-FREQ)
14> error: illegal character - -62
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
FAMP
(MAX (MIN FINAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
IAMP
(MAX (MIN INITIAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ2
(MAX LOW-FREQ HI-FREQ)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ1
(MIN LOW-FREQ HI-FREQ)
15> error: illegal character - -96
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
FAMP
(MAX (MIN FINAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
IAMP
(MAX (MIN INITIAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ2
(MAX LOW-FREQ HI-FREQ)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ1
(MIN LOW-FREQ HI-FREQ)
16> error: unbound variable - HZ1
if continued: try evaluating symbol again
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
FAMP
(MAX (MIN FINAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
IAMP
(MAX (MIN INITIAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ2
(MAX LOW-FREQ HI-FREQ)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ1
(MIN LOW-FREQ HI-FREQ)
17> error: illegal character - -62
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
FAMP
(MAX (MIN FINAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
IAMP
(MAX (MIN INITIAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ2
(MAX LOW-FREQ HI-FREQ)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ1
(MIN LOW-FREQ HI-FREQ)
18> error: illegal character - -96
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
FAMP
(MAX (MIN FINAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
IAMP
(MAX (MIN INITIAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ2
(MAX LOW-FREQ HI-FREQ)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ1
(MIN LOW-FREQ HI-FREQ)
19> error: illegal character - -62
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
FAMP
(MAX (MIN FINAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
IAMP
(MAX (MIN INITIAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ2
(MAX LOW-FREQ HI-FREQ)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ1
(MIN LOW-FREQ HI-FREQ)
20> error: illegal character - -96
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
FAMP
(MAX (MIN FINAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
IAMP
(MAX (MIN INITIAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ2
(MAX LOW-FREQ HI-FREQ)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ1
(MIN LOW-FREQ HI-FREQ)
21> error: illegal character - -62
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
FAMP
(MAX (MIN FINAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
IAMP
(MAX (MIN INITIAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ2
(MAX LOW-FREQ HI-FREQ)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ1
(MIN LOW-FREQ HI-FREQ)
22> error: illegal character - -96
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
FAMP
(MAX (MIN FINAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
IAMP
(MAX (MIN INITIAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ2
(MAX LOW-FREQ HI-FREQ)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ1
(MIN LOW-FREQ HI-FREQ)
23> error: illegal character - -62
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
FAMP
(MAX (MIN FINAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
IAMP
(MAX (MIN INITIAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ2
(MAX LOW-FREQ HI-FREQ)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ1
(MIN LOW-FREQ HI-FREQ)
24> error: illegal character - -96
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
FAMP
(MAX (MIN FINAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
IAMP
(MAX (MIN INITIAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ2
(MAX LOW-FREQ HI-FREQ)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ1
(MIN LOW-FREQ HI-FREQ)
25> error: illegal character - -62
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
FAMP
(MAX (MIN FINAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
IAMP
(MAX (MIN INITIAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ2
(MAX LOW-FREQ HI-FREQ)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ1
(MIN LOW-FREQ HI-FREQ)
26> error: illegal character - -96
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
FAMP
(MAX (MIN FINAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
IAMP
(MAX (MIN INITIAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ2
(MAX LOW-FREQ HI-FREQ)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ1
(MIN LOW-FREQ HI-FREQ)
27> error: illegal character - -62
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
FAMP
(MAX (MIN FINAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
IAMP
(MAX (MIN INITIAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ2
(MAX LOW-FREQ HI-FREQ)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ1
(MIN LOW-FREQ HI-FREQ)
28> error: illegal character - -96
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
FAMP
(MAX (MIN FINAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
IAMP
(MAX (MIN INITIAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ2
(MAX LOW-FREQ HI-FREQ)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ1
(MIN LOW-FREQ HI-FREQ)
29> error: illegal character - -62
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
FAMP
(MAX (MIN FINAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
IAMP
(MAX (MIN INITIAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ2
(MAX LOW-FREQ HI-FREQ)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ1
(MIN LOW-FREQ HI-FREQ)
30> error: illegal character - -96
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
FAMP
(MAX (MIN FINAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
IAMP
(MAX (MIN INITIAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ2
(MAX LOW-FREQ HI-FREQ)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ1
(MIN LOW-FREQ HI-FREQ)
31> error: unbound variable - HZ1
if continued: try evaluating symbol again
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
FAMP
(MAX (MIN FINAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
IAMP
(MAX (MIN INITIAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ2
(MAX LOW-FREQ HI-FREQ)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ1
(MIN LOW-FREQ HI-FREQ)
32> error: illegal character - -62
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
FAMP
(MAX (MIN FINAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
IAMP
(MAX (MIN INITIAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ2
(MAX LOW-FREQ HI-FREQ)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ1
(MIN LOW-FREQ HI-FREQ)
33> error: illegal character - -96
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
FAMP
(MAX (MIN FINAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
IAMP
(MAX (MIN INITIAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ2
(MAX LOW-FREQ HI-FREQ)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ1
(MIN LOW-FREQ HI-FREQ)
34> error: illegal character - -62
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
FAMP
(MAX (MIN FINAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
IAMP
(MAX (MIN INITIAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ2
(MAX LOW-FREQ HI-FREQ)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ1
(MIN LOW-FREQ HI-FREQ)
35> error: illegal character - -96
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
FAMP
(MAX (MIN FINAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
IAMP
(MAX (MIN INITIAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ2
(MAX LOW-FREQ HI-FREQ)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ1
(MIN LOW-FREQ HI-FREQ)
36> error: illegal character - -62
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
FAMP
(MAX (MIN FINAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
IAMP
(MAX (MIN INITIAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ2
(MAX LOW-FREQ HI-FREQ)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ1
(MIN LOW-FREQ HI-FREQ)
37> error: illegal character - -96
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
FAMP
(MAX (MIN FINAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
IAMP
(MAX (MIN INITIAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ2
(MAX LOW-FREQ HI-FREQ)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ1
(MIN LOW-FREQ HI-FREQ)
38> error: illegal character - -62
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
FAMP
(MAX (MIN FINAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
IAMP
(MAX (MIN INITIAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ2
(MAX LOW-FREQ HI-FREQ)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ1
(MIN LOW-FREQ HI-FREQ)
39> error: illegal character - -96
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
FAMP
(MAX (MIN FINAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
IAMP
(MAX (MIN INITIAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ2
(MAX LOW-FREQ HI-FREQ)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ1
(MIN LOW-FREQ HI-FREQ)
40> #<Sound: #44f0718>
40> error: misplaced right paren
Function: #<Subr-(null): #4630938>
Arguments:
#<File-Stream: #36b0100>
#\)
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
FAMP
(MAX (MIN FINAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
IAMP
(MAX (MIN INITIAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ2
(MAX LOW-FREQ HI-FREQ)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ1
(MIN LOW-FREQ HI-FREQ)
41> error: misplaced right paren
Function: #<Subr-(null): #4630938>
Arguments:
#<File-Stream: #36b0100>
#\)
Function: #<Subr-(null): #4630938>
Arguments:
#<File-Stream: #36b0100>
#\)
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
FAMP
(MAX (MIN FINAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
IAMP
(MAX (MIN INITIAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ2
(MAX LOW-FREQ HI-FREQ)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ1
(MIN LOW-FREQ HI-FREQ)
42> (#<Sound: #44f0128> -36.3763 T)
42> error: misplaced right paren
Function: #<Subr-(null): #4630938>
Arguments:
#<File-Stream: #36b0100>
#\)
Function: #<Subr-(null): #4630938>
Arguments:
#<File-Stream: #36b0100>
#\)
Function: #<Subr-(null): #4630938>
Arguments:
#<File-Stream: #36b0100>
#\)
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
FAMP
(MAX (MIN FINAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
IAMP
(MAX (MIN INITIAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ2
(MAX LOW-FREQ HI-FREQ)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ1
(MIN LOW-FREQ HI-FREQ)
43> error: misplaced right paren
Function: #<Subr-(null): #4630938>
Arguments:
#<File-Stream: #36b0100>
#\)
Function: #<Subr-(null): #4630938>
Arguments:
#<File-Stream: #36b0100>
#\)
Function: #<Subr-(null): #4630938>
Arguments:
#<File-Stream: #36b0100>
#\)
Function: #<Subr-(null): #4630938>
Arguments:
#<File-Stream: #36b0100>
#\)
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<Subr-(null): #4630958>
Arguments:
#<File-Stream: #36b0100>
#\(
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
FAMP
(MAX (MIN FINAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
IAMP
(MAX (MIN INITIAL-AMP 1) 0)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ2
(MAX LOW-FREQ HI-FREQ)
Function: #<FSubr-SETQ: #4630ae8>
Arguments:
HZ1
(MIN LOW-FREQ HI-FREQ)
44> 43> 42> 41> 40> 39> 38> 37> 36> 35> 34> 33> 32> 31> 30> 29> 28> 27>
26>
25> 24> 23> 22> 21> 20> 19> 18> 17> 16> 15> 14> 13> 12> 11> 10> 9> 8> 7>
6>
5>
4> 3> 2> 1>

-----Original Message-----
From: audacity4blind-bounce@xxxxxxxxxxxxx
[mailto:audacity4blind-bounce@xxxxxxxxxxxxx] On Behalf Of Steve the
Fiddle
Sent: Monday, October 19, 2015 3:59 AM
To: audacity4blind@xxxxxxxxxxxxx
Subject: [audacity4blind] Re: Noise Generator

That code works OK for me.
Ensure that you have pasted the full 16 lines (that's 16 lines
including line 5 which is an empty line).
If you still get the error, try running it using the Debug button
instead of the OK button.

Steve

On 19 October 2015 at 02:30, Annabelle Susan Morison
<foristnights@xxxxxxxxxxx> wrote:

I've tried this code in Audacity, and I get a message that says.
"Nyquist returned the value 0.100000". I'm confused! Is this some
sort of error? Am I forgetting something?


(setq low-freq 440) ; initial frequency - Hz (setq hi-freq 1320) ;
final frequency - Hz (setq initial-amp 0.8) ; initial amplitude on a
scale 0 to 1 (setq final-amp 0.1) ; final amplitude on a scale 0 to
1

(setq hz1 (min low-freq hi-freq))
(setq hz2 (max low-freq hi-freq))
(setq iamp (max (min initial-amp 1) 0)) (setq famp (max (min
final-amp 1) 0)) (mult (pwlv iamp 1 famp)
(fmosc 0
(sum
hz1
(mult
(- hz1 hz2)
(sum -1 (pwev 1 1 0.01))))*saw-table*))

-----Original Message-----
From: audacity4blind-bounce@xxxxxxxxxxxxx
[mailto:audacity4blind-bounce@xxxxxxxxxxxxx] On Behalf Of Steve the
Fiddle
Sent: Sunday, October 18, 2015 4:18 PM
To: audacity4blind@xxxxxxxxxxxxx
Subject: [audacity4blind] Re: Noise Generator

You can't just reverse the number in the first two lines because
note these two lines:

(setq hz1 (min low-freq hi-freq))
(setq hz2 (max low-freq hi-freq))

The first of these two lines sets HZ1 to the minimum of LOW-FREQ and
HI-FREQ.
Similarly the second sets HZ2 to the maximum of LOW-FREQ and HI-FREQ.

That code overall is rather more complicated than it really needs to
be, but was written like that so that it could be developed into a
more complex plug-in.

This is a simplified version of that perhaps makes it a bit clearer
what is going on:

(setf start-hz 440)
(setf end-hz 1320)
(setf start-amp 0.8)
(setf end-amp 0.1)
(setf mod (pwev start-hz 1 end-hz))
(setf envelope (pwlv start-amp 1 end-amp)) (mult envelope (fmosc 0
mod))

In the above code,:
start-hz is the initial frequency
end-hz is the final frequency
start-amp is the initial amplitude
end-amp is the final amplitude
mod is the modulation signal, which uses start-hz and end-hz.
envelope is the amplitude envelope which uses start-amp and end-amp.
The final line amplifies the FMOSC generator by the amplitude envelope.

In this version you can change the numbers around as you wish. For
example to create a sweep from 1320 Hz down to 440 Hz and the
amplitude increasing from 0.1 to 0.8:

(setf start-hz 1320)
(setf end-hz 440)
(setf start-amp 0.1)
(setf end-amp 0.8)
(setf mod (pwev start-hz 1 end-hz))
(setf envelope (pwlv start-amp 1 end-amp)) (mult envelope (fmosc 0
mod))

Steve

On 18 October 2015 at 23:41, Annabelle Susan Morison
<foristnights@xxxxxxxxxxx> wrote:

Would that be the same if I were to use this code? I think this is
one you previously showed me.

(setq low-freq 440) ; initial frequency - Hz (setq hi-freq 1320) ;
final frequency - Hz (setq initial-amp 0.8) ; initial amplitude on
a scale 0 to 1 (setq final-amp 0.1) ; final amplitude on a scale 0
to
1

(setq hz1 (min low-freq hi-freq))
(setq hz2 (max low-freq hi-freq))
(setq iamp (max (min initial-amp 1) 0)) (setq famp (max (min
final-amp 1) 0)) (mult (pwlv iamp 1 famp)
(fmosc 0
(sum
hz1
(mult
(- hz1 hz2)
(sum -1 (pwev 1 1 0.01))))))

-----Original Message-----
From: audacity4blind-bounce@xxxxxxxxxxxxx
[mailto:audacity4blind-bounce@xxxxxxxxxxxxx] On Behalf Of Steve the
Fiddle
Sent: Sunday, October 18, 2015 3:31 PM
To: audacity4blind@xxxxxxxxxxxxx
Subject: [audacity4blind] Re: Noise Generator

The part of the code that generates the sound is the function FMOSC.
This function is described in the Nyquist manual here:
http://www.cs.cmu.edu/~rbd/doc/nyquist/part8.html#index378

In our example we don't use the optional "table" or "phase"
parameters. Most of the code is to create the modulation signal.

If you want to create a tone that goes up and down between say 100
Hz and 1000 Hz, then you need to create a modulation signal that
goes up and down between values of 100 and 1000.

The HZOSC function produces a sine wav that goes up and down
between +/- 1.
HZOSC is described here:
http://www.cs.cmu.edu/~rbd/doc/nyquist/part8.html#index368

As you will see from the above link, to make a signal that goes up
and down repeatedly once every 4 seconds, we can use this code:

(hzosc (/ 1.0 4.0))

You wont be able to hear this because the "note" has a frequency of
0.25 Hz, which is far too low to hear, but it is part way to
creating a suitable modulation signal. All that we need to do is to
scale it so that rather than going between +/- 1 it will go between
100 and 1000.

Adding "1" will make it go between 0 and 2.
(sum 1 (hzosc (/ 1.0 4.0)))

Then if we multiply by 450 it will go between 0 and 900 (mult 450
(sum 1 (hzosc (/ 1.0 4.0))))

Then if we add 100, it will be shifted up to go between 100 and 1000.
(sum 100 (mult 450 (sum 1 (hzosc (/ 1.0 4.0)))))

We now have a modulation signal that goes between 100 and 1000.
To make it easier to use, we can assign this as the value of a
variable:
(setf mod (sum 100 (mult 450 (sum 1 (hzosc (/ 1.0 4.0))))))

We can now use the variable "mod" in the FMOSC function like this:

(setf mod (sum 100 (mult 450 (sum 1 (hzosc (/ 1.0 4.0)))))) (fmosc
0
mod)


Try substituting different numbers to get a different pitch and
different high/low speed.

Hope that helps to get you started.

Steve

On 18 October 2015 at 20:33, Annabelle Susan Morison
<foristnights@xxxxxxxxxxx> wrote:

I got it to work, however, it only does the windup side of the
siren. How would I make the wind-down of the siren? Would I
reverse the order of frequencies? How about the yelp and piercer
tones?
Would they be made with the same code?

-----Original Message-----
From: audacity4blind-bounce@xxxxxxxxxxxxx
[mailto:audacity4blind-bounce@xxxxxxxxxxxxx] On Behalf Of Steve
the Fiddle
Sent: Thursday, June 04, 2015 12:10 PM
To: audacity4blind@xxxxxxxxxxxxx
Subject: [audacity4blind] Re: Noise Generator

That code is written for the Nyquist Prompt.

Steve

On 4 June 2015 at 18:53, Annabelle Susan Morison
<foristnights@xxxxxxxxxxx> wrote:

And I would put this in the Nyquist Prompt? Or would that be the
Nyquist Generate Prompt?

-----Original Message-----
From: audacity4blind-bounce@xxxxxxxxxxxxx
[mailto:audacity4blind-bounce@xxxxxxxxxxxxx] On Behalf Of Steve
the Fiddle
Sent: Thursday, June 04, 2015 10:47 AM
To: audacity4blind@xxxxxxxxxxxxx
Subject: [audacity4blind] Re: Noise Generator

Attached is some code that may help to get you started.
The code came from this forum topic and there is additional
information
there:
http://forum.audacityteam.org/viewtopic.php?p=159187

Steve

On 4 June 2015 at 17:24, Annabelle Susan Morison
<foristnights@xxxxxxxxxxx>
wrote:

Hi, it's Annabelle.
I know this might sound strange but, I wonder if there's a way
for me to make a noise generator that generates the four common
siren tones, wail, yelp, hyperyelp, and hi-lo? If there is, what
would be the code for me to make these? Also, being blind, how
would I make this into a plugin?



The audacity4blind web site is at
//www.freelists.org/webpage/audacity4blind

Subscribe and unsubscribe information, message archives, Audacity
keyboard commands, and more...

To unsubscribe from audacity4blind, send an email to
audacity4blind-request@xxxxxxxxxxxxx
with subject line
unsubscribe

The audacity4blind web site is at
//www.freelists.org/webpage/audacity4blind

Subscribe and unsubscribe information, message archives, Audacity
keyboard commands, and more...

To unsubscribe from audacity4blind, send an email to
audacity4blind-request@xxxxxxxxxxxxx
with subject line
unsubscribe



The audacity4blind web site is at
//www.freelists.org/webpage/audacity4blind

Subscribe and unsubscribe information, message archives, Audacity
keyboard commands, and more...

To unsubscribe from audacity4blind, send an email to
audacity4blind-request@xxxxxxxxxxxxx
with subject line
unsubscribe

The audacity4blind web site is at
//www.freelists.org/webpage/audacity4blind

Subscribe and unsubscribe information, message archives, Audacity
keyboard commands, and more...

To unsubscribe from audacity4blind, send an email to
audacity4blind-request@xxxxxxxxxxxxx
with subject line
unsubscribe



The audacity4blind web site is at
//www.freelists.org/webpage/audacity4blind

Subscribe and unsubscribe information, message archives, Audacity
keyboard commands, and more...

To unsubscribe from audacity4blind, send an email to
audacity4blind-request@xxxxxxxxxxxxx
with subject line
unsubscribe

The audacity4blind web site is at
//www.freelists.org/webpage/audacity4blind

Subscribe and unsubscribe information, message archives, Audacity
keyboard commands, and more...

To unsubscribe from audacity4blind, send an email to
audacity4blind-request@xxxxxxxxxxxxx
with subject line
unsubscribe



The audacity4blind web site is at
//www.freelists.org/webpage/audacity4blind

Subscribe and unsubscribe information, message archives, Audacity
keyboard commands, and more...

To unsubscribe from audacity4blind, send an email to
audacity4blind-request@xxxxxxxxxxxxx
with subject line
unsubscribe

The audacity4blind web site is at
//www.freelists.org/webpage/audacity4blind

Subscribe and unsubscribe information, message archives, Audacity
keyboard commands, and more...

To unsubscribe from audacity4blind, send an email to
audacity4blind-request@xxxxxxxxxxxxx
with subject line
unsubscribe



The audacity4blind web site is at
//www.freelists.org/webpage/audacity4blind

Subscribe and unsubscribe information, message archives, Audacity
keyboard commands, and more...

To unsubscribe from audacity4blind, send an email to
audacity4blind-request@xxxxxxxxxxxxx
with subject line
unsubscribe



The audacity4blind web site is at
//www.freelists.org/webpage/audacity4blind

Subscribe and unsubscribe information, message archives, Audacity
keyboard commands, and more...

To unsubscribe from audacity4blind, send an email to
audacity4blind-request@xxxxxxxxxxxxx
with subject line
unsubscribe



The audacity4blind web site is at
//www.freelists.org/webpage/audacity4blind

Subscribe and unsubscribe information, message archives,
Audacity keyboard commands, and more...

To unsubscribe from audacity4blind, send an email to
audacity4blind-request@xxxxxxxxxxxxx
with subject line
unsubscribe


--
Best Regards,
William Wong



The audacity4blind web site is at
//www.freelists.org/webpage/audacity4blind

Subscribe and unsubscribe information, message archives,
Audacity keyboard commands, and more...

To unsubscribe from audacity4blind, send an email to
audacity4blind-request@xxxxxxxxxxxxx
with subject line
unsubscribe


The audacity4blind web site is at
//www.freelists.org/webpage/audacity4blind

Subscribe and unsubscribe information, message archives,
Audacity keyboard commands, and more...

To unsubscribe from audacity4blind, send an email to
audacity4blind-request@xxxxxxxxxxxxx
with subject line
unsubscribe



The audacity4blind web site is at
//www.freelists.org/webpage/audacity4blind

Subscribe and unsubscribe information, message archives,
Audacity keyboard commands, and more...

To unsubscribe from audacity4blind, send an email to
audacity4blind-request@xxxxxxxxxxxxx
with subject line
unsubscribe


The audacity4blind web site is at
//www.freelists.org/webpage/audacity4blind

Subscribe and unsubscribe information, message archives,
Audacity keyboard commands, and more...

To unsubscribe from audacity4blind, send an email to
audacity4blind-request@xxxxxxxxxxxxx
with subject line
unsubscribe



The audacity4blind web site is at
//www.freelists.org/webpage/audacity4blind

Subscribe and unsubscribe information, message archives,
Audacity keyboard commands, and more...

To unsubscribe from audacity4blind, send an email to
audacity4blind-request@xxxxxxxxxxxxx
with subject line
unsubscribe


The audacity4blind web site is at
//www.freelists.org/webpage/audacity4blind

Subscribe and unsubscribe information, message archives,
Audacity keyboard commands, and more...

To unsubscribe from audacity4blind, send an email to
audacity4blind-request@xxxxxxxxxxxxx
with subject line
unsubscribe

Other related posts: