Scripts for generating wavetables using the osc-gen library: https://github.com/harveyormston/osc_gen
First, create a write_waves.ini
configuration file. This file will allow you to configure where the wavetables are written, the samples per wave, and the number of waves in a table. Example:
[ph]
wave_size=256
table_size=64
error_when_missing_waves=True
output_dir=/my/computer/PHWaves
Now, you can run write_waves.py
to generate the wavetables. The write_waves
script can load one of the modules in the wavetables
directory. As arguments, provide the name of the wavetable module, the target, and optionally a file name (the default is wavetable module name). Example:
python -m write_waves odd_even ph
A file in the the wavetables
directory needs to implement the generate_waves
function and return a list of waves. The generate_waves
function is passed wave_size
and table_size
as arguments, this way you can render waves at the best resolution and dynamically create waves to fill the table.
Run pip install -r requirements.txt
On an Mac M1 you may need this hack for locating the 'sndfile' library: bastibe/python-soundfile#322