Commit Graph

52 Commits

Author SHA1 Message Date
Paul Licameli
58574f2f78 Redo type HFFT as a smart pointer, remove malloc and free 2017-03-17 17:52:51 -04:00
Paul Licameli
f993f1eadf Regularize casts as (int), so they are easier to find and review 2016-09-20 08:42:11 -04:00
Paul Licameli
5d102136a2 Fix noise reduction 2016-09-17 15:38:55 -04:00
Paul Licameli
ad04187a41 Change sampleCount arguments, variables, return values to size_t...
... whenever they really describe the size of a buffer that fits in memory, or
of a block file (which is never now more than a megabyte and so could be fit in
memory all at once), or a part thereof.
2016-09-15 21:03:17 -04:00
Paul Licameli
78be459fa1 Convert sampleCount <-> floating or -> long long explicitly ...
... A non-narrowing conversion out to long long is a necessity, but the
conversions to float and double are simply conveniences.

Conversion from floating is explicit, to avoid unintended consequences with
arithmetic operators, when later sampleCount ceases to be an alias for an
integral type.

Some conversions are not made explicit, where I expect to change the type of
the variable later to have mere size_t width.
2016-09-15 21:02:31 -04:00
Paul Licameli
ed21545c80 pixel column counts and sample window sizes use unsigned types 2016-09-11 20:28:13 -04:00
Paul Licameli
79c79f9cd3 Remove many mentions of sampleCount with auto and decltype...
... This makes much code agnostic about how other things (functions and
arguments) are typed.

Many of these neeed to become size_t instead of sampleCount.
2016-08-24 14:50:45 -04:00
Paul Licameli
1281f1b14b Common function limits buffer size to sampleCount known to be small 2016-08-23 12:46:10 -04:00
Paul Licameli
e599cfa6fa Effect::mOutputTracks is managed by smart pointer 2016-08-13 10:37:51 -04:00
Paul Licameli
14c23803ac Various uses of make_unique 2016-08-10 11:05:52 -04:00
Paul Licameli
6fec00149b Remove some naked new amd delete in: Built-in Effects 2016-08-08 07:51:25 -04:00
Paul Licameli
84c0337aba Fix TAB key navigation on Mac for all dialogs (not only for panels) 2016-07-10 17:12:27 -04:00
Paul Licameli
b279325d76 Mac build 2016-04-01 14:46:40 -04:00
Paul Licameli
5ef4dd46a5 TrackFactory functions return std::unique_ptr, although some callers...
... release() them for now.
2016-03-26 11:50:12 -04:00
Paul Licameli
60bcd7aea2 Fix warnings for unused variables and functions 2016-02-26 14:56:26 -05:00
Paul Licameli
7824e94030 Harmlessly qualify classes as final (or explicitly comment not)...
... Should have no effect on generated code, except perhaps some slight faster
virtual function calls.  Mostly useful as documentation of design intent.

Tried to mark every one of our classes that inherits from another, or is a
base for others, or has abstract virtual functions, and a few others besides.
2016-02-24 20:58:30 -05:00
Paul Licameli
7c4c45a0d5 "new"->"NEW" in comments, easier to find remaining naked operator new 2016-02-14 18:52:41 -05:00
Paul Licameli
56e7653343 "delete"->"DELETE" in comments, easier to find remaining naked operator delete 2016-02-14 18:50:45 -05:00
Paul Licameli
daa7617e88 auto_ptr (deprecated) -> unique_ptr (preferred in C++11) 2016-02-13 12:00:28 -05:00
Steve Daulton
1d6d08c47d Don't push effects that can't be undone onto the Undo Stack 2016-01-21 02:07:28 +00:00
James Crook
4dbcd73ca5 Noise Reduction smoothing now default 3 Max 12
After the freeze, but only just, and as RM I made the call that this matters enough to be worth doing.
2015-09-07 21:03:31 +01:00
Paul Licameli
374f7700d7 Change default for Frequency Smoothing in Noise Reduction 2015-09-01 17:15:31 -04:00
Leland Lucius
dfcad8a926 Remove GTK workarounds (or the reason for them) 2015-08-13 23:28:51 -05:00
Paul Licameli
d39eaa4e65 Remove WaveTrack.h from other headers 2015-07-28 10:02:05 -04:00
Steve Daulton
df8ddde874 Added dB - linear amplitude conversion macros. 2015-07-24 21:59:34 +01:00
Paul Licameli
e70f91c64e Removed ShuttleGui.h from other headers 2015-07-19 12:31:03 -04:00
Leland Lucius
4f4acffad1 Allow chains to use current/factory presets/settings
Also gives builtin effects a mean to determine if batch processing
is active, IsBatchProcessing() returns true if so.
2015-04-26 16:41:05 -05:00
Leland Lucius
7a0aa43a82 Convert all wxTRANSLATE() to XO()
XO() can be used anywhere a string must be extracted for translation
but not automatically translated at runtime.
2015-04-18 23:03:49 -05:00
Leland Lucius
8fbfa460c4 Migrating the remaining effects
This brings the builtin, LV2, and VAMP effects inline with the
Audio Units, LADSPA, and VST effects.  All effects now share
a common UI.

This gives all effects (though not implemented for all):

User and factory preset capability
Preset import/export capability
Shared or private configuration options

Builtin effects can now be migrated to RTP, depending on algorithm.
LV2 effects now support graphical interfaces if the plugin supplies one.
Nyquist prompt enhanced to provide some features of the Nyquist Workbench.

It may not look like it, but this was a LOT of work, so trust me, there
WILL be problems and everything effect related should be suspect.  Keep
a sharp eye (or two) open.
2015-04-16 23:36:28 -05:00
Paul-Licameli
20c510084d I just can't win. Does THIS version make the Mac compiler happy too? 2015-04-14 02:32:02 -04:00
Paul-Licameli
0bb643fcda remove unneeded macro 2015-04-12 22:30:47 -04:00
Paul-Licameli
f638c1504c Merge better fix for compiling NoiseReduction.cpp with wx3- configurations
Conflicts:
	src/effects/NoiseReduction.cpp
2015-04-12 22:24:43 -04:00
Paul-Licameli
4cb521923e Better fix for the compilation of NoiseReduction.cpp with wxWindows 3 2015-04-12 20:00:57 -04:00
James Crook
99416c628e WX3_STRING_FIX
A new macro that conditionally casts to wxString if in wx3.
2015-04-12 21:07:01 +01:00
david avery
ecd0222a15 update src/effects/NoiseReduction.cpp to build on wxWidgets 3 2015-04-11 13:05:10 -06:00
Paul Licameli
fe6f83feea Fix small memory leak in noise reduction, whenever Step 1 fails or is cancelled 2015-04-07 12:22:04 +01:00
Paul Licameli
b8af2d566f Bug886 - Some strings not translated in noise reduction
It may be too late for 2.1.0.  But anyway, I have written in the fix in
a way that does not disturb line numberings.
2015-04-05 22:30:48 +01:00
james.k.crook@gmail.com
abda1166de Fixed issue Steve rated as P1/P2 where noise reduction applied to just the (unseen) spectral selection.
Fix, which is to disable that aspect, was agreed between Paul, Bill, Steve (and OI agree too) and as a TL I'm putting it into action so as not to hold up release with a P1.
2015-01-30 20:43:28 +00:00
james.k.crook@gmail.com
58096be5a2 Preparation for 2.1.0 release: (1) Set Noise Reduction parameters to agreed values. (2) [Reluctantly] Disable Module Prefs. 2015-01-24 14:56:29 +00:00
lllucius
16ca4f17eb Re-adding localized menu labels for effects
If you can believe it, this whole big mess is
just to get localized effect labels back into
the menus.

I sure wish I'd had a little bit more time to
finish up all of the effects.  It sure would 
be a lot cleaner (code wise).
2014-12-15 21:54:23 +00:00
lllucius@gmail.com
83ba6da21a Fixes for noise removal effect
Removes all duplicate accelerator keys and changes ones that
were defined to characters with descenders (they work, but are
not visible on GTK).

Provides a different workaround for problem reported here:

http://audacity.238276.n2.nabble.com/Noise-Reduction-access-keys-tt7565915.html

Which also solves the problem reported here:

http://audacity.238276.n2.nabble.com/Missing-text-in-Noise-Removal-effect-tt7566032.html
2014-12-15 00:04:30 +00:00
stevethefiddle@gmail.com
a675cae252 Fix Noise Reduction access keys. 2014-12-11 17:27:27 +00:00
james.k.crook@gmail.com
51c6bf0d90 Show NewSensitivity rather than old, attack .02, release 0.1, choose between reduce and residue.
To be reviewed by Paul Licameli.
2014-12-10 18:35:14 +00:00
james.k.crook@gmail.com
83172420c7 Trimmed controls in Noise Reduction down (for this release). 2014-12-08 22:04:38 +00:00
lllucius
814ed57a68 Better resolution than r13716
The hairbrained "solution" I came up with in r13716
"worked" but it was simply unnecessary and this is
what I should have just done to begin with.

The previous "solution" actually caused some display
issues in the menus.
2014-12-08 03:11:20 +00:00
james.k.crook@gmail.com
fe722df653 Tweaks to Noise Reduction, by Paul Licameli.
1. Put the new files at the proper level of the Solution Explorer tree. 
2. Fix a tiny tiny inefficiency in RotateHistoryWindows(). 
3. Do not use leading zero-padded windows when gathering statistics. 
4. Hamming windows are in the advanced menu of choices, following Federico Miyara's suggestion.
2014-11-29 17:03:57 +00:00
lllucius@gmail.com
a334a39152 Found that the problem was a missing "class" on the friend statements.
I totally didn't see it!  It wasn't until I googled the error
that I had to stop, slap myself on the back of the head and
say "DOH!"
2014-11-14 04:18:23 +00:00
james.k.crook@gmail.com
2c64427129 Changes to compile NoiseReduction for Linux too. 2014-11-13 12:53:33 +00:00
james.k.crook@gmail.com
84db3a5cc6 Gray out noise reduction fields dynamically when they are not relevant.
Patch from Paul Licameli.
2014-11-13 12:15:43 +00:00
james.k.crook@gmail.com
703fafacb2 Frequency-selection aware noise reduction, plus small adjustments to toolbar and effect. (patch from Paul Licameli)
1. Change in project.cpp fixes misbehavior of spectral selection toolbar,
when you try to enter numbers in the low or high frequency boxes and one of
the frequencies was undefined.

2. Changes in NoiseReduction.cpp now take the spectral selection into
account in step 2, so that noise is reduced (or isolated) only in the
selected range of frequencies.  No effect on statistics gathered in step 1.

3. Other noise reduction changes:  avoid an assertion in case of certain
incompatible settings, and end all messages in message boxes consistently
with a period.
2014-11-11 18:02:31 +00:00