From f895bc2cd9a458e55712e5d8d53e87aa993a3b5d Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 12 Nov 2025 12:27:45 -0700 Subject: [PATCH] new Session signal to indicate that instrument tracks/busses were added and are configured Existing code sent RouteAdded() before the instrument plugin(s) were added. Rather than risk changing code ordering, just emit a 2nd signal to notify (the GUI) that new instrument tracks/busses were added --- libs/ardour/ardour/session.h | 4 ++++ libs/ardour/session.cc | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index 7a271bbfc9..11a93c4170 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -458,6 +458,10 @@ public: PBD::Signal Located; PBD::Signal RouteAdded; + /* This is emitted after one or more routes are added that are actually + Tracks with an instrument plugin. + */ + PBD::Signal InstrumentRouteAdded; /** Emitted when a property of one of our route groups changes. * The parameter is the RouteGroup that has changed. */ diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 0e08e3de9b..3b95788940 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -2828,6 +2828,9 @@ Session::new_midi_track (const ChanCount& input, const ChanCount& output, bool s add_routes (new_routes, input_auto_connect, !instrument, order); load_and_connect_instruments (new_routes, strict_io, instrument, pset, existing_outputs); + if (instrument) { + InstrumentRouteAdded (new_routes); + } } return ret; @@ -2908,6 +2911,9 @@ Session::new_midi_route (RouteGroup* route_group, uint32_t how_many, string name add_routes (ret, false, !instrument, order); load_and_connect_instruments (ret, strict_io, instrument, pset, existing_outputs); + if (instrument) { + InstrumentRouteAdded (ret); + } } return ret;