13
0
Commit Graph

95 Commits

Author SHA1 Message Date
72850d456f implement time-stretch from left of region
Make click & drag in the left-hand half of a region with the Timestretch
tool stretch the region on its left, leaving the end position of the new
time-stretched region in the same place as the end of the original.
2023-06-09 17:57:52 +01:00
dd542b8f4d
Use ARDOUR::PlaylistSet instead of local typedefs 2023-04-06 02:13:51 +02:00
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
be860db54f
Prefer new Rubberband engine for timestretch 2022-09-13 06:56:08 +02:00
b806ccf373 timestretching: fix inaccuracies in generated length
The design ignored the ratio computed by the drag interaction, and relied on getting the stretch
ratio from the dialog. This truncated the actual ratio, leading to (relatively) small errors
in the length of the generated region.

Now, if the ratio provided by the drag is not (1/1) (i.e. a single click while in timefx mode)
then the percentage stretch spinner is marked insensitive and the stretch ratio is taken from
the given ratio. For single clicks, the user can still adjust the percentage as they wish
2022-05-31 12:36:54 -06:00
399a5b3f25 convert use of operator* for tim::line types with ::scale(ratio_t) (GUI edition) 2022-05-27 12:47:44 -06:00
ffda4b867e temporal: remove dangerous muldiv methods and use explicit method name not cast (GUI edition) 2022-05-27 12:47:44 -06:00
fcbe6aab49
Fix crash when time stretching
```
#3  in __assert_fail
#4  in Temporal::TempoMap::use
#5  in Temporal::timepos_t::_superclocks
#6  in Temporal::timepos_t::superclocks
#7  in Temporal::timepos_t::samples
#8  in ARDOUR::Region::position_sample
#9  in ARDOUR::RBEffect::run
#10 in Editor::do_timefx
#11 in Editor::timefx_thread
```
2022-05-22 15:26:19 +02:00
0e8c7272eb
Fix duplicate undo/redo when stretching multiple regions
Previously, when running timefx on multiple regions on
the same track, undo commands accumulated for each region
in the playlist. Resulting in duplicate actions on undo/redo.

```
<UndoTransaction tv-sec="1649607270" tv-usec="646684" name="pitch shift">
    <StatefulDiffCommand obj-id="1690" type-name="ARDOUR::AudioPlaylist">
      <Changes>
        <Regions>
          <Add id="4046"/>
          <Remove id="2284"/>
        </Regions>
      </Changes>
    </StatefulDiffCommand>
    <StatefulDiffCommand obj-id="1690" type-name="ARDOUR::AudioPlaylist">
      <Changes>
        <Regions>
          <Add id="4046"/>
          <Add id="4057"/>
          <Remove id="2284"/>
          <Remove id="2388"/>
        </Regions>
      </Changes>
    </StatefulDiffCommand>
...
```
2022-04-10 18:25:19 +02:00
fed449d54d various fixes to get time stretching basically working again
Time domains are not well respected at present, so more work is needed here
2021-08-13 12:51:35 -06:00
06f93e65b2 fix timefx to use ratio_t from the beginning of the operation 2021-08-13 12:51:32 -06:00
18d64f0402 change all Region::nt_*() methods to names without the nt_ prefix (GUI version) 2021-08-13 12:51:30 -06:00
aa56f4a16e GUI: moving along with timeline type conversion 2021-08-13 12:51:29 -06:00
9d69fa3820 another day or two's work on timeline type conversion 2021-08-13 12:51:29 -06:00
mx
353ac8e106
Use soundtouch for vocal audio time stretching (2/2) 2020-08-26 19:05:51 +02:00
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
c36dfbedb7
Re-work TimeFX cancel/abort
When processing multiple regions, apply results at the end, so that
when the action is canceled, no changes are applied.
Furthermore, do not commit an undo-command if time-stretch is a no-op.
2019-02-26 03:01:53 +01:00
1776939dd3
Fix TimeFX threading (detached thread must not be joined) 2019-02-26 02:16:59 +01:00
3917c2e6e1
Increase pitch-shifting quality a bit
OptionPitchHighQuality - Use the highest quality
 method for pitch shifting.  This method has a CPU cost
 approximately proportional to the required frequency shift
2018-12-23 01:58:19 +01:00
3324c95687 Hardcode pitch-shift algorithm (for now)
This fixes an issue with pitch-shift using the most recently used
time-stretch algorithm, which may be "resample.." (effective NO-OP).

Also leave a ToDo note regarding rubberband crispness levels for later.
2018-07-23 18:13:41 +02:00
92a685495c Revert "Add timestretch debug printf"
This reverts commit c2e520fab0.
2018-07-23 17:20:48 +02:00
b5e67536a3 Fix timestretch "resample without preserving pitch" 2018-07-23 17:20:13 +02:00
c2e520fab0 Add timestretch debug printf 2018-07-23 17:12:51 +02:00
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
Thomas Brand
63ea7b6516 NO-OP whitespace (updated GH PR #357) 2017-07-01 19:28:26 +02:00
cf52d6e4b4 enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.h 2016-07-14 14:45:23 -04:00
e98553edfa more work on time/pitch stretch/shifting
Clock and percent measure are now linked, not alternatives. Threading for GUI updates is now safe.
2016-02-22 15:31:25 -05:00
60055a0d6a first steps in providing more precise control over timestretching 2016-02-22 15:31:25 -05:00
22b07e0233 NOOP, remove trailing tabs/whitespace. 2015-10-05 16:17:49 +02:00
nick_m
4c1d79af4a Unbreak region brush drag wrt undo, avoid some dangling commands in the gui
- also allow moving of automation lines in internal mouse mode.
	- this is also a first pass at ensuring that if an operation does
	  nothing, avoid an undo entry.
2015-06-17 09:54:22 +10:00
nick_m
16ded1acac Fix missing undo for audio timefx operations. 2015-05-13 02:30:52 +10:00
8a796bd5e1 Use Glib::usleep in Editor::timefx_thread on Windows 2014-05-14 09:47:40 +10:00
3020b224fa Merge windows+cc branch into cairocanvas branch. Not finished, need to now merge windows branch to get changes from there 2014-01-10 16:07:57 -05:00
Nils Philippsen
5f00d2f3a7 allow linking unbundled versions of some libraries
(libltc, rubberband, taglib, vamp-sdk)
2013-10-28 09:06:09 +01:00
5568026387 'gtk2_ardour' - Harmonize '__WIN32__', 'OS_WIN32' etc, etc. Use 'PLATFORM_WINDOWS' instead 2013-10-14 17:00:28 +01:00
32320ec31d Add windows equivalent of hack in timefx 2013-07-11 22:06:20 -04:00
4ac444dad5 revert previous commit
git-svn-id: svn://localhost/ardour2/branches/3.0@12555 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-06-04 15:23:36 +00:00
3077b251a1 don't create a TimeFX dialog unless we actually need one
git-svn-id: svn://localhost/ardour2/branches/3.0@12554 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-06-04 15:22:47 +00:00
Carl Hetherington
08d7dff3d9 Speculative fix for timefx add_command calls happening after
the commit_reversible command (#4864 and duplicates).


git-svn-id: svn://localhost/ardour2/branches/3.0@12548 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-06-02 19:42:45 +00:00
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
Carl Hetherington
cf73ffdfe2 Remove unnecessary dialog argument to do_timefx; use current_timefx instead.
git-svn-id: svn://localhost/ardour2/branches/3.0@11403 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-01-31 21:24:23 +00:00
Carl Hetherington
44283453bc Don't bother opening a time FX dialog if we are just time stretching MIDI regions (#4679).
git-svn-id: svn://localhost/ardour2/branches/3.0@11402 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-01-31 21:24:16 +00:00
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
ddd162bdb0 Make time stretch respect edit groups (#4615).
git-svn-id: svn://localhost/ardour2/branches/3.0@11334 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-01-24 17:04:15 +00:00
ed626628b5 Delete trailing whitespace
git-svn-id: svn://localhost/ardour2/branches/3.0@9656 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-06-01 17:00:29 +00:00
Carl Hetherington
95b83295b2 Minor coding style fix and comment addition.
git-svn-id: svn://localhost/ardour2/branches/3.0@9526 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-05-16 20:12:45 +00:00
c0a009beb9 forward port a disgusting hack from 2.X that stops the timefx thread's exiting from preventing its request event pool being marked dead too soon
git-svn-id: svn://localhost/ardour2/branches/3.0@9431 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-04-26 15:17:17 +00:00
Carl Hetherington
f30402d073 clear_history -> clear_changes and some comments.
git-svn-id: svn://localhost/ardour2/branches/3.0@7685 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-08-25 17:32:08 +00:00
Carl Hetherington
d62f7e1c72 Patch from colinf to add tape-style region stretching via rubberband. Fixes #3075.
git-svn-id: svn://localhost/ardour2/branches/3.0@7620 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-08-13 16:50:29 +00:00
Carl Hetherington
f0db054a07 Don't report an error when the user cancels a time stretch operation.
git-svn-id: svn://localhost/ardour2/branches/3.0@7008 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-04-27 23:34:22 +00:00