AudioKit / AudioKitSynthOne

AudioKit Synth One: Open-Source iOS Synthesizer App
http://audiokitpro.com/synth
MIT License
1.65k stars 214 forks source link

Feature request: export current preset as Swift code #164

Closed jupdike closed 4 years ago

jupdike commented 4 years ago

It would be amazing to use Synth One to create or tweak a preset and then press some sort of new Export Code button and get a chunk of text of Swift AudioKit code that would allow that exact instrument to be built independently of the Synth One app, including all parameters. Bonus points if this were available as a Playground export.

Perhaps this would require deeper changes to AudioKit to allow individual nodes to track their metadata (class names?), parameters and the ability to walk a node graph and retrieve this information. Probably some Synth One-specific code too. Once the node parameters and topology were available it might be possible to turn a directed acyclic graph into an ordered list and then generate variable names and concatenate all the strings as a block of code. Bonus points for removing nodes that don’t change the sound, to deliver the simplest, cleanest code.

Perhaps this is easier with the code for AnalogSynth X as a starting point, since it is much simpler.

aure commented 4 years ago

Yeah, definitely this would not be possible with the Synth One audio engine. Interesting idea for sure though!