Experimental automation recording support
Allows you to record automation by arming an automatable model and then recording with the RecordAndPlay button. Known bugs: * when you record and there is already an auto clip, it repeats it * it freezes when you try to do it with the Volume or Panning slider * crashes when you try to do it with a solo/mute button
This commit is contained in:
@@ -212,13 +212,16 @@ public:
|
||||
return "0";
|
||||
}
|
||||
|
||||
inline bool armed( void ){ return m_armed; }
|
||||
inline void setArmed( bool _armed ){ m_armed = _armed; }
|
||||
|
||||
|
||||
public slots:
|
||||
virtual void reset( void );
|
||||
virtual void copyValue( void );
|
||||
virtual void pasteValue( void );
|
||||
void unlinkControllerConnection( void );
|
||||
|
||||
void handleDataChanged( void );
|
||||
|
||||
protected:
|
||||
virtual void redoStep( journalEntry & _je );
|
||||
@@ -252,6 +255,7 @@ private:
|
||||
|
||||
controllerConnection * m_controllerConnection;
|
||||
|
||||
bool m_armed; // record this model during automation recording?
|
||||
|
||||
static float __copiedValue;
|
||||
|
||||
|
||||
@@ -104,7 +104,8 @@ public slots:
|
||||
void execConnectionDialog( void );
|
||||
void removeConnection( void );
|
||||
void editSongGlobalAutomation( void );
|
||||
|
||||
void arm( void );
|
||||
void deArm( void );
|
||||
|
||||
protected:
|
||||
automatableModelView * amv;
|
||||
|
||||
@@ -48,14 +48,14 @@ public:
|
||||
automationTrack* auto_track;
|
||||
// the tco that we're putting this automation in
|
||||
automationPattern* pat;
|
||||
} ControllerMetaData;
|
||||
typedef QMap<const controller *, ControllerMetaData> ControllerMap;
|
||||
} ClipData;
|
||||
typedef QMap<const automatableModel *, ClipData> AutoClipMap;
|
||||
|
||||
AutomationRecorder();
|
||||
~AutomationRecorder();
|
||||
|
||||
// midi controllers call this
|
||||
void controllerEvent( const controller * _controller, float _val );
|
||||
// automatable models call this when their data changes
|
||||
void modelDataEvent( automatableModel * _model );
|
||||
|
||||
// must be called at some point between a recording ending and a new
|
||||
// one beginning
|
||||
@@ -67,7 +67,7 @@ public:
|
||||
private:
|
||||
|
||||
bool m_recording; // while the song is playing, should we record automation?
|
||||
ControllerMap m_controllers; // remember state during recording
|
||||
AutoClipMap m_clips; // remember state during recording
|
||||
|
||||
friend class engine;
|
||||
} ;
|
||||
|
||||
Reference in New Issue
Block a user