Narrowband Noise

Archive of Nyquist Plug-ins.
Many of the plug-ins here will be available on the Audacity Wiki.
Forum rules
This Forum is an archive of old topics concerning Nyquist plug-ins.

Feedback and questions relating to topics may be posted, but please
DO NOT POST NEW TOPICS HERE.

New plug-ins may be posted on the New Plug-Ins board.
Other posts relating to Nyquist should be posted to the main Nyquist board.

The main repository for Audacity/Nyquist Plug-ins is on the Audacity Wiki.
steve
Site Admin
Posts: 80677
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Narrowband Noise

Post by steve » Mon Sep 03, 2012 10:42 am

This is intended to be a replacement for the old "Noise Band" effect (which does not work http://forum.audacityteam.org/viewtopic ... 36#p190436)

I've posted it here for testing / checking and proofreading the GUI text.

New features in this version:
  • Error checking user input.
  • Duration allows fractional values with one slider rather than 2.
  • Amplitude may be specified by the user.
  • Supports independent L/R channels for stereo tracks.
  • GUI updated to current conventions.
noiseband.ny
Old version (Obsolete)
(1.8 KiB) Downloaded 308 times
The latest version is available here: http://wiki.audacityteam.org/wiki/Nyqui ... band_Noise
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: Narrowband Noise

Post by Gale Andrews » Tue Sep 04, 2012 3:25 am

Maybe the comments should have ;; http://www.gnu.org/licenses/old-licenses/gpl-2.0.html per convention.

So people can use it from the Generate menu without changing defaults, I suggest "Identical" (renamed as "Mono/Dual Mono" or similar) be default.


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

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

Re: Narrowband Noise

Post by steve » Tue Sep 04, 2012 4:24 am

Gale Andrews wrote:Maybe the comments should have ;; http://www.gnu.org/licenses/old-licenses/gpl-2.0.html per convention.
Yes, no problem. The license statement had just been copied from an older plug-in. I'll update it, Also I think that I prefer the comment block above the ;control lines so I'll change that too.
Gale Andrews wrote:So people can use it from the Generate menu without changing defaults, I suggest "Identical" (renamed as "Mono/Dual Mono" or similar) be default.
"Dual Mono"? Is that different from "stereo"?

I'm happy to change the wording of "Independent / Identical" but I think that "Mono / Dual Mono" is a bit confusing. Any other ideas?

Thanks for the feedback .
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

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

Re: Narrowband Noise

Post by steve » Tue Sep 04, 2012 5:21 am

Gale Andrews wrote:So people can use it from the Generate menu without changing defaults, I suggest "Identical" (renamed as "Mono/Dual Mono" or similar) be default.
How about
Number of audio channels: "1" or "2 (stereo)"
default = 1

That wording ties in with the (Nyquist) error message "Nyquist returned too many audio channels".
noiseband.ny
Old version (Obsolete)
(1.85 KiB) Downloaded 245 times
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: Narrowband Noise

Post by Gale Andrews » Tue Sep 04, 2012 6:32 am

I believe identical left and right channels in a stereo track is properly described as "dual mono", but anyway, for those who have a stereo track to begin with, isn't choosing "1" audio channels and getting two channels (or four if you have two stereo tracks) more confusing than before? I agree it's a bit less confusing now if you have a mono track and choose "1".

Maybe you could have

A) "Number of independent channels" 1, 2

or

B) "Independent channels:" No, Yes (needs stereo)

You could have "different" instead of "independent".

I think A) is better than what we have now (if you don't mind the length of the label).

I think progress labels for effects are un-necessary as you know, but as we have them, should line 7 be

Code: Select all

;action "Generating Narrowband Noise..."   
to distinguish it from Audacity's Noise Generator?

line 30 has a UK English spelling of "Centre" while the others are "Center":

Code: Select all

(setq err "Centre Frequency out of range.~%"))      
line 33 has "Band Width" in the error but "Bandwidth" (more correct?) is in the GUI:

Code: Select all

(setq err (strcat err "Band Width out of range.~%"))) l33 
I noticed the errors don't display the user's incorrect input value as in other plug-ins, but "~%".

Is the default length long enough? I would expect this to be of some value for brainwave entrainers? If they are the main marked, they will want minutes and seconds, I'd have thought.

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

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

Re: Narrowband Noise

Post by steve » Tue Sep 04, 2012 7:33 am

Gale Andrews wrote:I believe identical left and right channels in a stereo track is properly described as "dual mono"
That's what I would call it, but not sure how obvious that would be.

Gale Andrews wrote:or those who have a stereo track to begin with, isn't choosing "1" audio channels and getting two channels (or four if you have two stereo tracks) more confusing than before?
Well for a stereo track, choosing "1" does return 1 audio channel and Audacity puts it into both left and right of the stereo track (but I agree that isn't obvious either).

For multiple tracks "Identical" channels creates 1 channel per track whether mono or stereo tracks.
For multiple tracks "Independent" creates 2 channels for a stereo track and an error message for mono tracks.

I'm quite tempted to remove the "stereo" feature. If someone really wants stereo they can generate to mono tracks and join them together. That would certainly be a lot more simple. It's a shame that Nyquist does not know if the track is mono or stereo.

Gale Andrews wrote:I think progress labels for effects are un-necessary as you know, but as we have them, should line 7 be

Code: Select all

;action "Generating Narrowband Noise..."
It could be, but it already says "Narrowband Noise" at the top of the window, so I went for the brief description.

Gale Andrews wrote:line 30 has a UK English spelling of "Centre" while the others are "Center":
Spelling a word just one way shows a lack of imagination ;)
This is the last time that I use the word "center" as a variable, it caused loads of trouble while writing the code :D

Gale Andrews wrote:line 33 has "Band Width" in the error but "Bandwidth" (more correct?) is in the GUI:
Yes, "bandwidth" I think is correct (or at least, more common).
Gale Andrews wrote: I noticed the errors don't display the user's incorrect input value as in other plug-ins, but "~%".
Oops.
I don't think that it's necessary to show the actual values, but "~%" should have been "n" (except for line 50).

Gale Andrews wrote:Is the default length long enough?
If the max length is too long, then we (yet again) run into the memory problem when normalizing.
Also, it makes it quite fiddly to set a short duration with the slider.
The original effect had a maximum slider duration of 30 seconds, whereas this version has a slider range of 60 seconds.
I'd not considered brainwave entrainers. What would you consider to be a reasonable maximum?

I could remove the "stereo" option and add a "minutes" slider.
1 hour mono uses about 600 MB of RAM. For independent stereo it would be double (but for 2 mono tracks, still 600 MB).
I can add a progress bar, but it will not appear until Nyquist has completed the number crunching, which could be quite a while when generating a very long track.
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: Narrowband Noise

Post by Gale Andrews » Thu Sep 06, 2012 6:27 am

steve wrote:I'm quite tempted to remove the "stereo" feature. If someone really wants stereo they can generate to mono tracks and join them together. That would certainly be a lot more simple. It's a shame that Nyquist does not know if the track is mono or stereo.
If I'm right that brainwave entrainers and sound effects lovers will like this, I don't think you should rip real stereo out. Stereo makes a lot of difference to the "effect" of these sounds.

If you don't like suggestion A) or B) for text, how about

"Stereo Output" No, Yes

with a custom instead of generic error message if they say "yes" with only a mono track?
steve wrote:I'd not considered brainwave entrainers. What would you consider to be a reasonable maximum?
20 or 30 minutes?

A "minutes" slider might be OK ; it would be still be nice to support fractional seconds.

I think the [minutes] [seconds] text input box in Click Track works OK, but would I assume supporting other than integers in such a box is hard to code?



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

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

Re: Narrowband Noise

Post by steve » Thu Sep 06, 2012 12:27 pm

Gale Andrews wrote: how about

"Stereo Output" No, Yes

with a custom instead of generic error message if they say "yes" with only a mono track?
I like "Stereo Output: [No, Yes]" best. It's simple and clear imo.
Unfortunately I cannot intercept the default message because Nyquist generator plug-ins do not know how many channels there are in the track. The generic error message is produced by Audacity when it receives the audio data back from Nyquist and tries to put it back into the track.

I think that the best that I can do is to output some debug information to the debug screen (which only appears if the user clicks the Debug button rather than the OK button). This is not an ideal solution, but at least it would an easy way to troubleshoot the error. The plug-in could output to the debug window what user options were set and how many audio channels were returned.

Gale Andrews wrote:20 or 30 minutes?

A "minutes" slider might be OK ; it would be still be nice to support fractional seconds.

I think the [minutes] [seconds] text input box in Click Track works OK, but would I assume supporting other than integers in such a box is hard to code?
I'll go for two sliders:
minutes (integer): default = 0
seconds (float): default = 30.0 (same as built in generators)

There should be no problem with up to 20 minutes.

The only drawback with supporting fractional seconds is how to support 59.99 seconds. To support fractional seconds greater than 59 seconds, the slider range for seconds needs to be 0 to 60. Three sliders (minutes, seconds, milliseconds) seems like overkill.
Gale Andrews wrote:I think the [minutes] [seconds] text input box in Click Track works OK, but would I assume supporting other than integers in such a box is hard to code?
The problem is commas. http://bugzilla.audacityteam.org/show_bug.cgi?id=173
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

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

Re: Narrowband Noise

Post by steve » Thu Sep 06, 2012 4:06 pm

I think this version implements all of the issues raised.
noiseband.ny
Old version (Obsolete)
(2.17 KiB) Downloaded 233 times
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: Narrowband Noise

Post by Gale Andrews » Fri Sep 07, 2012 3:26 am

Thanks, Steve.

I think it would look better (and balance the label lengths better) if you wrote out "minutes" and "seconds"

Code: Select all

;control dur-m "Duration (minutes)" int "" 0 0 20
;control dur-s "Duration (seconds)" real "" 30 0 60
Very nice, I think.


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

Post Reply