Commit Graph

35339 Commits

Author SHA1 Message Date
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
Ben Loftis ee137333b9 midi_region_view: implement undo for duplicating a note selection 2022-05-10 15:47:56 -05:00
Ben Loftis dbe49ae8c4 editor::paste fix a thinko in undo nesting 2022-05-10 15:47:56 -05:00
Ben Loftis 5310e1e099 create_note: fix a few thinkos which resulted in nested undo 2022-05-10 15:47:56 -05:00
Ben Loftis 1fa7a72f72 midi_region_view: rename 'apply_diff' to 'apply_note_diff' for clarity
these functions operate on the _note_diff_command,
 which is explicitly a NoteDiff,  not a generic DiffCommand

also fix a few thinkos where the ambiguous naming led to errors
2022-05-10 15:47:48 -05:00
Ben Loftis 133600d5dc midi_region_view::apply_diff: implement using renamed midi_model functions 2022-05-10 15:47:48 -05:00
Ben Loftis 9fcf8b3a11 midi_region_view: rename commit_resizing -> finish_resizing
* 'commit' suggests that this function would commit an undo record
2022-05-10 15:47:48 -05:00
Ben Loftis f9c9fd099d midi_region_view: adopt midi_model renaming (gtk patch_change part)
* apply_diff_command_as_commit explicitly tells us we don't
  need the begin/commit pair here
2022-05-10 15:47:47 -05:00
Ben Loftis f9d73957ce midi_list_editor: adopt midi_model diff function renaming (gtk part) 2022-05-10 15:47:47 -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 9c9273e694 scrolling the midi track/region works only if pointed-at-region is selected 2022-05-10 11:45:52 -06:00
Paul Davis 126a85aaca midi editing: simple click on region in internal edit/draw modes selects region 2022-05-10 11:45:10 -06:00
Paul Davis 26816fc696 remove debugging output 2022-05-10 11:44:51 -06:00
Paul Davis 6f9aa3677f tempo markers: ctrl-drag now alters tempo for that section 2022-05-10 09:46:08 -06: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
Paul Davis be2a29b8c3 remove debug output during tempo marker redisplay 2022-05-10 09:46:08 -06:00
Paul Davis 9b51d80210 explanatory comment 2022-05-10 09:46:08 -06:00
Paul Davis 66a3513dbd remove copy option for TempoMarkerDrag
This just seems like a dumb UI to implement. Drag-copying tempo markers is not a thing
2022-05-10 09:46:08 -06:00
Paul Davis eff34f2e1b use editor tempo editing API rather than TempoMap API 2022-05-10 09:46:08 -06:00
Robin Gareus f9353243c2
Do not unconditionally query git revision
Set version for configure, build and dist only.
This fixes an issue with `sudo ./waf install` where
`sudo git describe` can fail.


See also
 https://discourse.ardour.org/t/waf-error-when-buliding-on-linux-ubuntu/107201/11
 https://github.blog/2022-04-12-git-security-vulnerability-announced/
2022-05-10 16:43:29 +02: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 b26f0b3e85
I/O Plugin GUI: set min height, fix context menu generic/edit 2022-05-10 16:01:35 +02:00