summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_drag.cc
AgeCommit message (Collapse)Author
2016-12-06Fix crash when track creation failed draging regionJulien ROGER
Add more check when creating a new track from a region drag into editor's empty area. Fix #6496
2016-11-23decouple midi region note range and height from midi streamview.nick_m
- this allows a midi region drag to update the visible notes correctly while crossing MIDI streamviews with a differing note range. as a side effect, fixes a bug where changing note range on a track did not draw some notes (apply_note_range redisplays the model).
2016-11-22filter events in HitCreateDrag, remove some code.nick_m
2016-11-22NoteCreateDrag - remove some codenick_m
2016-11-21Make Cut mode respect snap modiferTim Mayberry
2016-11-21Show cursor in Cut mode on button press at cutting positionTim Mayberry
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-21Reparent cursor used in Cut mode so that it is on top and visibleTim Mayberry
2016-11-21clean up HitCreateDrag. should be a no-op.nick_m
2016-11-21fix compilation, rename PercussiveCreateDrag -> HitCreateDragnick_m
2016-11-21only spray percussive hits during create drag if the grid is in use.nick_m
2016-11-21rework mouse hit creation (percussive mode) - mostly as per #7130.nick_m
- snap behaviour is round to nearest - holding down button 1 while dragging creates many (if not already present) hits.
2016-11-21NoteCreateDrag scope fix - should be a no-op.nick_m
2016-11-21use a minimum note length of whatever 1 px is in beats in NoteCreateDrag.nick_m
2016-11-20NoteCreateDrag starts on button press.nick_m
- removes the separation between click and drag-creation of notes noth now handled by the drag code).
2016-11-20NoteCreateDrag::grid_frames works over a tempo change.nick_m
2016-11-18fix incorrect subdivision when dragging/trimming regions using magnetic snap.nick_m
- amends d2d2308588e84
2016-11-17magnetic snap uses note divisor appropriately.nick_m
- also looks nicer when resizing MIDI regions.
2016-11-11Add option to zoom using button press in the time rulers and dragging verticallyTim Mayberry
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-11rename Region pos_beats -> quarter_notenick_m
2016-11-11rename Tempo _beats_per_minute to _note_types_per_minute, provide pulse helpers.nick_m
- adds quarter_notes_per_minute(), note_divisions_per_minute (double) pulses_per_minute() and frames_per_quarter_note() - this should be a no-op except for the use of tempo by the vst callback which definitely uses quarter notes per minute. - the XML node for TempoSection named 'beats-per-minute' has been renamed.
2016-11-11remove public pulse methods from TempoMap.nick_m
- the only object whose musical position is not expressed in quarter notes is MetricSection. there is now no need to expose this.
2016-11-11clamp setting tempo via vertical drag.nick_m
- 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-11rename Region pulse to pos_beats. use new beat distance api where required.nick_m
- add more debugging output detecting regions whose beat and frame position do not align on a playlist. this is required as a check as we have never used frame rounding on constant tempi before 8884a5723dc
2016-11-11Refactor tempo api, include quarter-note distance in frames method.nick_m
- moves frame rounding up to TempoMap, which is needed in order to calculate pulse distance without frame rounding. - the time unit for tempo is still minute, but this now also applies to meter sections. (new audio locked meter sections no longer require a frame position). - there is no longer a discontinuity in the pulse for audio-locked meter/tempi. - temporarily add debugging output in Region::set_position() to test for region beat not matching region frame.
2016-10-27Prevent duplicate moves when selecting regions on shared playlistsRobin Gareus
selecting regions on multiple tracks which share playlists and dragging them has various odd side-effects. This prevents the worst of such edge-cases. A cleaner solution would be to not allow selecting the same region on multiple tracks at the same time in the first place. Comments are welcome.
2016-10-26clean up ghost note wrt create drag.nick_m
- hide ghost note when add dragging. - new note length snaps as per ghost note start (shifted snap). - prevent ghost note from appearing before region start.
2016-10-16Fix various snap issues when dragging control points (AutomationRegionView).nick_m
2016-10-16Fix incorrect musical position in NoteDrag::total_dx.nick_m
2016-10-10Interpret start & length_beats properties as double rather than Evoral::Beats.nick_m
- Evoral::Beats operator!= would prevent an increment of start_beats by intervals of less than a tick, so its possible that other subtle problems existed due to this kind of thing.
2016-09-23Fix bug where drawing long notes placed the new note on the previous snap line.nick_m
- NoteCreateDrag already applies this shift, so it was always applied twice to the note start frame.
2016-09-11Fix #7015, Crash while aborting Region trim using Esc keyTim Mayberry
There were two issues: The first is that TrimDrag::aborted was calling TrimDrag::finished with a null GdkEvent which caused a segfault when dereferencing. So avoid that by passing in a dummy event as we are just going to undo the operation in the next step anyway so it shouldn't matter if it is valid(AFAICT). The other is that TrimDrag:aborted was calling Editor::undo() which was in turn calling TrimDrag::aborted leading to infinite recursion and stack overflow. Calling Session::undo() directly seems to avoid that issue. This fix feels like a bit of a hack...but it seems to work and is better than a crash.
2016-08-31NoteCreateDrag uses quarter-notes.nick_m
2016-08-24Don't attempt to snap to the current musical grid when dragging tempi.nick_m
2016-08-20Revert last commit (269a08a2b1).nick_m
2016-08-20Allow both types of constrained drag (again).nick_m
- Holding the constraint modifier at the time of grab gives constrained x. - Holding the constraint modifier after the grab but before the first motion constrains to the direction of first movement.
2016-08-15allow constrained-drag of MIDI notes to workPaul Davis
2016-08-14Resolve potential ambiguity between the constraint modifier and the copy ↵nick_m
modifier when beginning a drag.
2016-08-14Ensure BBTRulerDrag operates within the tempo map.nick_m
2016-08-14Ensure positive length whan drag-adding new midi region.nick_m
2016-07-22Remove the temporary note group in MidiRegionView, update start trim during ↵nick_m
drag.
2016-07-14enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.hPaul Davis
2016-07-12GUI side of : once the user has explicitly set the session range end, ↵Paul Davis
playlist/range changes do not move it. The user may drag the marker, edit in the Location UI, or use nudge, to set the end
2016-07-10remove reference "const int32_t&" -> const int32_t"Robin Gareus
this simplifies lua-bindings and also let's the compiler worry about constant primitive types.
2016-07-10Stop passing references to things that may disappear when a metric section ↵nick_m
is replaced.
2016-07-10Check meter/tempo section exists in copy drag.nick_m
2016-07-10Paste uses exact beats. rework _start_beats calculation in copy-with-offset ↵nick_m
ctor.
2016-07-10Exact beat - provide audio->music mapping for region split.nick_m
- for those not in the know, this series provides a way to remove the temporal distortion introduced when using an audio frame-based gui for music-locked objects. In short, the gui uses an audio frame representation to move objects. It displays the object using frame_at_beat(), quantizing the time value to audio frames. This is fine until the user selects that frame but expects it to be interpreted as a beat. Thus beat_at_frame() would not produce the user-expected beat (temporal quantization error of up to 0.5 audio samples). This is one method of mapping audio time to music time accurately.
2016-07-10Make some musical operations on music-locked regions operate in beats.nick_m
- 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-06many changes associated with rationalizing selection flowPaul Davis
2016-06-12Make exact beat calculation of tempi a bit less cumbersome. Move tempi on an ↵nick_m
audio basis for non-musical snap.