Automation Recording

This commit is contained in:
Vesa
2014-05-04 21:59:39 +03:00
parent 1371b5b0fd
commit 4564ed14cd
5 changed files with 83 additions and 19 deletions

View File

@@ -133,6 +133,15 @@ public:
float controllerValue( int frameOffset ) const;
// get value always in float - for automation recording
inline float getValue( int frameOffset = 0 ) const
{
if( unlikely( m_hasLinkedModels || m_controllerConnection != NULL ) )
{
return controllerValue( frameOffset );
}
return m_value;
}
template<class T>
T initValue() const

View File

@@ -155,13 +155,21 @@ public:
static AutomationPattern * globalAutomationPattern( AutomatableModel * _m );
static void resolveAllIDs();
bool isRecording() const
{
return m_isRecording;
}
void setRecording( const bool b )
{
m_isRecording = b;
}
public slots:
void clear();
void openInAutomationEditor();
void objectDestroyed( jo_id_t );
private:
void cleanObjects();
void generateTangents();
@@ -179,6 +187,9 @@ private:
ProgressionTypes m_progressionType;
bool m_dragging;
bool m_isRecording;
float m_lastRecordedValue;
static const float DEFAULT_MIN_VALUE;
static const float DEFAULT_MAX_VALUE;

View File

@@ -50,7 +50,7 @@ protected slots:
void resetName();
void changeName();
void disconnectObject( QAction * _a );
void toggleRecording();
protected:
virtual void constructContextMenu( QMenu * );
@@ -69,6 +69,8 @@ private:
AutomationPattern * m_pat;
QPixmap m_paintPixmap;
bool m_needsUpdate;
static QPixmap * s_pat_rec;
void scaleTimemapToFit( float oldMin, float oldMax );
} ;