mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 23:35:03 +01:00
Slightly tweaked patch from royvegard to add optional threshold for catch-up of non motorised controls in generic MIDI surfaces (#4828).
git-svn-id: svn://localhost/ardour2/branches/3.0@12716 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
1c2951e0ea
commit
72642335d1
4 changed files with 47 additions and 1 deletions
|
|
@ -55,6 +55,7 @@ using namespace std;
|
|||
GenericMidiControlProtocol::GenericMidiControlProtocol (Session& s)
|
||||
: ControlProtocol (s, _("Generic MIDI"))
|
||||
, _motorised (false)
|
||||
, _threshold (10)
|
||||
, gui (0)
|
||||
{
|
||||
_input_port = MIDI::Manager::instance()->midi_input_port ();
|
||||
|
|
@ -647,6 +648,13 @@ GenericMidiControlProtocol::load_bindings (const string& xmlpath)
|
|||
} else {
|
||||
_motorised = false;
|
||||
}
|
||||
|
||||
if ((prop = (*citer)->property ("threshold")) != 0) {
|
||||
_threshold = atoi (prop->value ());
|
||||
} else {
|
||||
_threshold = 10;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ((*citer)->name() == "Binding") {
|
||||
|
|
@ -1011,3 +1019,9 @@ GenericMidiControlProtocol::set_motorised (bool m)
|
|||
{
|
||||
_motorised = m;
|
||||
}
|
||||
|
||||
void
|
||||
GenericMidiControlProtocol::set_threshold (int t)
|
||||
{
|
||||
_threshold = t;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue