So here's another thing I've been thinking about. The same way we currently have the Oscillator helper functions for producing waveforms in oscillator.h, I was thinking of writing some functions for acquiring bandlimited waveforms.
These would work the same way as the regular oscillator inline functions for getting waveforms, except that they'd need both frequency and phase as arguments. For the implementation, I'm thinking of following: - use additive synthesis to generate static mipmaps of bandlimited versions of all the waveforms we currently use (saw, sqr, tri are easy. moog and exp may be tricky to get right...) - these mipmaps will be regenerated whenever samplerate is changed (this is necessary) - the oscillator functions will then just do linear-interpolated lookups from the wavetables, always using the larger (ie. lower pitch) of the two nearest tables (nearest to frequency used as argument, that is) If done right, these should be not that much slower in practice than our current oscillator code. This might add a bit to our startup time though. Then we can add support for these bandlimited waveforms into some of our instruments (well, ones where it makes sense). LFOs too. ------------------------------------------------------------------------------ _______________________________________________ LMMS-devel mailing list LMMS-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lmms-devel