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

672 Commits

Author SHA1 Message Date
Paul Licameli
282abfce7f Abstract TrackPanel::GetSnapLeft() and ::GetSnapRight() 2017-05-18 07:07:50 -04:00
Paul Licameli
d36ac2cedb Revert "Fix for keyboard commands for time shifting clips"
This reverts commit b91160795dedce54745102027f8bb0908828772a.
2017-05-18 07:06:22 -04:00
Paul Licameli
9da999d40c Use OffsetTimeByPixels correctly...
That is, don't assume uniformity of pixels per second, but supply the correct
first argument.

This will matter when there is a magnifier.  But that will not be in the next
version.
2017-05-16 03:05:34 -04:00
David Bailes
b91160795d Fix for keyboard commands for time shifting clips
Commands didn't update history etc.

Fix: Commands now call TrackPanel::MakeParentPushState.
2017-05-15 13:12:11 +01:00
Pokechu22
3de3e7cd4d Add call to MakeParentModifyState for note track controls 2017-05-02 00:37:32 -04:00
Pokechu22
e707f6a263 Use static_cast instead of c-style casts for the velocity sliders 2017-05-02 00:37:31 -04:00
Pokechu22
a76ad22c91 Fix midi channel toggling
This reintroduces the buttons to toggle display of individual midi
channels, and cleans up the code behind that feature.

This functionality has actually been present in production versions of
audacity for a while, at least for clicking.  However, the buttons
themselves were not drawn, making it exteremly painful (but possible) to
use.

As requested by PRL, this is always enabled if USE_MIDI is defined.
2017-05-02 00:37:31 -04:00
Paul Licameli
5dd6a3558b Use #ifdef not #if in two places 2017-04-29 15:53:55 -04:00
Paul Licameli
05badc29e5 simplify some conditional compilation 2017-04-29 15:53:47 -04:00
Steve Daulton
516570074b Add preference option for Stem Plot
Tracks 'behaviors' preferences split to sub-page to avoid over-long
page for Tracks preferences.
2017-04-27 15:16:05 +01:00
James Crook
f0db511724 Add rotated pip
Also remove dead code from theming.
2017-04-26 22:30:31 +01:00
James Crook
de798b17d5 Fix: Swap Stereo sets pan to far right. 2017-04-24 23:24:39 +01:00
James Crook
8ad2e599ab Tweak Theming. Reticules, Down buttons; Selected buttons. 2017-04-06 20:44:24 +01:00
James Crook
fae1089b73 Fix positioning of Mute/Solo button when clicked on. 2017-04-05 22:12:58 +01:00
James Crook
fefc856901 Update slider in tracks on theme change. 2017-04-05 20:16:12 +01:00
James Crook
ebff4db80a Reinstate SplitStereoToMono for non DA builds. 2017-04-03 20:31:22 +01:00
David Bailes
a7a4a70e5f Two commands added, neither on a menu:
Clip Left
Clip Right

If the cursor lies within a clip, the clip and the cursor is moved 1 pixel left/right.
If the cursor position is at both a clip end and a clip start, the second of these clips is moved.

The movement currently ignores the snap to setting on the selection bar, and there is no snapping to the clip boundaries of other clips.
Following the behaviour or shifting with the mouse, the distance moved is rounded to an integral number of samples, and the minimum distance moved is one sample.
2017-04-03 13:53:48 +01:00
James Crook
028ed19d90 Sync with DarkAudacity 2017-04-02 23:07:13 +01:00
Pokechu22
59d740ad77 Use a dedicated velocity slider for note tracks
This gets rid of the offset rectangle hack that was needed to re-use gain
sliders for note track velocities.  It also removes the need for changing
the style of a single slider.  Perhaps most importantly, it fixes link
errors regarding GainSlider(int).

See https://sourceforge.net/p/audacity/mailman/message/35752524/ for
details on why this change is needed and what caused it.
2017-04-01 12:48:43 -04:00
Paul Licameli
0d7250578d Other methods of WaveTrack return void, will throw on failure instead 2017-03-31 18:26:52 -04:00
Paul Licameli
6c4cf46c06 Move mute and solo state into PlayableTrack 2017-03-29 13:45:08 -04:00
Paul Licameli
b2ab9b5087 Simplify MixerBoard.cpp using the PlayableTrack type 2017-03-29 13:42:51 -04:00
Paul Licameli
80984c9f1d From Pokechu22: Rename gain to velocity on note tracks
"Velocity" is the technical term, and it's the term that's used everywhere.
"Gain" was probably only used because "gain" is used on wave tracks; since
note tracks aren't wave tracks (and shouldn't be treated as them) the
corresponding variables should be named velocity.
2017-03-29 13:27:22 -04:00
Pokechu22
bdb0790150 Fix compiling when USE_MIDI not is defined
Compilation broke in TrackPanel in ed277ec and in TrackpanelAx in a96c719c.
2017-03-27 01:12:16 -04:00
Paul Licameli
39b8d99a56 WaveTrack::Get, WaveClip::GetSamples take a mayThrow=true argument...
... and pass non-default in all needed places.

Don't throw, don't put up error dialogs, in drawing or hit-test code.
2017-03-21 17:23:34 -04:00
Paul Licameli
63e44e2b6b Rearrange a few things in time shift button up...
... to reclaim some memory earlier, before possible throws
2017-03-21 14:11:19 -04:00
Paul Licameli
82dd7545c9 Reviewed uses of release(); prefer Destroy_ptr to hold window objects 2017-03-21 14:11:18 -04:00
David Bailes
ec7fe2dfcc Fix for bug 613: menu key deselects track.
When the menu key is pressed, mouse events are also generated, and one of these was interpreted as a mouse click outside the tracks, which deselected the tracks.

A possible fix would have been to make a change in TrackPanel::HandleTrackSpecificMouseEvent() so that only left clicks outside of tracks would deselect tracks.
However, I decided that a better fix was to modify TrackPanel::OnMouseEvent to ignore the mouse events generated when the menu key is pressed. This should prevent these mouse events from causing bugs in any new code.
2017-03-20 13:33:24 +00:00
Paul Licameli
e9a0876818 TrackPanel aborts any dragging action when an exception escapes 2017-03-17 17:53:03 -04:00
Paul Licameli
692a033968 Remove naked new[] in: various 2017-03-17 17:52:47 -04:00
Paul Licameli
0af9b46eac Move many fields out of Envelope that are needed only during editing 2017-03-17 17:52:31 -04:00
Paul Licameli
5fdd9fe05a Remove TrackList::GetLink 2017-03-17 17:52:29 -04:00
Paul Licameli
54aea4bccf Rewrite TrackPanel::FindTrack as FindCell ...
... which reports disjoint rectangles for the track control panel, the vertical
ruler, and the proper track area.
2017-03-17 17:52:28 -04:00
Paul Licameli
d831318132 simplify SpectrogramSettings::GetScale; abstract frequency-to-bin...
... this is a preparation for the constant-q feature, if we want it.
2017-03-17 17:52:27 -04:00
Paul Licameli
9af53f92cc un-confused editor indenting 2017-03-17 17:52:21 -04:00
Paul Licameli
81285ee0c1 More const and override 2017-03-17 17:52:20 -04:00
Paul Licameli
cde1e1eaab Remove some duplication, fix EXPERIMENTAL_OUTPUT_DISPLAY and Esc key 2017-03-17 17:52:18 -04:00
Paul Licameli
64d163ebcd Make EXPERIMENTAL_OUTPUT_DISPLAY compile 2017-03-17 17:52:18 -04:00
Darrell Walisser
43291687a5 Bug 1401 - Wait for window visibility before starting timer 2017-02-25 16:16:42 -05:00
Steve the Fiddle
14c706e16b Bug 1560 - RTP effects: Repeatable crash using Track Dropdown Menu to split during transport
Fixed by disabling some menu items during realtime preview.
2016-12-16 22:53:54 +00:00
Steve Daulton
3a9983795f Bug 1547
Fix some 'on pause' inconsistencies.
2016-11-14 10:32:55 +00:00
Paul Licameli
8b66fc4b05 Restore change of Waveform dB scale with change of magnification...
... This is done with Shift+Ctrl+wheel and pointer in the vertical ruler, and
the pointer y coordinate near the bottom of the dB scale.

If y coordinate is far from there, then Shift+Ctrl+wheel changes dB level
without change of magnification (as before this commit).
2016-10-28 12:36:26 -04:00
David Bailes
ff9763f984 Add two commands to move the cursor/selection to next/prev label
The two commands are "selection to next label" and "selection to previous label".
They have default shortcuts alt+right and alt+left.

A label track does not have to be the focus. If there is a single label track in the project, that it used. If there is more than one label track, then the first label track, if any, starting at the focused track is used.

If the commands are used during playback of the project, playback continues from the new cursor/selection.

The commands provide feedback to screen readers: the name of the label, and position in the form of "i of n".
2016-10-24 14:24:20 +01:00
Paul Licameli
25b7a0040f Make shortcut keys for moves really appear in track control menu...
These are "Moved focused track up/down/to top/to bottom" in keyboard
preferences.

There were prior changes that made any shortcuts for them appear in the track
control drop-down menu, but only after closing Preferences.  They still did
not appear after restart of Audacity, although the keystrokes had their effect.

See commit bb7dba2b678735da60b857fa99e963396d5a875f
and commit 7608e9cb521a6d57a030e1339b980c85f6b97227
2016-10-21 10:51:17 -04:00
James Crook
44c3474e4e Prompt with 'Command-Click' on Mac, Not 'Ctrl-Click'. 2016-10-09 22:16:18 +01:00
James Crook
d6302bc370 Count stereo tracks as one track, not two.
The TrackIterator actually iterates through channels, so we need to skip the linked tracks when counting.
2016-10-07 21:53:10 +01:00
James Crook
fe2dfca3e0 Bug 1522 - No pointer or Status Bar indication of CTRL-click in waveform to move selection boundary
I also took the opportunity to modifier the Status Bar indications when in the TrackInfo.
1) We now mention ctrl click can select or deselect track.
2) If there is only one track, we don't now prompt about rearranging tracks, since you can't.
3) If you hover in a label track's VRuler (which is just a spacer so that things line up), you now don't get a message.
2016-10-07 21:38:18 +01:00
James Crook
2add9792ce Bug 1484 - (Residual) allow an unselected track to be an anchor. 2016-10-06 20:50:45 +01:00
James Crook
44375c252a Bug 1484 - No ctrl-click toggling; History for anchor (mLastPickedTrack) 2016-10-04 09:05:47 +01:00
James Crook
37a0cd3af6 Bug 1484 - Cannot one-step extend/contract selections vertically or horizontally to specific TrackSelFunc
Progresses us a little towards closing.  Ctrl-Click on waveform now removes track selection status, not just adds it, and we don't flicker on again subsequently when we drag.  Ctrl-Click won't remove the last remaining selection (by design).  Shift-Click can now reduce us down to one track, rather than the previous behaviour when reducing track selection.
2016-10-03 13:28:25 +01:00