From 6e0c5e6a341babda78341d508840928960909690 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sun, 19 May 2024 01:40:02 +0200 Subject: [PATCH 1/8] Unify build scripts w/derivative projects --- tools/linux_packaging/build | 2 +- tools/linux_packaging/package | 3 --- tools/osx_packaging/osx_build | 6 +----- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/tools/linux_packaging/build b/tools/linux_packaging/build index c40fd8fba8..5c31814071 100755 --- a/tools/linux_packaging/build +++ b/tools/linux_packaging/build @@ -395,7 +395,7 @@ for x in $BUILD_ROOT/../share/osc/*.preset ; do done # Mixbus MixerSettings (if any) -for x in $BUILD_ROOT/../mixer_settings/*.lua ; do +for x in $BUILD_ROOT/../share/mixer_settings/*.lua ; do mkdir -p $MixerSettings # create on demand cp "$x" $MixerSettings done diff --git a/tools/linux_packaging/package b/tools/linux_packaging/package index 9ed9ebea1a..3ed82e5638 100755 --- a/tools/linux_packaging/package +++ b/tools/linux_packaging/package @@ -34,9 +34,6 @@ while [ $# -gt 0 ] ; do --mixbus) APPNAME=Mixbus ; shift ;; - --mixbus32c) - APPNAME=Mixbus32C ; - shift ;; --livetrax) APPNAME=LiveTrax ; shift ;; diff --git a/tools/osx_packaging/osx_build b/tools/osx_packaging/osx_build index c55b804df2..e12f6a361d 100755 --- a/tools/osx_packaging/osx_build +++ b/tools/osx_packaging/osx_build @@ -14,7 +14,6 @@ fi mkdir -p "$CACHEDIR" MIXBUS= -MIXBUS32C= WITH_HARVID=1 WITH_XJADEO=1 WITH_HARRISON_LV2= @@ -44,7 +43,6 @@ while [ $# -gt 0 ] ; do WITH_COMMERCIAL_X42_LV2=1 WITH_GRATIS_X42_LV2=1 WITH_GMSYNTH=1 - STRIP= ; PRODUCT_PKG_DIR=Mixbus; APPNAME=Mixbus ; BUNDLENAME=Mixbus${major_version} ; @@ -231,9 +229,7 @@ MAIN_EXECUTABLE=$EXECUTABLE echo "Copying ardour executable ...." cp $BUILD_ROOT/gtk2_ardour/ardour-$release_version $APPROOT/MacOS/$MAIN_EXECUTABLE -if test x$MIXBUS32C != x ; then - cp Mixbus32C.icns $Resources/appIcon.icns -elif test x$MIXBUS != x ; then +if test x$MIXBUS != x ; then cp Mixbus.icns $Resources/appIcon.icns elif test x$LIVETRAX != x ; then cp LiveTrax.icns $Resources/appIcon.icns From 66d36999b9e58c0553a7ac744491479206a94e76 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sun, 19 May 2024 18:43:45 +0200 Subject: [PATCH 2/8] Remove empty checkboxes from Ruler dialog --- gtk2_ardour/ruler_dialog.cc | 3 --- gtk2_ardour/ruler_dialog.h | 3 --- 2 files changed, 6 deletions(-) diff --git a/gtk2_ardour/ruler_dialog.cc b/gtk2_ardour/ruler_dialog.cc index ab525996e9..5f0af5b4c5 100644 --- a/gtk2_ardour/ruler_dialog.cc +++ b/gtk2_ardour/ruler_dialog.cc @@ -36,10 +36,7 @@ RulerDialog::RulerDialog () get_vbox()->pack_start (meter_button); get_vbox()->pack_start (tempo_button); get_vbox()->pack_start (range_button); - get_vbox()->pack_start (loop_punch_button); - get_vbox()->pack_start (cdmark_button); get_vbox()->pack_start (mark_button); - get_vbox()->pack_start (cuemark_button); get_vbox()->pack_start (section_button); get_vbox()->pack_start (video_button); diff --git a/gtk2_ardour/ruler_dialog.h b/gtk2_ardour/ruler_dialog.h index d175117de4..7984194bcb 100644 --- a/gtk2_ardour/ruler_dialog.h +++ b/gtk2_ardour/ruler_dialog.h @@ -41,12 +41,9 @@ private: Gtk::CheckButton bbt_button; Gtk::CheckButton tempo_button; Gtk::CheckButton meter_button; - Gtk::CheckButton loop_punch_button; Gtk::CheckButton range_button; Gtk::CheckButton mark_button; - Gtk::CheckButton cdmark_button; Gtk::CheckButton section_button; - Gtk::CheckButton cuemark_button; Gtk::CheckButton video_button; void connect_action (Gtk::CheckButton& button, std::string const &action_name_part); From ac779b38b2ef07ec8330d3acc72253d699da268f Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Mon, 20 May 2024 11:00:45 -0600 Subject: [PATCH 3/8] arrangement markers are named "section N" by default --- gtk2_ardour/editor_markers.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk2_ardour/editor_markers.cc b/gtk2_ardour/editor_markers.cc index f14da5c0da..1fdf1797bd 100644 --- a/gtk2_ardour/editor_markers.cc +++ b/gtk2_ardour/editor_markers.cc @@ -844,7 +844,7 @@ Editor::mouse_add_new_marker (timepos_t where, Location::Flags extra_flags, int3 markername = string_compose (_("cue %1"), cue_marker_name (cue_id)); } else { if (flags & Location::IsSection) { - namebase = _("verse"); + namebase = _("section"); } else { namebase = _("mark"); } From e34359b9210e5fe78d45ad1845efe95d72e0b9c0 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Mon, 20 May 2024 18:56:48 +0200 Subject: [PATCH 4/8] VST3: skip context info callbacks during session load This fixes a crash when SSL's channelstrip calls set-selection early on during session load, during Session::load_routes. Session::add_routes_inner calls calls ARDOUR::GUIIdle() which can trigger a SSL Native Channel Strip 2" VST3 to call VST3PI::setContextInfoValue, which in turn emits a CoreSelection::send_selection_change before the session is fully loaded. This also handles various edge cases where a given AC may not [yet] exist. --- libs/ardour/vst3_plugin.cc | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/libs/ardour/vst3_plugin.cc b/libs/ardour/vst3_plugin.cc index d9f6227fa9..313751f659 100644 --- a/libs/ardour/vst3_plugin.cc +++ b/libs/ardour/vst3_plugin.cc @@ -2969,14 +2969,21 @@ VST3PI::getContextInfoValue (double& value, FIDString id) tresult VST3PI::setContextInfoValue (FIDString id, double value) { - if (!_owner) { + Stripable* s = dynamic_cast (_owner); + if (!s) { DEBUG_TRACE (DEBUG::VST3Callbacks, "VST3PI::setContextInfoValue: not initialized"); return kNotInitialized; } DEBUG_TRACE (DEBUG::VST3Callbacks, string_compose ("VST3PI::setContextInfoValue %1 to %2\n", id, value)); + if (s->session ().loading () || s->session ().deletion_in_progress ()) { + return kResultOk; + } if (0 == strcmp (id, ContextInfo::kVolume)) { std::shared_ptr ac = lookup_ac (_owner, id); - ac->set_value (value, Controllable::NoGroup); + assert (ac); + if (ac) { + ac->set_value (value, Controllable::NoGroup); + } } else if (0 == strcmp (id, ContextInfo::kPan)) { std::shared_ptr ac = lookup_ac (_owner, id); if (ac) { @@ -3005,6 +3012,9 @@ VST3PI::setContextInfoValue (FIDString id, int32 value) return kNotInitialized; } DEBUG_TRACE (DEBUG::VST3Callbacks, string_compose ("VST3PI::setContextInfoValue %1 to %2\n", id, value)); + if (s->session ().loading () || s->session ().deletion_in_progress ()) { + return kResultOk; + } if (0 == strcmp (id, ContextInfo::kColor)) { #if BYTEORDER == kBigEndian SWAP_32 (value) // ABGR32 -> RGBA32 @@ -3022,10 +3032,11 @@ VST3PI::setContextInfoValue (FIDString id, int32 value) } } else if (0 == strcmp (id, ContextInfo::kMultiSelect)) { _add_to_selection = value != 0; - } else if (0 == strcmp (id, ContextInfo::kMute)) { - s->session ().set_control (lookup_ac (_owner, id), value != 0 ? 1 : 0, Controllable::NoGroup); - } else if (0 == strcmp (id, ContextInfo::kSolo)) { - s->session ().set_control (lookup_ac (_owner, id), value != 0 ? 1 : 0, Controllable::NoGroup); + } else if (0 == strcmp (id, ContextInfo::kMute) || 0 == strcmp (id, ContextInfo::kSolo)) { + std::shared_ptr ac = lookup_ac (_owner, id); + if (ac) { + s->session ().set_control (ac, value != 0 ? 1 : 0, Controllable::NoGroup); + } } else { DEBUG_TRACE (DEBUG::VST3Callbacks, "VST3PI::setContextInfoValue: unsupported ID\n"); return kNotImplemented; From 9de2b3435d9b08cc03caddc536c5e7161aae68ee Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Mon, 20 May 2024 18:37:27 +0200 Subject: [PATCH 5/8] Only send a single note-off when drawing notes Previously both the timer-based `off` as well as the d'tor sent a note-off event. --- gtk2_ardour/note_player.cc | 12 ++---------- gtk2_ardour/note_player.h | 12 +++++++----- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/gtk2_ardour/note_player.cc b/gtk2_ardour/note_player.cc index cb148f5f0b..d0396e588d 100644 --- a/gtk2_ardour/note_player.cc +++ b/gtk2_ardour/note_player.cc @@ -34,22 +34,15 @@ NotePlayer::NotePlayer (std::shared_ptr mt) NotePlayer::~NotePlayer () { - clear (); } void NotePlayer::add (std::shared_ptr note) { + /* Must not be called once play() has been called */ notes.push_back (note); } -void -NotePlayer::clear () -{ - off (); - notes.clear (); -} - void NotePlayer::on () { @@ -63,8 +56,7 @@ NotePlayer::play () { on (); - /* note: if there is more than 1 note, we will silence them all at the same time - */ + /* note: if there is more than 1 note, we will silence them all at the same time */ const uint32_t note_length_ms = 100; diff --git a/gtk2_ardour/note_player.h b/gtk2_ardour/note_player.h index 94c60b3ab4..e3cad02a33 100644 --- a/gtk2_ardour/note_player.h +++ b/gtk2_ardour/note_player.h @@ -27,6 +27,10 @@ #include "evoral/Note.h" +namespace Temporal { + class Beats; +} + namespace ARDOUR { class MidiTrack; } @@ -40,13 +44,11 @@ public: void add (std::shared_ptr); void play (); - void on (); - void off (); - void clear (); - - static bool _off (NotePlayer*); private: + void on (); + void off (); + static bool _off (NotePlayer*); typedef std::vector< std::shared_ptr > Notes; std::shared_ptr track; From f693c0406aa39310e3e083bf89dd67d137c925f5 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Mon, 20 May 2024 18:49:59 +0200 Subject: [PATCH 6/8] When drawing a note, only play it once Previously two identical Note on events were sent: * Select newly created note -> note-on event * Play newly created note -> note-on event --- gtk2_ardour/midi_region_view.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/gtk2_ardour/midi_region_view.cc b/gtk2_ardour/midi_region_view.cc index 01af7d3dfb..24433cd30a 100644 --- a/gtk2_ardour/midi_region_view.cc +++ b/gtk2_ardour/midi_region_view.cc @@ -910,11 +910,8 @@ MidiRegionView::create_note_at (timepos_t const & t, double y, Temporal::Beats l apply_note_diff(); trackview.editor().set_selected_midi_region_view (*this); - list to_be_selected; - to_be_selected.push_back (new_note->id()); - select_notes (to_be_selected, true); - play_midi_note (new_note); + /* apply_note_diff above selects and plays the newly created note */ } void From 5fdc7c46013a94fcc9149819fcd3d190aab6a2ac Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Mon, 20 May 2024 21:55:54 +0200 Subject: [PATCH 7/8] Redraw section markers when reloading session This fixes a bug that when re-loading a session, section marker rectangles (to next marker) were not drawn. --- gtk2_ardour/editor.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index 69e5078a66..5ed96c63f2 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -670,7 +670,6 @@ Editor::Editor () Location::start_changed.connect (*this, invalidator (*this), boost::bind (&Editor::location_changed, this, _1), gui_context()); Location::end_changed.connect (*this, invalidator (*this), boost::bind (&Editor::location_changed, this, _1), gui_context()); Location::changed.connect (*this, invalidator (*this), boost::bind (&Editor::location_changed, this, _1), gui_context()); - Location::flags_changed.connect (_session_connections, invalidator (*this), boost::bind (&Editor::update_section_rects, this), gui_context ()); #if SELECTION_PROPERTIES_BOX_TODO add_notebook_page (_("Selection"), *_properties_box); @@ -1364,6 +1363,7 @@ Editor::set_session (Session *t) } refresh_location_display (); + update_section_rects (); /* restore rulers before calling set_state() which sets the grid, * which changes rulers and calls store_ruler_visibility() overriding @@ -1411,6 +1411,7 @@ Editor::set_session (Session *t) _session->locations()->changed.connect (_session_connections, invalidator (*this), boost::bind (&Editor::refresh_location_display, this), gui_context()); _session->auto_loop_location_changed.connect (_session_connections, invalidator (*this), boost::bind (&Editor::loop_location_changed, this, _1), gui_context ()); _session->history().Changed.connect (_session_connections, invalidator (*this), boost::bind (&Editor::history_changed, this), gui_context()); + Location::flags_changed.connect (_session_connections, invalidator (*this), boost::bind (&Editor::update_section_rects, this), gui_context ()); _playhead_cursor->track_canvas_item().reparent ((ArdourCanvas::Item*) get_cursor_scroll_group()); _playhead_cursor->show (); From 7bfd128a753ff7b29c90e87fe5bf5c6c8bb5bdbe Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Mon, 20 May 2024 21:56:24 +0200 Subject: [PATCH 8/8] Downgrade warning (about I/O priority) --- libs/ardour/butler.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/ardour/butler.cc b/libs/ardour/butler.cc index af3e8097cb..7fb6c6ee39 100644 --- a/libs/ardour/butler.cc +++ b/libs/ardour/butler.cc @@ -195,7 +195,7 @@ Butler::thread_work () #ifdef HAVE_IOPRIO // ioprio_set (IOPRIO_WHO_PROCESS, 0 /*calling thread*/, IOPRIO_PRIO_VALUE (IOPRIO_CLASS_RT, 4)) if (0 != syscall (SYS_ioprio_set, 1, 0, (1 << 13) | 4)) { - warning << _("Cannot set I/O Priority for disk read/write thread") << endmsg; + info << _("Cannot set I/O Priority for disk read/write thread") << endmsg; } #endif