Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.wts files #4627

Open
baconpaul opened this issue Jun 1, 2021 · 3 comments
Open

.wts files #4627

baconpaul opened this issue Jun 1, 2021 · 3 comments
Labels
DSP Issues and feature requests related to sound generation in the synth Oscillator Features or additions to the oscillator section

Comments

@baconpaul
Copy link
Collaborator

so I had a neat idea today

Right now wavetables are .wt or .wav files which contain all the data. In XT I've introduced the LUA wavetable generator (#4578)(and may introduce more languages too). So lets introduce a new format, the '.wts' file

A '.wts' file is a surge wavetable, completely. But it contains no data. Rather it looks like this

--surgewts language=LUA ntables=10 resolution=1024
function generate(x,n)
   -- blah blah my function here
end

It is just a text file with a special header. That header starts with --surgewts, //surgewts, ;;surgewts or #surgewts and then has kv pairs

Surge would show this file in the menu and patch browser just like any other file. You could drop it on and it's just like dropping on a wt or a wave. When you load it in the wavetable oscillator, it runs the generator to populate the data. If you want to share the data to a non-surge synth you can use the existant export function

But this means: We can write a swath of formulaic wavetables in the factory library and have them be 2kb each rather than 2mb.

@baconpaul baconpaul added DSP Issues and feature requests related to sound generation in the synth Oscillator Features or additions to the oscillator section labels Jun 1, 2021
@baconpaul baconpaul added this to the Surge XT 1.0 milestone Jun 1, 2021
@CurlyMC
Copy link

CurlyMC commented Sep 4, 2021

Hello @baconpaul, would this LUA programming language be able to read Wavosaur looppoints, embedded in de wav header and populate this into a .wts file format, that would be freaky awesome ??

I would be interested to hear your opinion about using or expanding this wts format also for including data for looping a wav audio file ( parameters for sample-start, sample-end, loop-direction and filepath to the wav file ).
This way the wts file could be kept small and data could be pointing at wav files in a special wts? directory, so its possible to play partially looped wav files, just like Surge's ability to play one shots or wavtables.
( Idea I did post in the past : Loop support in imported wav files #2777, sorry I repeat, it was just an idea when reading here about your post about wts files )

A user exploring the XT beta's almost every day :-)
Recently amazed by the all new wave shapers and expanded fx section.
Thank you Surge Synth Team !! Kind Reagrds, Luc.

@mkruselj
Copy link
Collaborator

mkruselj commented Sep 4, 2021

.wts file format is about generating the wavetable algorithmically using math formulas, not using WAV files.

@CurlyMC
Copy link

CurlyMC commented Sep 4, 2021

ok thanx @mkruselj for your fast reaction, I do understand.
My plot was evil, but just did give it a try :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DSP Issues and feature requests related to sound generation in the synth Oscillator Features or additions to the oscillator section
Projects
None yet
Development

No branches or pull requests

3 participants