Hi there,
Around a year ago, a member of this community was kind enough to provide me with the following Nyquist Prompt:
;control lhz "Low frequency corner" float "Hz" 1000 20 2000
;control hhz "High frequency corner" float "Hz" 2000 1000 10000
(when (= (length (get '*selection* 'tracks)) 3)
(if (not (get '*scratch* 'filter-count-921))
(setf count
(putprop '*scratch* 1 'filter-count-921))
(setf count
(putprop '*scratch*
(1+ (get '*scratch* 'filter-count-921))
'filter-count-921))))
(if (/= (length (get '*selection* 'tracks)) 3)
"Error.\nYou must select three identical tracks."
(case count
(1 ;low pass
(lowpass4 *track* lhz))
(2 ;high pass
(highpass4 *track* hhz))
(t ;band pass and clean up
(remprop '*scratch* 'filter-count-921)
(diff *track*
(sum (lowpass4 *track* lhz)
(highpass4 *track* hhz))))))
This code worked amazingly well and saved me a heap of time, however after starting a new project with a new install of Audacity, it no longer works. I wondered if there was anyone who would be able to help me fix the code. The original code required that I still had to do a few manual steps and optimally, the Prompt would:
- Duplicate a track twice to create 3 identical “Original” tracks.
- Use a high pass filter at an optional frequency on an “Original” track to create a “Highs” track.
- Make a copy of the “Highs” track and invert it to create an “Inverted Highs” track.
- Use a low pass filter at an optional frequency on an “Original” track to create a “Lows” track.
- Make a copy of the “Lows” track and invert it to create an “Inverted Lows” track.
- Mix the “Inverted Highs” and “Inverted Lows” track with the final “Original” track to create a “Mids” track.
- Move the “Mids” track up so it is between the “Highs” and “Lows” track.
I totally understand if writing it to do exactly these steps might be a bit too much trouble so just fixing the original code would be a lifesaver as it is!