13
0
Commit Graph

186 Commits

Author SHA1 Message Date
b976bf8986 NO-OP whitespace & foratting of header files 2017-07-01 21:19:56 +02:00
Thomas Brand
63ea7b6516 NO-OP whitespace (updated GH PR #357) 2017-07-01 19:28:26 +02:00
nick_m
5c741b7a07 tempo editing updates
- a tempo marker may now be set to always continue (clamped)
	  this means that the end tempo of the previous section will
	  track the start tempo during tempo ops.
	  it mimics the behaviour in 5.8, with the gui indicating
	  the curves to be changed.
2017-03-05 05:21:56 +11:00
nick_m
1f9c26136c rework percussive hit spraying.
- the spray is limited to the first entered note.

	- all new notes are selected (requires a selection change to
	  MRV::create_note_at()
2017-03-05 01:57:10 +11:00
nick_m
f8a6f8918d back to using shift-ctrl for pinch drag. set colours of affected curves. 2017-02-27 20:16:10 +01:00
nick_m
ccb51a8ddb rework tempo editing.
most changes are due to a new design where tempo discontinuities at the
beginning of a ramped section may be set.
this allows easier mapping of live performance, especially in
the common case of a ramped ritard before the beginning of a new section.

feature summary:

holding constraint modifier (shift) while dragging the BBT ruler area
drags the tempo lines by changing the start tempo (as before)

holding copy modifier (control) while dragging the BBT ruler area
drags the tempo lines by changing the end tempo (ahem. not quite there)

dragging a tempo mark while holding constraint (shift) will change the
previous end tempo to match the marker position *worth trying*.

holding constraint and copy modifier (control + shift) while dragging
the BBT ruler area attempts to'pinch' or twist the surrounding tempi
sp that later ones are not repositioned (currently suffereng from
rounding errors)
2017-02-27 20:16:10 +01:00
nick_m
5031bdcf10 midi note drags are music-based.
- wysiwyg (during drag) when dragging more than one note across
	  a tempo change.

	- introduces a muscal equivalent of snap_delta (only used for
	  note drags atm)

	- split earliest note in selection into a separate function

	- MRV::copy_selection() returns the equivalent _primary note
  	  to avoid offset hell.

	- RV::snap_frame_to_frame returns a MusicFrame

	- prevent note drag moving before region start.
2017-02-05 05:02:01 +11:00
nick_m
650c1381d4 setup_snap_delta() need only take a framepos_t. 2017-02-04 22:57:36 +11:00
nick_m
59daffea1d rework snap
snap now fills in a struct (MusicFrame) which contins a snapped frame
along with a music divisor.
this gives useful information wrt magnetic snap which may or may not
have rounded to an exact musical position.

region position may now be set musically (using quarter notes for now).

this patch fixes several problems in the current code:

	- dragging a list of music-locked regions now maintains correct
	  musical offsets within the list.

	- splitting regions using magnetic snap works correctly (#7192)

	- cut drag should now work correctly with magnetic snap.

	- musical length of split midi regions is no longer frame based.
2017-02-04 22:57:36 +11:00
6de15a79cf improve range drag semantics
If a track is selected during the drag (by moving the mouse pointer into a new track), but it was not
selected at the start, and is then de-selected (by moving the mouse back out of it), then remove
it from the selection.
2017-01-25 21:46:24 +01:00
8dedea5ffa implement copy-drag for MIDI notes.
Probably some corner cases to be fixed, but pretty functional and largely modelled
on existing code (paste, drag, step add note etc.)
2017-01-23 21:58:02 +01:00
nick_m
62f37da989 filter events in HitCreateDrag, remove some code. 2016-11-22 02:05:32 +11:00
d4190d3761 Show cursor in Cut mode on button press at cutting position
Previously it would be shown at the mouse cursor position even though the
Region is cut/split at the snap/quantize point if no motion occurred.
2016-11-21 20:45:35 +10:00
nick_m
e0c06f39e1 clean up HitCreateDrag. should be a no-op. 2016-11-21 04:57:32 +11:00
nick_m
eef18c47fd fix compilation, rename PercussiveCreateDrag -> HitCreateDrag 2016-11-21 04:20:27 +11:00
nick_m
3d1d2feff7 make it clear that there is no drag threshold for NoteCreateDrag. 2016-11-20 04:55:34 +11:00
nick_m
ca046a8bb2 fix incorrect subdivision when dragging/trimming regions using magnetic snap.
- amends d2d2308588
2016-11-18 01:04:30 +11:00
dac2d41ee2 Add option to zoom using button press in the time rulers and dragging vertically
This is a common operation used for zooming in other DAWs like Ableton Live and
Cubase. To support such a usage pattern without changing the existing behaviour
of the ruler area I've made it an option that is false by default.

The behaviour of RulerDragZoom is intentionally different than a CursorDrag
that occurs in the rest of the ruler area in that it doesn't follow the snap to
grid setting and no locate related stuff occurs until button release.

There are some issues with responsiveness with more than a few hundred regions
or a large amount of MIDI events/notes.

Implements feature #6768
2016-11-11 14:13:53 +10:00
nick_m
594137f5cc remove public pulse methods from TempoMap.
- the only object whose musical position is not expressed in
	  quarter notes is MetricSection.
	  there is now no need to expose this.
2016-11-11 03:37:08 +11:00
nick_m
1d540605ac clamp setting tempo via vertical drag.
- a bit suboptimal. we really need the opposite of _trackview_only
	  to prevent jumping to track canvas scrolled coordinates in the first place.
2016-11-11 03:37:08 +11:00
nick_m
4eba9b8638 Resolve potential ambiguity between the constraint modifier and the copy modifier when beginning a drag. 2016-08-14 03:04:54 +10:00
140258d8ab remove reference "const int32_t&" -> const int32_t"
this simplifies lua-bindings and also let's the compiler worry about
constant primitive types.
2016-07-10 15:30:41 +02:00
nick_m
93c24e4433 Paste uses exact beats. rework _start_beats calculation in copy-with-offset ctor. 2016-07-10 02:18:36 +10:00
nick_m
2d5238d875 Make some musical operations on music-locked regions operate in beats.
- use exact beats to determine frame position.
	- see comments in tempo.cc for more.
	- this hasn't been done for split yet, but dragging and
	  trimming are supported.
2016-07-10 02:18:36 +10:00
nick_m
a924e938aa Allow non-musical snap when dragging bbt ruler.
- probably not what the user wants,
	  unless snapping beats to timecode frames.
2016-05-28 06:50:22 +10:00
nick_m
1c51cbcc82 Force snap when dragging meters. 2016-05-28 02:57:53 +10:00
nick_m
b9f70334b6 Dragging a meter sets editor snap type to bars during drag. 2016-05-28 00:48:18 +10:00
nick_m
5ccfeea5bc Tempo ramps - more bbt dragging work.
- display prev tempo and tempo at mouse while dragging
	- simplify ramp dilation somewhat.
2016-05-27 23:38:16 +10:00
nick_m
abac4ce854 Tempo ramps - more bbt ruler dragging work. 2016-05-27 23:38:16 +10:00
nick_m
86b0268e8b Tempo ramps - add visualtempo curve, dragging bbt or music rulers with constraint modifier dilates previous tempo. 2016-05-27 23:38:16 +10:00
nick_m
a64e46a6b3 Tempo ramps - allow constraint-drag of first tempo. 2016-05-27 23:38:12 +10:00
nick_m
69b6379b23 Tempo ramps - pressing constraint modifier keys during tempo drag changes tempo with vertical movement, incorporating beat constraint (if present).
- makes it easy to find suitable accelerandos for hit points in conjunction
	  with playhead position, beat-locked tempos and initial meter frame.
2016-05-27 23:38:12 +10:00
nick_m
452e484faf Tempo ramps - rework mouse dragging of tempo marks, derive beat_at_tempo() and tempo_at_beat(). 2016-05-27 23:38:11 +10:00
nick_m
340bd42c62 Tempo ramps - allow live updating of tempo markers.
- all a bit slow, but should be ok once we can lock
	  markers to frames.
2016-05-27 23:38:09 +10:00
nick_m
024adf3a4d Fix #6673 - another prematurely closed undo transaction.
- add_midi_region used to commit, resulting in
	  _region->set_position() adding a command when there was
	  no current transaction. The sub-bug here was that repeatedly
	  calling set_position() on the new region resulted in nonsensical
	  automation movement after the drag.
2015-11-14 03:14:23 +11:00
nick_m
e78a44d4e5 Markers use the selection change stack. 2015-10-25 05:26:44 +11:00
nick_m
c9864b71a0 ResizeNoteDrag selection click behaves as NoteDrag's does. 2015-10-24 01:19:00 +11:00
22b07e0233 NOOP, remove trailing tabs/whitespace. 2015-10-05 16:17:49 +02:00
c315c6f140 Allow to override A/V-lock (when moving audio) 2015-09-08 02:51:58 +02:00
89b0817f83 fix "locked" + "locked to video" bug.
previously if some audio region was locked and locked to video,
the audio-region always stayed put and the video could only be
moved forward.

TODO: add an "unlock all" option.
2015-08-20 02:24:27 +02:00
e1f168de11 rename Marker class
Classes are in the global namespace.
OSX has a flat namespace and OSX32bit/Carbon has a Marker too.
2015-07-23 17:58:40 +02:00
46c8369328 merge fix 2015-07-16 16:13:24 -05:00
aefd089b88 make editor_drag.h fully self-contained as a header file (it was missing more than a dozen necessary fwd decls etc)
Conflicts:
	gtk2_ardour/editor_drag.h
2015-06-29 14:18:13 -04:00
nick_m
16109ebcc8 Rework last commit, clicking on an automation line no longer adds history.
- fixes a crash when clicking on automation lines repeatedly.
2015-06-18 06:27:37 +10:00
nick_m
639750f815 Don't add history by clicking a control point, fix control point selection.
- also make set_selected_control_point_from_click () return
	  something useful.
2015-06-18 03:48:39 +10:00
nick_m
b86c3f97b0 Fix bug where inserting notes in MouseContent mode disallowed resizing. 2015-05-24 04:04:37 +10:00
nick_m
88477ace25 Fix inverted logic of SnapOff with snap modifiers pressed.
- also clean up, rename and comment some previous hanges.
2015-05-23 03:09:48 +10:00
nick_m
37ee083931 Small cleanup 2015-05-22 04:48:34 +10:00
nick_m
7edf0e17bc Clean up a bit - should be a no-op 2015-05-22 03:09:29 +10:00
nick_m
ae0759ae88 Allow all drag -related modifiers to be set, re-instate "jump after trim"
- Copy modifier still doesn't save
	- Testers please edit the Extra section of ~/.ardourN/config to allow
	defaults to "take"
	- Note that the current defaults overlap.
	- warning - absolute snap modifier has no default and will be always
	"on" unless you set it!
2015-05-21 01:30:57 +10:00