Page 2 of 3

Re: Special kind of frequency sweep (chirp)?

Posted: Tue Oct 11, 2011 7:24 pm
by Thewoog34
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.

Re: Special kind of frequency sweep (chirp)?

Posted: Tue Oct 11, 2011 9:37 pm
by steve
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.

Re: Special kind of frequency sweep (chirp)?

Posted: Tue Oct 11, 2011 11:46 pm
by Thewoog34
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?

Re: Special kind of frequency sweep (chirp)?

Posted: Wed Oct 12, 2011 12:05 am
by steve
There is a (new) plug-in for generating alias-free tones: http://forum.audacityteam.org/viewtopic ... 42&t=60735

Re: Special kind of frequency sweep (chirp)?

Posted: Wed Oct 12, 2011 7:45 pm
by Thewoog34
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.

Re: Special kind of frequency sweep (chirp)?

Posted: Wed Oct 12, 2011 8:39 pm
by steve
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 68 times

Re: Special kind of frequency sweep (chirp)?

Posted: Fri Oct 14, 2011 2:09 am
by Thewoog34
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.

Re: Special kind of frequency sweep (chirp)?

Posted: Fri Oct 28, 2011 8:14 pm
by Thewoog34
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.

Re: Special kind of frequency sweep (chirp)?

Posted: Tue Nov 01, 2011 9:21 pm
by steve
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*))

Re: Special kind of frequency sweep (chirp)?

Posted: Tue Nov 01, 2011 9:41 pm
by steve
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*))