Commit Graph

62 Commits

Author SHA1 Message Date
Paul Davis ef0938a16d more improvements to velocity drawing (including straight line) 2023-10-27 11:50:15 -06:00
Paul Davis 7dc532a646 lollis: only allow velocity editing on currently selected region 2023-06-26 14:18:18 -06:00
Paul Davis 31de7e93bf lollis: show note selected status (using note selection outlien color) 2023-06-26 14:18:18 -06:00
Paul Davis 077c5ba5d1 NO-OP: add helpful comment 2023-06-26 14:18:18 -06:00
Paul Davis 4bafadc419 steps to an ecology of lollipops 2023-06-26 14:18:17 -06:00
Paul Davis 52f10ad2a8 velocity views will be ghost regions 2023-06-26 14:18:17 -06:00
Paul Davis e54e8f3f4c tweaks to GhostRegion to prepare for possible inheritance 2023-06-26 14:18:17 -06:00
Paul Davis 2797ea9666 remove unusued "MIDI underlay" cruft 2023-06-26 14:18:17 -06:00
Paul Davis b35518e212 switch from boost::{shared,weak}_ptr to std::{shared,weak}_ptr
This is mostly a simple lexical search+replace but the absence of operator< for
std::weak_ptr<T> leads to some complications, particularly with Evoral::Sequence
and ExportPortChannel.
2023-03-24 14:19:15 -06:00
Paul Davis 4fa97e2c50 split midi region view redisplay into two similar methods
::model_changed() is used when the model has changed (eg. new notes or some
notes deleted); ::view_changed() is used when only some view parameter (e.g.
zoom, scroll, track height etc) has been altered.

Not fully functional yet (::view_chanted() ignores scroll)
2022-04-05 20:52:10 -06:00
Robin Gareus 4050ca5633
Update GPL boilerplate and (C)
Copyright-holder and year information is extracted from git log.

git history begins in 2005. So (C) from 1998..2005 is lost. Also some
(C) assignment of commits where the committer didn't use --author.
2019-08-03 15:53:15 +02:00
Paul Davis 7db12f6b12 convert codebase to use Temporal for various time types 2017-09-24 12:03:54 -04:00
Robin Gareus beb73edf55 Purify libcanvas, remove libardour dependency
A canvas is just a canvas. Move WaveView into its own library.
2017-07-17 21:06:04 +02:00
Robin Gareus 601c317d70 Clean up library inheritance (colors.h, utils.h)
make libwidget independent of libcanvas.
Confine basics to pbd and gtkmm2ext.
2017-07-17 21:06:04 +02:00
Robin Gareus b976bf8986 NO-OP whitespace & foratting of header files 2017-07-01 21:19:56 +02:00
nick_m ab052d0565 speed up midi ghost region update
- as MRV removes invalid notes from the GR, we
	  can simply update all events after checking vertical visibility.
2017-01-30 01:46:38 +11:00
nick_m 9e9f99f004 note display performance.
use boost::unordered_map as a note store for ghost & midi region
	views.

	as per otiginal method, only notes within regoin bounds are stored.
2017-01-04 00:19:31 +11:00
nick_m 52275254a7 allow the use of static_cast for MGR ghost events (speeds things up a bit). 2016-12-30 01:55:41 +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 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 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 bf75770939 use a map to find GhostEvents by a pointer to Note. 2016-12-21 03:30:32 +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 3c1bc99df9 Improve midi model redraw performance by caching colours. 2016-07-10 02:18:36 +10:00
Tim Mayberry 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
Robin Gareus 22b07e0233 NOOP, remove trailing tabs/whitespace. 2015-10-05 16:17:49 +02:00
Paul Davis 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
David Robillard d283608fe9 Automation ghost notes for percussive hits. 2014-12-28 21:31:33 -05:00
Paul Davis 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
Paul Davis 0796ccfb65 use newly factored canvas in gtk2_ardour 2014-06-21 11:44:22 -04:00
Paul Davis b05968fb4e change frames_per_pixel to samples_per_pixel 2013-04-12 11:31:50 -04:00
Paul Davis 19bd641915 commit immediately post linking 2013-04-04 18:45:27 -04:00
Paul Davis 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
Carl Hetherington bcaf808f7d Make GhostRegion a sigc::trackable as MidiGhostRegion connects to signals. Fixes e.g. a crash on track resize after splitting a MIDI region with automation.
git-svn-id: svn://localhost/ardour2/branches/3.0@9482 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-05-05 13:49:35 +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
Carl Hetherington 11d2bfa26f Fix up midi ghost regions. Should fix #3629.
git-svn-id: svn://localhost/ardour2/branches/3.0@8388 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-12-30 18:35:16 +00:00
Paul Davis c83389b8ec cleanup up cleanup at session destruction; clarify the meaning of 3 signals (DropReferences & Destroyed in libardour ; CatchDeletion in the GTK UI); clarify ownership of objects (session no longer pays attention to DropReferences for objects that it is considered to own, such as routes, sources, etc); fix up MIDI parsing and a couple of other places by correcting syntax for return of values from a boost::signals2::signal (possible danger elsewhere to be checked)
git-svn-id: svn://localhost/ardour2/branches/3.0@6389 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-12-22 20:21:43 +00:00
Paul Davis aae367b63c use new syntax for connecting to backend signals that enforces explicit connection scope, plus a few other related matters
git-svn-id: svn://localhost/ardour2/branches/3.0@6376 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-12-19 20:26:31 +00:00
Paul Davis f6fdd8dcbf switch to using boost::signals2 instead of sigc++, at least for libardour. not finished yet, but compiles, loads sessions, records and can close a session without a crash
git-svn-id: svn://localhost/ardour2/branches/3.0@6372 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-12-17 18:24:23 +00:00
David Robillard bb9cc45cd2 Strip trailing whitespace and fix other whitespace errors (e.g. space/tab mixing). Whitespace changes only.
Vimmers, try let c_space_errors = 1 in your .vimrc to highlight this kind of stuff in red.  I don't know the emacs equivalent...


git-svn-id: svn://localhost/ardour2/branches/3.0@5773 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-10-14 16:10:01 +00:00
Carl Hetherington 402cc384ce Back out big shared_ptr change. Moving to a branch. Apologies all.
git-svn-id: svn://localhost/ardour2/branches/3.0@5343 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-07-09 17:58:13 +00:00
Carl Hetherington 4297071b3f Use shared_ptr for the TimeAxisView hierarchy.
git-svn-id: svn://localhost/ardour2/branches/3.0@5339 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-07-09 13:39:45 +00:00
Carl Hetherington 015fc7b39f First stage of options rework.
- Split Configuration into RCConfiguration and SessionConfiguration;
the first for options which are saved to .rc files and the second
for options which are saved in a session file.

- Move some options from the old `master' Configuration object into
SessionConfiguration; this needs more refinement.

- Reflect many RCConfiguration options in an expanded Edit->Preferences
dialog; my intention is to remove the corresponding menu items
eventually.



git-svn-id: svn://localhost/ardour2/branches/3.0@5075 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-05-14 00:13:27 +00:00
David Robillard e0aaed6d65 *** NEW CODING POLICY ***
All #include statements that include a header that is a part of a library
bundled with ardour MUST use quotes, not angle brackets.

Do this:

#include "ardour/types.h"

NOT this:

#include <ardour/types.h>

Rationale:

This is best practice in general, to ensure we include the local version
and not the system version.  That quotes mean "local" (in some sense)
and angle brackets mean "system" (in some sense) is a ubiquitous
convention and IIRC right in the C spec somewhere.

More pragmatically, this is required by (my) waf (stuff) for dependencies
to work correctly.  That is:

!!! FAILURE TO DO THIS CAN RESULT IN BROKEN BUILDS !!!

Failure to comply is punishable by death by torture. :)

P.S. It's not that dramatic in all cases, but this (in combination with some
GCC flags specific to the include type) is the best way I have found to be
absolutely 100% positive the local ones are being used (and we definitely
want to be absolutely 100% positive on that one).


git-svn-id: svn://localhost/ardour2/branches/3.0@4655 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-02-25 18:26:51 +00:00