This should correct the crash and will also correct
the problem where one project's playback/capture was
being metered in another project if multiple projects
were open.
With realtime preview, the keyboard user will need this to get
back and forth between the effect and the project window. Actualy,
the "problem" existed before this since the keyboard user couldn't
switch between project and Plot Spectrum windows.
The normal flags-based keyboard handling would not work since it
depends on the state of the project and requires a project window
to have the current focus.
In this new case, a modeless dialog may actually have the focus and
using the "switch window" key combo may happen in nearly any mode, like
while playing.
So, I "created" the concept of "meta" commands...ones that do not have
the restrictions mentioned above. The should be used sparingly and
you must be careful about what happens within their handlers.
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.
I've made it where you can enable and disable via experimentals:
EXPERIMENTAL_REALTIME_EFFECTS
EXPERIMENTAL_EFFECTS_RACK
You will notice that, as of now, the only effects currently set up for
realtime are VSTs. Now that this is in, I will start converting the
rest.
As I start to convert the effects, the astute of you may notice that
they no longer directly access tracks or any "internal" Audacity
objects. This isolates the effects from changes in Audacity and makes
it much easier to add new ones.
Anyway, all 3 platforms can now display VST effects in graphical mode.
Yes, that means Linux too. There are quite a few VSTs for Linux if
you search for them.
The so-called "rack" definitely needs some discussion, work, and attention
from someone much better at graphics than me. I'm not really sure it should
stay in as-is. I'd originally planned for it to be simply a utility window
where you can store your (preconfigured) favorite effects. It should probably
revert back to that idea.
You may notice that this DOES include the API work I did. The realtime effects
were too tied to it and I didn't want to redo the whole thing. As I mentioned
elsewhere, the API stuff may or may not be very future proof.
So, let the critter complaints commence. I absolute KNOW there will be some.
(I know I'll be hearing from the Linux peeps pretty darn quickly. ;-))
This relies on three new nyquist scripts to actually do the editing. The peak-snapping code in FrequencyWindow has been extracted into a new class, SpectrumAnalyst, to provide peak-snapping in spectrogram too.
These are mostly for getting it to build on Linux, but I've
also created new configs in Visual Studio to make it easier
to switch between wx2 and wx3.
For Linux, you have to tell configure where to find the wx3
version of the wx-config script and, since some distros build
wxWidgets v3 against GTK+ v3, you may also need to enable
gtk3 with something like:
./configure --enable-gtk3 WX_CONFIG=/usr/bin/wx-config-3.0
On Windows, I've added "wx3-Debug" and "wx3-Release" to the
existing "Debug" and "Release" configurations.
They depend on you having your WXWIN environment variable
pointing to your wx2 directory and a new WXWIN3 environment
variable pointing to your wx3 directory. For instance, I
have:
WXWIN=C:\Users\yam\Documents\wxWidgets-2.8.13
WXWIN3=C:\Users\yam\Documents\wxWidgets-3.0.2
Doing this allows you to switch freely among the 4 configurations
without having to get out of Visual Studio and monkey around with
the environment.
The project files will also add the location of the wxWidgets DLLs
to the PATH when running Audacity from within Visual Studio. They
add %WXWIN%\lib\vc_dll or %WXWIN3%\lib\vc_dll at the beginning
of the PATH variable as appropriate.
I expect that once we convert to wx3 we'll just drop back down to
the normal Debug and Release configurations, but this should make
switching between wx2 and wx3 much easier during the transition.
We can't go to 3.0.1 yet as there are still build issues on
Linux and OSX. You can get Windows to build, but there's
still some display issues.
These changes should work with wxWidgets 2.8.12 as well, so
we can take our time to get things working properly before
switching over.
This change is believed to be a direct refactoring that does not change functionality. It paves the way for more complex kinds of selection, such as selections involving frequency as well as time. It also reduces risk of left and right edges being swapped in future code using SelectedRegion, as the default is to swap on assignment if needed.
Changes in AudacityProject::SaveAs() warning dialogs, per 'Save Project warning' discussion on audacity-quality, plus some further changes of my own.
Similar changes for 'Save Compressed Project'.
Added Cancel button to both warnings, so user can opt out immediately, rather than have to wait another dialog.
Added wxMessageBox's best 'warning' icon to our WarningDialog constructor, so it shows in title bar. It's low-rez (32x32), but all that's available with wxWidgets 2.8.12. Easy to remove if too ugly.
Must more extensive review of saving state
Try this one David. I reviewed all actions in Menus.cpp and have added state
saving where it seemed to be missing. I had no idea it would be so many (22).
And that was only reviewing Menus.cpp. I believe that will get them all since
all keyboard actions are tied to a menu or command action and they all go
through Menus.cpp. (I still have a few to review in TrackPanel.cpp though)
This is part 2...
Improve performance of selection via Selection bar
This provides a similar type of speed up when selecting with the keyboard via
the Selection toolbar.
This is part 1...
Provides some relief to the selection "hang"
This patch adds the ability for the keyboard based commands (like cursor left,
extend selection right, etc.) to know when the key has been released.
When the patch is applied the current state is saved only when the key is
released and not every time it repeats.
Here's an example of the difference it makes.
This video show the selection "hang", but also watch the CPU usage. All I'm
doing is pressing SHIFT+RIGHT ARROW.
http://youtu.be/tdMntDwGSkM
This one is the same thing bug with the patch applied. Notice that the
selection "hang" no longer occurs and look at the CPU usage!
http://youtu.be/EpXNsQ4Cky0
Make Snap To project specific
This makes the Snap To setting in the selection bar project specific. Changing
it will no longer affect other open projects.
The state is saved to audacity.cfg when the checkbox is changed. This means
that the next project window to open will start with the new value. (As it
should be).
This is an older one...originally from 2011. Bug says it all, but basically it allows logging
to begin immediately upon startup for all platforms. And it has multithreading protection, so
it should now be safe to log from the non-GUI threads.
One tricky aspect was that until GetActiveProject() is ready to return non-NULL, ControlToolBar::RegenerateToolsTooltips() cannot get the project's CommandManager, so cannot get the shortcuts. Changed ControlToolBar::RegenerateToolsTooltips() to be public and now call it late in wAudacityProject(). When called before the project is completely instantiated, in the rewritten ControlToolBar::RegenerateToolsTooltips(), it just sets the tooltips to the names without the keys, pretty much as now -- but I don't think users will ever see that because of the subsequent call.
Anyway, did it in a more programmatic way than the previous code, which reduces string literals duplication.
Btw, I changed the start value for the ID_PLAY_BUTTON because the former value of 0 causes FindWindow() to return the toolbar rather than the button -- wxWidgets bug.
Also got rid of some cruft and applied a few WXUNUSED.