Wave Draw Osc vs. Wave Player (loading time, ram, cpu)
Archive · 201112 old posts
From the original SynthMaker forum (2004–2014), with its members’ names and dates.
Dave ·
Hi,
i want to add some looped waves (singlecycle) to my synth... what's the best way to do this?
Should i just put some Wave Players into my schemata? Or put all waves into a Wave Table?
Or should i convert them all to .txt-files to use with the Wave Draw Osc?
What's easier? What's faster when loading the synth into the DAW? What uses lesser ram/cpu?
Thanks,
Dave
infuzion ·
Waves & WaveTables are 2 different things; Waves = samples, WT = OSC.
Dave ·
Yes i meant with "WaveTables" the Wave Draw Osc.
trogluddite ·
For single cycles (i.e. synth oscillators), then Wavetables are the way to go - not because of loading times, CPU or memory - but because they give much better sound quality.
Wave tables are not a collection of different oscillator shapes - rather, each table contains several versions of the same waveform, optimised for playing at different pitches. This enables you to play notes across a wide note range without any nasty aliasing distortion. The maths for 'optimising' the wave is much too complex to do in real-time as you play the synth, so the wave table allows all the difficult calculations to be done when the waveform is loaded.
A simple wave player does not have this ability - the sound will get progressively worse as you move away from the recorded pitch. Even using clever filtering and interpolation can only fix this to a limited degree - plus they would add a lot of extra CPU load compared to wavetables.
Wavetables will use some extra memory, and slow loading a little - but if it is just single cycles, it shouldn't be too big a worry unless you have hundreds of them. And the plus side is much lower CPU while your synth is playing, which also allows more voices to play at once.
SM already has components to load your samples as .wav files and comvert them to wave tables - and I think you can use the 'wave array' to store many waveforms at once for easy switching between them.
Dave ·
trogluddite wrote: SM already has components to load your samples as .wav files and comvert them to wave tables - and I think you can use the 'wave array' to store many waveforms at once for easy switching between them.
Where? I remember a tool from a board-member here but i can't find it. It was an exe-file which converts .wav into .txt (with some edit options, detuning etc).
But how to tune all the .wav-files that they fit into this 512/1024/2048 data points?
Some cycles are longer and some shorter... depending on how much is "in" there (e.g. single saw vs. sampled chord loop).
tektoog ·
Hey Dave,
Check this thread it might help you:
Wave Draw NOT drawing?
infuzion ·
Dave wrote: Yes i meant with "WaveTables" the Wave Draw Osc.
Trogie said what I was trying to say:
Use Wave for sample playback
Use WaveTables if you want Oscillator - type synth
trogluddite ·
Dave wrote: But how to tune all the .wav-files that they fit into this 512/1024/2048 data points?
The 'workflow' is a little convoluted but essentially it is...
Wave loader -> Mem to Float Array -> Resample Float Array -> Wave Table Create -> Wave Table Oscillator.
If the wavetables are to be fixed (i.e. end user cannot load new ones) then the results of the 'Resample' can be stored inside the plugin using 'Float Array Sample and Hold'; that way the conversion and resampling does not have to be done every time the synth is loaded. A simple 'Selector' can then be used to choose a wave table for each patch.
To have waves loadable from disk, it is a little more complex - the patch will have to store the file path in a 'VST String Preset', so that the right .wav is loaded on preset changes, and then converted on the fly. This will make patch changes quite a bit slower, but would make the oscillators extremely versatile.
CoreStyler ·
If you follow the schematic described by trog you will easily save wave to a text containing the array of a wavetable.
Take default wave player and connect draw wave module (inside) where output data is [F] (float arrays) to a resample primitive, then use text save.
Jay ·
Hi Dave
here is a little wave to wavetable maker that i made for my own use,you can audition the resulting wavetable aswell.
hope that helps 🙂
Best Regards Jay
infuzion ·
Thanks Jay!
That new WT Resampler really makes things easier!
trogluddite ·
Just a thought - I have not yet tried this, but it occurs to me that the output of the Wave Table is just a regular 'mem' data type. I wonder if it is possible to simply use the Save Wave to save the contents of the wavetable as a .wav file.
If so, that could maybe speed up the loading of wavetables from disk as there would be no parsing of text to an array, followed by calculating the wave table at every load time - all that stuff would be already pre-calculated in the .wav file.
I have done some experiments before using the float32 format - and have successfully saved and loaded all sorts of weird and wonderful data that is not conventional audio (they are true floats, so not limited to the -1/+1 range of most .wavs).
This would be much like the "create wavetable.dat files for faster loading" option you can tick when exporting.
Wrote something here? To have a post removed or your name hidden, write to [email protected].