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.
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.
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.
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.
"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.
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.
... 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).
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".
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
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.
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.