Commit graph

135 commits

Author SHA1 Message Date
Robin Gareus
74c4ca3e52
Reduce reliance on boost - the hard part
the rest from `tools/convert_boost.sh`.

* replace boost::function, boost::bind with std::function and std::bind.

This required some manual fixes, notably std::placeholders,
some static_casts<>, and boost::function::clear -> = {}.
2024-10-19 03:47:21 +02:00
Paul Davis
56ce9c33c0 renaming: AutomationLineBase => AutomationLine, AutomationLine => EditorAutomationLine 2024-10-17 07:44:31 -06:00
Paul Davis
90c8726c6d wideranging changes to get automation editing working in cue editor 2024-10-17 07:44:31 -06:00
Paul Davis
9e5211e9b1 move 2 relative time methods from RegionView to EditingContext 2024-10-17 07:44:29 -06:00
Paul Davis
18819a48a9 region gain and MIDI CC freehand line drawing
This involved a significant change in event handling for automation region views,
but it brings it into line with how it works for other things. On button press
we initiate a drag, then if no motion occurs, the Drag returns false during
finalization, and only then do we continue through Editor::button_release_handler()
to eventually end up in ::add_automation_event().

Although it is a substantial change, the fact that it now works the same
way for audio regions, automation regions and automation tracks seems
like a definite plus.
2023-09-30 11:09:58 -06:00
Paul Davis
c53a476f15 allow drawing automation control points in mouse object mode
This is a tentative change and if it proves unwise we can back it out.
I just find it awkward to have to change modes to draw when it is
completely obvious whether I am drawing or not.
2023-06-28 13:44:59 -06:00
Paul Davis
64b08a1c70 when a parent (audio/MIDI) regionview is selected, raise matching AutomationRegionView
Currently, we only use AutomationRegionView to show MIDI CC data
2023-06-28 13:44:59 -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
Robin Gareus
3442500002
Remove "midi frame base", consistent TAV color (1/2) 2022-12-10 02:37:05 +01:00
Paul Davis
7850628f6f fix manual drawing of MIDI automation (avoid offset) #9142
Change assumption that the "pos" argument to AutomationRegionView::add_automation_event is region-relative, by
making it global.

This did not affect non-MIDI automation because that used
AutomationTimeAxisView::add_automation_view() instead.
2022-12-06 11:11:08 -07:00
Paul Davis
04131077b3 NOOP: remove newline 2022-10-26 22:26:29 -06:00
Paul Davis
a6b63b1cca automation region paste: snap at paste, not at cut
This fixes various issues with this operation, mostly because it was really the
wrong concept to begin with.
2022-10-26 22:23:14 -06:00
Paul Davis
621e0f4f91 remove debug output 2022-10-25 11:24:31 -06:00
Paul Davis
a928e35efb significant overhaul of automation region/lines to update during tempo map drags etc 2022-10-25 11:10:36 -06:00
Robin Gareus
63c78ebced Fix MIDI edit opertaiont (trim, draw) across tempo-changes
In the presence of tempo-changes distinguishing between offsets and
absolute positions is signficant. It is only valid to convert absolute
times using the tempo-map

Furthermore since GUI zoom-factor is time-invariant (samples per pixel),
all GUI operations must explictly use samples (or timecnt). It is not
valid (and problematic) to use use a location dependent timepos.
2022-10-23 19:12:31 +02:00
Robin Gareus
2245042b85
Fix crash when adding events to disabled MIDI event-lane
In case of MIDI CC/Bend/Pressure etc events, the underlying
data is provided by a MidiTrack (is-a Automatable) and not
an automation-control.

When directly calling AutomationControl::set_automation_state,
the AC disables automation-watch using shared_from_this().
With the Evoral::Control used for MidiTrack event-lists this
results in a tr1::bad_weak_ptr.
2022-07-22 03:38:34 +02:00
Robin Gareus
09e8ba00c2
Replace ::user_double() with ::get_double() 2/2 2022-06-29 01:39:02 +02:00
Robin Gareus
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
Paul Davis
b8a6b97b49 redesign (MIDI)RegionView display disabling around an RAII model 2022-04-05 20:52:10 -06:00
Paul Davis
ae8c043fe1 regionviews: use integer counter instead of boolean to control redisplay of contents 2022-04-05 20:52:09 -06:00
Paul Davis
4911779157 manual fixups after a rebase against master 2021-08-13 12:51:34 -06:00
Paul Davis
f321dd4dac remove NUTEMPO #warning (comment explains more) 2021-08-13 12:51:33 -06:00
Paul Davis
164b098a21 fix AutomationRegionView::paste() 2021-08-13 12:51:31 -06:00
Paul Davis
84d33f3ec3 manual fixups after rebase against master (GUI edition) 2021-08-13 12:51:31 -06:00
Paul Davis
18d64f0402 change all Region::nt_*() methods to names without the nt_ prefix (GUI version) 2021-08-13 12:51:30 -06:00
Paul Davis
9d69fa3820 another day or two's work on timeline type conversion 2021-08-13 12:51:29 -06:00
Paul Davis
7433bc27e0 intermediate, unfinished snapshot of ongoing timeline types work on GTK GUI 2021-08-13 12:51:29 -06:00
Paul Davis
0a469527f1 updated Temporal::Beats ... GUI edition 2021-08-13 12:51:28 -06:00
Robin Gareus
e81794d878
Add preference to keep spilled automation-lanes visible 2021-03-02 19:00:23 +01:00
Robin Gareus
f31e8ede4c
Unconditionally switch Manual->Play when drawing automation 2021-02-23 22:00:27 +01:00
Robin Gareus
0becbe7f4f
Auto-touch when adding automation events to a spilled control 2021-02-11 00:29:44 +01:00
Robin Gareus
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
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
Robin Gareus
01a43c6b1e
Another round of whitespace fixes 2019-04-09 00:27:33 +02:00
Robin Gareus
f9e12235c3
Frame as in "picture frame", not sample 2019-04-08 20:19:15 +02:00
Paul Davis
41bd6d3721 fix unintentionally edited color/theme name from f2s edit 2017-09-19 11:15:22 -04:00
Paul Davis
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
Paul Davis
36c708c465 only button 1 click in mouse draw mode on MIDI automation regions should add events 2017-08-15 17:36:50 -04:00
Robin Gareus
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
Paul Davis
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
Tim Mayberry
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
David Robillard
3b38d7d8a6 Keep automation lines within their parent (#6215). 2015-03-26 11:48:13 -04:00
David Robillard
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
Paul Davis
00887f94dc more color/modifier tweaks 2014-12-19 12:06:42 -05:00
David Robillard
6031308520 Use color modifiers for dynamic region styles. 2014-12-18 20:23:34 -05:00