13
0
Commit Graph

19390 Commits

Author SHA1 Message Date
d48ee3df0e temporal: improve debug output when ::superclock_at() returns < 0 2022-05-24 17:10:25 -06:00
8ee7dc35f4 temporal: improve operator<< for MusicTimePoint 2022-05-24 17:10:25 -06:00
735835dff3 temporal: improve output of TempoMap::dump() 2022-05-24 17:10:25 -06:00
c48430f502 temporal: refactor methods to add tempo/meter points 2022-05-24 17:10:25 -06:00
ef1f814837 temporal: remove commented constructor 2022-05-24 17:10:25 -06:00
e3501a05f8 temporal: remove the concept of a time domain for the tempo map
TempoPoint and MeterPoint always have their position set in musical time; MusicTimePoint (BBT)
always has a position in audio time. It's that simple
2022-05-24 17:10:25 -06:00
7f5a576f66 temporal: fix continuing tempo section's tempo after end-stretch 2022-05-24 17:10:25 -06:00
e7e467264f temporal: add TempoMap::set_continuing() and make it and set_ramped return bool 2022-05-24 17:10:25 -06:00
f2a596669e temporal: set speed *and* tempo when setting tempo 2022-05-24 17:10:25 -06:00
e863a7dbc9
Allow to configure vari-speed resampler quality
This also allows to disable the resampler, effectively disabling
varispeed support, for the benefit of adding no additional latency.
By default 2 * 16 samples latency are added, due to port-resampler,
this is not desirable if Ardour is used as mixer only.
2022-05-24 20:41:59 +02:00
bb4a45ebaf
zita-resampler: pass-through data if not configured
This is in preparation to allow fixed-speed processing without
resampler latency
2022-05-24 20:41:59 +02:00
f02e8d34e3
Make resampler reset idempotent 2022-05-24 20:41:56 +02:00
83b5be1add
Add static signal to indicate MixerScene changes 2022-05-24 20:08:05 +02:00
4d5ac90248
Only emit RouteProcessorChange if disk-i/o point actually changes 2022-05-24 02:26:56 +02:00
baa30262b8
Be more specific about RouteProcessorChange signals
Session::route_processors_changed accumulates signals emitted
in realtime and processing is delegated to a dedicated rt-safe
thread. Previously this resulted in any changed to be converted
to a `GeneralChange`, which unconditionally triggered a route-reorder.

Record-arming a track causes a MeterPointChange (meters change to "in"),
and this caused routes to be resorted and a latency-update.

While the former is reasonable (Ardour prefers to process
rec-armed routes first), the latter certainly is not.
2022-05-24 02:26:56 +02:00
20d7313e13 temporal: change "clamped" terminology to "continuing" (since that's what the GUI calls it) 2022-05-23 08:07:08 -06:00
1179b022da temporal: fix error in TempoMap::previous_tempo() 2022-05-21 18:58:41 -06:00
8de52a74bb temporal: better fix for tempo ramp setting during ::reset_starting_at() 2022-05-21 17:28:38 -06:00
5c8b7519c1 remove debug-only direct-to-output debug info that duplicates a DEBUG_TRACE msg 2022-05-21 16:38:36 -06:00
c4844b00e3 temporal: when calling TempoMap::reset_starting_at(), fix ramps
Even if we start at time T, if the tempo point before T is ramped, we need to
adjust it's omega value based on the beat time of the following tempo point. If
we don't do this, then using that tempo to compute ::superclock_at() for
subsequent points will be incorrect.

Note: there may be an ordering issue here with Tempo/Meter points. We might
need to pass over all tempo points first, then process meters etc. Something
like that.
2022-05-21 16:35:00 -06:00
029ef88059 temporal: wrap some calls to TempoMap::dump() in appropriate DEBUG stuff 2022-05-21 16:35:00 -06:00
a0810ed608
LV2: pass patch-set messages to replicated plugin instances
This also fixes impulse analysis plugin display
2022-05-22 00:16:22 +02:00
58372f5b78
Fix macOS builds, size_t serialization
See also e1905e779b
2022-05-21 21:09:21 +02:00
e1905e779b
Fix macOS builds, size_t serialization
libs/ardour/session_state.cc:1500:13: note: in instantiation of
 function template specialization 'XMLNode::set_property<unsigned long>'
 requested here
libs/pbd/pbd/string_convert.h:151:11: error:
  type 'unsigned long' cannot be used prior to '::' because it
  has no members
2022-05-21 07:44:39 +02:00
ba675fa0e9
Remove old, now unused freesound path config 2022-05-20 22:03:14 +02:00
5476a20fc4 temporal: fix conditional when deciding which log expression to use inside ::superclock_at() 2022-05-20 11:20:39 -06:00
2129552777
MixerScene: correctly restore controls with VCA master
The master needs to be restored first, otherwise setting
the master value with be propagated. Furthermore the
actual value is saved at the time of VCA assignment.
Restoring the vaule needs to scale by the master-reduced value.
2022-05-20 19:10:16 +02:00
7d6e429001
Add API to query control-masters
This allows to traverse VCA masters upstream, and potentially
build a graph.
2022-05-20 19:10:13 +02:00
9dd4931247 temporal: revert changes that created two different omegas; fix computation of ::superclock_at() for decelerando
changes in tempo can be negative (decelerando/slowing down), and thus so can _omega. We cannot call log() or its
cousins on negative values, so in this scenario use an alternate expression for "t from b" in the tempo.pdf paper
2022-05-20 09:06:25 -06:00
c4307667fb freesound: add a DebugBit
Add a new DebugBit value for Freesound
2022-05-20 14:33:57 +01:00
e1f5fb0206 libpbd: change GlibEventLoopCallback to use C API not C++
We discovered in the past that the C++ API for GSource/Glib::Source has some fatal and unfixable flaws. Copy similar
code and just use the C API for GSource instead
2022-05-19 22:24:43 -06:00
04aaf23851
Add Lua bindings for MixerScene 2022-05-19 23:32:01 +02:00
48fdfbab53
Implement Session support for Mixer Scenes 2022-05-19 23:31:54 +02:00
bdc5711c31
Implement mixer-scene class 2022-05-19 20:08:24 +02:00
a811583380
Add API to query registered controllers 2022-05-19 20:08:08 +02:00
276172b8b1
Fix PhaseControl set_value()
Previously this resulted in excessive "000...000" state string.
2022-05-19 20:08:00 +02:00
5c85695362
Add Input Port meters for I/O Pre-Plugin outputs 2022-05-17 02:26:28 +02:00
cdf3b5209e
Generalize input-meters 2022-05-17 02:26:28 +02:00
4c1506e50e add copyright notices 2022-05-16 15:41:56 -06:00
9758e6280f use new event loop callback to ensure that all surface/control protocol threads have tempo map ptr set 2022-05-16 15:24:52 -06:00
968533cc23 (re)add mechanism for a callback in any glib event loop executed before the loop "executes"
This is based on code from earlier commits that were later reversed, but we need some mechanism
to ensure that threads have a thread local tempo map ptr set. The big difference is that this
time we do not implement this for all instances of an AbstractUI - implementation is left to
each thread/event loop
2022-05-16 15:24:52 -06:00
2079a150dd probable fix for Mackie vpot press/release misbehavior in sends (and plugin) subview
The accessed control needs to reflect the current subview banking
2022-05-16 15:24:52 -06:00
e528c4df92
Fix export-processor position, include triggerbox output 2022-05-16 14:32:47 +02:00
cd332a2af0 when pasting a Range of automation, first add guard points,
so the automation data before and after this range is retained
2022-05-16 07:16:25 -05:00
3a174ff914 add support for 'positive' guard points in ControlList 2022-05-16 07:16:25 -05:00
c98561e95c when cutting or clearing an automation range, always add boundary points
* these guard points are necessary to retain the automation that existed
 before and after the selected range is removed
2022-05-16 07:16:24 -05:00
44e273d713
Overhaul export channel state save/load
This allows to properly save/restore Route and Port
channel config states.
2022-05-16 04:54:17 +02:00
f6e67875f4
Implement MIDI ExportGraph processing 2022-05-16 04:54:17 +02:00
aa09a445e3
Bootstrap MIDI export writer
This leans on the AudioGrapher API for IdentityVertex.
2022-05-16 04:54:17 +02:00
719dda7701
Implement MIDI ExportChannel
Since MIDI Export is limited to Stem-Export, only a port-reader
and ExportProcessor have to be implemented.
2022-05-16 04:54:17 +02:00
4c4ab9cf51
Prepare PortExportChannel API for MIDI export 2022-05-16 04:54:17 +02:00
7c2cb31b63 temporal: use boost::intrusive ::iterator_to to improve efficiency of ::next/previous_tempo() 2022-05-15 17:49:09 -06:00
a522a98118
Add API to query fixed delay line's delay time 2022-05-15 19:32:46 +02:00
ae0aa50b6f
Fix MIDI delay-line (amend 25098ed)
Events in the delay-buffer must be shifted back every cycle.
Also in case of fixed-delay-lines events may not be in sequence
since events are only sorted at backend port-level.
2022-05-15 19:20:32 +02:00
d55d3a7360
Save/load export timespan realtime setting 2022-05-15 02:20:19 +02:00
4577f86aa0
NO-OP: clang-format 2022-05-15 02:19:46 +02:00
86597d7e1c
NO-OP: re-indent, and cleanup 2022-05-14 23:32:26 +02:00
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
be5c64f737 temporal: NOOP - add blank line 2022-05-13 19:05:13 -06:00
1ccda17504 temporal: add a new version of tempo twist based on pre-nutempo code 2022-05-13 19:05:13 -06:00
60159acd33 temporal: slightly change const positioning in definition of ::stretch_tempo() 2022-05-13 19:05:13 -06:00
b0ff612572 temporal: add DEBUG_TRACE message 2022-05-13 19:05:13 -06:00
4defa3ae8f temporal: fix logic bug in TempoMap::reset_starting_at() 2022-05-13 19:05:13 -06:00
c9b7f012e4 temporal: helpful comment for future readers 2022-05-13 19:05:13 -06:00
f0f8f15cce temporal: missing change from 072a7b17a22f 2022-05-13 19:05:13 -06:00
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
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
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
43b3ec005f temporal: use new debug bit for debug output in reset_starting_at() 2022-05-13 19:05:13 -06:00
5d22e522d1 temporal: add new debug bit for debug tracing just TempoMap::reset_starting_at() 2022-05-13 19:05:13 -06:00
45de3694cc temporal: add reimplemented version of 6.x's TempoMap::gui_stretch_tempo() 2022-05-13 19:05:13 -06:00
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
9c9a7bbf97
Remove debug message 2022-05-13 21:02:37 +02:00
3b13dc9b54
Remove unused method declaration 2022-05-13 19:38:12 +02:00
f8aecc460c
Use new hard-stop API to stop transport before export 2022-05-13 19:38:11 +02:00
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
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
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
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
f849f3ce2c
Use futex semaphores on Linux only 2022-05-12 00:56:33 +02:00
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
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
c87a5cdcfd
Remove mutex from RTTaskList, use MPMC queue 2022-05-11 23:55:41 +02:00
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
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
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
c44d692390 Create a trap for overlapping or nested undo commands 2022-05-10 13:14:08 -05:00
a57f4fbce6 temporal: after changing a tempo point, reset the map starting at that point 2022-05-10 09:46:08 -06:00
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
834ca29cde
Silence DR after freewheel export 2022-05-10 16:01:39 +02:00
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
2fc43c59c4
Fix audible hiccup at end of realtime export 2022-05-10 16:01:39 +02:00
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
a97e910b70
Debug efficiency of latency and graph order callbacks 2022-05-09 17:39:05 +02:00
3f1420880b
Implement IOPlug processing using the Process Graph 2022-05-09 17:39:05 +02:00
af6f8abdc7
Prepare IOPlug processing as GraphNode 2022-05-09 17:39:05 +02:00
c45a6b80c7
Session support to add/remove save/load IOPlugs 2022-05-09 17:39:05 +02:00
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
8a90d4a414
Fix another possible memory leak in BPM detection code 2022-05-09 17:34:59 +02:00
f0a8b8cd6d
Fix an unlikely memory leak in zita-resampler 2022-05-07 04:19:16 +02:00
221975a982
Fix memory-leak in BPM detection 2022-05-07 04:19:12 +02:00
46117303da
Fix some potentially uninitialized variables 2022-05-07 04:19:09 +02:00
f5b280a850
Generalize graph processing
This allows to pass any GraphChain to the Graph to process.
It removes the need to use a mutex to swap two dedicated
chains (setup-chain <> active-chain, pending-chain).

Also various special cases pertaining to graph interaction
while auditioning and route-deletion can be removed.

This also unconditionally creates a graph-thread for GraphChains
to be processed, even if the main callback uses a special-cased
sorted RouteList if there is only one process thread.
2022-05-06 17:43:01 +02:00
5fa7d481c1
Optimize Route::direct_feeds_according_to_reality
Consolidate duplicate function calls, cache result in local variable.
2022-05-06 14:02:35 +02:00
44bb8caa65
Use new Route fed-by API (2/2) 2022-05-06 14:02:35 +02:00
9ad154f265
Untangle Graph from Route
The process-graph should only be concerned with GraphNodes,
which may or may not be Routes.

This also removes intrinsic connection information from
the graph-node. Connection information is to be kept separate
from the nodes.

When the graph is re-calculated in the background, old information
has to be retained until the new graph becomes active.

Previously *new* information was already stored in the nodes
while the graph is sorted, even though the new graph was not
active.
2022-05-06 14:02:34 +02:00
3862d13e21
Prepare for GraphNode::feeds () and fed-by API update (2/2) 2022-05-06 14:02:34 +02:00
078e652859
Implement rt-safe deletion - delegate to butler 2022-05-06 14:02:32 +02:00
226dadbd19
Further reduce DSP load of debug builds
In all years of using these assert()s never triggered. Besides
there are valid_port() tests in other strategic locations that
are not periodically hit in realtime context.
2022-05-06 02:04:55 +02:00
ed21ea8fc6
Speed up valid-port changes O(n) -> O(log(n))
This significantly reduces DSP load of sessions with many ports
when using debug builds.
2022-05-06 02:04:49 +02:00
37c0fceeac
Prefer comparison operators as part of the class 2022-05-06 02:04:43 +02:00
ce95c9fb09
Fix std::set< BackendPortPtr> lookup by key
The set uses a custom sort-by-name comparator.
Previously it was possible to have an inconsistent set iterator.
std::set::find() did not find a given port while std::find() did.

This fixes using std::set::find() on the PortIndex set.
2022-05-06 02:04:33 +02:00
668cb1ca3b
Set names of RT tasks threads 2022-05-05 00:54:47 +02:00
6c2c3a49c4
Update comment about required buffers 2022-05-05 00:54:47 +02:00
John Emmas
2554302281 Export a variable which can't be accessed via a 'get()' function
Temporal::most_recent_engine_sample_rate is used in performance-critical code so shouldn't be accessed via a 'get()' function. But (via the TEMPORAL_SAMPLE_RATE #define) it does get accessed outside of libtemporal and therefore needs to get exported.
2022-05-04 16:09:34 +01:00
28231d6365
NO-OP: cleanup public API, re-indent source 2022-05-04 05:58:06 +02:00
96c138c985
ALSA: prevent excessive slave-device latency updates on underrun 2022-05-04 05:57:52 +02:00
John Emmas
2245e362b9 TempoMap::twist_tempi() gets used outside of libtemporal so needs to get exported 2022-05-03 11:31:43 +01:00
Caleb Potter
b689d2881e M: US2400: allows user to bank over sends while in TrackView.
Sends only appear on the last 8 vpots, which means sends to matrices 9-12
are unreachable without banking.
2022-05-02 22:41:40 -06:00
Caleb Potter
20fff72370 US2400: Use Bank- and Bank+ to page over sends on pots 2022-05-02 22:41:40 -06:00
Caleb Potter
0d05cd231b US2400: maps track parameters and sends to vpots
Pots 0-4 now display the 5 parameters from the Mackie track subview when a
track is selected and pots 8-23 will display up to the first 16 sends.
2022-05-02 22:41:40 -06:00
b5487415ec editing: a partiaally implemented version of TempoTwistDrag, to be completed. 2022-05-02 16:47:23 -06:00
86e7a1b259 temporal: no reason for Point::set() to be virtual 2022-05-02 16:45:33 -06:00
55755d5453 temporal: fix TempoMap::reset_starting_at()
We were using a given tempo or meter point as part of the metric used when
recomputing its position. In fact, the metric should be only use the
tempo/meter immediately preceding the given point.
2022-05-02 16:44:15 -06:00
00b9e3f86a temporal: change return type of TempoMap::next_tempo()
It is more useful to get the actual TempoPoint than just the Tempo
that we discover.

Aside: it would be awesome to understand how to use boost::intrusive to get the
next tempo point directly from the tempo hook.
2022-05-02 11:40:23 -06:00
2b8b9a3a2f const for const-sake 2022-05-01 18:01:35 -06:00
d218dcb21b evoral: when adding points to a ControlList, coerce the time domain of the new point to the list time domain
This may not be the ideal solution, but for now it appears to be the best approach to preventing
points with different time domains with the same list
2022-05-01 17:50:51 -06:00
f7e917c123
Potential fix for M1 x-thread events
On M1, the cross-thread channel sets G_IO_PRI in addition to G_IO_IN
this breaks various assumptions in receivers, which test for ~G_IO_IN
as error condition.
2022-05-02 00:02:33 +02:00
8b97abee19 change location of TempoMap::fetch() call in graph main thread to match semantic equivalent in process threads 2022-04-30 19:16:31 -06:00
f3bf91b9b1 fix another use of a reader lock by a source (comments explain more) 2022-04-30 17:25:53 -06:00
b74fb262fa use a very very slightly more convenient and possibly more correct method for LV2 bpm port 2022-04-28 14:33:39 -06:00
51ebb143de on windows, allow ARDOUR_DATA_PATH envvar to be used in the data search path 2022-04-28 14:33:39 -06:00
7cd16d9473
Apply new Item method name to various other usage sites 2022-04-27 13:16:18 +02:00
c9b8a91edb apply new Item method name to various other usage sites 2022-04-26 22:04:08 -06:00
f913373351 canvas: change Item::bb_clean() to better named Item::set_bbox_clean() 2022-04-26 22:04:08 -06:00
c75ceb31ab canvas: when an item has its bbox marked dirty, this should propagate to all parents 2022-04-26 22:04:08 -06:00
d54d63da3a canvas: remove code long disabled via an "if (0" 2022-04-26 22:04:08 -06:00
3d860b9665 libpbd: do not use DEBUG transmitter from inside AbstractUI<T> request methods
This will lead to recursion, since delivering the debug msg goes through a request method.

Discovered by running with -D all
2022-04-26 22:04:08 -06:00
6917a1e836 triggerbox: initialize the follow_length control from the source data length 2022-04-26 09:42:00 -05:00
98bfede1fc
Restore connections when using templates
This also fixes an issue when duplicating tracks. Saved
connections were ignored and tracks were auto-connected.
2022-04-26 15:36:51 +02:00
6f5d3d8dd9 another change from ReaderLock to WriterLock in audio source peak reading
The rationale is as for f06d04c174
2022-04-25 20:33:21 -06:00
f06d04c174 audiosource: lock held during peak reading must be a write lock
We modify elements of the source object, not to mention the peakfiles on disk. This
was a regression introduced when switching from Lock to RWLock, caused by a failure
to recognize this as a case where a write lock was required.

The presence of scoped_array<> as a member of AudioSource (peak_cache) is suspicious
nevertheless, and we should establish that it serves a useful purpose.
2022-04-25 19:03:11 -06:00
be927f7a58
Revert "Debug async MIDI port (M1 builds)"
This reverts commit f8a0de5928.
2022-04-25 15:40:11 +02:00
f8a0de5928
Debug async MIDI port (M1 builds) 2022-04-23 23:12:16 +02:00
9ce91e2952
NO-OP: clang-format 2022-04-23 23:12:13 +02:00
c1d6c0690e
Fix poll() edge case on macOS, clean up logic
Return from poll_for_request() when CrossThreadChannel is
closed/destroyed. -- see also f4166fb61d

This also cleans up poll API usage, and check for nonnegative
return value is added.
2022-04-23 23:12:10 +02:00
95693f9364
Fix endless recursion when creating cyclic connection graphs
This is mainly relevant for Mixbus, which allows cyclic-connections
to record Master-out on a Track (which unconditionally has Mixbus send
and feeds master).

In Ardour it may also cause issues when creating loopback connections,
however latency is not usually updated with invalid graphs (old
process graph remains in use).

Otherwise it fixes a crash connecting Track 1 -> Track 2 -> Track 1.

This also optimizes Route::output_effectively_connected by caching
any prior lookup. This helps e.g. Track 1 -> Track 2 -> Master.
The connection "Track 2 -> Master" now only need to be looked up once.

See also 7958031287 and a556e96ed0
2022-04-23 15:37:57 +02:00
ae32daa148 allow ARDOUR::Filter to be used with MIDI regions/sources 2022-04-20 17:11:29 -06:00
aee3cf1534 handle an action named "Escape" specially when blocking activation during drags 2022-04-18 12:22:30 -06:00
c0b1f0e63c fix buglet in RAII mgmt of Bindings::_drags_active 2022-04-18 12:21:57 -06:00
729f930974 bindings: add a mechanism to prevent binding activation during drag 2022-04-18 11:38:21 -06:00
Caleb Potter
8b82de7ac1 Prevents user from infinitely banking right in mackie plugin subview
Changes handle_cursor_right_press() in PluginSubviewState to pure virtual
function so that PluginSelect and PluginEdit can each have their own
version.
2022-04-18 11:14:53 -06:00
Caleb Potter
f3bd740913 Formatting. Adds spaces before parentheses 2022-04-18 11:07:45 -06:00
Caleb Potter
8e375f5acd Moves left brackets to be on the same line as conditionals 2022-04-18 11:07:45 -06:00
Caleb Potter
bc6461dc76 Prevents user from infinitely banking right in mackie sends subview 2022-04-18 11:07:45 -06:00
Caleb Potter
17a7dbe06d adds ability to bank over in mackie sends subview
The cursor_left and cursor_right mackie control buttons will now move the
sends subview left and right like it does in the plugin subview. Previously,
if you had more than 8 sends (which is almost always the case for Mixbus),
then sends 9+ were unreachable on an 8 channel controller.
2022-04-18 11:07:45 -06:00
217f51e6fb
Break out common plugin-insert state methods
This is in preparation for IO-Plug, and should also come
in handy later for per region plugins.
2022-04-14 20:08:22 +02:00
74a673ce17
Create a virtual base class for PluginInsert
This in in preparation for IO-Plug GUI support.
2022-04-14 16:35:03 +02:00
f9d80c32d6
Allow to destroy Widgets when removing them from a container
This is useful when the container uses manage()d Widgets,
which are otherwise not destroyed.
2022-04-14 16:35:02 +02:00
defc902571
Allow to use Destructible as virtual base class
This is in preparation for a pure-virtual base class for
PluginInsert to expose `DropReferences` in the virtual base.

```
class PlugInsertBase : virtual public PBD::Destructible
class PluginInsert : public Processor, public PlugInsertBase
class Processor : public SessionObject
class SessionObject : public PBD::StatefulDestructible
```
2022-04-14 16:35:02 +02:00
db1a6720c2
Fix Region Export (clip library bounce)
Region::read_at fails if the region is not in a playlist.
It also applies fades and and region transparency which are
not relevant here.
2022-04-14 16:34:39 +02:00
844479568b
fix building OSC surface (amend 9b89dd7967) 2022-04-14 04:49:23 +02:00
99ed076e7e
Potential fix for region export on windows 2022-04-14 00:31:33 +02:00
7f12c664d2
Consistent checks for peakfile file descriptors
This fixes a crash on windows, close(-1) or closing an
already closed FD will abort the application
(Save-As can trigger the issue in done_with_peakfile_writes).

Note that g_open() returns -1 if an error occurred. However
other negative number may still be a valid FD.
2022-04-13 18:04:35 +02:00
91e1083cb1 fix typo 2022-04-09 18:35:16 -06:00
bdc8264fda given 217519b1b4, revert 5bbfac23 and cleanup DEBUG_TRACE output 2022-04-09 18:33:24 -06:00
Mads Kiilerich
217519b1b4 Put ostream operator<< for PresentationInfo in std namespace
Fix compilation error seen with gcc 12.0.1 on Fedora 36:

In file included from ../libs/ardour/ardour/variant.h:30,
                 from ../libs/ardour/ardour/parameter_descriptor.h:25,
                 from ../libs/ardour/ardour/automation_control.h:39,
                 from ../libs/ardour/ardour/amp.h:30,
                 from ../libs/ardour/session.cc:61:
../libs/pbd/pbd/compose.h: In instantiation of ‘StringPrivate::Composition& StringPrivate::Composition::arg(const T&) [with T = ARDOUR::PresentationInfo]’:
../libs/pbd/pbd/compose.h:277:31:   required from ‘std::string string_compose(const std::string&, const T1&, const T2&, const T3&, const T4&) [with T1 = std::__cxx11::basic_string<char>; T2 = unsigned int; T3 = std::__cxx11::basic_string<char>; T4 = ARDOUR::PresentationInfo; std::string = std::__cxx11::basic_string<char>]’
../libs/ardour/session.cc:3268:4:   required from here
../libs/pbd/pbd/compose.h:122:20: error: no match for ‘operator<<’ (operand types are ‘std::ostringstream’ {aka ‘std::__cxx11::basic_ostringstream<char>’} and ‘const ARDOUR::PresentationInfo’)
  122 |                 os << obj;
      |                 ~~~^~~~~~

This might also fix a similar problem with clang, and
https://github.com/Ardour/ardour/commit/5bbfac23808 can be backed out.
2022-04-09 18:03:21 -06:00
Mads Kiilerich
5b7431f243 wscript: drop unnecessary trailing ";" 2022-04-09 12:16:41 +02:00
Mads Kiilerich
49855e52aa wscript: consistently have at most one empty separator line 2022-04-09 12:16:40 +02:00
Mads Kiilerich
bac32a8c2d wscript: consistently use 4 spaces for indentation 2022-04-09 12:16:40 +02:00
Mads Kiilerich
c3bdcdd3fa wscript: consistently use space indentation instead of tab indentation 2022-04-09 12:16:40 +02:00
Mads Kiilerich
06f8936a73 wscript: remove trailing whitespace 2022-04-09 12:16:37 +02:00
fa204b632f
Fetch tempo-map for main process thread (amend 9e69c0d184) 2022-04-09 02:25:30 +02:00
luz paz
fb55878375
Fix source typos (heirarchy->hierarchy) 2022-04-08 21:38:00 +02:00
Mads Kiilerich
cb4e10683d
gtkmm: use size_request() function instead of deprecated Gtk::Widget::size_request(&) 2022-04-08 21:11:07 +02:00
Mads Kiilerich
1a0f862a0c
gtkmm: use prepend() instead of deprecated Gtk::ComboBoxText::prepend_text() 2022-04-08 21:11:05 +02:00
Mads Kiilerich
09c6e68ae8
gtkmm: use append() instead of deprecated Gtk::ComboBoxText::append_text() 2022-04-08 21:10:56 +02:00
Mads Kiilerich
71ea2cc7b9
gtkmm: use get_sensitive() instead of deprecated Gtk::Widget::sensitive() 2022-04-08 20:20:33 +02:00
Mads Kiilerich
91b08d5f45
gtkmm: use get_realized() instead of deprecated Gtk::Widget::is_realized() 2022-04-08 20:20:32 +02:00
Mads Kiilerich
a86aa31747
gtkmm: use get_visible() instead of deprecated Gtk::Widget::is_visible() 2022-04-08 20:20:10 +02:00
Mads Kiilerich
d52c727ec5
gtkmm: use get_mapped instead of deprecated Gtk::Widget::is_mapped() 2022-04-08 20:20:10 +02:00
JungHee Lee
539ef331d1
Update ko.po
Ardour 6.9 Update.
2022-04-08 20:07:49 +02:00
9c4024ff0c fix creation of TempoCommands for undo/redo history 2022-04-08 11:58:04 -06:00
7fd8544e31 temporal: fix copy-n-paste error in TempoCommand cosntructor 2022-04-08 11:58:04 -06:00
e466736e2d temporal: remove MementoBinder API for tempo map undo/redo 2022-04-08 11:58:04 -06:00
a806ede94d temporal: add TempoCommand, a Command-derived structure for managing undo/redo w.r.t TempoMap 2022-04-08 11:58:04 -06:00
7c3268d12f temporal: TempoMap::use() returns a const ptr to enforce semantics (library version)
This commit leaves two issues outstanding:

1. unclear/ugly semantics for drag operations that reset the GUI thread's tempo map to the writable copy
2. undo/redo for the tempo map

These will be addressed in future commits
2022-04-08 11:58:04 -06:00
luz paz
3d395585c1
Fix various typos
Found via `codespell -q 3 -S *.po,./share/patchfiles,./libs -L ba,buss,busses,doubleclick,hsi,ontop,ro,seh,siz,sord,sur,te,trough,ue`  
Follow-up to 364f2f078
2022-04-08 19:51:02 +02:00
Remi Thebault
a77ac7107f
fix websockets toggle_roll
Also fix BasicUI::toggle_roll who is supposed to do
the same as spacebar but doesn't.
2022-04-08 19:48:23 +02:00
Remi Thebault
93987de09f
websockets provide BBT 2022-04-08 19:39:25 +02:00
Mads Kiilerich
6f04dfc774
wscript: detect if qm-dsp is self-contained or need linking with kiss
When building with --use-external-libs on Fedora, Ardour would fail at
runtime with messages like:
  symbol lookup error: .../vamp/libardourvampplugins.so: undefined symbol: kiss_fftr_alloc
Try to automate handling of this error situation.

Fedora packaging worked around it with a custom patch that we rather
would avoid:
https://src.fedoraproject.org/rpms/ardour6/blob/rawhide/f/ardour6-missing-kissfft.patch .
2022-04-08 18:39:15 +02:00
Mads Kiilerich
9b89dd7967
wscript: drop liblo check in libs/surfaces - it is already mandatory in top level wscript 2022-04-08 18:39:15 +02:00
luz paz
59320b378f
wscript: fix 'testing equality is none' issue
ref: https://lgtm.com/rules/7900090/
2022-04-08 18:27:10 +02:00
Raphael Isemann
3dfcbf17b2
Fix memory leak in ctorNilPtrPlacementProxy 2022-04-08 18:21:55 +02:00
Edgar Aichinger
77fe1c6d32
amend previous commit 2022-04-08 18:17:27 +02:00
Edgar Aichinger
55988b5456
retranslate corrected sourc strings/finish german translation at current state 2022-04-08 18:17:27 +02:00
Edgar Aichinger
13c8af3620
libs/ardour part of german translation 2022-04-08 18:17:27 +02:00
Matthijs van Otterdijk
69bf9d36aa Use integer arithmetic to calculate number of samples per bin 2022-04-08 12:47:44 +02:00
f8dc6d93ec constification: clean up final warning
This explains why we use const_cast<>. We also fix a logic error that
crept in here, in which a source might have its state saved twice
2022-04-07 15:13:30 -06:00
04d34c4061 constification: use const_cast to resolve a CONSTIFICATION warning 2022-04-07 11:27:46 -06:00
7bf89ce109 Constification: make Stateful::get_state() const, with all other required const-ness added (libs) 2022-04-06 21:56:59 -06:00
9e69c0d184 make use TempoMap::fetch() in RTproc threads more explicit
This also places the call in a more optimal location, right after it is woken
because there is Route processing to be done
2022-04-06 21:56:59 -06:00
c0eb86b586 hide debug iteration inside #ifdef 2022-04-05 20:52:10 -06:00
8410161ae2 remove debug output 2022-04-05 20:52:10 -06:00
1d10408bd1 temporal: add some relatively useless code to one of the timeline test functions 2022-04-05 20:52:10 -06:00
fc731419c5 fix potentially incorrect use of strncpy(3) when copying URI for ladspa preset 2022-04-05 20:52:10 -06:00
55752ed8b7 NOOP: blank line deletion 2022-04-05 20:52:10 -06:00
1be72e7a4e NOOP: whitespace for alignment in argument list 2022-04-05 20:52:09 -06:00
3321ae74ab missing changes to MidiAutomationListBinder header file related to 4bc9f9319c014e 2022-04-05 20:52:09 -06:00
892b7b9772 use correct header includes to handle temporal enum conversions 2022-04-05 20:52:09 -06:00
bbfb1bd229 MidiRegion: take reader lock before cloning data into new source 2022-04-05 20:52:09 -06:00
718b3fcfa9 no need for enable_shared_from_this<> in MidiSource 2022-04-05 20:52:09 -06:00
bc38f8d424 MidiSource: change thread mutual exclusion object from Mutex to a RWLock
This allows two reader threads to proceed without blocking each other, as can
happen when the butler renders a MIDI track into an RT-safe buffer while the
GUI reads the same MidiModel/Source for visual display.
2022-04-05 20:52:09 -06:00
1686db8b0c Change the type of reference held by a MidiModel to its MidiSource
This also requires a change in the type of reference held by
a MidiAutomationListBinder.

Both the MidiSource and MidiModel have a reference to each other, and it is
important that we avoid circular references to avoid problems with object
destruction. We had been accomplishing this by having the Model hold a
weak_ptr<MidiSource>. However, the lifetime of a MidiSource and its MidiModel
are coincident and there's really no need to use a smart ptr at all. A normal
reference is just fine. However, due to constructors that accept a serialized
state, we cannot use an actual reference (we cannot set the constructor in the
initializer list), so we use a bare ptr instead.

This forces a similar change in MidiAutomationListBinder, which also maintains
a reference to the Source. However, the only purpose of this object is to
ensure that if the Source is destroyed, relevant commands will be removed from
the undo/redo history, and so all that matters here is that the binder connects
to the Destroyed signal of the source, and arranges for its own destruction
when received.

Note that the previous construction of the binder, actually holding a
shared_ptr<MidiSource> would appear have prevented the Destroyed signal from
ever being emitted (from ~Destructible), and so this may also be a bug fix that
allows MidiSources to actually be deleted (the memory object, not the file).
2022-04-05 20:52:09 -06:00
54597bd803 change the type of reference held by a MidiModel to its MidiSource
This also requires a change in the type of reference held by
a MidiAutomationListBinder.

Both the MidiSource and MidiModel have a reference to each other, and it is
important that we avoid circular references to avoid problems with object
destruction. We had been accomplishing this by having the Model hold a
weak_ptr<MidiSource>. However, the lifetime of a MidiSource and its MidiModel
are coincident and there's really no need to use a smart ptr at all. A normal
reference is just fine. However, due to constructors that accept a serialized
state, we cannot use an actual reference (we cannot set the constructor in the
initializer list), so we use a bare ptr instead.

This forces a similar change in MidiAutomationListBinder, which also maintains
a reference to the Source. However, the only purpose of this object is to
ensure that if the Source is destroyed, relevant commands will be removed from
the undo/redo history, and so all that matters here is that the binder connects
to the Destroyed signal of the source, and arranges for its own destruction
when received.

Note that the previous construction of the binder, actually holding a
shared_ptr<MidiSource> would appear have prevented the Destroyed signal from
ever being emitted (from ~Destructible), and so this may also be a bug fix that
allows MidiSources to actually be deleted (the memory object, not the file).
2022-04-05 20:52:09 -06:00
3454353aa3 remove concept of "note-mode" from Evoral::Sequence (and thus ARDOUR::MidiModel)
This note-mode had no effect on anything at all, at least as far back
as 5.12. There is a note-mode in the GUI which affects the duration of notes
added using the GUI, and that remains in place. It is not clear
if the _percussive member of Evoral::Sequence ever had any effect on
the actual MIDI event stream the Sequence could generate.
2022-04-05 20:52:09 -06:00
ae3548c1da temporal: fix location of enum conversion decls
Without these changes, minor changes in include file
ordering or extent elsewhere can cause compiler errors.
2022-04-05 20:52:09 -06:00
e0fa447d29 NOOP: whitespace and multiline -> one line changes 2022-04-05 20:52:09 -06:00
b6d0f8f661 canvas: add a drawing-request-freeze/thaw API
If queue_draw is "frozen", we simply accumulate drawing
requests in a (union) rectangle, and when finally "thawed"
the canvas submits a single redraw request for the entire
accumulated rect.

Although in theory this is all that GTK/GDK does for
draw requests, callgrind reveals significant costs
associated with the actual calltree for GtkWidget::queue_draw_area().

One potential cost is that GDK also maintains a list of
invalidated rectangles in addition to the union, and
for MIDI regions with thousands of notes, this can represent
real overhead. This approach dispenses with the rect list,
since our Canvas drawing model only uses the union rectangle
anyway.
2022-04-05 20:52:09 -06:00
8657eba4c5 evoral: NOOP reorder and edit comments 2022-04-05 20:52:09 -06:00
8c3fad0133 evoral: fix implementation of rt_safe_earliest_event_linear_unlocked
Code within the method was using @param start_time rather than start, which is a modified
value required to generate the correct results.

This comment also contains some logical reordering, optimization and commenting
on this rather complex method.
2022-04-05 20:52:09 -06:00
256e6f97a2 evoral: change how we specify a zero min_x_delta to rt_safe_earliest_event_linear_unlocked
See comment in the code for more details.
2022-04-05 20:52:09 -06:00
dae649d79c temporal: add namespace to macro definition to make it usable everywhere 2022-04-05 20:52:09 -06:00
5fbc390821 evoral: NOOP whitespace adjustment 2022-04-05 20:52:09 -06:00
83dc2fe407 evoral: change interpolation distance to match 6.x
Note that the value is still defined in Beats (ticks) rather than seconds
which means that the interpolation density is tempo-dependent. This
should still likely change one day.
2022-04-05 20:52:09 -06:00
b58072f14c
Fix canvas tooltips
The tooltip should remain visible until the mouse leaves
the item's bounding box. Also do not start the tooltip
timeout if the item does not have a tooltip.
2022-04-04 20:50:49 +02:00
a946046532
Add API to copy Biquad parameters
This is handy for stereo or higher-order plugin configurations,
the coefficients have to be calculated only once.
2022-04-02 19:10:08 +02:00
b411eeb74e
Fix crash when exporting multiple timespans with MIDI tracks
::start_audio_export() may be called from a background thread
which does not yet have a thread-local TempoMap.

Track::seek() calls ARDOUR::AudioPlaylist::read()
which calls Playlist::regions_touched_locked() which may require
a TempoMap to calculate overage with Temporal::Beats
2022-04-01 21:41:30 +02:00
e15fb0dc38
Fix unset of LIBRARY_PATH environment variable
see also 82d491cb80
2022-04-01 20:50:28 +02:00
2942ecf27e
Do not use ABU suffix for vamp plugin shared object
VAMP looks for `libardourvampplugins.so` and not
`libardourvampplugins.so.0` (which waf install deploys).
2022-04-01 18:40:46 +02:00
8c7157df6c
Ignore LD-environment for mp3 im/export
This fixes mp3 export on Linux/ARM (Raspberry Pi) with
system-wide dynamically linked ffmpeg. Otherwise the there
would be library conflicts with ardour-bundled libz and libcairo.
2022-04-01 18:19:59 +02:00
82d491cb80
Allow to unset LD_LIBRARY_PATH on exec
This is useful when using distro-packaged video-tools
(e.g. on Linux/ARM), or when running post-export commands.
2022-04-01 18:19:55 +02:00
66a3d727cd
Process rt-tasks (resample ports) in parallel (again).
This was changed to single-thread execution in
in bd229936ec
and likely accidentally committed.
2022-03-31 21:51:28 +02:00
6bbe684304 import_pt: Simplify region to track mapping
This allows regions to be correctly imported to their
actual track number now that they are numbered from zero
without any gaps by ptformat, removing the need for a lookup table.
2022-03-29 19:02:19 +11:00
1532f218ab ptformat: Update to upstream c1c6475
This changes region to track entries to make importing easier.
Entries are now sequential, gapless and numbered from zero.
2022-03-29 18:59:46 +11:00
d841b13673
Fix moving automation with region
This issue was introduced in
eae9d276fe
by using the incorrect new nutempo methods for the case at hand.
2022-03-28 19:39:45 +02:00
3f37d54d85
Fix path to user-clip library
This is only used when the path is initially unset (`@default@`),
existing config paths are left as-is.
2022-03-28 18:55:27 +02:00
bf2618e97b temporal: fix crash during reset_starting_at() 2022-03-23 18:03:42 -06:00
857856431e temporal: remove debug output and stacktrace 2022-03-23 17:42:52 -06:00
74a4678c04 temporal: NOOP add explanatory comment 2022-03-23 17:42:52 -06:00
214c291e55 temporal: fix ::set_state() for old sessions where initial meter was moved to non-zero location 2022-03-23 17:42:52 -06:00
edc94c5213
VST3: allow to query presets via PluginInfo
This fixes an issue with the mixer-sidebar treeview
not listing VST3 user-presets.
2022-03-22 04:06:31 +01:00
b4cf61304c fix meter point removal
std::upper_bound() was not the correct tool to find the existing point,
it should have been std::lower_bound(). For code consistency, this
change doesn't use either but like ::remove_tempo() and similar methods,
just iterates over the whole list
2022-03-21 11:35:34 -06:00
ea4a6f6215 triggerbox: d+d: follow count should be carried over as part of the arrangement 2022-03-21 12:07:43 -05:00
333e19a2cf triggerbox: patch_changes must also use the ui_state API 2022-03-20 15:36:07 -05:00
8cba60bfd4 triggerbox: used_channels must use ui_state API (see prior commits) 2022-03-20 15:36:07 -05:00
1b08fa1581 triggerbox: commenting the ui_state process 2022-03-20 15:36:07 -05:00
ca94b63a55 triggerbox: allow-patch-changes should use DIRECT_SET 2022-03-20 15:36:07 -05:00
1a3b82a12e triggerbox: TRIGGER_DIRECT_SET should also set ui_state
bugfix: changing the FA state can overwrite the clip's name and color

Some params (like gain) can and should take effect immediately
by directly setting the properties.  TRIGGER_DIRECT_SET does that.
But we still, ALSO have to set the ui_state, because when the
triggerbox imports ui_state via update_properties() it will
overwrite your changes.

Said another way:  since we use a queued ui_state to set the properties,
you ALWAYS have to set and use the ui_state mechanism, even if you want
to short-circuit the process for specific properties.
2022-03-20 15:36:07 -05:00
40744c672a
Fix VST2 callbacks querying tempo-map
Some VST2 use a custom thread to make callbacks, in this case
the corresponding thread will not have fetched a thread-local
tempo-map.
2022-03-20 15:42:47 +01:00
6bcc0163cd
Fix VST3 processor refcount
This fixes an issue with JUCE plugins remaining alive
after closing the session (and causing issues at exit).
see also 789949ed8e
2022-03-20 15:42:43 +01:00
0aabdc0849 remove errant stacktrace 2022-03-19 17:00:09 -05:00
9f91747ac5 triggerbox: improve speed of TriggerBox::fast_forward() and handle a couple of logic errors
Having identified the trigger that will be running at a given transport position, we determine its effective
length (not necessarily its own length) and last start, then "jump" forward to the next-earliest start
point prior to the transport position. This greatly reduces the amount of actual audio processing we
need to do to prepare the trigger to run in sync at the transport position.

This commit also adjusts the targetted transport position by the processor's playback offset, so that
it is correctly prepared to run() once the transport starts again.

Logic errors when using cue-isolated or empty triggers were also fixed.
2022-03-19 15:25:14 -06:00
d29c70a2a2 temporal: add new variant of TempoMap::bbtwalk_to_quarters() 2022-03-19 15:25:14 -06:00
a4459ebf9c avoid double-locates when locate-while-rolling
We know when we call non_realtime_stop() if we will be subsequently
locating. If so, do not do an additional non_realtime_locate() from
within the stop.
2022-03-17 17:43:43 -06:00
8ebd097df9 move #includes so that they are only used if needed 2022-03-17 17:43:43 -06:00
176c41a485
Fix region-gain when region-start is trimmed
Region-gain (unlike other automation) is specific to the
region and independent of the source. Region::start() offset
does not apply. When region-start is trimmed the region's
envelope is modified (not just offset). The event-list is truncated.

Any audio-region envelope does (and must) have a point exactly
at the start and end of the region.

truncate_start() can thus calculate the earliest position of
valid events with the new length relative to the last event.

The mathematical operator for that is subtraction, not distance.
2022-03-17 23:46:55 +01:00
CalebJPotter
e64fdcfb55 fixes issue where monitor section gets stuck on mute
This mute button wasn't meant to mute the monitor section in the first
place.
2022-03-17 15:37:07 -06:00
Caleb Potter
643342995d fixes issue where MCP controller strips got stranded switching banks
This commit fixes an issue where if your controller was currently on a
bank not near the first few tracks, and you then deleted tracks, the
controller bank buttons would appear unresponsive because of the
"if (initial >= sorted.size())" check in switch_banks().
This would occur when the difference between the _initial_bank and
whatever sorted.size() returns was greater than or equal to strip_cnt.
For example, if your _initial_bank was 48, your strip_cnt was 24 and you
had 24 tracks after the deletion, then the above conditional would evaluate
to true and exit out of switch_banks BEFORE actually switching the bank,
effectively stranding the controller unless you added enough tracks back.
2022-03-17 15:37:07 -06:00
Caleb Potter
e89d85f776 remaps button handlers specific to iCon QCon ProG2
If the QCon ProG2 is selected as the device profile, then the button map
will be built with handlers that map specific to the iCon QCon ProG2
controller.
2022-03-17 15:37:07 -06:00
Caleb Potter
ad4475fe7a adds iCon QCon ProG2 specific MCP button handlers
Adds function to clear solo and (with shift) mute all channels.Adds
function to save and (with shift) save as. Adds function to toggle all
processors on selected track. Adds functions to select track to the
left/right. Adds function to add marker and (with shift) remove marker at
playhead. Adds function to undo without needing shift modifier.
2022-03-17 15:37:07 -06:00
Caleb Potter
b846356f87 adds MCP button to toggle between master fader and monitor fader
Adds an MCP button function to switch the master fader on the controller
between the session master fader and (if enabled) monitor fader.
2022-03-17 15:37:07 -06:00
Caleb Potter
b6a1144472 adds a few general purpose MCP button functions
Adds a function to go to the next and previous marker. Adds a function to
redo (without requiring a shift modifier). Adds a function to open a
project.
2022-03-17 15:37:07 -06:00
Caleb Potter
381276e862 adds support for iCon QCon ProG2 controller
This commit does no remapping, but it adds the Pro G2 as a value in the
device profiles.
2022-03-17 15:37:07 -06:00
Caleb Potter
d1f4679abc adds support for iCon Platform M+ controller
Adds a device profile for iCon Platform M+ controller and new function
that flips between editor and mixer window. This function is mapped to
"mixer" button on controller.
2022-03-17 15:37:07 -06:00
Caleb Potter
fc961f1622 adds support for MCP device-specific button to function remapping
Adding this function so that different devices can remap their buttons
to functions based on device profile.
2022-03-17 15:37:07 -06:00
7633005a22 Fix solo control activation 2022-03-17 13:51:30 -07:00
a803dd0df8 superclock_ticks_per_second: use an (inline) accessor, change value
We do not want a value as large as the previous one, which limits the time
range that can be represented in 62 bits unnecessarily. The new value is
9 times smaller than the previous value, and loses only 384000 as a significant
factor.

This commit also switches to using an (inline) accessor for superclock_ticks_per_second,
making it possible in debug/testing phases to spot early/illegal uses of the value.
2022-03-17 14:15:59 -06:00
e72cff4ab1 triggerbox: reset all trigger states when locating/stopping
We also exclude anything from happening during TriggerBox::run() while locating/stopping
is taking place.
2022-03-17 12:20:34 -06:00
2b630c4887 triggerbox: add TriggerBox::dump() to check trigger states 2022-03-17 12:20:34 -06:00
1af0e7cc4f triggerbox: provide ::shutdown_from_fwd() method
This does the internal shutdown of a Trigger that is shared between
a normal shutdown and when stopping for a locate/stop. There's no
output to buffers possible.

This method/design may need to change if/when we add declicking for
various conditions
2022-03-17 12:20:34 -06:00
1cc8a3f92c extend Session API to provide ::transport_locating() 2022-03-17 12:20:34 -06:00
13da06feb9 triggerbox: remove debug messages 2022-03-16 11:21:29 -05:00
e603b2e12d
Remove debug messages (1/2) 2022-03-16 17:08:14 +01:00
2572a24172 auditioner: fix thinko in midi file length 2022-03-15 17:57:15 -05:00
3ae73eb242
Extend Session::Exported signal
Include timespan start position. This will allow to re-import
the file at the export-position.
2022-03-15 22:52:58 +01:00
d9773e5788 triggerbox: add PropertyChange::all_trigger_props() 2022-03-15 09:03:40 -05:00
0bfa7e1b30 triggerbox: implement allow_patch_changes 2022-03-15 09:03:40 -05:00
20dad3f520 ripple: Lua bindings for ripple enums (no funcs to use them yet) 2022-03-14 21:35:35 -05:00
4cbdb30d56 ripple: tweak behavior of Locations::ripple
* ignore session, punch and loop ranges
* support positive and negative ripple distances
* move either or both (start+end) of a range marker
2022-03-14 19:26:41 -05:00
ba9bbf81ba ripple: create RippleMode and associated enums
* RippleAll is no longer an EditMode
* RippleSelected, RippleAll and RippleInterview are now subtypes of Ripple
2022-03-14 19:26:41 -05:00
54367e5aef playlist: use C++11 style iterators wherever possible 2022-03-14 14:52:46 -06:00
a336e87df8 when loading a session, catch up on tb_with_filled_slots correctly 2022-03-14 14:10:29 -06:00
2ea75e88a2 sync cue markers when tempo map changes
This generates the _cue_events list, which is timestamped in samples, from all
current locations that are cue markers
2022-03-14 14:03:07 -06:00
22b50c1716 ensure that Session handles tempo map changes synchronously in the main RT process thread 2022-03-14 14:03:07 -06:00
10dc09fcd4 temporal: extend TempoMap thread local ptr API a little
This allows checking to see if the map has changed compared with the thread's
current local pointer.
2022-03-14 14:03:07 -06:00
da95a0a0ee replace sample rate callback used for superclock<=>sample conversion
Now using a globally-scoped static variable which is updated by the
AudioEngine whenever an SR change occurs. Defaults to 48kHz and can
be used even before there is a backend.
2022-03-14 14:03:07 -06:00
a4fd4cdaf0 triggerbox: enhance utility of a fatal message 2022-03-14 14:03:07 -06:00
00d8b08300 triggerbox: track empty slot status and ignore stop-at-session-end when appropriate 2022-03-14 14:03:07 -06:00
a435d4d18e Auditioner: round-up midi region length to seconds, at least 2 seconds long 2022-03-13 19:42:00 -05:00
7321248916 triggerbox: do not try to set the {segment} tempo if there is no region
* divide-by-zero was resulting in NaNs in the snapshot file
2022-03-13 19:42:00 -05:00
6c0d3651cf
Cont'd work on track bounce/export alignment
Due to recent changes, when the master bus is disconnected its
private port latency was never unset. This lead to misalignment
when using stem-export if master (or monitor) output was not
connected.
2022-03-13 18:28:00 +01:00
d505ae3372 triggerbox: record stop-all-cues "cue" when appropriate 2022-03-13 10:22:20 -06:00
d5ee0342a2
Cont'd work on track->track bounce alignment
see also e58c312420
2022-03-11 21:53:22 +01:00
abbf1ca698
Allow to get exit status from child processes 2022-03-11 18:18:06 +01:00