summaryrefslogtreecommitdiff
path: root/libs/ardour/audioregion.cc
AgeCommit message (Collapse)Author
2012-12-13crossfade hack and slash. removed overlap checks, overlap mode, default ↵Ben Loftis
length, fade_is_xfade, fade_is_short, and other leftovers from previous crossfade models. Draw crossfade drags in realtime so fade_line is no longer needed. remove code for hiding crossfades during a drag. moved crossfade rect to top layer so crossfade lines dont grab mouse focus. drag-trim-with-fixed-fade-anchor is partially implemented and needs discussion git-svn-id: svn://localhost/ardour2/branches/3.0@13659 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-11-30fix x-fades (part one)Robin Gareus
The data from the lower layer(s) was not faded out because the reversed gain curve was incorrect because ControlList:add() inserts anchor points. a call to reverse_curve() for a linear fade produced: INPUT: [when,val] {[0.0, 0.0], [300.0, 1.0]} OUTPUT: (reversed) {[0.0, 0.0], [0.0, 1.0], [1.0, 0,0], [300.0, 0.0]} solution: use fast_simple_add() instead. git-svn-id: svn://localhost/ardour2/branches/3.0@13572 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-07-25convert from Glib:: to Glib::Threads for all thread-related APIPaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@13084 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-07-24a bit more output from -D audioplayback, to help thorsten track down a ↵Paul Davis
crash/valgrind bug git-svn-id: svn://localhost/ardour2/branches/3.0@13074 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-06-16Return silence from read_from_sources() if we try to read a channel that our ↵Carl Hetherington
source does not have (if replicate-missing-region-channels is turned off); should fix #4934. git-svn-id: svn://localhost/ardour2/branches/3.0@12741 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-06-16Add new SharedStatefulProperty which manages a shared_ptr toCarl Hetherington
some Stateful object, and a subclass to use this for AutomationList. SharedStatefulProperty will manage undo / redo using full copies of the XML state, like MementoCommand, but does it within the Property undo system. git-svn-id: svn://localhost/ardour2/branches/3.0@12740 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-06-09Fix off-by-one in body_range().Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@12635 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-06-01fix construction of new xfades from legacy xfades, and add a few comments ↵Paul Davis
here and there git-svn-id: svn://localhost/ardour2/branches/3.0@12519 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-05-30rethink how to load legacy crossfades as new-style xfadesPaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@12496 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-05-26convert audioregion xfade stuff to properties, add "is-short" property for ↵Paul Davis
fade in and out so that we can keep track of whether an (x)fade is supposed to remain "short", and don't do "mess-with-region-below" stuff when trimming a short xfade. should be back-compatible with 3beta4a git-svn-id: svn://localhost/ardour2/branches/3.0@12452 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-05-24Tweak comment.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@12432 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-05-24Remove over 500 unnecessary includes (including 54 of session.h).David Robillard
It's slightly possible that this causes trivial build failures on different configurations, but otherwise shouldn't cause any problems (i.e. no actual changes other than include/naming/namespace stuff). I deliberately avoided removing libardour-config.h since this can mysteriously break things, though a few of those do seem to be unnecessary. This commit only targets includes of ardour/*.h. There is also a very large number of unnecessary includes of stuff in gtk2_ardour; tackling that should also give a big improvement in build time when things are modified. git-svn-id: svn://localhost/ardour2/branches/3.0@12420 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-05-24Opaque region bodies should overwrite whatever is already inCarl Hetherington
the buffer; fix crash when the sum of the fade in and out is longer than the region. git-svn-id: svn://localhost/ardour2/branches/3.0@12410 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-05-22merge new symmetric curve from mixbus, fix errors in fade out slow curve, ↵Paul Davis
tweak display of xfades so that the non-upper-fade is slightly less dominant (alpha) git-svn-id: svn://localhost/ardour2/branches/3.0@12384 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-05-19prevent xfades from being dragged to a longer length than the region that ↵Paul Davis
owns them git-svn-id: svn://localhost/ardour2/branches/3.0@12332 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-05-15don't apply inverse fades if a region is not acoustically opaquePaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@12294 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-05-11alter computation of inverse constant power curvesPaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@12255 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-05-11remove some debug noise from previous commitPaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@12254 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-05-11switch to 5 new fade curves, taken from mixbus2 branch. make xfade context ↵Paul Davis
menus functional even though the images are not accurate git-svn-id: svn://localhost/ardour2/branches/3.0@12253 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-05-10don't trim regions in conjunction with xfade trimming unless auto-xfade and ↵Paul Davis
full-overlap-xfades are selected git-svn-id: svn://localhost/ardour2/branches/3.0@12245 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-05-10trim a single other region when adjusting xfade lengthPaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@12241 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-05-10if an xfade involves only 2 regions, clamp its length to the overlap between ↵Paul Davis
them git-svn-id: svn://localhost/ardour2/branches/3.0@12238 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-05-09change inverse fades when changing fade lengthPaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@12232 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-05-09correctly save & restore xfade statePaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@12231 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-05-04hide unused argsPaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@12169 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-05-01mostly backup-oriented commit to preserve very initial pass at rendering ↵Paul Davis
fades-as-xfades in a more useful way. quite a bit of work to do here git-svn-id: svn://localhost/ardour2/branches/3.0@12129 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-04-30Clarify behaviour of ::read (overwrites its buffer) wrt ::read_at (mixes ↵Carl Hetherington
into its buffer). Refactor things slightly, removing need for ReadOps. Fix crash on teardown of test. Fixes Rhythm Ferret. git-svn-id: svn://localhost/ardour2/branches/3.0@12127 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-04-30add explicit inverse fade in/out curves for use when doing constant power ↵Paul Davis
xfading git-svn-id: svn://localhost/ardour2/branches/3.0@12123 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-04-27Crossfades: default xfades are now constant-power, -3dB rule, other options ↵Paul Davis
are constant power(-6dB) rule or use existing region fade shape as is; provide GUI control over options; fix some inconsistent behaviour regarding xfades when relayering git-svn-id: svn://localhost/ardour2/branches/3.0@12113 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-04-26slightly explanatory comment for crossfadingPaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@12099 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-04-18Re-work fade operation to be closer to Mixbus; thingsCarl Hetherington
below the top region's fades are implicitly faded in the opposite sense; restore short crossfades option. git-svn-id: svn://localhost/ardour2/branches/3.0@12022 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-04-16Fairly major change to the way in which crossfades are handled;Carl Hetherington
they are now done with region fades, rather than separate objects. After this commit, Ardour will try to convert your session files to the new crossfade format, but will make a backup in your session folder first. If you have works in progress using Ardour 3 it is ***STRONGLY RECOMMENDED*** that you back up session files before updating to this commit. git-svn-id: svn://localhost/ardour2/branches/3.0@11986 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-04-04Remove ControlList::_max_xval which is set up and stored inCarl Hetherington
state but never actually read. git-svn-id: svn://localhost/ardour2/branches/3.0@11787 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-01-21Remove unused code.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@11289 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-12-30Set up layering_index immediately on an explicit layer, so that undoCarl Hetherington
works properly. Stop the layer being a stateful property, as it is always derived from layering_index, unambigiously, by relayer(). git-svn-id: svn://localhost/ardour2/branches/3.0@11120 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-12-17Remove unused code.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@11015 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-10-24Remove unused read/write data count code.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@10300 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-10-20again, drop the assert when asked to read part of an audio region with an ↵Paul Davis
invalid timeline range, and just send an error message. this avoids crashing when loading sessions created with the broken crossfade constructor git-svn-id: svn://localhost/ardour2/branches/3.0@10260 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-10-20remove absurd internal Crossfade constructor that confused region start and ↵Paul Davis
region position; set position explicitly in the two places that we use these crossfades; revert to the assert that caught this crazy error git-svn-id: svn://localhost/ardour2/branches/3.0@10259 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-10-20fix an aggressive assert that crashes out when reading the wrong regions ... ↵Paul Davis
why are we reading the wrong regions? git-svn-id: svn://localhost/ardour2/branches/3.0@10257 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-08-09Add a few asserts.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@9966 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-07-19Make _read_at take notice of its srcs parameter; fixes part of #3908.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@9900 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-07-19Remove unused parameters to AudioRegion::read_atCarl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@9899 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-06-01Fix broken whitespace. I'd apologize for the compile times if it was my ↵David Robillard
fault :D git-svn-id: svn://localhost/ardour2/branches/3.0@9654 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-05-30remove unused and useless "src" argument for a number of Region property ↵Paul Davis
modifying methods git-svn-id: svn://localhost/ardour2/branches/3.0@9632 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-05-28putative fix for crashes related to diskstream playback buffer refills with ↵Paul Davis
compound regions git-svn-id: svn://localhost/ardour2/branches/3.0@9620 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-05-27abort when cnt is too highPaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@9619 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-05-27debugging outputPaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@9618 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-04-04Fix read_raw_internal to use the appropriate audio source for the specified ↵Carl Hetherington
channel, and fix maximum_amplitude to check all channels of a region rather than just the first. Fixes #3933. git-svn-id: svn://localhost/ardour2/branches/3.0@9290 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-02-28No-op; coding style.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@8988 d708f5d6-7413-0410-9779-e7cbd77b26cf