mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-24 06:07:29 +01:00
Don't add duplicate remote_control_id to active banks. Notes and tweaks.
git-svn-id: svn://localhost/ardour2/trunk@1471 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
78f6e01f2d
commit
207eaa4298
7 changed files with 46 additions and 19 deletions
|
|
@ -6,24 +6,29 @@
|
|||
* discuss button mapping for Ardour
|
||||
* concurrency for bank switching? And make sure "old" events aren't sent to "new" faders
|
||||
* concurrency in write( bytes ). Queueing?
|
||||
* Are remote_ids supposed to be 1-based or 0-based?
|
||||
* TODOs in code
|
||||
* handle remote_control_id changed signal from Route.
|
||||
* handle removal of route. Need another session signal?
|
||||
* Some indication on the UI of remote_ids?
|
||||
Useful for surfaces that don't have a scribble strip.
|
||||
* use i18n. see string_compose
|
||||
* MackieControlProtocol in namespace Mackie?
|
||||
* Generic surface code to common location
|
||||
* power-cycling of surface. fd_midiport doesn't close.
|
||||
* remove couts
|
||||
* jog with transport rolling doesn't work properly
|
||||
* jog with transport rolling doesn't work properly. My use of ScrollTimeline also doesn't work.
|
||||
* docs in manual
|
||||
|
||||
Later
|
||||
-----
|
||||
* which bank switching - overlap or dead faders? Option?
|
||||
* signals for buttons?
|
||||
* mix busses and/or a "bus-only" bank/mode
|
||||
* what about surfaces like Mackie C4 and BCR2000?
|
||||
|
||||
Need UI integration
|
||||
-------------------
|
||||
* Some indication on the UI of currently bank-switched-in routes?
|
||||
Useful for surfaces that don't have a scribble strip.
|
||||
* use current zoom setting and snap state for shuttle wheel
|
||||
|
||||
Actual Mackie
|
||||
-------------
|
||||
|
|
@ -35,8 +40,8 @@ Actual Mackie
|
|||
Bugs
|
||||
----
|
||||
|
||||
* get_state isn't called on deactivate
|
||||
* get_state isn't called on deactivate. Huh? What did I mean here?
|
||||
* routes "forget" their remote_id between session save and the next session load
|
||||
* definitely something wrong with remote_id assignment on session create
|
||||
(master strip assigned 0).
|
||||
* gui enables record for tracks with no inputs
|
||||
* editor window doesn't update route remote_control_id when it's updated in mixer window.
|
||||
|
|
|
|||
|
|
@ -202,14 +202,27 @@ MackieControlProtocol::Sorted MackieControlProtocol::get_sorted_routes()
|
|||
|
||||
// fetch all routes
|
||||
boost::shared_ptr<Session::RouteList> routes = session->get_routes();
|
||||
set<uint32_t> remote_ids;
|
||||
|
||||
// routes with remote_id 0 should never be added
|
||||
// TODO verify this with ardour devs
|
||||
// remote_ids.insert( 0 );
|
||||
|
||||
// sort in remote_id order, and exclude master, control and hidden routes
|
||||
// and any routes that are already set.
|
||||
for ( Session::RouteList::iterator it = routes->begin(); it != routes->end(); ++it )
|
||||
{
|
||||
Route & route = **it;
|
||||
if ( route.active() && !route.master() && !route.hidden() && !route.control() )
|
||||
if (
|
||||
route.active()
|
||||
&& !route.master()
|
||||
&& !route.hidden()
|
||||
&& !route.control()
|
||||
&& remote_ids.find( route.remote_control_id() ) == remote_ids.end()
|
||||
)
|
||||
{
|
||||
sorted.push_back( *it );
|
||||
remote_ids.insert( route.remote_control_id() );
|
||||
}
|
||||
}
|
||||
sort( sorted.begin(), sorted.end(), RouteByRemoteId() );
|
||||
|
|
@ -846,7 +859,11 @@ void MackieControlProtocol::handle_control_event( SurfacePort & port, Control &
|
|||
next = session->current_end_frame();
|
||||
}
|
||||
|
||||
// moves jerkily and doesn't really work. eventually core-dumps
|
||||
session->request_locate( next, session->transport_rolling() );
|
||||
// ditto
|
||||
// ScrollTimeline( state.ticks );
|
||||
// mtaht says maybe snap-to code has some ideas
|
||||
|
||||
// turn off the led ring, for bcf emulation mode
|
||||
port.write( builder.build_led_ring( dynamic_cast<Pot &>( control ), off ) );
|
||||
|
|
|
|||
|
|
@ -104,7 +104,9 @@ void MackieControlProtocol::update_ports()
|
|||
}
|
||||
_ports_changed = false;
|
||||
}
|
||||
cout << "MackieControlProtocol::update_ports signalling" << endl;
|
||||
update_cond.signal();
|
||||
cout << "MackieControlProtocol::update_ports finished" << endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ void RouteSignal::connect()
|
|||
// TODO
|
||||
// active_changed
|
||||
// SelectedChanged
|
||||
// RemoteControlIDChanged
|
||||
// RemoteControlIDChanged. Better handled at Session level.
|
||||
}
|
||||
|
||||
void RouteSignal::disconnect()
|
||||
|
|
|
|||
|
|
@ -37,8 +37,6 @@ class MackiePort;
|
|||
connections from a route to a control surface strip. Instantiating
|
||||
it will connect the signals, and destructing it will disconnect
|
||||
the signals.
|
||||
|
||||
TODO deal with routes with >1 panner.
|
||||
*/
|
||||
class RouteSignal
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7,16 +7,15 @@
|
|||
using namespace std;
|
||||
using namespace Mackie;
|
||||
|
||||
Surface::Surface( uint32_t max_strips )
|
||||
: _max_strips( max_strips )
|
||||
Surface::Surface( uint32_t max_strips, uint32_t unit_strips )
|
||||
: _max_strips( max_strips ), _unit_strips( unit_strips )
|
||||
{
|
||||
}
|
||||
|
||||
void Surface::init()
|
||||
{
|
||||
init_controls();
|
||||
// TODO fix this hard coding
|
||||
init_strips( _max_strips, 8 );
|
||||
init_strips( _max_strips, _unit_strips );
|
||||
}
|
||||
|
||||
Surface::~Surface()
|
||||
|
|
@ -34,11 +33,9 @@ Surface::~Surface()
|
|||
}
|
||||
}
|
||||
|
||||
// Possibly Mackie-specific, because of multiple devices on separate ports
|
||||
// Mackie-specific, because of multiple devices on separate ports
|
||||
// add the strips from 9..max_strips
|
||||
// unit_strips is the number of strips for additional units.
|
||||
// TODO would be better to pass the MackiePorts in here, cos
|
||||
// each might have a different number of strips
|
||||
void Surface::init_strips( uint32_t max_strips, uint32_t unit_strips )
|
||||
{
|
||||
if ( strips.size() < max_strips )
|
||||
|
|
|
|||
|
|
@ -28,7 +28,14 @@ class MackieButtonHandler;
|
|||
class Surface
|
||||
{
|
||||
public:
|
||||
Surface( uint32_t max_strips );
|
||||
/**
|
||||
A Surface can be made up of multiple units. eg one Mackie MCU plus
|
||||
one or more Mackie MCU extenders.
|
||||
|
||||
\param max_strips is the number of strips for the entire surface.
|
||||
\param unit_strips is the number of strips per unit.
|
||||
*/
|
||||
Surface( uint32_t max_strips, uint32_t unit_strips = 8 );
|
||||
virtual ~Surface();
|
||||
|
||||
/// Calls the virtual initialisation methods. This *must* be called after
|
||||
|
|
@ -56,7 +63,7 @@ public:
|
|||
std::map<std::string,Control*> controls_by_name;
|
||||
|
||||
/// The collection of all numbered strips. No master
|
||||
/// strip in here.
|
||||
/// strip in here.
|
||||
typedef std::vector<Strip*> Strips;
|
||||
Strips strips;
|
||||
|
||||
|
|
@ -78,6 +85,7 @@ protected:
|
|||
|
||||
private:
|
||||
uint32_t _max_strips;
|
||||
uint32_t _unit_strips;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue