Remove more global automation from MidiImport (#6605)
This commit is contained in:
@@ -283,7 +283,6 @@ public:
|
||||
|
||||
|
||||
bpm_t getTempo();
|
||||
AutomationClip * tempoAutomationClip() override;
|
||||
|
||||
AutomationTrack * globalAutomationTrack()
|
||||
{
|
||||
@@ -352,6 +351,11 @@ public:
|
||||
return m_timeSigModel;
|
||||
}
|
||||
|
||||
IntModel& tempoModel()
|
||||
{
|
||||
return m_tempoModel;
|
||||
}
|
||||
|
||||
void exportProjectMidi(QString const & exportFileName) const;
|
||||
|
||||
inline void setLoadOnLaunch(bool value) { m_loadOnLaunch = value; }
|
||||
|
||||
@@ -63,12 +63,6 @@ public:
|
||||
|
||||
void loadSettings( const QDomElement & _this ) override;
|
||||
|
||||
|
||||
virtual AutomationClip * tempoAutomationClip()
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
int countTracks( Track::TrackTypes _tt = Track::NumTrackTypes ) const;
|
||||
|
||||
|
||||
|
||||
@@ -358,7 +358,11 @@ bool MidiImport::readSMF( TrackContainer* tc )
|
||||
pd.setValue( 2 );
|
||||
|
||||
// Tempo stuff
|
||||
AutomationClip * tap = tc->tempoAutomationClip();
|
||||
auto tt = dynamic_cast<AutomationTrack*>(Track::create(Track::AutomationTrack, Engine::getSong()));
|
||||
tt->setName(tr("Tempo"));
|
||||
auto tap = new AutomationClip(tt);
|
||||
tap->setDisplayName(tr("Tempo"));
|
||||
tap->addObject(&Engine::getSong()->tempoModel());
|
||||
if( tap )
|
||||
{
|
||||
tap->clear();
|
||||
|
||||
@@ -837,14 +837,6 @@ bpm_t Song::getTempo()
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
AutomationClip * Song::tempoAutomationClip()
|
||||
{
|
||||
return AutomationClip::globalAutomationClip( &m_tempoModel );
|
||||
}
|
||||
|
||||
|
||||
AutomatedValueMap Song::automatedValuesAt(TimePos time, int clipNum) const
|
||||
{
|
||||
return TrackContainer::automatedValuesFromTracks(TrackList{m_globalAutomationTrack} << tracks(), time, clipNum);
|
||||
|
||||
Reference in New Issue
Block a user