13
0
Commit Graph

18939 Commits

Author SHA1 Message Date
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