updateFromAudio method
void
updateFromAudio({})
Implementation
void updateFromAudio({
required double phase,
required double amplitude,
required double pan,
required double breath,
required double modulation,
required double neuro,
required double frequency,
}) {
AppConfig.logger
.t('NeomFrequencyPainterEngine.updateFromAudio: '
'phase=$phase, amplitude=$amplitude, pan=$pan, '
'breath=$breath, modulation=$modulation, neuro=$neuro');
_state = NeomVisualState(
frequency: _normalizeFrequency(frequency),
phase: _smooth(current: _state.phase, target: phase, factor: 0.2),
pan: _smooth(current: _state.pan, target: pan, factor: 0.25),
modulation: _smooth(current: _state.modulation, target: modulation, factor: 0.2),
amplitude: _smooth(
current: _state.amplitude,
target: amplitude,
factor: smoothAmp,
),
breath: _smooth(
current: _state.breath,
target: breath,
factor: smoothBreath,
),
neuro: _smooth(
current: _state.neuro,
target: neuro,
factor: smoothNeuro,
),
);
notifyListeners();
}