Commit Graph

215 Commits

Author SHA1 Message Date
Adrian Knoth 6fa88273aa Spelling correction patch from Debian
Patch taken (and forward-ported to HEAD) from
<https://anonscm.debian.org/cgit/pkg-multimedia/ardour.git/plain/debian/patches/0100-fix-typos.patch>
2016-02-22 15:13:01 -05:00
Tim Mayberry e6a33b818f Add Playlist::duplicate_range/s utility methods 2016-01-28 12:25:16 +10:00
Tim Mayberry 9a52cefd13 Fix bug 6725 regions incorrectly moved after tempo change when glued to BBT time
Playlist::_split_region copies the region and BBT_Time member is default
constructed so position is bar 1 beat 1.

The regions sample position is then initialized to the new position using the
property list.

Playlist::add_region_internal is then used to add new regions to the playlist
which calls region->set_position() but as the region position has already been
initialized it does not recompute the _bbt_time member based on the new sample
position.

Then when a tempo change occurs and Region::update_after_tempo_map_change is
called the default initialized _bbt_time member is used to incorrectly
determine the new sample position.

So the change removes the initialization of the new region position using the
property list initialization method and just lets the playlist set the position
of the region in Playlist::add_region_internal so that the region _bbt_time
member is recomputed in Region::set_position_internal.
2016-01-14 07:05:04 +10:00
André Nusser ba4db8f6cb Add function to duplicate until a certain frame.
This excludes the 'end' frame.
2015-12-02 14:59:43 -05:00
André Nusser f048eb7d02 Make duplicate start at position, not position + 1. (libs part) 2015-11-04 17:50:12 -05:00
Robin Gareus 27f57cde9a fix crashes due to glib ignored EDEADLK.
Taking a readlock after a writelock in the same thread should result
in a deadlock, yet pthread on Linux returns EDEADLK and continues.
glib-2.42.0 ignores EDEADLK and assumes the lock was taken. Releasing
the lock later causes issues: "Calling g_rw_lock_writer_unlock() on a 
lock that is not held by the current thread leads to undefined behaviour."

The issue at hand: 
 AudioStreamView::redisplay_track()
 -> foreach_region()                       #<< WriteLock
 -> add_region_view()
 ...
 -> AudioRegionView::create_one_wave()
 -> RegionView::update_coverage_frames 
 -> Playlist::top_unmuted_region_at()      #<< ReadLock

All current users of Playlist::foreach_region() are in the GUI
and AFAICT read-only (display regions, update visuals)
2015-10-12 02:11:04 +02:00
Robin Gareus 22b07e0233 NOOP, remove trailing tabs/whitespace. 2015-10-05 16:17:49 +02:00
Paul Davis 4dc63966f0 globally remove all trailing whitespace from ardour code base.
Paul Davis was responsible for introducing almost all of this.
2015-10-04 14:51:05 -04:00
André Nusser 6a248b61f0 fix duplicating multiple selected regions - fixes #6202 2015-09-20 22:22:39 +02:00
Paul Davis 039127c89a fix indentation 2015-06-29 14:18:10 -04:00
GZharun c4f6faa424 [Summary] Region changes will make session dirty 2015-06-29 14:18:10 -04:00
nick_m 13f34f3922 Layering - the return of "later is higher".
Currently we don't do anything special on layering prefs change
    (relayer only occurs when each playlist is first edited). The idea here is
    that "undo" is still available to restore previous layering in case of any
    surprises.
2015-05-10 03:15:50 +10:00
Paul Davis d0e636e1a8 remove unused local variable 2015-04-11 10:57:42 -04:00
Colin Fletcher 30a9c2d05b Comments in various call-sites of coverage()
Comments in various call sites of Evoral::coverage() marking things I think
are dubious (with XXX). Also straightened up the alignment of some ASCII
art in libs/ardour/diskstream.cc
2014-12-01 20:12:51 +00:00
Paul Davis 5d53335300 when flushing notifications/signals from an ARDOUR::Playlist, emit the RegionAdded/ContentsChanged signals first so that when LayersChanged is sent, the receivers know about all the new regions 2014-10-15 18:44:22 -04:00
Robin Gareus 5b25dbba03 Properly count nested regions 2014-10-10 14:11:43 +02:00
Robin Gareus 9df1d1ef2e re-reference regions during uncombine - #5979 2014-10-10 14:05:49 +02:00
Ben Loftis e85ff4dad2 Cut and Copy should remember the white space at the end of a range.
This will be used when you paste with Ripple; it maintains the whitespace that you chose in the selection.
Also fix default setting of Dim contol by storing the default(normal) value for MPControl Controllables.
2014-07-23 14:36:21 -05:00
Paul Davis 0622a0cc30 add libardour infrastructure for "fade range" edit operation 2014-07-10 08:16:55 -04:00
Colin Fletcher e5e12acc56 Merge branch 'ripple-mode-cc' into cairocanvas
Fix up merge conflicts in
	gtk2_ardour/editor_mouse.cc
	gtk2_ardour/editor_ops.cc

Also fix up compile errors.
2014-07-01 19:10:47 +01:00
Robin Gareus a96036e3af fix typo in comment of prev. commit 2014-06-16 00:55:26 +02:00
Robin Gareus c8fd1d26eb fix region un/combine, based on a patch by Tom Brand 2014-06-16 00:51:45 +02:00
Colin Fletcher d75c7151d4 Ripple mode: basic implementation
Add a value for Ripple to EditMode enum.

Add Ripple edit mode to edit mode dropdown, by adding it to the
Editor::build_edit_mode_menu() helper function, and remove the old code that
added items to the (now unused) Editor::edit_mode_strings.

Add the regions that should be affected by the drag to RegionDrag::_views so
that the drag carries them along automatically.

Use a copy of the RegionList in Playlist::core_ripple(), since bad things
happen when iterating over regions and they get moved around in the list.

Handle rippling in removal of regions from playlist.

When dragging in ripple mode, exclude all regions that lie before the
original start position of the selected regions being dragged from
rippling: this is what Mixbus does.

Make editor dragging respect snap-to settings, by using the existing
compute_x_delta() function, which did almost the right thing. Move setting
of _last_frame_position out of that function so all ripple-dragged regions
can move.

Ripple when dragging from region list: even though Mixbus doesn't do this, it
seems like a good idea.

Prevent multi-track selection being dragged across tracks, by making
RegionMotionDrag::y_movement_allowed() virtual, and overriding it in
RegionRippleDrag to forbid dragging of selections containing regions on more
than one track to dofferent tracks in ripple mode.

Remember which TimeAxisView a ripple-mode drag that's allowed cross-track
drags started from, so that the effect of rippling regions after any region
that's dragged off that track can be undone.
2014-05-07 19:46:24 +01:00
Colin Fletcher 0026399358 Splice mode: exclude newly-added regions from being shuffled
When adding regions in splice mode, exclude the region being added from
possibly being shuffled. I don't know whether this might have some other
adverse effects, but it fixes an obvious defect in 'Splice' mode where
newly-recorded regions 'jump' to the playhead position when recording
stops, and since splice mode is pretty much broken anyway, I don't think it
can make matters any worse.
2014-05-07 19:46:24 +01:00
John Emmas fa59391f6a 'libs/ardour' - Use 'const_iterator' where appropriate (required to be buildable with MSVC) 2013-08-04 15:06:10 +01:00
Paul Davis 28f3d76e7c remove an identical odd namespacing typo 2013-08-01 10:46:22 -04:00
Paul Davis 6a18103800 remove odd namespacing typo 2013-08-01 10:44:34 -04:00
Paul Davis 72393f101b allow region list selection of whole file regions to select every instance of a region that has any source relationship with that whole file region (from a logic feature that came up while writing the manual)
git-svn-id: svn://localhost/ardour2/branches/3.0@13779 d708f5d6-7413-0410-9779-e7cbd77b26cf
2013-01-04 22:46:51 +00:00
Ben Loftis 2292e33ee4 crossfade hack and slash. removed overlap checks, overlap mode, default 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-12-13 16:42:05 +00:00
Carl Hetherington 2022a05c00 Set up layering correctly on compound playlists so that
the regions on the compound list are arranged the same
as on the original.


git-svn-id: svn://localhost/ardour2/branches/3.0@12643 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-06-10 13:07:33 +00:00
Carl Hetherington 6930071cdb When we rename a track, only rename its playlist if it
has never contained any regions (#4759).


git-svn-id: svn://localhost/ardour2/branches/3.0@12525 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-06-01 15:19:30 +00:00
Paul Davis 9dae320b12 always create short xfades when adding a region based on capture
git-svn-id: svn://localhost/ardour2/branches/3.0@12443 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-05-24 22:03:19 +00:00
David Robillard 6fa6514cfd Remove over 500 unnecessary includes (including 54 of session.h).
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-24 06:09:29 +00:00
Paul Davis 2a262b55cb stop deadlock when pasting into a playlist
git-svn-id: svn://localhost/ardour2/branches/3.0@12400 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-05-23 20:32:12 +00:00
Paul Davis 88f6395134 switch to a RWLock for Playlist, to allow simultaneous reads (which can happen occasionally, eg. peak and butler threads)
git-svn-id: svn://localhost/ardour2/branches/3.0@12301 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-05-16 00:16:34 +00:00
Paul Davis ac46e5edb4 remove recursive mutex from Playlist, replace with private regular mutex, force everyone to use Playlist::RegionLock to allow checking on lock handling if necessary; fix recursive use of lock in AudioPlaylist::read()
git-svn-id: svn://localhost/ardour2/branches/3.0@12131 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-05-01 16:19:51 +00:00
Carl Hetherington ec82de75b6 Handle update of crossfades on explicit relayer more efficiently.
git-svn-id: svn://localhost/ardour2/branches/3.0@12119 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-04-29 13:00:45 +00:00
Carl Hetherington bed5cf3344 Remove unused variable.
git-svn-id: svn://localhost/ardour2/branches/3.0@12118 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-04-28 16:25:16 +00:00
Paul Davis f78913cc99 Crossfades: default xfades are now constant-power, -3dB rule, other options 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-27 20:57:48 +00:00
Carl Hetherington a2897ecef6 Fairly major change to the way in which crossfades are handled;
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-16 16:32:22 +00:00
Carl Hetherington 81372b6ebe Remove some unused stuff.
git-svn-id: svn://localhost/ardour2/branches/3.0@11782 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-04-02 23:31:17 +00:00
Carl Hetherington 6b65e684eb Tidy up slightly.
git-svn-id: svn://localhost/ardour2/branches/3.0@11412 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-02-01 01:07:44 +00:00
Paul Davis 33c61757fc promote Playlist::RegionList to ARDOUR::RegionList; fix timefx on multiple regions, even regions of mixed type. this mostly involved some trivial code changes but to make the code simpler and less error prone, the API switched away from using RegionSelection (list of regionviews that catches regionviews vanishing) and used RegionList (lists of regions, no semantics) instead.
git-svn-id: svn://localhost/ardour2/branches/3.0@11362 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-01-27 16:29:01 +00:00
Carl Hetherington b9a9d8d047 Use a few shared_ptrs to make things slightly neater.
git-svn-id: svn://localhost/ardour2/branches/3.0@11156 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-01-04 13:56:09 +00:00
Carl Hetherington 6c0224c987 Emit notify_layering_changed() more often; especially when we remove the only region on a top layer, and the StreamView needs to sort itself out.
git-svn-id: svn://localhost/ardour2/branches/3.0@11126 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-12-31 13:25:50 +00:00
Carl Hetherington b93254f275 Anywhere that deletes regions needs to use a rdiff() on the playlist
for the undo history, so that changes to regions' layering_index
get stored in the undo record.  Make Playlist::update use add_region_internal
so that undone regions don't have their layering_index corrupted.
Setup layering indices on relayer() so that deletion of regions
causes an update.


git-svn-id: svn://localhost/ardour2/branches/3.0@11123 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-12-30 23:41:17 +00:00
Carl Hetherington 0be530821c Debug code.
git-svn-id: svn://localhost/ardour2/branches/3.0@11122 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-12-30 23:41:11 +00:00
Carl Hetherington dd53e7284a Set up layering_index immediately on an explicit layer, so that undo
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-30 20:05:48 +00:00
Carl Hetherington b177514930 Revert internals of the last layering-related commit, and go back a slightly-cleaned-up version of how it was before. Remove all layering modes; only option now is add-is-higher. Move-add-higher could easily be re-added if anyone uses it.
git-svn-id: svn://localhost/ardour2/branches/3.0@11111 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-12-29 22:14:15 +00:00
Carl Hetherington 0d46ad4ca5 Remove unused variable.
git-svn-id: svn://localhost/ardour2/branches/3.0@11101 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-12-28 18:55:25 +00:00