From 2b660e3756b2f0f34495522bdd5e3fd84ed858b8 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Thu, 16 Jul 2009 10:07:56 -0700 Subject: [PATCH] automationPattern - deleted glitchy code why is that code even there? until the next mixer-period, then the model's value is reset to the actual automation track I have no idea. I think it should be removed honestly. again, there is no comment explainign the true intent * superjoe experiments it was probably a poor attempt to make it so when you adjust the only automation point for a track, that the value of the model will change immediately' I think it is safe to move the newTime==0 chunk if we want to make the automationEditor immediately change the value, there needs to be more logic and it would belong in automationEditor -- not automationPattern but this fixes the superAutomation why-in-the-hell bug --- TODO | 3 ++- src/core/automation_pattern.cpp | 26 ++++---------------------- 2 files changed, 6 insertions(+), 23 deletions(-) diff --git a/TODO b/TODO index cbabc1646..4d42b3248 100644 --- a/TODO +++ b/TODO @@ -53,7 +53,8 @@ Andrew Kelley's todo: * load asdlol.mmpz. if you render it without playing it, or if you play it - the first time, you hear unwanted artifacts. + the first time, you hear unwanted artifacts. (solution: apply automation + before playing) * VST presets don't work. when you save a project, it doesn't even save what you did. diff --git a/src/core/automation_pattern.cpp b/src/core/automation_pattern.cpp index 604070914..dbea43a6d 100644 --- a/src/core/automation_pattern.cpp +++ b/src/core/automation_pattern.cpp @@ -150,33 +150,14 @@ midiTime automationPattern::length( void ) const midiTime automationPattern::putValue( const midiTime & _time, - const float _value, - const bool _quant_pos ) + const float _value, const bool _quant_pos ) { midiTime newTime = _quant_pos && engine::getAutomationEditor() ? - note::quantized( _time, - engine::getAutomationEditor()->quantization() ) : - _time; + note::quantized( _time, engine::getAutomationEditor()->quantization() ) + : _time; m_timeMap[newTime] = _value; - if( newTime == 0 ) - { - for( objectVector::iterator it = m_objects.begin(); - it != m_objects.end(); ) - { - if( *it ) - { - ( *it )->setValue( _value ); - ++it; - } - else - { - it = m_objects.erase( it ); - } - } - } - // just one automation value? if( m_timeMap.size() == 1 ) { @@ -544,3 +525,4 @@ void automationPattern::objectDestroyed( jo_id_t _id ) #include "moc_automation_pattern.cxx" +/* vim: set tw=0 noexpandtab: */