automationPattern - deleted glitchy code

<superjoe> why is that code even there?
<pgib> until the next mixer-period, then the model's value is reset
to the actual automation track
<pgib> I have no idea. I think it should be removed honestly. again,
there is no comment explainign the true intent
* superjoe experiments
<pgib> 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'
<pgib> I think it is safe to move the newTime==0 chunk
<pgib> if we want to make the automationEditor immediately change the
value, there needs to be more logic
<pgib> and it would belong in automationEditor -- not automationPattern

<pgib> but this fixes the superAutomation why-in-the-hell bug
This commit is contained in:
Andrew Kelley
2009-07-16 10:07:56 -07:00
parent e0e93a9730
commit 2b660e3756
2 changed files with 6 additions and 23 deletions

3
TODO
View File

@@ -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.

View File

@@ -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: */