Commit Graph

35215 Commits

Author SHA1 Message Date
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 6f973af1e1 tempo end drag: make this work with new implementation 2022-05-13 19:05:13 -06:00
Paul Davis db17a46498 tempo twist drag: changes to work with new (old) implementation 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 a60412373a tempo map editing: re-enable stretch tempo drag 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 2a4ebd17d6
Save last route type 2022-05-13 23:07:49 +02:00
itmuckel 9178ca635a
Remove unused imports and modernize stateful.cc 2022-05-13 23:07:49 +02:00
itmuckel 77356c0ebb
Reformat and remove unused imports 2022-05-13 23:07:49 +02:00
Robin Gareus 9c9a7bbf97
Remove debug message 2022-05-13 21:02:37 +02:00
Ben Loftis 39f41e2357 fix midi-note Copy+Paste and Duplicate actions
* broken in 1fa7a7
2022-05-13 14:00:14 -05: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
Mads Kiilerich 2a2b2c8b36
Export dialog: update state after "Select All" and "Deselect All"
The state was inconsistent after using the "All" buttons, causing
confusing behaviour. Most visibly, the message "No timespan has been
selected!" message and the disabling of the "Export" button were not
cleared.

Fixed by making
ExportTimespanSelector::set_selection_state_of_all_timespans call
update_timespans and CriticalSelectionChanged , like for example
ExportTimespanSelector::update_range_name and
ExportTimespanSelectorMultiple::update_selection do.
2022-05-13 02:09:26 +02:00
Ben Loftis 41815f8d53 midi_region_view: use absolute_time_to_region_beats
* this fixes the location of the 'ghost note' that is shown
 when adding notes with the Draw tool
2022-05-12 12:15:53 -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 function`max_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
Ben Loftis 83d0892777 when drawing notes, the grid should be scaled to the zoom scale
this prevents the case where have enabled snap, and you add a note that
 appears to be on a bar line. but actually it is {some Grid value} off,
 it just looks right because of pixel rounding.
2022-05-11 11:45:33 -05:00
Ben Loftis a60dfc19d2 take Snap enablement into account when drawing new notes
* snap_to_bbt assumes that snap is enabled and you want to snap to bbt
* snap_to() is the generic form to snap to the user's snap+grid settings
2022-05-11 11:38:54 -05:00
Ben Loftis de9f18b4f9 when Drawing MIDI notes, enforce a minimum length
This fixes the issue where you click to create a note, but move the mouse
 just a little, resulting in a note of invisibly small length

Do the calculation in ::motion so it displays the final
 size while you are dragging. "what you see is what you will get"
2022-05-10 20:00:26 -05: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 5f6f01a8e2 fix trim_region_to_{loop|punch} ... coverage logic was reversed 2022-05-10 15:47:56 -05:00
Ben Loftis 764aa75f09 reset_region_scale_amplitude is redundant with reset_region_gain 2022-05-10 15:47:56 -05:00
Ben Loftis 62fd8ecd35 crop_region_to_selection: remove redundant check for a Range
get_edit_op_range() already checks for the existence of a Range
2022-05-10 15:47:56 -05:00
Ben Loftis 256549e0c7 correctly abort the undo record when Editor::clear_markers (et al) have no effect
* move abort_reversible_command into the correct bracketed location

* check for missing _session at top of function to avoid unnecessary nesting

* this fixes an undo 'assert' when an action like "clear xrun markers" has no effect

* this was likely a copy+paste thinko since they are adjacent in the code
2022-05-10 15:47:56 -05:00
Ben Loftis dbd80a6dd0 fix thinko in command name ('set session END' not start) 2022-05-10 15:47:56 -05:00
Ben Loftis 07b468b108 fix undo for toggle_region_mute 2022-05-10 15:47:56 -05:00