Commit Graph

118 Commits

Author SHA1 Message Date
1dafa5017e
Always place first automation point using the current value
This is in preparation to always show a line, which show
the current value in case there are no automation points yet.

It also unconditionally snapshots the current value without
changing automation modes to touch/write first.
2022-04-25 18:32:23 +02:00
b8a6b97b49 redesign (MIDI)RegionView display disabling around an RAII model 2022-04-05 20:52:10 -06:00
ae8c043fe1 regionviews: use integer counter instead of boolean to control redisplay of contents 2022-04-05 20:52:09 -06:00
4911779157 manual fixups after a rebase against master 2021-08-13 12:51:34 -06:00
f321dd4dac remove NUTEMPO #warning (comment explains more) 2021-08-13 12:51:33 -06:00
164b098a21 fix AutomationRegionView::paste() 2021-08-13 12:51:31 -06:00
84d33f3ec3 manual fixups after rebase against master (GUI edition) 2021-08-13 12:51:31 -06:00
18d64f0402 change all Region::nt_*() methods to names without the nt_ prefix (GUI version) 2021-08-13 12:51:30 -06:00
9d69fa3820 another day or two's work on timeline type conversion 2021-08-13 12:51:29 -06:00
7433bc27e0 intermediate, unfinished snapshot of ongoing timeline types work on GTK GUI 2021-08-13 12:51:29 -06:00
0a469527f1 updated Temporal::Beats ... GUI edition 2021-08-13 12:51:28 -06:00
e81794d878
Add preference to keep spilled automation-lanes visible 2021-03-02 19:00:23 +01:00
f31e8ede4c
Unconditionally switch Manual->Play when drawing automation 2021-02-23 22:00:27 +01:00
0becbe7f4f
Auto-touch when adding automation events to a spilled control 2021-02-11 00:29:44 +01:00
01b52ce221
Fix adding MIDI automation points on an existing line #7683
This follows 973d58e8f9, which allows to ignore y-axis
position when drawing new events to parameter automation lanes.
2020-10-04 22:18:54 +02:00
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
01a43c6b1e
Another round of whitespace fixes 2019-04-09 00:27:33 +02:00
f9e12235c3
Frame as in "picture frame", not sample 2019-04-08 20:19:15 +02:00
41bd6d3721 fix unintentionally edited color/theme name from f2s edit 2017-09-19 11:15:22 -04:00
30b087ab3d globally change all use of "frame" to refer to audio into "sample".
Generated by tools/f2s. Some hand-editing will be required in a few places to fix up comments related to timecode
and video in order to keep the legible
2017-09-18 12:39:17 -04:00
36c708c465 only button 1 click in mouse draw mode on MIDI automation regions should add events 2017-08-15 17:36:50 -04:00
0b5db91ee9 AutomationLine time-unit conversion and paste API update
This fixes copy/paste of MIDI automation (time-unit: beat) from/to
Parameter automation (time-unit: samples).

It also fixes repeatedly pasting with tempo-ramps: pre-multiply length
before converting to samples.
2017-04-26 23:37:27 +02:00
nick_m
5031bdcf10 midi note drags are music-based.
- wysiwyg (during drag) when dragging more than one note across
	  a tempo change.

	- introduces a muscal equivalent of snap_delta (only used for
	  note drags atm)

	- split earliest note in selection into a separate function

	- MRV::copy_selection() returns the equivalent _primary note
  	  to avoid offset hell.

	- RV::snap_frame_to_frame returns a MusicFrame

	- prevent note drag moving before region start.
2017-02-05 05:02:01 +11:00
nick_m
390f56a5e1 fix a crash when deleting a MIDI region with CC automation (see recipe below)
- object mode: select a MIDI region that has CC automation.
	  Move the mouse over a CC automation event,
	  then press backspace to delete the selected region

	- the recipe is mentioned in #7049, but seems unrelated.
2016-11-23 15:29:57 +11:00
nick_m
7da51b9792 Ensure correct initial automation region view position. 2016-10-15 23:17:19 +11:00
cf52d6e4b4 enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.h 2016-07-14 14:45:23 -04:00
nick_m
17294ab9ec Make control point selection more consistent.
- disallow simultaneous events via ControlList::editor_add ()
	- clicking on an automation line selects the points that define it.
	- don't 'flash' a region selection when using mousedraw mode.
	- cp click selection resembles region selection.
	- region gain points respect snap modifier (a la automation points).
2015-10-20 00:53:27 +11: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
nick_m
15819f0896 Automation -use editor_add in gui, record straight lines with fewer points.
- don't keep setting/unsetting write pass when transport frame
	  remains the same (think larger jack buffer sizes)
	- insert guards are now 64 frames after when.
	- refactor previous approach.
2015-06-17 09:54:22 +10:00
3b38d7d8a6 Keep automation lines within their parent (#6215). 2015-03-26 11:48:13 -04:00
59bb3fbe65 Remove drag code from automation region view.
Let the editor handle it like (almost) everything else.
2015-01-13 23:53:28 -05:00
00887f94dc more color/modifier tweaks 2014-12-19 12:06:42 -05:00
6031308520 Use color modifiers for dynamic region styles. 2014-12-18 20:23:34 -05:00
5fef655380 Remove internal edit mode and add "content" tool. 2014-12-18 20:21:01 -05:00
nick_m
9af9e17adc Add editor selection state to session history via a SelectionMemento, which
combines selection related editor properties with the current editor selection.

The related editor properties are:
mouse mode,
zoom setting,
left frame of the canvas,
y origin of the canvas.

Selection state now includes region views (storing the underlying region id)
and time.

This patch also fixes a region mute undo bug.
2014-12-18 11:03:10 -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
dff9e60c7f Draw region automation with draw in either mode.
Perhaps debatable if contents should be edited when not in internal mode
whatsoever, but consistent with audio region gain and track automation.  It's
less of a problem with the draw tool than, say, object since drawing stuff is
its entire purpose.
2014-12-07 20:37:53 -05:00
60a045271e Allow creation of MIDI control points object tool. 2014-12-06 22:43:06 -05:00
2a28345bab Use source-relative time converter directly. 2014-12-06 10:27:18 -05:00
a65cd2a1b9 Make scroll work on MIDI regions when internal.
For some reason, grabbing the magic keyboard focus makes scroll stop working
regardless of what MRV::canvas_group_event() returns.  I can't figure out any
reason to grab the keyboard in this case anyway, so I just removed it.

Also simlify MRV event handling code in general.
2014-12-05 17:36:02 -05:00
b426873f6f Add MIDI control points only in internal/pencil. 2014-12-04 22:40:39 -05:00
41a9060df9 Move time converters only to the region views that actually need them.
A step towards sorting out time issues more solidly, the time situation of MIDI
region views and automation region views is slightly different.
2014-11-22 00:46:15 -05:00
7def8de5a3 Use memento_command_binder() to (probably) fix MSVC build and other things.
Remove ugly hack that does the same thing.
2014-11-20 12:01:39 -05:00
2fa6caad95 Support cut/copy/paste of several regions and lines at once.
The idea here is to do the reasonable thing, and copy objects of some
type (e.g. MIDI region, gain line) to tracks with a matching type.  The user
can override this with a track selection, which will be used straight-up.

Lost: ability to copy/paste lines across types, e.g. gain to pan.  This is
often questionable, but sometimes useful, so we will need to implement some
sort of "greedy mode" to make it possible.  Implementation simple, but not sure
what to do.  Perhaps this should only be possible if one automation track is
explicitly (i.e. via track selection) involved, and the types are at least
compatible-ish?
2014-11-16 22:35:45 -05:00
b4fcdbb100 Don't add origin value to MIDI controller regions on initial insert.
This should probably hijack the same modifier as the guard points and work the
same on all automation tracks, but I did it this way to not change behaviour of
track automation where a default is much more reasonable.
2014-11-16 22:35:45 -05:00
3f8251962f Fix crash when splitting regions in internal edit mode. 2014-11-16 22:35:45 -05:00
163dc756e5 Fix selection in automation regions (MIDI controllers).
We shouldn't have to manually drive the drag here, but if the ARV handler
returns false, the event doesn't propagate correctly for some reason and the
drag is not driven by the Editor.
2014-11-15 03:48:40 -05:00
de1ebcc149 Fix entering/editing MIDI region "automation" (controllers).
Two issues:

1) AutomationRegionView not receiving events (CC breakage).

2) Entered values must be rounded to integer for MIDI controllers.  This should
be done more generically with ParameterDescriptor for all controls (also
supporting boolean toggles and such), once ParameterDescriptor becomes more
pervasive and takes over Evoral::Parameter, but this will do for now.
2014-11-15 02:58:39 -05:00
a1e4befcca Fix crash after deleting automation region views (#4718). 2014-11-13 22:18:15 -05: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