13
0
Commit Graph

34936 Commits

Author SHA1 Message Date
3ff4d6c5ab some instrumentation for MidiRegionView::redisplay_model() 2022-04-05 20:52:10 -06:00
cc0869d931 restore setting selection in MidiRegionView::redisplay_model() 2022-04-05 20:52:10 -06:00
582661dbd0 as an experiment, prevent redisplay of (MIDI) regions during trimming
This doesn't actually work right now because of a conflicting design in MidiRegionView, but
could be promising. Or it might be reverted
2022-04-05 20:52:10 -06:00
5ec7375884 fix issue with RAII RegionView::DisplaySuspender copy constructor 2022-04-05 20:52:10 -06:00
b8a6b97b49 redesign (MIDI)RegionView display disabling around an RAII model 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
d586956636 NOOP: some minor whitespace fixes 2022-04-05 20:52:09 -06:00
7c6bce5cda fix recursive loop in patch change display
We do not want a loop between ::add_canvas_patch_change() and
::display_patch_changes(), even if it does bottom out in the end
2022-04-05 20:52:09 -06:00
9efdba5b91 comment name of unused function parameter 2022-04-05 20:52:09 -06:00
ae8c043fe1 regionviews: use integer counter instead of boolean to control redisplay of contents 2022-04-05 20:52:09 -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
22a56de13a use canvas freeze-queue-draw API when redrawing a MIDI region 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
1769b20dd1 arcall: use dedicated directory for output, and add --dump-instr=yes 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
7cb7d83bb8
Cont'd "meter/time-signature" disambiguation 2022-04-05 19:26:01 +02:00
7e10061d16
Disambiguate "Meter" use "Time Signature for music meter
In general we should use
* "meter": signal level meter
* "time-signature": music meter / metrum
2022-04-05 18:56:10 +02:00
504a04878f
Fix typos, consistent text markup
Thanks to Edgar Aichinger
2022-04-05 18:45:40 +02: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
4f43d5d024
Optimize ACE-Hi/Lo pass filter automation performance a bit 2022-04-02 19:19:38 +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
f74b8227c5
Ignore LD-environment for video transcoding and Lua exec 2022-04-01 18:20:04 +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
0b5e502546
Video import/export overhaul and ffmpeg-5.0 compat
* Update commandline parameters for ffmpeg 5.0
* Simplify video-export, allow only standard settings
* Check ffmpeg exit code and parse errors
* Fix SessionhandleRef on audio-import (clear import status)
* Cleanup and reformat sourcecode
2022-04-01 01:35:08 +02:00
391c3e96b3
Clarify stop-at-session-end preference tooltip 2022-03-31 21:51:32 +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
9c9f1dbf82
Fix nudge-playhead-backward 2022-03-30 03:08:16 +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