From 0eee85f43b2435277c7cccda8e5145761bcb98a8 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 19 Apr 2012 00:30:55 +0000 Subject: add a simple method to return "the instrument" associated with a Route. see the comments about the semantics of this, which do not preclude 0..N "instruments" in a single route git-svn-id: svn://localhost/ardour2/branches/3.0@12027 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/ardour/route.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'libs/ardour/ardour/route.h') diff --git a/libs/ardour/ardour/route.h b/libs/ardour/ardour/route.h index 89a0cac214..bdda941a97 100644 --- a/libs/ardour/ardour/route.h +++ b/libs/ardour/ardour/route.h @@ -397,6 +397,15 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember, boost::shared_ptr gain_control() const; boost::shared_ptr pannable() const; + /** + Return the first processor that accepts has at least one MIDI input + and at least one audio output. In the vast majority of cases, this + will be "the instrument". This does not preclude other MIDI->audio + processors later in the processing chain, but that would be a + special case not covered by this utility function. + */ + boost::shared_ptr the_instrument() const; + void automation_snapshot (framepos_t now, bool force=false); void protect_automation (); -- cgit v1.2.3