13
0
Commit Graph

559 Commits

Author SHA1 Message Date
nick_m
5d6ad68004 Revert terrible thinko in 647c86e. (back to slow for now) 2016-05-29 05:57:19 +10:00
nick_m
647c86e0f7 Speed up redraw while tempo dragging with midi regions (and possibly other redraws) 2016-05-29 05:47:11 +10:00
nick_m
baf8f37967 Tempo ramps - rename meter_at() -> meter_at_frame() & make the ticker slightly more efficient. 2016-05-27 23:38:17 +10:00
nick_m
4f7a4cd233 Crapola - this is an experimental performance hack that must be reverted. 2016-05-27 23:38:14 +10:00
nick_m
e82c997b3d Tempo ramps - remove double calls to RegionView::set_duration() and MidiRegionView::redisplay_model()
- massively improves note redrawing performance when dragging tempos
	  and audio-locked meters,
2016-05-27 23:38:11 +10:00
nick_m
b415b59f79 Tempo ramps - respect tempo note type and meter note divisor correctly.
- tempo and meter position is now pulse-based,
	  although meter still has a beat for convenience.
2016-05-27 23:38:11 +10:00
nick_m
d3c24fe0ca Tempo ramps - midi notes resize when dragged, misc bug fixes. 2016-05-27 23:38:11 +10:00
nick_m
bdef9b2466 Tempo ramps - fix constant tempo assumption wrt midi ghost note. 2016-05-27 23:38:10 +10:00
nick_m
885f1fd684 Tempo ramps - update midi regions and locations when dragging tempo.
- also make locations and regions use a double beat rather than bbt for musical position.
2016-05-27 23:38:10 +10:00
nick_m
dbfe991cd8 Tempo ramps - fix changing from const to ramp in the gui.
- also fixes some midi mouse over problems
	- start using replacements for frames_per_bar() frames_per_beat() etc.
2016-05-27 23:38:09 +10:00
Adrian Knoth
6fa88273aa Spelling correction patch from Debian
Patch taken (and forward-ported to HEAD) from
<https://anonscm.debian.org/cgit/pkg-multimedia/ardour.git/plain/debian/patches/0100-fix-typos.patch>
2016-02-22 15:13:01 -05:00
90e35c7143 Fix bug #6762, MIDNAM note read outs don't work when dragging MIDI note
Also fixes it so the key is selected in the piano roll header
2016-02-11 08:17:18 +10:00
084af96bf4 Change handling of Midi note selection to eliminate signal emission/delays.
Each MidiRegionView(MRV) is connected to the Selection::ClearMidiNoteSelection
signal that is used to notify the all MRV instances to clear their note
selection.

The MRV class also has a private static SelectionCleared signal that is used to
signal other MRV instances when their selection has been cleared. When the
Selection::ClearMidiNoteSelection signal is emitted it causes each MRV to also
emit the SelectionCleared signal. So the emission takes quadratic time.

With 1500 MRV instances emission takes about 2.2 seconds on my machine, and
some operations like track selection cause it to be emitted 3 times(another
issue).

The Selection class in the Editor knows which MRV instances have note
selections, as it is notified by MidiRegionView whenever the selection count
becomes zero or becomes non-zero. Clearing the Note selection should then just
be O(N) and direct calls can be used rather than signals.

This change removes both the signals and uses the existing references between
Selection and MRV class to control note selection. There should be no
behavioural changes in Midi note selection with this change.
2016-01-14 20:41:44 +10:00
André Nusser
ef9713d5c6 Comment remaining unsolved bug. 2016-01-12 13:45:39 +01:00
André Nusser
f979d9c0a6 Don't show a ghost note when draw mode is entered over a note. 2016-01-12 13:45:39 +01:00
André Nusser
616c1aa0ce Clean enter_internal and leave_internal in MidiRegionView. 2016-01-12 13:45:39 +01:00
André Nusser
76237a696c Hide MIDI ghost note when over existing note. 2016-01-12 13:45:38 +01:00
André Nusser
688fe8504b Hide ghost note when switching from draw to internal edit mode.
Before it was only hidden after moving the mouse.
2016-01-12 13:45:38 +01:00
André Nusser
2d786617bb Fix appearing ghost note after drag select in internal edit mode. 2016-01-12 13:45:38 +01:00
Nil Geisweiller
93ea63f6d0 Better align note end time with grid 2015-12-22 04:52:50 +01:00
Nil Geisweiller
ef393f5a88 Remove shortening inserted notes by one tick
I don't think this is necessary, if some synth cannot deal with that,
perhaps Ardour could try to send the note off right before the next
note on, even-though they supposedly occur simultaneously.
2015-12-22 04:52:50 +01:00
André Nusser
6389c52d3c Enable horizontal scrolling in midi regions when note is selected.
The shortcut for 'change velocities together' had to be changed to
achieve that. The new shortcut is now primary+tertiary modifier +scroll,
i.e. ctrl+shift+scroll for the default keys.
2015-12-02 18:36:59 -05:00
nick_m
0e809dd1d5 Add comment to MRV snap workaround. 2015-11-01 01:43:13 +11:00
nick_m
d5c4d068b0 Fix snap modifiers not working on notes when grid is set to off. 2015-10-31 06:02:54 +11:00
nick_m
96524d863b Clear point selection when uniquely selecting a note.
- Also fix selection undo when creating notes w/control
	  in MouseContent mode.
2015-10-24 00:07:03 +11:00
b074ff0dd5 Remove GhostRegion::CatchDeletion signal to reduce session close times
Currently when a GhostRegion is deleted by its "parent" RegionView it emits the
static GhostRegion::CatchDeletion signal which is connected to the
RegionView::remove_ghost method of every RegionView instance.

With a static GhostRegion::CatchDeletion signal a particular test session
causes 31 Million calls of RegionView::remove_ghost on Session deletion and the
session takes 70 seconds to close with a debug build.

The lifetime of a ghost region is tied to both the TimeAxisView(TAV) and
RegionView(RV) in that when a RegionView is deleted all GhostRegion instances
associated with the RegionView should be deleted or when a TimeAxisView is
deleted all ghost regions that are contained in the view should be deleted.

This means that there needs to be notification between GhostRegion and both
classes. Instead of using a signal for this as we know there are only two
listeners and GhostRegion already holds a reference to the TimeAxisView, also
take a reference to the parent RegionView in the GhostRegion constructor and
use it to notify the RegionView when GhostRegion destructor is called so it can
drop any references it holds.

Using a direct function call in the GhostRegion destructor to notify the
TimeAxisView and RegionView "parents" brings the unload/close time down for the
test session from 70 seconds to 4.5 seconds.

The GhostRegion also references canvas items that are added to the TimeAxisView
canvas group or at least a canvas group that it manages. So when the
TimeAxisView is destroyed and the canvas group that is the parent of those
items is destroyed, the GhostRegion's canvas items will also be
deleted/destroyed by the parent canvas item/group. This means the GhostRegions
must be destroyed when the TimeAxisView they are contained in is destroyed or
there will be dangling references to canvas items that have already been
deleted and trying to delete them again will be bad.
2015-10-22 11:51:03 -04:00
e7b8e98db2 Replace static PBD::Signal in NoteBase with direct call to MidiRegionView
NoteBaseDeleted signal is static so each MidiRegionView(MRV) gets notified
about the deletion of each NodeBase instance even if it is contained in another
MRV

The NoteBase and MRV classes are currently coupled anyway, so this change uses
the reference to the MRV parent to directly call the parent when the NoteBase
is deleted. This is all in the GUI thread so I'm not sure why a PBD::Signal was
being used?

If the MRV class is the only reference holder to the NoteBase class
then I'm not sure if a callback is needed, perhaps the MRV should just remove
the note from the selection before deleting it but I'm not that familiar with
the code.

Signal emission/calls static NoteBaseDeleted signal vs direct with 10540
NoteBase instances.

static:

After Load Session: 6360638
After Unload Session: 12221026(5860388)

direct:

After load Session: 10540
After unload Session: 21080

Session Load/Unload time in master, debug/release with ~10000 Notes(seconds)

Load Debug: 32, 26
Unload Debug: 83
Load Release 32, 20, 42
Unload Release 26, 25

Session Load/Unload time with direct call debug/release(seconds)

Load Debug: 21.7, 18.1
Unload Debug: 69.4, 71
Load Release: 22.6, 13.4, 17.7
Unload Release: 24, 23.5

This is not a large Session, 1500 regions, 10000 notes so there is probably
some other funky stuff going on that needs fixing.
2015-10-17 22:15:07 -04:00
22b07e0233 NOOP, remove trailing tabs/whitespace. 2015-10-05 16:17:49 +02:00
4dc63966f0 globally remove all trailing whitespace from ardour code base.
Paul Davis was responsible for introducing almost all of this.
2015-10-04 14:51:05 -04:00
2ef2ea0b59 create new Event-IDs for pasted midi-notes 2015-09-18 20:37:23 +02:00
6b019a4953 Move UIConfiguration Singleton into UIConfiguration header
This removes the direct dependence on ardour_ui.h from 39 files
2015-09-16 16:55:17 -04:00
344c435dae cont'd work on piano roll highlighting. 2015-08-15 05:13:14 +02:00
f2495d9808 Highlight note in piano roll - #6510 2015-08-15 03:08:55 +02:00
da3df9c1d1 Revert "replace two more instances of !! with implicit use of operator bool()"
This reverts commit e8eff9fb9c2fa6fc518404c2f9b731f8c28d3a23.

OS X compiler gets confused by this change.
2015-06-29 14:18:15 -04:00
8ac11386a6 replace two more instances of !! with implicit use of operator bool() 2015-06-29 14:18:15 -04:00
c4c7dc0086 Revert "use newly added operator bool() for Evoral::Beats rather than double-negation as boolean"
This reverts commit a19902b52f08bf33c54e60dfb49c44a1c154f4c9.

OS X compiler gets confused by this change.
2015-06-29 14:18:14 -04:00
9c84633eb4 Revert "replace two more instances of !! with implicit use of operator bool()"
This reverts commit e8eff9fb9c2fa6fc518404c2f9b731f8c28d3a23.

OS X compiler gets confused by this change.
2015-06-29 14:18:14 -04:00
82fc73d663 replace two more instances of !! with implicit use of operator bool() 2015-06-29 14:18:14 -04:00
15b3ad956d use newly added operator bool() for Evoral::Beats rather than double-negation as boolean 2015-06-29 14:18:14 -04:00
nick_m
392f48709c Magnetic snap now works on note moves / resizes. 2015-06-11 02:20:37 +10:00
nick_m
b3a4c88e0e Make absolute snap the default snap.
- also fixes a couple of absolute snap bugs wrt midi notes.
2015-06-11 01:36:34 +10:00
nick_m
2ef94d9422 Fix uninitialised variable. 2015-05-28 23:37:46 +10:00
nick_m
ea8b5a970f Bring back contrained drag modifier with preference setting.
- this should work as before, but when applied to a button 1 drag,
	  the constraint is in the first direction travelled.
2015-05-23 05:36:03 +10:00
nick_m
3d599be991 Fix missing comment. 2015-05-23 03:44:42 +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
784abd03e0 Make note drags and resizes obey the disable sanp modifier. 2015-05-22 06:54:16 +10:00
nick_m
65e06fa350 More cleanup
- remove "no_magnets" ugh.
2015-05-22 04:26:16 +10:00
nick_m
c359f881a1 Relative Snap -make it activated by the tertiary modifier during drag.
Disabled/enabled with the shift key. no config stuff at all now.
	Move existing (strange) trim feature to primary + tertiary modifiers.
2015-05-17 23:47:01 +10:00
nick_m
91a34c596d Relative snap - support magnetic mode (hackishly for now) 2015-05-17 04:26:05 +10:00
nick_m
68a8330afc Relative snap 2015-05-16 04:15:52 +10:00