Thanks for your friendly comments, Robert! First of all, I probably need to clarify that I'm not trying to make a traditional synth application out of these wavetables, but I will use some of them in my own compositions in one way or another. > > 1. "The wavetables are written to an array expected to be of type > double, float, or long double, and of odd length." > why an odd length??? > Maybe that's not necessary when I think about it. But the oscillator I've written expects a wavetable where the first and last entry are identical, for the purpose of convenient interpolation. For waveforms that are symmetric about their midpoint it's practical that both halves of the waveform fit into exactly the same number of samples, and then there's the guard point at the end that makes the size odd.

> expect to do linear interpolation with the large and upsampled > wavetable to get rid of quantization error. > Yes, the oscillator does linear interpolation. > > 2. "Choose a waveshape, find its Fourier series, and add up a limited > number of partials to make a strictly bandlimited waveform." > this is good advice. it is the advice i give when using wavetable to > do "classic analog" waveforms like saw and triangle and square and PWM > and even master-slave sync-saw or sync-square. It is pretty easy to > use the FFT and iFFT to do this. use a big-long FFT (like 1 Meg > long). you can prune it down to 2048 or 4096 later. we can discuss > the detail of how to do this wavetable harmonic pruning in a later > music-dsp post. > Yeah, I realise the FFT is the way to go to make arbitrary waveforms bandlimited. I've done a few Fourier series by pen and paper so far, but I think I'll leave out the FFT from this small library. > I also wrote a paper in the 90s about wavetable synthesis and > mathematics regarding it (the "Wavetable 101" paper). > Thanks, I'll take a look at that paper. > 4. wavetables can be interpolated between each other to morph tones > between different MIDI NoteOn pitches, between different MIDI key > velocities, between different MIDI mod-wheel settings, and between > wavetables extracted at different times during the note evolution > between NoteOn, NoteOff, and when the note finally dies after > NoteOff. One will need to extract wavetables more densely around the > NoteOn attack portion than during the decay of the note. to do this > right, the wavetables need to be aligned to each other, perhaps > spinning one wavetable so that its circular cross-correlation is > maximum to its adjacent wavetable that it is being interpolated with. And that's already four dimensions of wavetables! I've barely tried some timbral morphing and pitch interpolation, and not even simultaneously. But perhaps you can get away with a two dimensions of wavetables, one that drops off harmonics as pitch increases and another one for miscellaneous modulation effects? > > 5. you can also interpolate between wavetables to **selectively** > detune some partials away from their harmonic value and not other > partials (that remain harmonic to the fundamental). you do that by > crossfading to other wavetables that are identical but with some > harmonics shifted in phase. a change in phase means a detuning of the > frequency of the partial from the harmonic value. to do that, the > dimension involved should be made circular like with cylindrical > coordinates. > > i have some C code that demonstrates this interpolation (all linear) > in up to 3 cartesian dimensions (cylindrical in one dimension is an > easy modification), if anyone is interested. it's conceptually very > simple. if there is a clamoring, i can post it here or send it to > whomever requests. just lemme know. > I hadn't thought of that way of doing it. Wouldn't you have to crossfade between the wavetables with phase offsets several times each cycle for this to work? And I don't quite see what you mean by cylindrical coordinates here, so if you don't mind, please elaborate. Risto _______________________________________________ dupswapdrop: music-dsp mailing list music-dsp@music.columbia.edu https://lists.columbia.edu/mailman/listinfo/music-dsp