13
0
Commit Graph

79 Commits

Author SHA1 Message Date
nick_m
1e487d59d1 MidiGhostRegion::update_contents_height() is only about height (again). 2016-12-23 05:44:29 +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
ebf60feb13 remove wtfery in MidiGhostRegion ctor 2016-12-23 00:41:25 +11:00
nick_m
05c3850ac1 GhostEvent wrangling.
- update_range() solely looks after visibility.
	- update_note/hit() positions both x and y using code stolen from
	  update_range()
	- add update_contents_height() for when we just change the GR height.
	- find_event() is now used rather than map::find()
	- use temp canvas items to avoid constructor overhead.
2016-12-22 04:41:25 +11:00
nick_m
e75788614a use map::find in the currently unused MidiGhostRegion::find_event()
- the next one is still often the one we want.
2016-12-22 04:41:25 +11:00
nick_m
2000349e69 revert b330a8a0ce 2016-12-22 04:41:25 +11:00
nick_m
b330a8a0ce improve scroomer performance.
- MRV will redisplay the model on scroom, so there is no need
	  to update the range as well.
2016-12-21 23:43:05 +11:00
63e89b2090 'Rect' is ambiguous (also defined in MacTypes.h) 2016-12-21 13:21:54 +01:00
nick_m
bf75770939 use a map to find GhostEvents by a pointer to Note. 2016-12-21 03:30:32 +11:00
nick_m
165645495c there is no need to do a full set_colors() in MidiGhostRegion ctor. 2016-12-11 23:57:50 +11:00
nick_m
c876aea64d midi ghost region fill colour is per event. don't store it. ensure _outline is set. 2016-11-25 04:50:46 +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
b732147676 Use Note::set (Rect) for speed improvement when rendering notes. 2016-07-10 02:18:37 +10:00
nick_m
3c1bc99df9 Improve midi model redraw performance by caching colours. 2016-07-10 02:18:36 +10: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
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
11cfdd4c6d remove use of TimeRectangle 2015-02-11 21:59:38 -05:00
d283608fe9 Automation ghost notes for percussive hits. 2014-12-28 21:31:33 -05:00
e0cb9efb00 Various color tweaks.
This commit changes some color names, nuke your theme.  This isn't quite ideal
yet, but takes some steps towards where I think things should go aesthetically:

Make automation tracks/regions colors correspond to their parent's type.

Make selected MIDI notes outlined in red like most everything else, and scrap
separate min/mid/max fill colors for selected MIDI notes.

Color automation ghost MIDI notes based on original note color.

Try to kill 90's looking brightish gray gradients in general.
2014-12-16 00:05:45 -05:00
7b023f4ee0 next modifier 2014-12-15 10:11:21 -05:00
56ca52651e fix up requested color names everywhere.
Thank <deity> for emacs ... space-uncamelcase-word-at-point FTW
2014-12-14 16:15:38 -05:00
48a7a11974 initial pass to replace all UIConfiguration::get_XXXXXX() calls with UIConfiguration::color(name).
IMPORTANT: names have not been downcased and spaced yet, so many colors are not found
2014-12-14 12:27:07 -05:00
30740983e0 fix up dimensions of ghostregion colored rect 2014-11-07 12:58:56 -05:00
f1e6b28ab7 use ArdourCanvas::TimeRectangle for regions, notes, markers 2014-11-03 21:48:08 -05:00
ba4d1cd1c1 remove "canvasvar_" from all functions related to obtaining values from ARDOUR_UI::config() 2014-10-21 22:58:58 -04:00
4cde08cdb8 fix midi-ghost region y-scale 2014-10-21 14:05:41 +02:00
1f313ec19c Vertically align Midi Notes, Piano Roll & Canvas Line Grid 2014-09-08 18:44:32 +02:00
70358639de Revert "cont'd work on automation-track headers (amend ba53af1c5)"
This reverts commit beb5e3e777.
2014-09-04 16:14:01 +02:00
beb5e3e777 cont'd work on automation-track headers (amend ba53af1c5)
now that the separator line is at the top,
offset region-contents y0 by 1px.
2014-09-03 20:48:20 +02:00
6a5d805b38 more canvas refactoring.
Remove Canvas::Layout, use Canvas::Container for the same purpose, move child-rendering into Item::render_children() so that it
could theoretically be used by any derived type.
2014-06-22 11:41:05 -04:00
0796ccfb65 use newly factored canvas in gtk2_ardour 2014-06-21 11:44:22 -04:00
279aefc60e fix error in height computation of MIDI region views (FUDGE!) use Rectangle::set_outline_all() and avoid the removed integer version of ::set_outline_what() 2014-03-11 07:39:25 -04:00
0bcf3001f5 fiddle with single pixel adjustments to time axis view item heights; fix region gain envelope visibility 2014-02-25 12:02:50 -05:00
7ee5d452ff fix vertical placement of ghostregions 2014-02-14 10:28:53 -05:00
08b485db75 send enter events to EVERY newly entered item (ignore the bool return from the event handler); other canvas debugging aids;switch items_at_point() to use canvas coordinates 2013-11-03 10:07:00 -05:00
6f664c1f67 many pervasive changes primarily related to waveform drawing, particular content-dragging, colors, and more 2013-04-24 15:42:14 -04:00
96eee9e7a1 change UIConfig to use accessor/setter methods like RCConfig so that ParameterChanged methods can actually be emitted; add variable (over a small range) background shading for all TimeAxisViewItems 2013-04-16 23:46:22 -04:00
a0044e5f71 add back various functionality to waveviews such as zero line, amplitude scaling 2013-04-16 10:07:52 -04:00
b05968fb4e change frames_per_pixel to samples_per_pixel 2013-04-12 11:31:50 -04:00
19bd641915 commit immediately post linking 2013-04-04 18:45:27 -04:00
aaea166135 initial commit of hand merging, plus getting "ancient" waf script to work correctly 2013-04-04 00:32:52 -04:00
Carl Hetherington
1e185b54f5 Concatenate MidiGhostRegion::Note and MidiGhostRegion::Event.
git-svn-id: svn://localhost/ardour2/branches/3.0@10660 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-11-17 22:15:56 +00:00
Carl Hetherington
fecf120f1e Remove ghost notes when actual notes are deleted, and ensure the _optimization_iterator is valid even after things have been removed from the list (should fix #4483).
git-svn-id: svn://localhost/ardour2/branches/3.0@10659 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-11-17 22:15:50 +00:00
ed626628b5 Delete trailing whitespace
git-svn-id: svn://localhost/ardour2/branches/3.0@9656 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-06-01 17:00:29 +00:00
Carl Hetherington
9e5f5ed0ee Fix a couple of memory leaks.
git-svn-id: svn://localhost/ardour2/branches/3.0@8987 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-02-28 04:14:23 +00:00
Carl Hetherington
165a38e74e Remove unused code.
git-svn-id: svn://localhost/ardour2/branches/3.0@8986 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-02-28 04:01:08 +00:00
Carl Hetherington
c75b17e3ba Update ghost MIDI regions in automation tracks when zoom changes. Fixes #3803.
git-svn-id: svn://localhost/ardour2/branches/3.0@8985 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-02-28 04:00:38 +00:00
Carl Hetherington
60f48d24f4 Remove unused code.
git-svn-id: svn://localhost/ardour2/branches/3.0@8984 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-02-28 03:59:51 +00:00