So as I was just about to fall asleep last night, it occurred to me that it's possible to implement a low-pass filter with variable cut-off, without using multiplication.
Assuming an engine that supports multiple volume levels per channel, the idea is as follows:
current_volume = 0
max_volume_delta = x
loop {
new_volume = n // use whatever standard method here
if abs(current_volume - new_volume) > max_volume_delta {
if new_volume > current_volume {
new_volume = current_volume + max_volume_delta
} else {
new_volume = current_volume - max_volume_delta
}
}
... // output sound
}
This could potentially be used to add filter envelope emulation to existing synthesis algorithms such as Phaser. The question though is how to efficiently implement that big fat nested conditional.
It's fairly easy for a saw wave generator, because we can assume that when (abs(current_volume - new_volume) > max_volume_delta) is true, then (new_volume < current_volume) is also true for a real-world implementation (in other words, max_volume_delta is never exceeded on the rising edge of the saw). So that's what the attached example demonstrates.