Commit graph

64 commits

Author SHA1 Message Date
Robin Gareus
74c4ca3e52
Reduce reliance on boost - the hard part
the rest from `tools/convert_boost.sh`.

* replace boost::function, boost::bind with std::function and std::bind.

This required some manual fixes, notably std::placeholders,
some static_casts<>, and boost::function::clear -> = {}.
2024-10-19 03:47:21 +02:00
Paul Davis
549defc068 more work on fixing pianorule recomposition of objects 2024-10-17 07:44:29 -06:00
Paul Davis
e658056cd7 length (& position) of the region added for step entry shouuld use in beat time 2023-11-06 20:38:08 -07: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
Paul Davis
2c7bfa9ead require use of BBT_Argument as both parameter and return type from most methods (GUI edition) 2023-02-15 16:02:56 -07:00
Paul Davis
4f83eea46c Revert "step entry: do not pass auto_partition=true to Playlist::add_region()"
This was an error of understanding.

This reverts commit e9f98fe230.
2022-09-24 15:21:05 -06:00
Paul Davis
e9f98fe230 step entry: do not pass auto_partition=true to Playlist::add_region()
This code path is only followed if there is no region at the start of step entry, so auto-partition
makes no sense anyway
2022-09-24 14:53:06 -06:00
Robin Gareus
3c03e4951e
Use updated temporal API 2/2 2021-12-11 15:51:31 +01:00
Ben Loftis
2a6da0113f MIDI Draw: Provide a menu to explicitly select note-length
ToDo: 3,5,7's?  keyboard shortcuts?
2021-11-18 07:35:13 -06:00
Paul Davis
9c7f2cd642 fixup another NUTEMPO #warning 2021-08-13 12:51:32 -06:00
Paul Davis
f328fdc56a adapt to DoubleableBeats and so forth (gui edition) 2021-08-13 12:51:32 -06:00
Paul Davis
0093ae07b0 cleanup after timecnt_t API changed (GUI edition) 2021-08-13 12:51:31 -06:00
Paul Davis
cce695d33a changes required by fixing ambiguities in timepos_t/timecnt_t API (GUI edition) 2021-08-13 12:51:31 -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
3c00fab75e remove/hide Session::tempo_map() and use TempoMap::use() instead (thread local shared ptr) (GUI edition) 2021-08-13 12:51:30 -06:00
Paul Davis
1098b27b35 new tempo map API for almost all of the GUI now 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
0a469527f1 updated Temporal::Beats ... GUI edition 2021-08-13 12:51:28 -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
0972e9a513
Skip potential garbage midi-step 2019-08-20 04:46:42 +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
Paul Davis
923d07be31 remove debug output 2018-12-27 17:18:21 -05:00
Paul Davis
b09ac181e0 div wrapping 2018-12-27 17:18:21 -05:00
Paul Davis
bc1a7ec9e5 deal with end-of-step-editing in a better way 2018-12-22 16:48:16 -05:00
Paul Davis
126def9e1a make StepEntry into a singleton.
More work to follow to clean up the details, and more comments to
explain the relationship between StepEntry and StepEditor.
2018-12-22 14:45:44 -05:00
Robin Gareus
ccddc0db3a Fix some small memory leaks (GUI) 2018-01-27 15:44:59 +01:00
Paul Davis
7db12f6b12 convert codebase to use Temporal for various time types 2017-09-24 12:03:54 -04: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
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
nick_m
5c2ccc4f3e Allow negative return in TempoMap::beat_at_frame() and its exact_ variant.
- audio-locked midi regions can be start-trimmed properly
	  when close to 1|1|0
	- a midi region placed before the first meter
	  will continue the tempo curve and first meter.

Only a couple of callers require change, as bbt_at_beat() already
deals with this.
2016-08-14 03:04:53 +10:00
nick_m
2d5238d875 Make some musical operations on music-locked regions operate in beats.
- use exact beats to determine frame position.
	- see comments in tempo.cc for more.
	- this hasn't been done for split yet, but dragging and
	  trimming are supported.
2016-07-10 02:18:36 +10:00
nick_m
03ea905b86 Step edit cursor no longer assumes constant tempo. 2016-06-08 02:45:40 +10:00
Paul Davis
541a419cfe fix unused variable warning 2016-05-31 15:30:45 -04:00
nick_m
baf8f37967 Tempo ramps - rename meter_at() -> meter_at_frame() & make the ticker slightly more efficient. 2016-05-27 23:38:17 +10:00
nick_m
8f3bc6f809 Tempo ramps - rename tempo_at() -> tempo_at_frame().. 3 decimals for the audioclock tempo display. 2016-05-27 23:38:17 +10:00
nick_m
dbfe991cd8 Tempo ramps - fix changing from const to ramp in the gui.
- also fixes some midi mouse over problems
	- start using replacements for frames_per_bar() frames_per_beat() etc.
2016-05-27 23:38:09 +10: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
Robin Gareus
cba7d37107 fix various issues when deleting midi region during step-edit
fixes #6404
2015-07-04 12:33:10 +02:00
Ben Loftis
eafb66d001 update some calls to use new get_preferred_edit_position; needs testing 2015-04-21 10:22:28 -05:00
David Robillard
2eef0612b9 Start step entry at playhead. 2015-01-07 20:46:21 -05:00
David Robillard
69069e0381 Fix whitespace (noop). 2015-01-07 20:12:14 -05:00
David Robillard
2a251b4570 MusicalTime => Beats. 2015-01-07 00:12:07 -05:00
David Robillard
c1cfa12d6e Wrap MusicalTime in a class.
This lets us get a more explicit handle on time conversions, and is the main
step towards using actual beat:tick time and getting away from floating point
precision problems.
2014-11-22 04:05:42 -05:00
David Robillard
fd9ccc7058 Use an enum for RoundMode instead of magic numbers.
No functional changes in this one (for easier auditing), but towards having
round up/down only if necessary modes, rather than kludging around that
situation with a double round as we do currently.
2014-11-16 22:35:45 -05:00
Paul Davis
38f2aa51bd Merge branch 'master' into cairocanvas 2013-07-09 09:11:52 -04:00
Robin Gareus
07be5beee7 window delete/hide is managed by WMProxy (amend to cb6f16ac) 2013-07-07 22:29:45 +02:00
Paul Davis
ce8731b32d Merge branch 'master' into cairocanvas 2013-06-06 09:52:21 -04:00
Robin Gareus
04967de3af fix 5498 -- use note length from step-entry with midi keybd. 2013-05-21 00:25:04 +02:00
Paul Davis
e2f0c5f91e merge resolution with master 2013-05-02 20:21:54 -04:00
Paul Davis
3973ce81b3 remove all of Gtk::Window::set_position (WIN_POS_MOUSE) for anything deriving from ArdourDialog or ArdourWindow; move the set_position() call into those classes' constructors, so that they are called before the windows are realized, and thus it actually works 2013-05-02 18:13:35 -04:00