[Ardour-Dev] Fwd: [Ardour-Cvs] r7840 - ardour2/branches/3.0/libs/evoral/src

Jörn Nettingsmeier nettings at stackingdwarves.net
Fri Sep 24 13:05:09 PDT 2010


any chance of this being backported to 2.0? i can reproducibly crash it 
by doing the nasty with just one or two midi faders...

-------- Original Message --------
Subject: [Ardour-Cvs] r7840 - ardour2/branches/3.0/libs/evoral/src
Date: Fri, 24 Sep 2010 07:05:20 -0700
From: pauld at addisababa.dreamhost.com
To: ardour-cvs at lists.ardour.org

Author: carlh
Date: 2010-09-24 07:05:20 -0700 (Fri, 24 Sep 2010)
New Revision: 7840

Modified:
    ardour2/branches/3.0/libs/evoral/src/Sequence.cpp
Log:
Slightly hacky but functional fix for large quantities of MIDI output 
when interpolating sharp changes in controller value.  Fixes #3476.


Modified: ardour2/branches/3.0/libs/evoral/src/Sequence.cpp
===================================================================
--- ardour2/branches/3.0/libs/evoral/src/Sequence.cpp	2010-09-24 
12:25:25 UTC (rev 7839)
+++ ardour2/branches/3.0/libs/evoral/src/Sequence.cpp	2010-09-24 
14:05:20 UTC (rev 7840)
@@ -39,6 +39,16 @@
  using namespace std;
  using namespace PBD;

+/** Minimum time between MIDI outputs from a single controller,
+    expressed in beats.  This is to limit the rate at which MIDI messages
+    are generated, particularly for quickly-changing controllers which
+    are being interpolated.
+
+    XXX: This is a hack.  The time should probably be expressed in
+    seconds rather than beats, and should be configurable etc. etc.
+*/
+static double const time_between_controller_outputs = 1.0 / 256;
+
  namespace Evoral {

  // Read iterator (const_iterator)
@@ -253,9 +263,9 @@
  	case CONTROL:
  		// Increment current controller iterator
  		if (_force_discrete) {
-			ret = _control_iter->list->rt_safe_earliest_event_discrete_unlocked 
(_control_iter->x, x, y, false);
+			ret = _control_iter->list->rt_safe_earliest_event_discrete_unlocked 
(_control_iter->x + time_between_controller_outputs, x, y, false);
  		} else {
-			ret = _control_iter->list->rt_safe_earliest_event_unlocked 
(_control_iter->x, x, y, false);
+			ret = _control_iter->list->rt_safe_earliest_event_unlocked 
(_control_iter->x + time_between_controller_outputs, x, y, false);
  		}
  		assert(!ret || x > _control_iter->x);
  		if (ret) {

_______________________________________________
Ardour-Cvs mailing list
This list is read-only.
http://lists.ardour.org/listinfo.cgi/ardour-cvs-ardour.org



More information about the Ardour-Dev mailing list