1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-04-30 23:59:41 +02:00

8242 Commits

Author SHA1 Message Date
James Crook
7c819595bf Make Message command into an AudacityCommand. 2018-02-21 20:30:00 -05:00
James Crook
8b4b16524a Prevent crash on reentrant Nyquist. 2018-02-21 20:29:59 -05:00
James Crook
57c50ff9ac Nyquist can now make a selection and not have it overwritten by Effect. 2018-02-21 20:29:59 -05:00
James Crook
3d0d28eb03 Add envelope commands
- Added SetEnvelope (which can also delete/clear an envelope.)
- Added GetInfo: Type=Envelope
2018-02-21 20:29:59 -05:00
James Crook
d7e4e338fa Nyquist now defines its parameters. 2018-02-21 20:29:59 -05:00
James Crook
9e33e9082f Allow using default parameters as not-an-error 2018-02-21 20:29:59 -05:00
James Crook
b93a2e53cc Protect Nyquist against effect-within-effect
The Effect code makes temporary copies of wavetracks.  If Nyquist invokes another effect,
its temporary copy is no longer valid.
My solution is to NOT apply the Nyquist effect results IF some other effect was successfully
invoked in creating them.  I do this by counting the effect invocations.  If it has changed, then
Nyquist output Is not applied back to the track.

The net result is that Nyquist prompt can invoke other effects, or process the audio itself,
but it cannot do both.
2018-02-21 20:29:59 -05:00
James Crook
15aad64f7b LISP format improvements (Thanks Steve)
- Readable by Lisp and humans (now), but indentation still a bit strange because of how it is being generated.
2018-02-21 20:29:58 -05:00
James Crook
6236a9fb94 Add support for aud-do command into Nyquist.
Examples:

(aud-do "GetInfo")
(aud-do "Select: Start=4 End=7")
2018-02-21 20:29:58 -05:00
Paul Licameli
e52552056a fix 2018-02-21 20:29:58 -05:00
James Crook
828d01a48c Shorter commands. Shorter scripts. 2018-02-21 20:29:58 -05:00
James Crook
54895655e8 Improved labels script. 2018-02-21 20:29:58 -05:00
James Crook
34f0b97a60 Add ability to set the selected label. 2018-02-21 20:29:58 -05:00
James Crook
a5de0ed0c6 More screenshot options. 2018-02-21 20:29:58 -05:00
James Crook
9ba3ec059b Use a-lists for Lispy output.
- Also bump long strings onto a new line in JSON and LISP formats.
2018-02-21 20:29:57 -05:00
James Crook
205dc13594 Fix \n shenanigans in command output. 2018-02-21 20:29:57 -05:00
James Crook
5d1b3189ac Script the images for Tracks page of manual.
- There's a problem with stem plot preference.  It isn't reloading properly from batch but is from menu.
2018-02-21 20:29:57 -05:00
James Crook
ea4403ee65 Typo. 2018-02-21 20:29:57 -05:00
James Crook
4ee471adb1 Scripts in Piped-Work
- New docimages script for the tracks.
- Added new option in screenshots to capture ruler as well as track.
2018-02-21 20:29:57 -05:00
James Crook
590b471eb7 Fix ScreenshotCommand
- Show Status immediately (Flush), don't wait for window to be closed.
- Correct strings with _ in them.
- Remove unhelpful 'Received Script Command' message.
2018-02-21 20:29:57 -05:00
James Crook
e0ee34e877 Implement selection from ends of tracks. 2018-02-21 20:29:56 -05:00
James Crook
2caad0f407 Implement ReloadPreferences for SetPreferences Command. 2018-02-21 20:29:56 -05:00
James Crook
a8903a6c56 Include tips in command list. 2018-02-21 20:29:56 -05:00
James Crook
500765329f Fix Automation listing
- Now correctly shows optional fields
- Now includes the zero-parameter commands.
- Fetches the Short-Names for menu commands.
2018-02-21 20:29:56 -05:00
James Crook
a0c393a012 Fix GetInfo: Commands (Automated type matching matched 'the wrong thing'). 2018-02-21 20:29:56 -05:00
James Crook
7fa73dbde7 SetClip, SetLabel, SetProject added
- SetTrack also updated with more options.
2018-02-21 20:29:56 -05:00
James Crook
1a7700af8a Optional parameters now working. 2018-02-21 20:29:55 -05:00
James Crook
8b3726e8bc Compilation on Mac
Changes found/recommended by Paul.
2018-02-21 20:29:55 -05:00
James Crook
fa1cedb044 Fix extra spaces 2018-02-21 20:29:54 -05:00
James Crook
860110ff2d Cleaner class hierarchy 2018-02-21 20:29:54 -05:00
James Crook
c0b3c0d13a Doxygen, Clips and Labels
- Classes renamed and better doxygenated
- GetInfo: Type=Clips added
- GetInfo: Type=Labels added.
2018-02-21 20:29:54 -05:00
James Crook
425c8b92f5 Fix build 2018-02-21 20:29:54 -05:00
James Crook
210d4f1fe6 Support: JSON, Lispy or Other formats 2018-02-21 20:29:54 -05:00
James Crook
43e9c2365f Structured output for CommandContext 2018-02-21 20:29:54 -05:00
James Crook
3017f8dddf OldStyleCommandType - It's on the way out.
This renaming makes it clearer which code is still using Dan Horgan's Command system.
2018-02-21 20:29:54 -05:00
James Crook
4c65a74c03 Long message target
This allows interactive display of the results of new commands that generate
lots of text.
2018-02-21 20:29:53 -05:00
James Crook
037df23d3c More Menus Items, Better prompting Dialogs. 2018-02-21 20:29:53 -05:00
Paul Licameli
49a2bb293b fixes 2018-02-21 20:29:53 -05:00
James Crook
cf5ec042f3 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-21 20:29:52 -05:00
Paul Licameli
33b13018df Replace almost all wxArrays with std::vector, except for wxArrayString 2018-02-21 19:33:33 -05:00
Paul Licameli
3b32d39b54 Remove wxArrays of pointers 2018-02-21 19:33:32 -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
080dd34e61 Get rid of wx object arrays, use std::vector 2018-02-21 19:33:27 -05:00
Paul Licameli
89d8f0df63 Rewrite uses of wxEventHandler::(Dis)Connect with (Un)Bind 2018-02-21 19:30:44 -05:00
Paul Licameli
2fbe04eda0 Replace more Connect with Bind; needed redeclaration of custom events 2018-02-21 19:30:40 -05:00
Paul Licameli
e6e8e3251c Rewrite more Connect() with Bind(), which were type incorrect...
... though harmlessly so.  They called to nonstatic member functions of classes
with improper this pointers; though the functions did not use this.

Bind events to nonmember funtions instead.  Sometimes just to empty lambdas to
consume the event and ignore it, blocking other handlers.
2018-02-21 19:28:12 -05:00
Paul Licameli
2f3604bdea Rewrite many calls to Connect() with Bind()...
... it's the more modern way, and does better type checking, without the
dubious casts of pointers-to-member-functions.
2018-02-21 19:28:11 -05:00
Paul Licameli
bf5228267a Calls to Disconnect or Unbind in destructors are not needed, if...
... it's either the source of the connection that is being destroyed, or other
object (such as an ancestor window) transitively owning it and so causing it to
be destroyed too;

or, the sink is being destroyed, and that sink is a wxEvtHandler (which is
always so for Disconnect, though not for Unbind in case Bind was passed a
member function of a non-wxEvtHandler).

wxWidgets takes care of erasing the connection in such cases.

This removes most calls to Disconnect and Unbind.  Many destructors shrank to
nothing.

Notably, in case of popup menu handling, the call to Disconnect is not removable
because the object being destroyed is neither the source nor the sink.
2018-02-21 19:28:06 -05:00
Paul Licameli
12983e1685 Use wxWeakRef to avoid dangling pointer 2018-02-21 19:25:04 -05:00
Paul Licameli
94b97f5c95 Validators: type safe enum arguments & can specify range in ctor 2018-02-21 19:21:09 -05:00