Special kind of frequency sweep (chirp)?

This section is now closed.
Forum rules
Audacity 1.3.x is now obsolete. Please use the current Audacity 2.1.x version.

The final version of Audacity for Windows 98/ME is the legacy 2.0.0 version.
Thewoog34
Posts: 19
Joined: Sat Oct 08, 2011 8:28 pm
Operating System: Please select

Re: Special kind of frequency sweep (chirp)?

Post by Thewoog34 » Tue Oct 11, 2011 7:24 pm

It actually has a rotor with one row of 5 ports and another row of 6. It spun at about 7500 RPM though as opposed to the traditional 3500 RPM. Some of them were special ordered in a 4/5 port configuration.

steve
Site Admin
Posts: 80679
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Special kind of frequency sweep (chirp)?

Post by steve » Tue Oct 11, 2011 9:37 pm

Thewoog34 wrote:It actually has a rotor with one row of 5 ports and another row of 6.
Oh well :) I got the right ratio even though the wrong numbers. I just noticed that the main frequencies had a ratio of 1:1.2 which suggested to me that the number of ports would be in that same ratio.

Thewoog34
Posts: 19
Joined: Sat Oct 08, 2011 8:28 pm
Operating System: Please select

Re: Special kind of frequency sweep (chirp)?

Post by Thewoog34 » Tue Oct 11, 2011 11:46 pm

Yeah, it's actually the ratio that affects the pitch. For example, the ACA Cylone is 8/12 port, and the Sentry 40v2t is 10/15 port. The 40v2t sounds like a higher-pitched Cyclone. It's more than twice as loud though. So how can I make this generate sawtooth waves?

steve
Site Admin
Posts: 80679
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Special kind of frequency sweep (chirp)?

Post by steve » Wed Oct 12, 2011 12:05 am

There is a (new) plug-in for generating alias-free tones: http://forum.audacityteam.org/viewtopic ... 42&t=60735

Thewoog34
Posts: 19
Joined: Sat Oct 08, 2011 8:28 pm
Operating System: Please select

Re: Special kind of frequency sweep (chirp)?

Post by Thewoog34 » Wed Oct 12, 2011 7:45 pm

Okay, I'm all done with my first draft. This is what I have so far. Listen to how HUGE of an improvement this is over my Allertor synth! There is still a LOT more I have to do - I need to figure out how to do rotation properly and I haven't gotten the wind-down 100%. Here is a video of the real thing for comparison.

steve
Site Admin
Posts: 80679
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Special kind of frequency sweep (chirp)?

Post by steve » Wed Oct 12, 2011 8:39 pm

When the horn is pointing away, there is a very noticeable rolling off of the higher frequencies (use Plot Spectrum on different sections of a recording).
You can simulate this effect by having two copies of the synthesized sound. Use the Equalizer to roll-off the higher frequencies of one track, then use the Envelope Tool to gradually cross-fade from one track to the other.

You can also make a reverb track and using the envelope tool, make the reverb a bit more prominent when the horn is facing away.

Here's a quick mix from your first draft.
stereo-siren.flac
(1.86 MiB) Downloaded 69 times

Thewoog34
Posts: 19
Joined: Sat Oct 08, 2011 8:28 pm
Operating System: Please select

Re: Special kind of frequency sweep (chirp)?

Post by Thewoog34 » Fri Oct 14, 2011 2:09 am

Sorry for the late reply, but I'm going to try both methods. I'll come back with results when I'm finished.

EDIT: I'm finished. It could be a lot better cause I did not do the reverb thing you recommended, only the equalization. It sounds decent. I'll upload it to Youtube tomorrow.

Thewoog34
Posts: 19
Joined: Sat Oct 08, 2011 8:28 pm
Operating System: Please select

Re: Special kind of frequency sweep (chirp)?

Post by Thewoog34 » Fri Oct 28, 2011 8:14 pm

How can I make this effect produce Sawtooth and Square waves instead of Sine waves? I am planning on re-doing the Allertor and old Whelen electronic sirens, which give off heavily low-passed square waves. I could also use those for other projects too that have nothing to do with sirens.

steve
Site Admin
Posts: 80679
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Special kind of frequency sweep (chirp)?

Post by steve » Tue Nov 01, 2011 9:21 pm

You will get some aliasing distortion (the distortion will sound similar to tuning in a short-wave radio) with this code, but otherwise this code should work for a sawtooth wave:

Code: Select all

(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*))
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

steve
Site Admin
Posts: 80679
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Special kind of frequency sweep (chirp)?

Post by steve » Tue Nov 01, 2011 9:41 pm

This will give you a bandwidth limited (no aliasing) square wave siren chirp:

Code: Select all

(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 (float (max low-freq hi-freq)))
(setq iamp (max (min initial-amp 1) 0))
(setq famp (max (min final-amp 1) 0))

(setf *sq-table*
   (let* ((wave (build-harmonic 1 2048)))
      (do ((i 3.0 (setq i (+ 2.0 i))))           ; odd harmonics
          ((or (>= (* i hz2)(/ *sound-srate* 2.0))(> i 2048)) wave)
         (setq wave (sum wave (mult (/ i) (build-harmonic i 2048)))))
      (maketable wave)))

(mult (pwlv iamp 1 famp)
  (fmosc 0
    (sum
      hz1
      (mult
        (- hz1 hz2)
        (sum -1 (pwev 1 1 0.01))))*sq-table*))
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Locked