Commit Graph

118 Commits

Author SHA1 Message Date
James Crook 6a4663e19c Use wxGetUTCTimeMillis in preference to wxGetLocalTimeMillis
For internal time-difference test, it is significantly faster, and does not suffer from daylight-saving time shifts.
2018-10-29 19:59:28 +00:00
Paul Licameli 11d217076a Remove PluginManager::GetTranslatedVendor()...
... Instead, use the IdentInterfaceSymbol for vendor reported by the effect
2018-04-11 11:13:41 -04:00
Paul Licameli 2c19e8f81e Use IdentInterfaceSymbol to identify effect families 2018-04-11 11:13:40 -04:00
Paul Licameli e3c54a769e Use IdentInterfaceSymbol in PluginDescriptor 2018-04-11 11:13:40 -04:00
Paul Licameli 4bfd8abc2b Fix more missed translations 2018-03-08 22:53:00 -05:00
Paul Licameli 298e440e1b Fix compilation of EXPERIMENTAL_EFFECTS_RACK again 2018-02-24 17:07:22 -05:00
James Crook 0ad533a740 Automation -> Scripting. 2018-02-24 14:20:30 -05:00
James Crook 859fe69a15 Case insensitive command names. 2018-02-24 14:20:28 -05:00
James Crook 5e2371c636 Use a-lists for Lispy output.
- Also bump long strings onto a new line in JSON and LISP formats.
2018-02-24 14:20:26 -05:00
James Crook 1551a5a073 Include tips in command list. 2018-02-24 14:20:25 -05:00
James Crook 1d9477a455 SetClip, SetLabel, SetProject added
- SetTrack also updated with more options.
2018-02-24 14:20:24 -05:00
James Crook 8ebf502cd6 Cleaner class hierarchy 2018-02-24 14:20:24 -05:00
James Crook ca5dac59ff Support: JSON, Lispy or Other formats 2018-02-24 14:20:23 -05:00
James Crook e29699086e More Menus Items, Better prompting Dialogs. 2018-02-24 14:20:23 -05:00
James Crook 1c988b4e3a Automation: AudacityCommand
This is a squash of 50 commits.

This merges the capabilities of BatchCommands and Effects using a new
AudacityCommand class.  AudacityCommand provides one function to specify the
parameters, and then we leverage that one function in automation, whether by chains,
mod-script-pipe or (future) Nyquist.

- Now have AudacityCommand which is using the same mechanism as Effect
- Has configurable parameters
- Has data-entry GUI (built using shuttle GUI)
- Registers with PluginManager.
- Menu commands now provided in chains, and to python batch.
   - Tested with Zoom Toggle.

- ShuttleParams now can set, get, set defaults, validate and specify
the parameters.
- Bugfix: Don't overwrite values with defaults first time out.
- Add DefineParams function for all built-in effects.
- Extend CommandContext to carry output channels for results.

We abuse EffectsManager.  It handles both Effects and
AudacityCommands now.  In time an Effect should become a special case of
AudacityCommand and we'll split and rename the EffectManager class.

- Don't use 'default' as a parameter name.
- Massive renaming for CommandDefinitionInterface
- EffectIdentInterface becomes EffectDefinitionInterface
- EffectAutomationParameters becomes CommandAutomationParameters
- PluginType is now a bit field.

This way we can search for related types at the same time.

- Most old batch commands made into AudacityCommands.
The ones that weren't are for a reason.  They are used by mod-script-pipe
to carry commands and responses across from a non-GUI thread to the GUI
thread.

- Major tidy up of ScreenshotCommand
- Reworking of SelectCommand
- GetPreferenceCommand and SetPreferenceCommand
- GetTrackInfo and SetTrackInfo
- GetInfoCommand
- Help, Open, Save, Import and Export commands.
- Removed obsolete commands ExecMenu, GetProjectInfo and SetProjectInfo
  which are now better handled by other commands.

- JSONify "GetInfo: Commands" output, i.e. commas in the right places.

- General work on better Doxygen.
    - Lyrics -> LyricsPanel
    - Meter -> MeterPanel
- Updated Linux makefile.
- Scripting commands added into Extra menu.
- Distinct names for previously duplicated find-clipping parameters.
- Fixed longstanding error with erroneous status field number which
  previously caused an ASSERT in debug.
- Sensible formatting of numbers in Chains, 0.1 not 0.1000000000137
2018-02-24 14:20:22 -05:00
Paul Licameli 575070e9ae Remove PluginDescriptor::GetTranslatedEffectFamily...
... and instead look it up by ID, and find the effect's family name

Simplifying what was done at 4628d6afa7
2018-02-21 21:43:02 -05:00
Paul Licameli 8be1e8fdad Remove wxArray(Int|Long|Double) except where wxWidgets fns need it 2018-02-21 19:33:31 -05:00
Paul Licameli 7fd78183d2 Remove needless uses of wxString::c_str() in wxString::Format...
... and similar wx "variadics," which all treat wxString smartly enough that
you don't need this.

Don't need c_str either to convert wxString to const wxChar * because
wxString has a conversion operator that does the same.
2018-01-01 20:34:33 -05:00
Paul Licameli ccb4bbac33 Translate "Message" as default title of message box...
... This required a sweeping change of all calls to wxMessageBox!  But it seems
safe to me, despite the great number of touched files.
2018-01-01 17:50:02 -05:00
James Crook f463eda36c Clean up some dead code and MSVC warnings.
- Dead code from experiments in SelectionBar removed.
- Many warnings about unused parameters fixed with WXUNUSED()
- Many warnings about signed / unsigned comparisons cleaned up.
- Several 'local variable declared but not used' warnings fixed.
2017-12-08 15:20:39 +00:00
Paul Licameli 5f298accbd Translated effect name and description in many places in Effect.cpp...
... including titles of dialogs,
messages,
About sub-menu of the Manage button,
long-form names of Undo items (in history view),
message for why command is not allowed when there is no selection

Also one place in Effect Rack code but it's commented out
2017-09-10 19:21:35 -04:00
Paul Licameli ddf236993f Bug1502: VST and AU plug-ins should show correct rates and spectra 2017-07-24 14:20:54 -04:00
Paul Licameli a4c7d37d3e Remove naked new[] in: effects framework 2017-03-17 17:52:48 -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 67cec5ad83 Make many counts of tracks and channels unsigned...
... And in some places where a library uses signed types, assert that
the reported number is not negative.

What led me to this, is that there are many places where a size_t value for
an allocation is the product of a number of channels and some other number.
2016-09-07 10:11:41 -04:00
Paul Licameli 942c62b6f6 Remove some naked new amd delete in: various 2016-08-08 07:51:24 -04:00
Paul Licameli 2e5d24ab02 Make EXPERIMENTAL_EFFECTS_RACK compilable 2016-04-03 09:42:16 -04:00
Paul Licameli df6a7c5464 More uses of safenew for classes we derive from wxWindow classes...
... Also removed some unnecessary deletes of widgets that are managed by parent
windows
2016-02-14 20:39:28 -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
Steve Daulton 1d6d08c47d Don't push effects that can't be undone onto the Undo Stack 2016-01-21 02:07:28 +00:00
Leland Lucius 0ef7ccb1d1 Fix permissions...not sure why this was happening though 2015-05-29 19:49:28 -05:00
Leland Lucius b8ce7f6125 Fix for bug #981 2015-05-28 09:57:59 -05:00
Leland Lucius a7203c5d3f Fix crash when certain effects are open and a new project window is created
This affected VST, LADSPA, LV2, and Audio Unit effects.
2015-05-16 22:14:07 -05:00
Leland Lucius 07f965a057 Make sure the effect ID is valid (non-blank) 2015-05-12 10:40:28 -05:00
Leland Lucius 20fbb163d2 Fix a few things with chain/effect parameters as reported by Gale 2015-04-29 09:54:48 -05:00
Leland Lucius 7407243e25 Save/restore effect state during batch processing 2015-04-27 09:22:47 -05:00
Leland Lucius e41db0e4b4 Preload the "Select Preset" with current setting
Also, loads the command parameters box with the default preset if
the selected effect doesn't expose any automation parameters.
2015-04-27 05:02:56 -05: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
Daniel Winzen 759ff8cd0d Performance improvements 2015-04-23 16:07:25 +02: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
lllucius 10f62cdae5 Fix for bug #833
This allows duplicate items in the effects menus and provides a
means to uniquely identify each item.
2015-01-19 16:28:48 +00:00
lllucius 3755e57591 Do not call start/stop if suspended
The RealtimeProcessStart/Stop methods are used to process the
samples for the master effect (the one the user interacts with),
it should be bypassed as well if suspended.
2015-01-05 15:50:45 +00:00
lllucius@gmail.com fcf2a28867 Fix for opening effect while play is active
Stupid Leland didn't test all cases...grrrr!!!
2015-01-03 17:55:36 +00:00
lllucius@gmail.com aa49817563 Fixes 2 VST issues, an RTP issue, and relaxes an AU restriction
1)  Shell VSTs were completely unrecognized...that is no longer the case
2)  All VSTs will now ALWAYS be initialized and cleaned up from the main
    GUI thread.  I found that some Waves VSTs would freeze Audacity when
    initialized in the audio thread and closed in the GUI thread.
3)  While realtime previewing, it was possible that the wrong slave 
    could be used to process new blocks of audio.
4)  I found that the Waves AUs don't crash on a real Mac (instead of a
    virtual machine), so I removed the "black list" I'd put in just for
    them.  (Something to do with needing full 3D support I think.)

Anyway, #2 and #3 were quite intrusive, so as much RTP testing as possible
would be a good thing.
2015-01-02 05:24:43 +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 6ecf2e38e9 Separate power button and playing state
This will allow the power button to function independently
of the actual playback state.  It also gets rid of the whole
"Bypass" folderol.
2014-12-13 18:24:11 +00:00
lllucius 9ce427f283 Fixes StereoToMono effect
The problem is that lookup of effects is based on their
ID and legacy effects didn't play well in this scheme, so
I've added a workaround for now.  This will go away when
I get all of the effects converted.

And removes some debugging.
2014-12-07 19:27:06 +00:00
lllucius 2803bcd67a Protect against blank parameter names 2014-12-07 18:26:22 +00:00
lllucius 4d76e14794 Changes to the Effect dialog based on QA suggestions
Solves the problem of what the "Settings" button should say
by converting it to a bitmap button.

Adds the missing "bypass effect" button.

The Ok/Cancel buttons are now Apply/Close buttons and the
dialog stays open after the apply is done.

Record is no longer disabled when an RTP effect is open as
the RTP effect now monitors when recording starts and disables
its buttons as needed.

Added "Play", "Skip forward", and "Skip backward" buttons.
While the other stuff is required, this last one is in to
get a feel for its usefulness.  We'll need to get feedback
on it pretty quickly so we can rip it out if need be.
2014-12-02 08:55:02 +00:00
lllucius c2218d5ddf Only allow one realtime effect at a time
Warning...this required a small hack that allowed updating the
menus even if the toplevel frame is not the project window.  This
is because with the active frame actually becomes the effect dialog
and UpdateMenus() bailed if it wasn't the project frame.

This should be removed when we get multiple effect support.
2014-11-29 23:17:03 +00:00
lllucius 071cd0f066 Disables the rack and fixes a couple of other things
Needed to redo a bit of code so that effects would work
without the rack in the middle.  I wanted to disconnect
it completely as I'm not sure it something that will be
kept around.

During realtime preview, effects will be applied in the
order their dialogs were opened...hmmm...what happens
if they don't have a dialog???  I look into that.

Fixed the focus target for windows when cycling among
active windows as suggested by David B.

Fixed plugin registration if the plugins were located
in the "Plug-ins" folder.  I believe this problem may
have played a role in the duplicate menu items.
2014-11-27 12:22:41 +00:00
lllucius 41083f74cc Another round of effects bashing.
I've added some of the new plugin stuff to LV2, Nyquist, and
Vamp so that they play better in the new system.  They no
longer get bunched in with the Audacity effects when sorting
or grouping the menus.  They have not been fully converted
but they should be good for 2.1.0.

Nyquist plugins now include ";author" and ";copyright"
statements.

Added the 4 new Nyquist plugins to the Windows build.

Audiounits are still coming...had to push them to the back
burner to get this other stuff out of the way.

Scanning for new plugins has been improved so that newly
discovered ones will be shown to the user when Audacity starts.

Effects menu sorting has been fixed and improved.

Disabling effect types in Preferences works again and you
no longer have to restart Audacity for them the change to work.

Effect usage in chains works again.

Plugin registration dialog code simplified a bit.

Group names in the pluginregistry are now base64 encoded.  I
never really thought about it, but wxFileConfig group names
are case insensitive and since I was using the group name as
the plugin ID, I ran into a conflict on Linux where there
were two plugins with the same name, just different case.  (And
they were different plugins.)  Hoping all of this will change
when/if the config file gets converted to XML.  (wx3 if finally
including XML support)

A fair amount of cleanup of this new code has been done and
will continue as more stuff is converted.
2014-11-19 06:58:44 +00:00
lllucius ad92e8c4bf One more round of effects changes.
The big thing is the common efffects UI.  Right now Ladspa and VST
have been converted to use it and Audiounits will be next.  It makes
everything nice and consistent while reducing the clutter in the
dialog.

Other goodies are:

Ladspa effects now show output controls when supplied by the effect
Ladspa effects now work fine as Analyze type effects
Ladspa now has user presets
VST effects dialog is now less cluttered...leaving more room for the effect
Ladspa and VST effects now share a common UI
Ladspa and VST effects are now usable in chains
Ladspa and VST effects now handle user presets the same way
Currently active effects settings automatically saved and reloaded
Can now do numeric range checking on input fields.

And, as always, plenty of critter squashing.
2014-11-14 03:03:17 +00:00
james.k.crook@gmail.com 740bc0d983 Fixed warnings about AUDACITY_DLL_API.
If one class is exported, then all the classes it derives from must be exported too, otherwise we get warnings wherever it is used.
2014-11-11 15:47:48 +00:00
lllucius@gmail.com 94d97f87b8 Darn Windows developers! (Or the VS compiler is just too helpful.) 2014-11-06 04:58:40 +00:00
lllucius 3d8de17c22 Slightly better error handling during effect initialization
It at least detects load failures now.  ;-)
2014-11-05 20:41:29 +00:00
lllucius@gmail.com 126152a756 Converts the ladspa effects to the new format and adds realtime support
This also (hopefully) corrects some additional problems in general 
realtime support.  Particular focus should be given to the handling
of various combinations of stereo, left channel mono, right channel
mono, and true mono as this has been a particularly troublesome
area.
2014-11-05 07:06:38 +00:00
lllucius cae6669275 Round 3 of realtime changes.
This gets meter type VST effects working again by extending the

The master now maintains his own internal buffers and sums (mixes) all
playing tracks into those buffers.  The buffers are then fed into the
VST effect that is presented to the user.  This allows the effect to
provide feedback to the user if it support it.  Such effects may display
meters or clipping indicators.

Several issues with treading have also been corrected (hopefully ;-)).
These showed up mostly on Linux, but could have happened on the others
as well.

The realtime support is no longer limited to 2 channels per logical
track.  Once support for more channels is added, this should be ready
for it.

The rack dialog can now be toggled via the edit toolbar button.  It
doesn't stay pressed because the closing of the dialog would have to
be communicated back to the toolbar.

As the rack is updated with new or removed effects or active state
changed, all effects in the active list were shutdown and all effects
in the updated list were initialized.  This now shuts down only the
effects no longer in the list and initializes only new ones.

The rack now uses wxBitmapButton instead of Audacity's AButton.  The
AButton has a timing issue that prevents it from being deleted while
processing the click event.  I looked into it, but gave up and switched
to the wxBitmapButton.  Unfortunately, there's a problem with the
wxBitmapButton as well...at least on my setup here.  Either the bitmaps
are being scaled or antialiased.  Will have to get feedback on this.

I finally figured out why some VSTs didn't seem to do anything in
realtime, at least in my case anyway.  I've installed a lot of demo
VSTs and while they work in "batch/offline" mode, some of them will
not work in realtime since vendors tend to remove automation as one
of the demo limitations.

More changes coming shortly...
2014-11-03 06:48:54 +00:00
lllucius d50e9fee52 Realtime preview round 2
This changes the realtime preview from using 1 effect for all tracks
to an effect per track (logical track).  This should clear up the 
bad audio when more than one track (or a stereo track) is present.

An unfortunate side effect is that meter effects no longer work since
the one presented to the user is not the one doing the actual work.
Suggestions on how to remedy this are welcome.
2014-10-30 14:04:48 +00:00
lllucius d48f03518f Fixing some typos and makes effects added to rack OFF by default
That's going to solve some doubling up of effects while playing I think.
2014-10-29 03:46:53 +00:00
james.k.crook@gmail.com f0b3367a8a Effects Rack now appears center screen first time it is used. 2014-10-27 21:47:28 +00:00
lllucius 1eeb4d979a The fabled realtime effects...
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.  ;-))
2014-10-26 03:24:10 +00:00
benjamin.drung@gmail.com 277932dccb Remove trailing spaces. 2014-06-03 20:30:19 +00:00
martynshaw99 4ce2643d5f Remove the
// Indentation settings for Vim and Emacs
etc. lines from all files, as Campbell's patch (except for other changes to Languages.cpp)
2013-09-24 00:14:37 +00:00
martynshaw99 c7d2c6e282 Make EffectManager::GetEffectByIdentifier do what BatchCommands::GetAllCommands expects, and disable the BatchCommandDialog mEditParams button when illegal. 2011-08-16 00:12:12 +00:00
v.audacity c31e01e980 Clean up some issues with Effect abstract classes, primarily that the progress dialog had Stop and Cancel buttons that produced exactly the same results, i.e., Cancel, so I removed the Stop button. 2010-09-02 02:40:17 +00:00
ra e74978ba77 Locate and position the current Audacity source code, and clear a variety of old junk out of the way into junk-branches 2010-01-23 19:44:49 +00:00