Commit graph

19086 commits

Author SHA1 Message Date
Robin Gareus
d55d3a7360
Save/load export timespan realtime setting 2022-05-15 02:20:19 +02:00
Robin Gareus
4577f86aa0
NO-OP: clang-format 2022-05-15 02:19:46 +02:00
Robin Gareus
86597d7e1c
NO-OP: re-indent, and cleanup 2022-05-14 23:32:26 +02:00
Ben Loftis
0cfbc64e54 triggerbox: given no other info, assume a clip is 1,2,4,8 or 16 bars at 4/4
this solves the oft-recurring problem where we assign
 a beat-count of '3' or '7' because minipm  mis-detected the tempo,
 and that situation is vanishingly rare.  it's better to assume 4 or 8

the user always has the option to change the number of beats (and
 therefore the detected tempo) manually, for those clips that are
 in a different time signature.  but minibpm cannot be expected
 to help us there.

NOTE: this is a fallback to make things 'just work' lacking any other context.

* if the tempo is detected in the filename, we use that instead
* clips that were recorded to the timeline use that bpm+timesig
* in the future we can use file-metadata (acidized wave?) instead
* this is audio-only: midi files can have an embedded timesignature

but... given no other information, experience says the vast majority
of downloaded/purchased clips will be 1,2 or 4 bars at 4/4.
2022-05-14 14:16:21 -05:00
Paul Davis
be5c64f737 temporal: NOOP - add blank line 2022-05-13 19:05:13 -06:00
Paul Davis
1ccda17504 temporal: add a new version of tempo twist based on pre-nutempo code 2022-05-13 19:05:13 -06:00
Paul Davis
60159acd33 temporal: slightly change const positioning in definition of ::stretch_tempo() 2022-05-13 19:05:13 -06:00
Paul Davis
b0ff612572 temporal: add DEBUG_TRACE message 2022-05-13 19:05:13 -06:00
Paul Davis
4defa3ae8f temporal: fix logic bug in TempoMap::reset_starting_at() 2022-05-13 19:05:13 -06:00
Paul Davis
c9b7f012e4 temporal: helpful comment for future readers 2022-05-13 19:05:13 -06:00
Paul Davis
f0f8f15cce temporal: missing change from 072a7b17a22f 2022-05-13 19:05:13 -06:00
Paul Davis
51980b15cd temporal: split _omega into two values, for each time domain
omega can be computed from Beat or superclock duration. This gives rise to
different units for omega, and we must use the correct value in a given
context.

This commit also changes the way that the audio time omega is computed during
TempoMap::reset_starting_at()
2022-05-13 19:05:13 -06:00
Paul Davis
f679cd6eab temporal: remove Rampable, change name of method to set end note types per minute
Rampable only existed to provide exclusive access to ::set_end() for the
TempoMap. More idiomatic C++ but now that _type has also gone away, so has
::set_ramped() and it really was not worth keeping it around.
2022-05-13 19:05:13 -06:00
Paul Davis
8770df611c temporal: remove TempoMap::_type concept
Ramped/Constant is really a function of start/end note_types_per_minute. Having
a separate member is really just caching it and leads to errors or risk thereof.
2022-05-13 19:05:13 -06:00
Paul Davis
43b3ec005f temporal: use new debug bit for debug output in reset_starting_at() 2022-05-13 19:05:13 -06:00
Paul Davis
5d22e522d1 temporal: add new debug bit for debug tracing just TempoMap::reset_starting_at() 2022-05-13 19:05:13 -06:00
Paul Davis
45de3694cc temporal: add reimplemented version of 6.x's TempoMap::gui_stretch_tempo() 2022-05-13 19:05:13 -06:00
Paul Davis
db9cc04230 temporal: remove debug output from TempoMap::reset_starting_at() 2022-05-13 19:05:13 -06:00
itmuckel
9178ca635a
Remove unused imports and modernize stateful.cc 2022-05-13 23:07:49 +02:00
Robin Gareus
9c9a7bbf97
Remove debug message 2022-05-13 21:02:37 +02:00
Robin Gareus
3b13dc9b54
Remove unused method declaration 2022-05-13 19:38:12 +02:00
Robin Gareus
f8aecc460c
Use new hard-stop API to stop transport before export 2022-05-13 19:38:11 +02:00
Robin Gareus
25098edfc1
Fix MIDI delaylines
MidiBuffer::read_from() clears the buffer, so events were not
accumulated into the delay-buffer.

This also includes a small optimization and comments for the
variable delayline.
2022-05-13 19:38:07 +02:00
Ben Loftis
a899136cae Fix egregious playlist copy+paste thinko
* when you copy a Range into a playlist, the playlist's 'timeline' should
 begin at the start of the selected Range.  Regions should retain the
 offset they had from the Range's start.
2022-05-13 12:05:04 -05:00
Ben Loftis
1fdfa53b9f region::absolute_time_to_region_beats() needs to incorporate start offset
* this fixes the Draw tool when adding notes;  if you tried to draw in
 a region with a trimmed front, the note would not get added in the correct
 location
2022-05-12 12:15:53 -05:00
luz paz
78f1205806 Fix typos in source foward(s)->forwards(s)
Fix source typos
2022-05-12 10:15:15 -04:00
luz paz
b3c0143df7 Fix typos in source functionmax_configurable_outputs
Fixes source typo
2022-05-12 09:18:32 -04:00
Robin Gareus
40fa6e2023
Improve PBD::Semaphore performance
Skip syscall if no threads are waiting and decouple atomic
value from futex address so that FUTEX_WAIT does not fail.
2022-05-12 05:27:27 +02:00
Robin Gareus
f849f3ce2c
Use futex semaphores on Linux only 2022-05-12 00:56:33 +02:00
Robin Gareus
13cac5c139
Grow Graph and RTTask MPMC queues as required
This fixes an issue if with sessions where a process-graph can
have more than 1024 routes to be processed concurrently.
2022-05-12 00:44:39 +02:00
Robin Gareus
5ca76789c5
Allow to query capacity of MPMC queue
This is in preparation to grow the queue as needed.
2022-05-12 00:40:31 +02:00
Robin Gareus
c87a5cdcfd
Remove mutex from RTTaskList, use MPMC queue 2022-05-11 23:55:41 +02:00
Robin Gareus
34678c094a
Implement Futex semaphore 2022-05-11 23:55:41 +02:00
luz paz
36ae8e7022
Fixed typo that may also be a bugfix 2022-05-11 00:14:28 +02:00
luz paz
1e640563d6
Fix source comment typos in libs/ardour
Found via `codespell`
2022-05-11 00:14:28 +02:00
Ben Loftis
a251ba3b76 pt_import: since we aren't using undo here, need to delete the diff_command manually 2022-05-10 15:47:56 -05:00
Ben Loftis
f50d5507c3 midi_model: rename some midi diff functions, to (try to) avoid confusion
syntax for beginning and ending a diff command is:
 "new_diff_command"  ->  "apply_diff_command"

syntax for applying a diff_command is:
 "_as_commit" :  Begins and Commits a standalone undo Command
 "_as_subcommand" :  adds to undo but does not Begin or Commit a Command
 "_only" : (new) applies the note_diff but does not have any effect on undo
2022-05-10 15:47:20 -05:00
Ben Loftis
c44d692390 Create a trap for overlapping or nested undo commands 2022-05-10 13:14:08 -05:00
Paul Davis
a57f4fbce6 temporal: after changing a tempo point, reset the map starting at that point 2022-05-10 09:46:08 -06:00
Todd Naugle
be90b4e0ca US2400 - fix crash when no strip is selected
first selected could be null, so check that first.
This is untested since I don't have a surface.
2022-05-10 09:17:33 -05:00
Robin Gareus
834ca29cde
Silence DR after freewheel export 2022-05-10 16:01:39 +02:00
Robin Gareus
445e8c468e
Add TSFM API to immediately stop the transport
This is useful after a freewheel export, where a realtime-stop
is called, but the actual Locate/MustStop event is only processed
later. Once the session switches back to normal processing after
export the transport is still rolling, TSFM schedules a de-click
locate. This may play some remaining audio.

This new API allows to hard stop the transport, without going
via any session-events and process_with_events. It is intended to
be called from the freewheel process-callback in the last export
cycle.
2022-05-10 16:01:39 +02:00
Robin Gareus
2fc43c59c4
Fix audible hiccup at end of realtime export 2022-05-10 16:01:39 +02:00
Robin Gareus
1809b6ae9a
Reset port resampler after freewheeling
This clears out any data potently left there by export processing.
Previously this could cause an audible click.
2022-05-10 16:01:39 +02:00
Robin Gareus
a97e910b70
Debug efficiency of latency and graph order callbacks 2022-05-09 17:39:05 +02:00
Robin Gareus
3f1420880b
Implement IOPlug processing using the Process Graph 2022-05-09 17:39:05 +02:00
Robin Gareus
af6f8abdc7
Prepare IOPlug processing as GraphNode 2022-05-09 17:39:05 +02:00
Robin Gareus
c45a6b80c7
Session support to add/remove save/load IOPlugs 2022-05-09 17:39:05 +02:00
Robin Gareus
74f71c6683
Session-wide plugin support (IOPlug)
The idea is to run a plugin outside the process graph, and provide
its I/O as port (much like an external JACK app).

The intended use-case is NDI (provide additional I/O), but it could
also be useful for other cases.
2022-05-09 17:39:05 +02:00
Robin Gareus
8a90d4a414
Fix another possible memory leak in BPM detection code 2022-05-09 17:34:59 +02:00