Commit graph

23 commits

Author SHA1 Message Date
Robin Gareus
d8e4e7b259
Fix calculating intersection of waveform rectangle
see also 68eb63e0c8
2024-09-27 02:54:35 +02:00
Robin Gareus
9d0415ba04
Waveview: fix visual jitter when trimming or splitting regions
The left edge of a region on the the editor is rounded to be
on a pixel. When zoomed out, the position corresponding to that
pixel is not usually identical to the region's position().

We need to correct for this as best as possible, while keeping
peaks aligned to pixels.
2024-09-26 02:21:24 +02:00
Robin Gareus
68eb63e0c8
Waveview: fix rounding, span entire region rectangle
Previously samples at the end could end up being cropped,
when the Waveview is rendered using an offset.
2024-09-26 02:21:24 +02: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
d12dd4015d
Revert canvas debugging
This reverts commit 8359311849.
This reverts commit f377822891.
This reverts commit 859d6ebe4a.
This reverts commit 4cd7de7a6f.
2023-02-04 18:23:18 +01:00
Paul Davis
4cd7de7a6f debugging: allow selection no-draw for canvas fill, outline, text, lineset and waveview 2023-01-20 18:13:12 -07:00
Robin Gareus
5b52aa956f
Prepare for region polarity inversion (using negative gain) 2022-12-17 13:14:54 +01:00
Mads Kiilerich
004b32b91e
Update tracker/reference URLs to prefer HTTPs 2022-10-24 04:59:20 +02:00
Paul Davis
bbb0b78a50 fetch thread local tempo map in potential peak-building threads 2022-06-20 14:25:40 -06:00
Paul Davis
c9b8a91edb apply new Item method name to various other usage sites 2022-04-26 22:04:08 -06:00
Robin Gareus
d9b9f4f588
Waveform: work around empty peakfile edge-case
(gdb) p peak.max
$5 = -1
(gdb) p peak.min
$6 = 1
2021-11-14 23:11:19 +01:00
Robin Gareus
8e89325bee
Waveform: scope-like smooth waveform
* Draw antialised waveform if waveform is monotonic
* Fix center-line position (span at most height - 1),
* Remove invalid "side-lines" that were previously
  drawn around spikes.
* Do not linearly center min/max when drawing log-scale
* Fix offset of lower outline and clip indicators
2021-11-14 22:28:55 +01:00
Robin Gareus
70a07eec48
Waveview: properly draw 1px outline 2021-11-14 22:28:55 +01:00
Paul Davis
c9035efb25 timeline types for libs/waveview 2021-08-13 12:51:29 -06:00
Robin Gareus
5957e14259
Remove unused #include<> (2/2)
PBD::stacktrace() is not used nor needed by default.
It should be used sparingly.
2021-05-05 17:57:16 +02:00
Robin Gareus
239c340527
Do not show blank waveforms in case height is < 1px
Instead draw some lines to indicate that "something" is there.
2020-12-22 13:27:46 +01:00
Robin Gareus
4b0f72e205
Do not bother to render waveforms < 2px high
Those are blank to begin with, nothing is drawn, yet they'd still be
cached.

This may happen during an initial exposure (see 1a49d7d42b),
or when deleting regions.
2020-12-22 05:54:55 +01:00
Robin Gareus
b8e336b973
Add API to clear waveform cache 2020-12-21 21:12:53 +01:00
Robin Gareus
cec5ce8f45
Update canvas/UI lib GPL boilerplate and (C) from git log 2019-08-03 15:53:17 +02:00
Robin Gareus
7b92f54929
Fix random off-by-one issue when vertically zooming a waveform
To mitigate concurrent rendering, the waveform cache adds a random
range of pixels centered around the visible waveform.

Alignment is using integer half_width = width_samples / 2;
This always aligns the left-edge to the left-most cairo-pixel.

This fixes an issue with moving moiree patterns in waveforms when
zooming vertically (which invalidates the cache and uses a
different random number of pixels),
2019-07-29 03:56:35 +02: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
5f485f964e Fix OSX builds in the wake of the source-tree layout changes 2017-07-18 18:29:22 +02: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
Renamed from libs/canvas/wave_view.cc (Browse further)