Tonejs / Tone.js

A Web Audio framework for making interactive music in the browser.
https://tonejs.github.io
MIT License
13.37k stars 976 forks source link

Create oscillator from .wav / PCM wavetable #1137

Open dotKokott opened 1 year ago

dotKokott commented 1 year ago

Hello,

I am not sure if this is already possible. I am looking to create a wavetable synth that accepts classic .wav wavebanks (same format WaveEdit uses).

I understand that I can create custom oscillators by setting the partials. However the relationship between partial and PCM is not quite clear to me.

Earlier versions of tone.js seemed to take a Buffer as a constructor for OscillatorNode, however not anymore, which I suspect might be the feature I am looking for?

Context is that I am trying to load .wav files that are wavetable banks to turn them into oscillators. I would love to reimplement a feature WaveEdit has which is being able to draw / influence the wave through either drawing the wave and/or changing partial amplitudes.

Thank you!