SynthMaker

Wave file to wave table converter

Archive · 2012 9 old posts

From the original SynthMaker forum (2004–2014), with its members’ names and dates.

acg2010 ·

After reading Oddson's description on wave file to wave table conversion, I thought I would try and build a tool to do this. Everyone probably already has one of these in their toolboxes. It is nothing special and is built from stock modules and others work. The progess bar is from the work of Tektoog. It is just set up for show since the actual conversion from wave file to wave table is fast. I used it to convert single cycle waveforms to wave tables to use in a wave table synth I am working on. I know it is best to use wave tables in multiples of two (i.e. 256, 512, 1024, etc) but when I converted single cycle waveforms available from Adventure Kid, the readout says its size is 600, but sounds OK in my wave table synth. Is part of the wave table just ignored if it is not a multiple of two?

acg2010 ·

I realized that it might be nice to be able to see the waveform of the wave table when it is created so I added a wavedraw display module and rearranged the interface.

oddson ·

acg2010 wrote: After reading Oddson's description on wave file to wave table conversion...

My what now? 😕

trogluddite ·

acg2010 wrote: Is part of the wave table just ignored if it is not a multiple of two?

That all comes down to the wavetable primitive...

...this takes your raw wave data from the array, and coverts it into many copies of the wave all with different filtering. The filtering removes the high frequencies that would cause aliasing - and so the correct "copy" of the wave is chosen so that there is the correct amount of filtering to match the playback frequency - all of the audible harmonics will be preserved, but the "out of range" ones are filtered out. The reason for the power-of-two requirement, is that the filtering is done using FFT techniques - and that algorithm only works for 2^n sized blocks of samples. If you use a different size of array, it will padded with zero's up to the next valid size - which will work, but it's possible that the big chunk of zero's might affect the 'window function' of the FFT, leading to slight inaccuracies of the filtering.

BTW - note that the primitive's output is just a 'mem' connector - the same as a loaded wave would give you. It is possible to save this 'mem' using the Save Wave primitive as if it were just a regular audio sample (it can even be saved as full resolution 32bit float data). This way, the filtered table can be loaded straight from disk, rather than converting an array following every text load. Of course, that depends exactly what you want to do with the data (i.e. making a wave display from the filtered table would be much more complicated than direct from an array).

And thanks for the module - making tables is the perfect thing to be done "off-line" instead of real-time within ones main plugin project.

tester ·

Would be cool to create a library of nice sounding shapes for wavetable loader. ...or is there any?

acg2010 ·

Oddson wrote: My what now?

lol. Sorry Oddson, should have realized that with all the posts you make, a vague reference like I made would not ring a bell. The post I was referring to is:Re: How can i build a Osc(samplebased)

Re: How can i build a Osc(samplebased) by oddson on Fri Jul 03, 2009 3:46 pm

Is this the same question as your other one in the 'Sound' forum?

If you have a wave file with a single cycle sample (one complete waveform - preferably recorded at a pitch that translates into an even number of samples) you can read this into SynthMaker with the Wave File primitive.

Then the Mem to Float Array Min/Max can turn it into an array (make sure the step input is 1). Then the Resample primtive can interpolate it to a size that's a power of 2 (1024 or 2048 are recommended). Then the Wave Table and Wave Table Read primitives can make that into a band-limited oscilator.

I used that as my basis to build my wave file to wave table converter project. So I was just giving you credit

trogludite wrote: That all comes down to the wavetable primitive...

Thanks trogluddite for the excellent and detail explanation of the wavetable primative.

I realized that there are other similar projects after searching wave file to wave table in the forums.

acg2010 ·

tester wrote: Would be cool to create a library of nice sounding shapes for wavetable loader. ...or is there any?

I am using wave forms from the following sources:

http://www.adventurekid.se/akrt/waveforms http://www.adventurekid.se/akrt/wavefor ... waveforms/ http://www.galbanum.com/products/archit ... forms2010/ http://lesproductionszvon.com/caustic.htm

BasherT made a graphical oscillator selector that had 80 waveforms from angular momentum (referenced on wiki but the link is no good). Graphical Oscillator Selector

Also I have read here and other places you can create single cylce waveforms with Audacity and Wavosaur and probably others or could just use the SynthMaker wave draw module to create them.

I guess the best thing to do is generate our own libraries of wave tables and maybe we can share them.

acg2010 ·

Added ability to save bitmap of waveform to use as a reference when convering wave files to wave tables to remind you of the shape as well as use in a wave table selector in a synth. I borowed from BasherT's Graphical Osc wavedraw resizer and bitmap generating modules and then added the bitmap capture/save module from the image save module to allow exporting in tiff, bmp, jpeg, or png formats.

tester ·

Thanks for all, also for the links.

Wrote something here? To have a post removed or your name hidden, write to [email protected].

Before your first post

A few rules keep this a friendly place. You agree to them once.

Shown next to what you post, here and in the app. It doesn’t have to be your real name: 3–24 lower-case letters, digits or _ (capitals become lower case, spaces become _).

    Then your post goes up straight away.

    Delete this reply?

    Open it in SynthMaker?

    It goes on the track you’re editing there, in place of that track’s sound, and into My sounds. Your other tracks stay as they are.

    Want to keep that track’s sound? Start a new song in SynthMaker first (Song › New song), then open this.

    Report this reply?

    Only the developer reads reports. The person isn’t told who reported them.

    What’s wrong with it?

    Block this person?

    You won’t see their posts and replies here any more. They aren’t told, and you can unblock them at any time.

    People you’ve blocked

    Their posts and replies are hidden from you. Unblock someone to see them again.

    The community rules

    A few rules keep this a friendly place. Everyone agrees to them once, before their first post.