1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-07-04 22:49:07 +02:00

11444 Commits

Author SHA1 Message Date
Paul Licameli
8832621b0a Effects are registered, not exhaustively listed 2020-01-19 19:18:16 -05:00
Paul Licameli
bbdc27b462 LoadEffects.cpp doesn't depend on individual effect classes... 2020-01-19 19:16:51 -05:00
Paul Licameli
69dab8b552 Each built-in effect class registers itself with BuiltinEffectsModule 2020-01-19 19:16:51 -05:00
Paul Licameli
4579835911 Eliminate one of the ## macro hacks in LoadEffects 2020-01-19 19:16:51 -05:00
Paul Licameli
83be5b3045 All loaded built-in effects have nullary constructors 2020-01-19 19:16:50 -05:00
Paul Licameli
1f283a8981 Fewer includes of WaveformSettings.h, SpectrogramSettings.h...
... See ultimate origin of some of the deleted lines at 4724c6a

Whatever change it is that needs loading by LoadPrefs -- do it instead right
after any possibility of changes to the relevant preferences, in the Commit()
functions of SpectrumPrefs and WaveforPrefs
2020-01-19 19:11:14 -05:00
Paul Licameli
2ec2ad378d Break dependency cycle introduced at a69fba9 2020-01-19 14:36:28 -05:00
Paul Licameli
f2ed21f9e5 Fix some comments 2020-01-19 13:23:30 -05:00
Paul Licameli
2570b56176 Rename Maybe and its members more like std::optional of C++17 2020-01-19 11:38:12 -05:00
Paul Licameli
30999ab134 Dynamic registry of sub-views replaces exhaustive switches on type...
... Such switches were in the TCP context menu for wave tracks,
SetTrackVisualsCommand, Nyquist (choosing the string for 'view property of
*tracks*), and the Tracks preferences panel.

This will allow easier, non-intrusive addition of other kinds of track
visualizations.
2020-01-18 20:33:19 -05:00
Paul Licameli
a69fba9990 TracksPrefs does not use hardcoded list of all view types...
... It does have some duplication of string values, but only for purposes of
upgrading old config files.
2020-01-18 20:28:54 -05:00
Paul Licameli
d2ccde77e7 Remove another exhaustive switch on view sub-types, in Nyquist.cpp 2020-01-18 20:28:53 -05:00
Paul Licameli
7cff170cf7 Sub-view objects report their complete type, not just an enum value 2020-01-18 20:28:53 -05:00
Paul Licameli
36aad4d1c6 Don't hard-code the exhaustive list of sub-view types...
... in Wave track context menu and SetTrackVisualsCommand

Instead, discover them through a registry.

This eliminates some duplication of string constants and prepares for
non-intrusive generalization to more kinds of sub-views.

This makes the command agnostic about which subview types are known, but the
context menu still has special case treatment for Spectrogram Settings and
Wave Colors.
2020-01-18 20:26:12 -05:00
Paul Licameli
fb8ba0ce43 Some briefer type aliases for wave track display type 2020-01-18 19:35:17 -05:00
Paul Licameli
d9ddb41410 Un-fix smart single quotes in Nyquist prompt too; see commit 45a0ce1 2020-01-18 19:34:40 -05:00
Paul Licameli
833bbb5455 Supply missing changes in win/ for 6eb0f3a 2020-01-18 16:32:15 -05:00
Paul Licameli
0537bdb89a Fix link on windows 2020-01-18 15:50:38 -05:00
Paul Licameli
96f29e0cd0 Don't forget to modify undo state when toggling a sub-view 2020-01-18 14:40:24 -05:00
Paul Licameli
6eb0f3aca1 Move SpectrumAnalyst into its own files...
... It's the pure calculation common to the Plot Spectrum window and
to spectral editing

This removes some dependencies on FreqWindow
2020-01-18 13:38:19 -05:00
Paul Licameli
72f20d9129 Change cursors for rearranging of tracks...
... To be consistent with the rearranging of sub-views, and with general UI
guidelines.

The hover cursor is an open hand, and the dragging cursor is the closed hand.
2020-01-18 13:03:11 -05:00
Paul Licameli
73fd60543d Amending commit 1176b61 to avoid compatiblity break in macros using EQ 2020-01-18 11:14:41 -05:00
Paul Licameli
705d4a26a5 Don't supply "Waveform (dB)" to the 'VIEW property in Nyquist...
... consistently with the drop-down menu, and now the Tracks Preferences too.

Only distinguish Waveform and Spectrogram and nil.

See also commit e3d9fd9.
2020-01-17 22:48:23 -05:00
Paul Licameli
000d63c95e Widen the hot zone for sub-view rearrangement...
... so it's wider than the close button
2020-01-17 16:14:23 -05:00
Paul Licameli
f10b303279 A close box button for sub-views 2020-01-17 16:10:46 -05:00
Paul Licameli
0f3f13502c Fix hot zones of sub-view cursors...
which got broken at 876cd92ed3a1729a4211938ab3c67c649df4cb3e

And remove duplicate function
2020-01-17 16:04:45 -05:00
Paul Licameli
851b49d912 Avoid churn of handles for sub-view adjustment and rearrangement 2020-01-17 15:53:33 -05:00
Paul Licameli
b45e3e8aac Separate default waveform scale choice in Tracks preferences...
... Some complications in handling correct migration of preferences from
config files in older versions
2020-01-17 12:28:52 -05:00
Paul Licameli
6c3731061f Switch priority of adjust and rearrange hit tests for sub-views 2020-01-17 11:03:25 -05:00
David Bailes
d531e8a2f8 Fix Linux build.
Problem caused by my commit: 64079c3. DBL_MAX was not declared.
2020-01-17 10:06:27 +00:00
David Bailes
64079c3f55 Keyboard scrubbing: faster change of direction
If one of the keyboard scrubbing keys is being held down, and the other keyboard scrubbing key is pressed:
1. With current behaviour, scrubbing in the other direction only starts when the original key is released - scrubbing stops and then starts in the other direction.
2. With the new behaviour, scrubbing immediately changes direction, and does not stop when the original key is released - scrubbing does not stop and then start again.

New behaviour:
If one of the keyboard scrubbing keys is being held down,
2020-01-17 09:32:17 +00:00
Paul Licameli
6fd29ad863 Restrict y coords of the hot zone for the new sub-view rearrangement 2020-01-16 15:01:52 -05:00
Paul Licameli
876cd92ed3 Remove the 16x16 cursors, unused since d52d8de 2020-01-16 14:42:56 -05:00
Paul Licameli
a95838a3e8 Better cursors for sub-view rearrangement 2020-01-16 12:06:59 -05:00
SteveDaulton
e14c9538ad Nyquist: Fix multichan-expand
Many existing Nyquist plug-ins require the old version
of multichan-expand, so in Audacity we need to support
both the old and new versions.
2020-01-16 13:37:26 +00:00
Leland Lucius
30f61a535d Don't copy lsp/ny files to the Resources folder
Needed to remove them from the Audacity project
as they were showing up in the "Resources" folder
of the app bundle unnecessarily.
2020-01-15 14:36:05 -06:00
Paul Licameli
a1ef73398b Implement click and drag to rearrange sub-view permutation...
... The hot zone is 15 pixels wide at the left of the track contents, and the
cursor is a hand.  Those particular choices can be easily amended.
2020-01-15 13:50:28 -05:00
Paul Licameli
1fa41808c2 Some refactoring of SubViewAdjustHandle 2020-01-15 13:44:10 -05:00
Paul Licameli
468d48b8dd Bug2245 residual: better color choice for sub-view separator...
... so it can be seen also in High Contrast theme
2020-01-15 12:58:06 -05:00
Paul Licameli
94af81b9f7 Fix Ubuntu build 2020-01-15 11:08:17 -05:00
Paul Licameli
e3e75705a6 Fix error in const overload of ClientData::Site::FindIf 2020-01-15 11:08:17 -05:00
David Bailes
6b9c8e79cc Bug 1954: Clicks may occur starting/pausing play-at-speed or Scrub
Problem:
On Windows, after 50ms, there is a short period of roughly zero introduced into the output. On Linux, there is also a spike which sounds like a crackle.

In AudioIO::FillBuffers(), Mixer::SetTimesAndSpeed() is called, which sets mT0 and mT1 to a small interval.
In Mixer::MixVariableRates(), all the samples in the interval are used, which means the Resample::Process() is called with last equal to true.
So when Mixer::MixVariableRates() is called again, the resampler is being reused after a call to Process() in which last is true.
It is not stated in the soxr documentation if the resampler will produce valid results in this case, and it's only the scrubbing code which does this.
I think this is the problem, and so the partial fix below avoids this happening.

Partial fix for play-at-speed and keyboard scrubbing:
For these, there is no need to reset the values of mT0 and mT1. (There is no need to allow for the sample position being used to potentially jump around.)
So for these cases, Mixer::SetSpeed() is called, rather than Mixer::SetTimesAndSpeed().
2020-01-15 11:12:40 +00:00
SteveDaulton
f11b2b6bab Restore Nyquist *runtime-path* 2020-01-15 01:37:45 +00:00
Paul Licameli
cbe4a46af2 Bug2265: Should save and restore track heights...
... Regression happened at 3f1fd8ced0fb5fe617ad2dd7808cd1ae2ca2c0f3

The heights were written to file, but not read back again.

This fix was done carefully to avoid making dependency cycles.  We don't want
Track to depend on TrackView or TrackControls.

It's not great that LabelTrack, NoteTrack, TimeTrack, and WaveTrack now have
those dependencies, but at least they don't make cycles.

It would be better to figure out how to attach the view and controls to the
track with ClientData, then just invoke BuildAll to repopulate the view and
controls, so that they are non-null when you reach
Track::HandleCommonXMLAttribute.
2020-01-14 20:04:32 -05:00
Paul Licameli
bd95b910bb Bug2245: Draw a line separating split views 2020-01-14 19:26:56 -05:00
Paul Licameli
9e0372cbea Bold, clickable, butting clip boundaries also in spectrum view 2020-01-14 15:16:30 -05:00
Paul Licameli
97b7572504 Stroke clip edges in spectrum views too, improving split appearance 2020-01-14 14:37:54 -05:00
Paul Licameli
98bd937389 Add the multi-view menu item only if there are multiple sub-views...
... anticipating possible subtraction of all spectrogram code into an optional
plug-in in a later release
2020-01-14 14:06:22 -05:00
Paul Licameli
ae1644627f Define ClientData::slots() 2020-01-14 14:03:50 -05:00
Leland Lucius
333c6905b1 Update Nyquist system.lsp to the r288 version
It removes the "s-plot" function which, when defined as it was in
our system.lsp, caused Nyquist initialization to fail.
2020-01-14 09:44:32 -06:00