Weird thing on Spectral edit Ver 2.3.1

Help for Audacity on macOS.
Forum rules
ImageThis forum is for Audacity on macOS 10.4 and later.
Please state which version of macOS you are using,
and the exact three-section version number of Audacity from "Audacity 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.
Paul2
Posts: 166
Joined: Wed Sep 04, 2019 1:17 pm
Operating System: macOS 10.15 Catalina or later

Weird thing on Spectral edit Ver 2.3.1

Post by Paul2 » Sat May 08, 2021 4:26 pm

I all,

Can any one shed some light on the following:

When editing in spectral view, if a selection is cut-out/attenuated, weird smearing in the low end.
To illustrate what I mean:

1) Create some white noise.
2) High pass filter it, say from 100Hz (not critical).
3) Now in spectral edit mode, select a portion of the noise and use either "spectral edit multitool" or "spectral edit parametric EQ" to attenuate it.
4) Weird smearing happens in the low end.

Screen-Shot-2021-05-08-at-9-14-56-PM.png
Screen-Shot-2021-05-08-at-9-14-56-PM.png (131.28 KiB) Viewed 165 times
Audacity 2.3.1 on MacOS 10.12 (Sierra)

EDIT:

Forgot to mention, does the same thing with music.
Select a portion, press Z to ensure it's at the zero crossing points and do the same thing.
Smearing still happens.
Last edited by steve on Sat May 08, 2021 7:10 pm, edited 1 time in total.
Reason: Uploaded image as attachment and placed inline

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

Re: Weird thing on Spectral edit Ver 2.3.1

Post by steve » Sat May 08, 2021 6:21 pm

Paul2 wrote:
Sat May 08, 2021 4:26 pm
4) Weird smearing happens in the low end.
Can you post a screenshot to illustrate what you mean by "weird smearing".
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Paul2
Posts: 166
Joined: Wed Sep 04, 2019 1:17 pm
Operating System: macOS 10.15 Catalina or later

Re: Weird thing on Spectral edit Ver 2.3.1

Post by Paul2 » Sat May 08, 2021 6:25 pm

Hi Steve,

By smearing, I'm referring to the vertical tails shown in my original post, just above the red arrows with the question marks.

Thanks,
Paul

EDIT:

Could it have something todo with ringing or (ripple in the freq. domain) of the filters?
I notice it also happens if I apply a notch filter to a selection.

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

Re: Weird thing on Spectral edit Ver 2.3.1

Post by steve » Sat May 08, 2021 6:47 pm

Paul2 wrote:
Sat May 08, 2021 6:25 pm
I'm referring to the vertical tails shown in my original post
Which "original post"? There are no pictures in this forum topic.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

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

Re: Weird thing on Spectral edit Ver 2.3.1

Post by steve » Sat May 08, 2021 7:12 pm

Thanks, I downloaded the image from the direct link and uploaded the image into your first post so that it will show for everyone.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

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

Re: Weird thing on Spectral edit Ver 2.3.1

Post by steve » Sat May 08, 2021 7:14 pm

The "smearing" is due to a short crossfade at the start and end of the selection.
The crossfade is created automatically by the effect so as to avoid creating an audible click at the start / end of the filtered section.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Paul2
Posts: 166
Joined: Wed Sep 04, 2019 1:17 pm
Operating System: macOS 10.15 Catalina or later

Re: Weird thing on Spectral edit Ver 2.3.1

Post by Paul2 » Sat May 08, 2021 7:20 pm

OK, I see the lines in the .ny code:

Code: Select all

        (transition (truncate (* 0.01 rate))) ; 10 ms
        (t1 (min transition (/ tn 2)))        ; fade in length (samples)
        (t2 (max (- tn transition) (/ tn 2))) ; length before fade out (samples)
As I normally take out (attenuate) very small portions, any advantage in tweaking the fade in/out values to other durations?
What would the minimum fade times be to avoid a click?
One sample as it crosses zero?
Just thinking out aloud here.

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

Re: Weird thing on Spectral edit Ver 2.3.1

Post by steve » Sat May 08, 2021 7:42 pm

Paul2 wrote:
Sat May 08, 2021 7:20 pm
What would the minimum fade times be to avoid a click?
The longer the transition, the quieter the transition will be, but obviously you would usually want to keep it as short as possible.

In effect, the transition is like a low frequency, low amplitude pulse. The longer the fade, the lower the frequency. At 10 ms, the effective frequency is low enough to be inaudible. Much less than 10 ms and you may hear a subtle "thud".

10 ms is a good compromise between avoiding an audible glitch and keeping it as short as possible.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Paul2
Posts: 166
Joined: Wed Sep 04, 2019 1:17 pm
Operating System: macOS 10.15 Catalina or later

Re: Weird thing on Spectral edit Ver 2.3.1

Post by Paul2 » Sat May 08, 2021 8:17 pm

That makes perfect sense Steve, thanks, although I'm gonna try with 3mS, 5mS and 7mS and check out the results.

Giving it more thought, there could be a lot more ny plugins that could be tailored to spectral editing, making Audacity even more versatile.
The fact that these spectral editing plugins are external and not compiled into Audacity is a very big bonus.

For example, when a biggish chunk of audio (freq. wise) is heavily attenuated, it could leave a "hole" of near silence which will sound pretty un-natural.
How about a copy and paste function (of a nearby similar selection) but not applied to the whole track, but rather the users selection?

Another idea would be noise generation.
The high and low limits of the selection will be known to Nyquist and I'm assuming level as well.
The noise would then be applied shaped and leveled to the users selection.

Others:

A fade in or out (or both) over the complete selection, could be nice to sculpt percussion when the isolated track is not available.
Then the big one...ability to select irregular shaped regions.
I'm assuming it would be pretty tough to implement programmatically.

With these in mind, would it be OK if I change the title of this thread to something like.."Questions & ideas about Spectral editing"?

Thanks,
Paul

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

Re: Weird thing on Spectral edit Ver 2.3.1

Post by steve » Sat May 08, 2021 8:49 pm

Paul2 wrote:
Sat May 08, 2021 8:17 pm
With these in mind, would it be OK if I change the title of this thread to something like.."Questions & ideas about Spectral editing"?
I'd suggest that you do a bit more digging into the code, try writing some Nyquist code that uses the "spectral" selection, then start a new topic.
Paul2 wrote:
Sat May 08, 2021 8:17 pm
Then the big one...ability to select irregular shaped regions.
That is not possible in the current implementation.
The frequency selection is handled in the main Audacity app (C++). Nyquist just makes use of the low-hz, high-hz, center-hz and bandwidth variables, which it accesses with:
(get '*selection* 'property)
where property is one of: low-hz, high-hz, center-hz, bandwidth.

As a simple example, you can run this code in the Nyquist Prompt to print the centre frequency of a spectral selection in a message window:

Code: Select all

;type analyze
(setf center (get '*selection* 'center-hz))
(if center
    (format nil "The center frequency is: ~s Hz." center)
    (format nil "Make a spectral selection before running this code."))
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Post Reply