Effect High pass filter with Q

Help for Audacity on Windows.
Forum rules
ImageThis forum is for Audacity on Windows.
Please state which version of Windows you are using,
and the exact three-section version number of Audacity from "Help menu > About Audacity".


Audacity 1.2.x and 1.3.x are obsolete and no longer supported. If you still have those versions, please upgrade at https://www.audacityteam.org/download/.
The old forums for those versions are now closed, but you can still read the archives of the 1.2.x and 1.3.x forums.
юра00
Posts: 867
Joined: Mon Jan 21, 2013 11:26 am
Operating System: Windows 10

Effect High pass filter with Q

Post by юра00 » Sun Dec 28, 2014 12:31 pm

Failed to overinstall defaults (cutoff frequency and q), after attempt to chahge the values error message appears or the effect doesn't work. The view of document:

;nyquist plug-in;version 1;type process;name "High Pass Filter with Q...";action "Applying High Pass Filter with Q...";info "High Pass Filter with Q by David R. Sky";control freq "Cutoff frequency" real "Hz" 1000 20 10000;control q "Filter q (resonance)" real "q" 1.00 0.00 5.00;; Highpass with Q, works on mono and stereo audio(if (arrayp s)(vector (highpass2 (aref s 0) freq q)(highpass2 (aref s 1) freq q))(highpass2 s freq q))

such as for High (or Low) Pass Filter, here it is easy to set new values. Other view of the document:

Code: Select all

;nyquist plug-in
;version 3
;type process
;preview enabled
;categories "http://lv2plug.in/ns/lv2core#LowpassPlugin"
;name "Low Pass Filter..."
;action "Performing Low Pass Filter..."
;author "Dominic Mazzoni"
;copyright "Released under terms of the GNU General Public License version 2"

;; lowpass.ny by Dominic Mazzoni
;; Modified by David R. Sky
;; Updated by Steve Daulton June 2012
;; Released under terms of the GNU General Public License version 2:
;; http://www.gnu.org/licenses/old-licenses/gpl-2.0.html .

;; To enable the Q control, remove one semicolon from the start of lines 18 and 32

;control rolloff "Rolloff (dB per octave)" choice "  6 dB,12 dB,24 dB,36 dB,48 dB" 1
;;control q "Filter quality (Q) for 12 dB rolloff" real "" 0.7071 .1 20
;control frequency "Cutoff frequency (Hz)" real "" 16000 1 20000

(cond 
  ((> frequency (/ *sound-srate* 2))
    (format nil 
           "Cutoff frequency is set at ~a Hz but must not~%~
           be greater than ~a Hz (half of the track sample rate)."
           frequency
           (truncate (/ *sound-srate* 2.0))))
  ((< frequency 1)
    (format nil
           "Cutoff frequency is set at ~a Hz~%but must be at least 1 Hz."
           frequency))
; ((= rolloff 1)(lowpass2 s frequency (max (min q 20) 0.1)))
  (T 
    (funcall 
      (nth rolloff '(lp lowpass2 lowpass4 lowpass6 lowpass8))
      s frequency)))
Please, correct!
Last edited by юра00 on Fri Apr 24, 2015 4:45 pm, edited 3 times in total.
Reason: code tags added

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: Effect High pass filter with Q

Post by Gale Andrews » Sun Dec 28, 2014 4:30 pm

юра00 wrote:Failed to overinstall defaults (cutoff frequency and q), after attempt to chahge the values error message appears or the effect doesn't work. [...] such as for High (or Low) Pass Filter, here it is easy to set new values.
So does this problem happen with http://wiki.audacityteam.org/wiki/Nyqui ... ter_with_q but not the High Pass or Low Pass?

I tried running Windows is Russian in today's build on Windows but did not see a problem. Please give an example of Cutoff and q values that cause the problem and give us the Debug output.

Are you inputting Cutoff values above half the sample rate? That gives a specific error in High Pass and Low Pass, but only a generic error in High Pass with Q.


Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

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

Re: Effect High pass filter with Q

Post by steve » Sun Dec 28, 2014 4:53 pm

If you want to enable the Q setting, this is the code that you need:

Code: Select all

;nyquist plug-in
;version 3
;type process
;preview enabled
;categories "http://lv2plug.in/ns/lv2core#LowpassPlugin"
;name "Low Pass Filter..."
;action "Performing Low Pass Filter..."
;author "Dominic Mazzoni"
;copyright "Released under terms of the GNU General Public License version 2"

;; lowpass.ny by Dominic Mazzoni
;; Modified by David R. Sky
;; Updated by Steve Daulton June 2012
;; Released under terms of the GNU General Public License version 2:
;; http://www.gnu.org/licenses/old-licenses/gpl-2.0.html .

;; To enable the Q control, remove one semicolon from the start of lines 18 and 32

;control rolloff "Rolloff (dB per octave)" choice "  6 dB,12 dB,24 dB,36 dB,48 dB" 1
;control q "Filter quality (Q) for 12 dB rolloff" real "" 0.7071 .1 20
;control frequency "Cutoff frequency (Hz)" real "" 16000 1 20000

(cond
  ((> frequency (/ *sound-srate* 2))
    (format nil
           "Cutoff frequency is set at ~a Hz but must not~%~
           be greater than ~a Hz (half of the track sample rate)."
           frequency
           (truncate (/ *sound-srate* 2.0))))
  ((< frequency 1)
    (format nil
           "Cutoff frequency is set at ~a Hz~%but must be at least 1 Hz."
           frequency))
 ((= rolloff 1)(lowpass2 s frequency (max (min q 20) 0.1)))
  (T
    (funcall
      (nth rolloff '(lp lowpass2 lowpass4 lowpass6 lowpass8))
      s frequency)))

I note that in the code comment, the line that says:

Code: Select all

;; To enable the Q control, remove one semicolon from the start of lines 18 and 32
it should actually say;

Code: Select all

;; To enable the Q control, remove one semicolon from the start of lines 20 and 34
I shall correct that for the next Audacity release.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: Effect High pass filter with Q

Post by Gale Andrews » Sun Dec 28, 2014 5:10 pm

steve wrote:If you want to enable the Q setting, this is the code that you need
Did we decide not to make a note about that in the Manual pages for High Pass and Low Pass? I guess the problem may be explaining what Q does or why you might want to enable it.


Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

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

Re: Effect High pass filter with Q

Post by steve » Sun Dec 28, 2014 5:28 pm

Gale Andrews wrote:Did we decide not to make a note about that in the Manual pages for High Pass and Low Pass? I guess the problem may be explaining what Q does or why you might want to enable it.
I think we decided not to mention it. Normally users will get best results with Q set to 1/2(2^0.5) (0.7071...). In those rare cases where users may want to use other Q settings, they will almost certainly know what "Q" is. We also agreed to retain "High Pass Filter with q" as an optional download (on the wiki).
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

юра00
Posts: 867
Joined: Mon Jan 21, 2013 11:26 am
Operating System: Windows 10

Re: Effect High pass filter with Q

Post by юра00 » Sun Dec 28, 2014 5:53 pm

1. Download additional plugin High pass filter with Q.
2. Try to set new value q: 0.88 instead of default 1., save changes in document.
3. Open audacity, Import file, try to apply the effect, but appears:

Copy from Show log.

21:54:47: Audacity 2.1.0-alpha-Dec 26 2014
21:54:47: Trying to load FFmpeg libraries...
21:54:47: Trying to load FFmpeg libraries from system paths. File name is 'avformat-55.dll'.
21:54:47: Looking up PATH environment variable...
21:54:47: PATH = 'C:Windowssystem32;C:Windows;C:WindowsSystem32Wbem;C:WindowsSystem32WindowsPowerShellv1.0'
21:54:47: Checking that '' is in PATH...
21:54:47: FFmpeg directory is in PATH.
21:54:47: Checking for monolithic avformat from 'avformat-55.dll'.
21:54:47: Error: Failed to load shared library 'avformat-55.dll' (error 126: не найден указанный модуль.)
21:54:47: Loading avutil from ''.
21:54:47: Error: Failed to load shared library '.dll' (error 126: не найден указанный модуль.)
21:54:47: Loading avcodec from ''.
21:54:47: Error: Failed to load shared library '.dll' (error 126: не найден указанный модуль.)
21:54:47: Loading avformat from 'avformat-55.dll'.
21:54:47: Error: Failed to load shared library 'avformat-55.dll' (error 126: не найден указанный модуль.)
21:54:47: Error: Failed to load FFmpeg libraries.
21:54:47: Error: Failed to find compatible FFmpeg libraries.
Attachments
пост2.png
пост2.png (120.83 KiB) Viewed 1199 times

юра00
Posts: 867
Joined: Mon Jan 21, 2013 11:26 am
Operating System: Windows 10

Re: Effect High pass filter with Q

Post by юра00 » Sun Dec 28, 2014 5:59 pm

Attemt to change.
This problem not with High pass filter or Low pass filter, only for filters with q.
Attachments
пост3.png
пост3.png (95.16 KiB) Viewed 1198 times
Last edited by юра00 on Sun Dec 28, 2014 6:03 pm, edited 1 time in total.

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

Re: Effect High pass filter with Q

Post by steve » Sun Dec 28, 2014 6:01 pm

Is "High Pass Filter with Q..." listed once in the list of effects, or twice?
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

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

Re: Effect High pass filter with Q

Post by steve » Sun Dec 28, 2014 6:03 pm

юра00 wrote:Attemt to change.
Your editor is messing up the lines.
It should look like this:

Code: Select all

;nyquist plug-in
;version 1
;type process
;name "High Pass Filter with Q..."
;action "Applying High Pass Filter with Q..."
;info "High Pass Filter with Q by David R. Sky"

;control freq "Cutoff frequency" real "Hz" 1000 20 10000
;control q "Filter q (resonance)" real "q" 1.00 0.00 5.00

;; Highpass with Q, works on mono and stereo audio

(if (arrayp s)
(vector (highpass2 (aref s 0) freq q)
(highpass2 (aref s 1) freq q))

(highpass2 s freq q))
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

юра00
Posts: 867
Joined: Mon Jan 21, 2013 11:26 am
Operating System: Windows 10

Re: Effect High pass filter with Q

Post by юра00 » Sun Dec 28, 2014 6:08 pm

In my editor it looks:

;nyquist plug-in;version 1;type process;name "High Pass Filter with Q..."
;action "Applying High Pass Filter with Q..."
;info "High Pass Filter with Q by David R. Sky"
;control freq "Cutoff frequency" real "Hz" 1000 20 10000
;control q "Filter q (resonance)" real "q" 0.88 0.00 5.00
;; Highpass with Q, works on mono and stereo audio(if (arrayp s)(vector (highpass2 (aref s 0) freq q)(highpass2 (aref s 1) freq q))(highpass2 s freq q))


It is listed once in the effects. I ask to correct problem with setting default values for the additional effect "High pass filter with q", not to enable q for usual effect High pass filter.
Last edited by Gale Andrews on Mon Dec 29, 2014 2:19 pm, edited 7 times in total.

Post Reply