Initial implementation for two additional methods in AutomatableModel, AutomationPattern:

These methods are used to fetch the automated value of a model at a given MidiTime
These are still untested but that shouldn't be a problem since they aren't actually used by anything yet... but I'll be doing some testing and bugfixing (if needed) for them later.
These will be an important step in making sampletracks eventually be reliably playable from any position, and more generically, being able to reliably convert MidiTime to real time. Of course they can be useful for other things too (not sure what though, yet).
This commit is contained in:
Vesa
2014-05-15 03:02:42 +03:00
parent fd89e4c5e6
commit aefc9832f8
4 changed files with 112 additions and 0 deletions

View File

@@ -29,6 +29,7 @@
#include "JournallingObject.h"
#include "Model.h"
#include "MidiTime.h"
// simple way to map a property of a view to a model
@@ -239,6 +240,7 @@ public:
return m_hasLinkedModels;
}
float globalAutomationValueAt( const MidiTime& time );
public slots:
virtual void reset();

View File

@@ -152,6 +152,7 @@ public:
static bool isAutomated( const AutomatableModel * _m );
static QVector<AutomationPattern *> patternsForModel( const AutomatableModel * _m );
static AutomationPattern * globalAutomationPattern( AutomatableModel * _m );
static void resolveAllIDs();