Commit Graph

315 Commits

Author SHA1 Message Date
Paul Davis 201580f7ba fix crashes caused by assert (_fx_line); item does not exist for livetrax 2024-04-25 13:07:00 -06:00
Robin Gareus 38adfdf79e
Add custom color for region effect automation 2024-04-23 21:56:26 +02:00
Robin Gareus b2d4280e0f
Add support for Region Fx Automation 2024-04-23 21:56:22 +02:00
Robin Gareus b962addc8c
Fix Region Gain freehand draw offset for regions with start offset 2023-10-07 17:55:39 +02:00
Paul Davis 764ed125a4 region gain line freehand draw: ensure drawn line is above waveform 2023-10-02 12:04:57 -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 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 9819cdb117
GUI support for per region polarity invert 2022-12-17 13:15:37 +01:00
Robin Gareus 6187556498
Opaque regions are supposed to be opaque 2022-12-13 01:35:28 +01:00
Robin Gareus 516bf1fa17
Set "opaque region base" alpha to 1.0 2022-12-10 02:37:05 +01:00
Robin Gareus a0d36a03b4
Tweak ARV waveform colors to match new transparency model 2022-12-10 02:37:05 +01:00
Robin Gareus 0bb81a9a18
Do not shade transparent regions in Layered mode
There already is a shaded coverage frame indicating
if a layer is audible. This leads to a more consistent view.

In addition changing layered mode now has to update the
colors (set_frame_color).
2022-12-10 02:37:05 +01:00
Robin Gareus 45fddc8533
Slightly improve rendering of muted regions
A fully transparent waveform (with only a semi-transparent outline)
looks very odd with all themes.

Perhaps this was a typo and the initially intended rendering was
supposed to be 31% transparent, however this is not distinguishable
from non-opaque regions (27% transparency).
2022-07-11 21:45:26 +02:00
Robin Gareus efa2efa221
Fix "muted" indicator (dup on audio-regions, missing on macOS)
RegionView::make_name already adds the prefix, AudioRegionView
does not need to add it again.

Also the font used on macOS (Lucia Grande) has a rather limited
UTF-8 charset and does not support:
 \u20F0 (COMBINING ENCLOSING CIRCLE BACKSLASH)
 \U0001F507 (SPEAKER WITH CANCELLATION STROKE)
so for now we keep using "!" on macOS.
2022-06-07 02:33:55 +02:00
Paul Davis 4ae5c04fd7 remove duplicate sync_mark member in AudioRegionView (decl'd in RegionView) 2022-02-19 09:03:36 -07:00
luz paz 364f2f0788 Fix typos in gtk2_ardour/ directory
Found via `codespell -q 3 -S *.po,./share/patchfiles,./libs -L ba,buss,busses,doubleclick,hsi,ontop,ro,seh,siz,sur,te,trough,ue`
2022-01-26 12:35:38 -05:00
Paul Davis 888239a834 remove dual (x,y) version of AutomationLine::view_to_model_coord()
The x-axis coordinate was never transformed or modified anyway (6.x just changed it
from double to integer and back again!)
2021-08-13 12:51:33 -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 04e8dbb342 another day of slow timeline type conversion 2021-08-13 12:51:29 -06:00
Paul Davis baee1a2f01 add API to make sure that region cue markers are above any waveviews or MIDI etc 2021-05-18 16:50:27 -06:00
Robin Gareus 5c579ed52d
Remove unused #include<> (1/2)
PBD::stacktrace() is not used nor needed by default.
It should be used sparingly.
2021-05-05 17:43:28 +02:00
Robin Gareus f4f9d76e53
Option to how x-run markers in regions 2021-02-14 16:22:35 +01:00
Robin Gareus 1a49d7d42b
Fix invisible multicahannel waveform at rec-stop
AudioRegionView() c'tor calls create_waves() early on
before the _height is set [1].

Now one following can happen:
 1. All peak-files are present. create_waves() directly calls
    create_one_wave() for each channel. They are initialized
    with zero height.
    But all channels are present so waves[] is populated and
    a later call to set_height() corrects this
 2. All peak-files are still missing. create_waves() schedules
    callbacks via PeaksReady -> peaks_ready_handler()
    Those callbacks arrive after set_height() was called and
    the waveforms are displayed correctly.

 3. Only some peak-files are present. This can happen at
    rec-stop when the region is created.
    create_waves() directly calls create_one_wave() for available
    peaks, and schedules peaks_ready_handler() for the remainder.
    The directly created waves have zero-height.
    Since not all waves are ready, they are stored in tmp_waves.
    waves[] remains unpopulated.

The set_height() call only ever changed the height of wave[], which
resulted in hidden waveforms, until a user manually changed the
height of the track.


[1] the height is set from
```
#1 AudioStreamView::create_region_view(boost::shared_ptr<ARDOUR::Region>, bool, bool)
#2 AudioStreamView::add_region_view_internal(boost::shared_ptr<ARDOUR::Region>, bool, bool)
#3 StreamView::add_region_view(boost::weak_ptr<ARDOUR::Region>)
 ...
## PBD::Signal1 Playlist::RegionAdded()
```
2020-12-22 03:37:17 +01:00
Paul Davis daa46c4225 the return of waveform outline (tips) color
This seems to have been removed unintentionally in 973e9ad132
2020-05-13 18:52:29 -06:00
Robin Gareus 070d8f5ee1
Fix SesionhandlRef when rebuilding peak-files
Since rebuilding peaks does not call drop-references, the WaveView
is not explicitly released. and ArdourWaveView::WaveView
keeps a shared pointer reference to the AudioRegion.

This also fixes a memory leak, waves, tmp_waves store C++ pointers,
not shared pointers. Explicit delete is required
2020-03-30 21:19:43 +02:00
Paul Davis a855119bdd rename all Evoral source from .(hpp|cpp)$ to .(h|cc) 2019-11-02 16:32:18 -06:00
Robin Gareus 219d366d88
Amend 973e9ad1: fix "black" regions when selecing them 2019-09-27 04:33:06 +02:00
Robin Gareus 973e9ad132
Tweak semantics for coloring regions
* Shade muted regions only when they are not selected, nor
  being dragged.
* Selecting and Dragging a region adds alpha, so that
  underlying regions and the grid become visible.
* record-red trumps.
2019-09-26 18:57:35 +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 f5bc64d00e
Add option to leave vertical gap below audio regions
This is a backport from Mixbus, to leave are 4 "open" pixels
at the bottom of the track so one can see the grid-lines between tracks.

This is useful with low region-transparency. grid-lines behind
opaque regions are not visible.
2019-04-10 21:50:55 +02:00
Robin Gareus a0b032efe2
Revert more "frame/sample" replacements
- Coverage concerns rectangles (frames, not sample)
- frame-handles are rectangles
- layout container boxes are frames
- inline display boxes are display_frame
2019-04-08 22:42:47 +02:00
Robin Gareus 8a7e452265
Yet another "Rect frame" (not a sample) 2019-04-08 20:57:56 +02:00
Robin Gareus f9e12235c3
Frame as in "picture frame", not sample 2019-04-08 20:19:15 +02:00
Robin Gareus ccddc0db3a Fix some small memory leaks (GUI) 2018-01-27 15:44:59 +01: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
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
Thomas Brand 63ea7b6516 NO-OP whitespace (updated GH PR #357) 2017-07-01 19:28:26 +02:00
Tim Mayberry de80767c8c Use AxisView::get_gui_property in AudioRegionView class 2017-04-19 09:36:58 +10:00
nick_m 59daffea1d rework snap
snap now fills in a struct (MusicFrame) which contins a snapped frame
along with a music divisor.
this gives useful information wrt magnetic snap which may or may not
have rounded to an exact musical position.

region position may now be set musically (using quarter notes for now).

this patch fixes several problems in the current code:

	- dragging a list of music-locked regions now maintains correct
	  musical offsets within the list.

	- splitting regions using magnetic snap works correctly (#7192)

	- cut drag should now work correctly with magnetic snap.

	- musical length of split midi regions is no longer frame based.
2017-02-04 22:57:36 +11:00
Robin Gareus 47de9314cc suffix region gain to TAVitem name 2017-01-24 13:37:20 +01:00
Paul Davis 90202f7675 coverage frames must still be deleted when switching back to Overlay mode 2017-01-11 11:43:44 +00:00
Paul Davis 9095d60f96 removed commented code, now that the comment is actually correct 2016-08-17 23:13:49 -04: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 3ee7972069 AudioRegionView - don't do coverage frames unless we're in stacked mode. 2016-07-10 02:18:37 +10:00
Paul Davis 6baac7d46f various safety checks for the result of dynamic_cast-ing a TimeAxisView to RouteTimeAxisView
Now that we have VCATimeAxisView, this needed to be done, but it also potentially applied with automation
2016-06-02 08:42:58 -04:00
nick_m 4f7a4cd233 Crapola - this is an experimental performance hack that must be reverted. 2016-05-27 23:38:14 +10:00
Robin Gareus 8fe2a308a5 GUI updates for transient rework 2016-05-01 02:02:25 +02:00
Paul Davis 6991a07902 remove all trace of SAE from source code.
This had become incoherent over time, and posed a development hazard and burden going forward
2016-02-22 15:31:24 -05:00
nick_m 5e7c7e52bd Use automation line's frame of reference for y position.
- removes the need for 'pixel hunting' wrt NAME_HIGHLIGHT_SIZE.
	- new control points generated by clicking on a line are placed
	  where the verbose canvas cursor says they are.
2015-10-30 21:14:16 +11:00