MCPcopy Create free account
hub / github.com/LMMS/lmms / setAutomatedValue

Method setAutomatedValue

src/core/AutomatableModel.cpp:314–340  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

312
313
314void AutomatableModel::setAutomatedValue( const float value )
315{
316 m_oldValue = m_value;
317 ++m_setValueDepth;
318 const float oldValue = m_value;
319
320 const float scaled_value = scaledValue( value );
321
322 m_value = fittedValue( scaled_value );
323
324 if( oldValue != m_value )
325 {
326 // notify linked models
327 for( AutoModelVector::Iterator it = m_linkedModels.begin();
328 it != m_linkedModels.end(); ++it )
329 {
330 if( (*it)->m_setValueDepth < 1 &&
331 (*it)->fittedValue( m_value ) != (*it)->m_value )
332 {
333 (*it)->setAutomatedValue( value );
334 }
335 }
336 m_valueChanged = true;
337 emit dataChanged();
338 }
339 --m_setValueDepth;
340}
341
342
343

Callers 3

processAutomationsMethod · 0.80
syncPluginMethod · 0.80
syncPluginMethod · 0.80

Calls 3

beginMethod · 0.45
endMethod · 0.45
fittedValueMethod · 0.45

Tested by

no test coverage detected