You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the API requires the user to pass a closure for synthesis.
I'd like to re-work this to be data-oriented (savable and loadable as a file), and synthesis constructable with the builder pattern. Users must be able to pass in their own variables, and still be able to get step events in custom closures for flexibility and backwards-compatibility.
The text was updated successfully, but these errors were encountered:
I have thought about the right way to do this probably too way much without writing code. I want to avoid writing a VM within Twang due to performance concerns. So how should a synthesis format work?
API
The new API will heavily use the type system.
use twang::Synth::{Sig,Mix};letmut audio = Audio::<Ch16,2>::with_silence(48_000,48_000*5);// Two sine oscillators, an octave apartlet oscs = [Sig(440.0).sine(),Sig(880.0).sine(),];// Mix the two togetherlet synth = Mix(&oscs);
synth.stream(audio.sink());
Format
For the format, twang will attempt to use postcard (as an optional feature). An intermediate MuON based format for human-readable/writeable will be able to be used with it.
Currently the API requires the user to pass a closure for synthesis.
I'd like to re-work this to be data-oriented (savable and loadable as a file), and synthesis constructable with the builder pattern. Users must be able to pass in their own variables, and still be able to get step events in custom closures for flexibility and backwards-compatibility.
The text was updated successfully, but these errors were encountered: