setFrequency method
Set the frequency for generator.
Implementation
@override
void setFrequency(final double frequency, {final double? time}) {
if (time == null) {
generator.frequency.value = frequency;
} else {
final startTime = context.currentTime.value;
final endTime = startTime + time;
generator.frequency.automate(
startTime: startTime,
startValue: generator.frequency.value,
endTime: endTime,
endValue: frequency,
);
}
}