Some elementary wavetables

At some point I was missing a sound where all harmonics have the same amplitude as generated by the opcode buzz buzz in Csound. That made me look into wavetable generation by code and I came up with a couple of wavetables included here: RZ.vitalbank (5.6 MB).

The wavetables differ by the selection of harmonics:

  • Ultrasaw: all integers
  • Ultrasquare: odd integers
  • Squares: only square numbers
  • Primes: fundamental + prime numbers
  • Fibonacci: the Fibonacci series
  • Weierstrass: only powers of two (The waveform is related to the Weierstrass function.) Combined with a bandpass filter this generates a Shepard tone Shepard tone - Wikipedia.

The wavetables consist of 256 frames * 2048 samples. The first frame has the constant amplitude harmonics I was originally looking for. The last one is always a pure sine. In between the amplitudes decrease by 1/f^x where frame #128 has x=1. So Ultrasaw[128] sounds exactly like a saw wave (although it looks different due to the phase randomisation), Ultrasquare[128] like a square wave, and Ultrasquare[171] roughly like a triangle wave.

If you are interested in the python code you can find it here: gen_wavet.zip (853 Bytes).

2 Likes

There was the Serum Wavetable Studio Glow Shrimp Software
It follows a similar approach of combining different “basic atoms” to more complex wts.

The author has several more things to offer:
If you can code use the javascript wt studio: Glow Shrimp Software
And there’s somewhere a wavetable studio 2, but I think this is still beta Glow Shrimp Software

Thanks for mentioning this! I don’t use Serum, neither am I too proficient with Javascript. But I see that the idea is basically the same as mine. Outcommenting lines 3 and 4 will give a saw wave (I guess). But there is one quirk I did not mention above: If you have a weaker decay than 1/harmonic you have to randomise the phases. Otherwise you will get strong peaks in the waveform which spoil the RMS at limited amplitude. But that of course could also be implemented in line 3 (supposing knowledge of how to generate a random number in Javascript :wink:). Also the selection of harmonics could probably be done by using a conditional expression in line 4 but I guess to identify prime numbers would not work out of the box.

Just to make sure … the tool is not serum specific as there seems to be a (more or less) “standard” approach to “encoding” wavetables in a standard wav file interpreting each 2048 samples as a single cycle. So serum wavetable can actually be used in any WT synth that share the same standard like for instance Vital or Icarus 2