1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-23 17:30:17 +01:00
Commit Graph

885 Commits

Author SHA1 Message Date
Paul Licameli
8da228748b Delete this start of time shift on double-click (it never completed) 2017-06-01 11:55:10 -04:00
Paul Licameli
537ccfbc4f Change evaluation of envelope near discontinuities...
... So that even if the time is "slightly" (less than 1/2 sample interval) left
of the discontinuity, the right-hand limit is always used.

Thus this compensates for some roundoff errors when pasting one clip with
an envelope into another.

This overcomes the objections that were in a comment in Envelope::Paste
to making control points with exactly equal times.

And therefore Paste can be rewritten to do so, but that has not happened yet.

Envelope points at exactly equal time coordinates can already be made by
dragging points in the envelope editor.
2017-05-26 14:50:43 -04:00
Paul Licameli
646c66f78f Sync lock adjustment for NoteTrack stretch...
... It applies only at button-up, not in a previewing fashion during the drag.

Realizing that preview is more work than I want to do right now.
2017-05-22 23:25:39 -04:00
Paul Licameli
54636c65fa Allow NoteTrack to stretch left of zero 2017-05-22 23:16:44 -04:00
Paul Licameli
82ce041c75 Preview cursor for Stretch can take left, right, or center form 2017-05-22 23:16:42 -04:00
Paul Licameli
90eb4ec142 Make MIDI track stretch path-independent 2017-05-22 23:15:26 -04:00
Paul Licameli
9fb7185ea4 Rewrite undo handling for Stretch to be more like other drags...
... that is, push a state only at button-up.

The undo during each drag increment didn't actually happen, because of a check
in OnUndo whether there is a drag in progress!

But this is not necessary to fix the excessive number of undo items, because
commit 63ae687baf already did that by other means.

It only removes an unusual usage.
2017-05-22 23:12:36 -04:00
Paul Licameli
2eb6285ddc Group some TrackPanel fields into a structure 2017-05-22 23:12:35 -04:00
David Bailes
f9827a57a7 Minor fix for commands for shifting clips using the keyboard.
Fix for minor bug introduced in commit 9da999d. The selection wasn't being updated by the actual slide amount.
2017-05-20 11:26:59 +01:00
Paul Licameli
01f853f174 Fix Windows build 2017-05-18 19:01:46 -04:00
James Crook
a6310d770d Fix Travis build
Add return 0.0
This does not fix the windows build, which is complaining about deleted functions.
2017-05-18 21:34:46 +01:00
Paul Licameli
f7578193b4 TrackPanel::OnClipMove is a static function 2017-05-18 07:46:54 -04:00
Paul Licameli
227850f9cd Group some member variables into ClipMoveState 2017-05-18 07:45:04 -04:00
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 b91160795d.
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