13
0
Commit Graph

629 Commits

Author SHA1 Message Date
nick_m
68ca289b92 retain note selection for invalidated notes. 2016-12-30 00:40:20 +11:00
nick_m
f4b3133035 more note performance work (dereference less). 2016-12-29 23:22:06 +11:00
nick_m
149cb402b9 revert 7805217b5 (make note mode change work again). 2016-12-29 23:15:35 +11:00
nick_m
d49b141e11 improve the performance of MidiRegionView::find_canvas_patch_change().
- also fixes patch changes appearing outside region bounds
	  when copied/trimmed.
2016-12-29 04:21:37 +11:00
nick_m
7805217b5f don't clear note items in MidiRegionView::display_model().
- redisplay_model() does this for us.
2016-12-29 02:39:57 +11:00
nick_m
da92d2d764 speed up load/quit for sessions containing ~25k events.
- MGR uses a _note_group to hold events.

	- MRV & MGR delete canvas notes directly from their note group.

	- sysex is untested (it uses MRV note group).
2016-12-24 02:01:37 +11:00
nick_m
ddd085cf4e hide ghost events appropriately (e.g. after split). 2016-12-23 05:07:22 +11:00
nick_m
37e858da7d only update GhostEvents on visible trackviews.
- this requires that MidiGhostRegion::update_contents_height()
	  also controls visibility.
2016-12-23 02:55:51 +11:00
nick_m
96048ad4c0 midi scrooming performance updates.
- MGR visibility is handled by update_note/hit()
	  MRV unconditionally updates MGR events
	- remove MidiGhostRegion::update_range()
	- rename set_contents_height -> update_contents_height
2016-12-23 00:51:34 +11:00
nick_m
eecc9ed743 fix various midi display bugs introduced by 9038be49d8. 2016-12-21 03:18:18 +11:00
nick_m
9038be49d8 improve midi zoom/scroom performance with lots of notes.
- mostly due to searching a multiset rather than a list of
	  canvas events.
2016-12-20 21:31:54 +11:00
nick_m
a99331a4e9 more work on patch change redisplay.
- fixes just-introduced undo crash.
2016-12-16 01:58:58 +11:00
c9444e048e correct return syntax 2016-12-15 11:57:31 +00:00
nick_m
cfbcadc7ef speed up patch change redisplay when using scroomer / adjusting height.
- zoom is still a bit slow.
2016-12-15 22:35:23 +11:00
nick_m
176625d9e0 test diff for patch change performance when caching colours. 2016-12-14 04:05:08 +11:00
08fffeffec Remove Evoral::MIDIEvent
It is slightly questionable whether type specific methods like
velocity() belong on Event at all, these may be better off as free
functions.  However the code currently uses them as methods in many
places, and it seems like a step in the right direction, since, for
example, we might some day have events that have a velocity but aren't
stored as MIDI messages (e.g. if Ardour uses an internal musical model
that is more expressive).

In any case, the former inheritance and plethora of sloppy casts is
definitely not the right thing.
2016-12-03 15:18:21 -05:00
nick_m
bd107a28c6 MidiRegionView::clear_events() does _selection.clear(). remove the extra one. 2016-11-23 15:32:13 +11:00
nick_m
fcad5a337f decouple midi region note range and height from midi streamview.
- 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-23 08:04:14 +11:00
nick_m
766fa9aa5b don't display notes that start at region end.
- its not obvious that this is happening in sustained mode,
	  but Percussive reveals all.
2016-11-22 02:59:57 +11:00
nick_m
a14c577b8a fix thinko in 8e8c4a73f1. 2016-11-22 02:21:05 +11:00
nick_m
8e8c4a73f1 prevent Percussive mode from displaying a ghost hit at region end. 2016-11-22 02:01:01 +11:00
nick_m
eef18c47fd fix compilation, rename PercussiveCreateDrag -> HitCreateDrag 2016-11-21 04:20:27 +11:00
nick_m
5bcb9adbf8 rework mouse hit creation (percussive mode) - mostly as per #7130.
- snap behaviour is round to nearest

	- holding down button 1 while dragging creates many
	  (if not already present) hits.
2016-11-21 04:02:21 +11:00
nick_m
7eed31a4b2 MRV handles an alt key press even if nothing happened.
- nothing else treats a modifier press as
	  a key press event, so don't pass it on.
	  amends 0af9fb0d
2016-11-21 01:17:24 +11:00
nick_m
f989ed5b7f fix for short notes being displayed as infinitely long. 2016-11-21 00:17:31 +11:00
nick_m
0af9fb0dee pressing alt while creating a note (snap modifier) keeps mouse_state. 2016-11-20 04:54:20 +11:00
nick_m
e525be86d6 after creating a note, don't add the ghost note until next motion. 2016-11-20 04:51:38 +11:00
nick_m
cb64e926c2 NoteCreateDrag starts on button press.
- removes the separation between click and
	  drag-creation of notes noth now handled by the drag code).
2016-11-20 04:49:18 +11:00
nick_m
0e0ef41ed4 remove unused variable. 2016-11-19 21:42:50 +11:00
nick_m
c9dd1d39d1 further to 1a6a72b57, handle deleting a note while a non-selected one is entered. 2016-11-19 21:40:41 +11:00
nick_m
1a6a72b57a fix for ghost note becoming stuck after note selection deleted.
- thanks ristic for the report
2016-11-19 03:03:20 +11:00
nick_m
d9dea0a3aa rename Region pos_beats -> quarter_note 2016-11-11 03:37:08 +11:00
nick_m
dca96d8b5d rename Region pulse to pos_beats. use new beat distance api where required.
- 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-11 03:37:08 +11:00
nick_m
24846f478b clean up ghost note wrt create drag.
- 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-26 04:52:09 +11:00
nick_m
1c9dbb5242 Amend previous commit. 2016-10-17 04:33:48 +11:00
nick_m
2359a0b2fa Set note colour of new MidiGhostRegions corrctly. 2016-10-17 04:23:43 +11:00
nick_m
1692968627 Slightly improve note update performance, fix note resizing for non-4.0 meter divisors. 2016-10-16 03:11:05 +11:00
nick_m
9698f16aee Note selection state uses note event_id_t. 2016-10-15 23:50:02 +11:00
nick_m
4faf44588f Interpret start & length_beats properties as double rather than Evoral::Beats.
- 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-10-10 03:39:57 +11:00
nick_m
a54d105107 Use double comparison in MidiRegionView::note_in_region_range(). 2016-10-09 03:24:14 +11:00
nick_m
4270569528 Fix bug where drawing long notes placed the new note on the previous snap line.
- NoteCreateDrag already applies this shift, so it was
	  always applied twice to the note start frame.
2016-09-23 05:06:03 +10:00
nick_m
080e7755a6 Remove _midi_regions_use_bbt_beats from Session, _start_pulse and _length_pulse from MidiRegion.
- _start/length_beats are now quarter notes regardless
	  of loaded session version.

	- also restores note colour update
2016-09-23 03:39:05 +10:00
Guido Aulisi
e2b724194e Do not delete selected MIDI notes while dragging. (See #6602)
This is not caused by commit_reversible_command, but because
NoteDrag::total_dx calls Evoral::Note<Evoral::Beats>::time()
with invalid MIDI note (deleted).
2016-09-15 23:24:36 +10:00
nick_m
fb9f4636e7 Remove unused variable. 2016-09-07 00:27:01 +10:00
nick_m
d7879486a0 Ensure the correct position is passed to MidiRegionView::get_grid_beats(). 2016-09-02 05:18:53 +10:00
nick_m
34e234825e No-op - rename var in MidiRegionView::note_dropped(). 2016-08-31 23:12:11 +10:00
nick_m
c0f89e99a2 MidiRegionView uses quarter note snapping.
- also ensures poiinter ghost note respects the snap modifier.
2016-08-31 23:12:11 +10:00
nick_m
a9b72f87a6 Add missing line feed in midi_region_view.cc 2016-08-16 00:56:08 +10:00
nick_m
cecbae1df4 Midi region ghost note uses beat-based note time calculation. 2016-08-16 00:52:18 +10:00
nick_m
62372b48ea Fix frame-based beat calculation in MidiRegionView::snap_frame_to_grid_underneath()
- this caused the ghost note under the pointer to behave badly when
	  hovering near an audio-locked meter.
2016-08-16 00:48:54 +10:00