Re:Show HN: OctaSine, a FM-based VST2 synthesizer written in...
by vort3 on Friday June 11, 2021 @05:10AM
(#27470936)
Maybe you could upload a demo with sample workflow and sounds to youtube.
Re:Show HN: OctaSine, a FM-based VST2 synthesizer written in...
by greatest-ape on Friday June 11, 2021 @06:43AM
(#27471554)
That’s a great idea, I will definitely consider it! I have a couple of sample sounds/tracks at SoundCloud: https://soundcloud.com/octasine
Features:
Thoughts on development:When I came across vst-rs, I realised that I could try out writing an audio plugin. Since I was already familiar with FM synthesis from Elektron Monomachine and FM8, I decided to go with it. It has worked out pretty well.
I though I’d write about some things that happened along the way.
At some point, I decided that I wanted to accelerate the synthesis with SIMD. I started out with using packed_simd, but switched to simdeez to abstract over vector widths and enable runtime detection. However, I wanted more flexibility and the option of splitting SIMD code into multiple functions. My solution was to skip frameworks and instead use custom traits and the duplicate crate to abstract over Rust simd instrinsics for different instruction sets. I use sleef for fast sines.
I eventually decided that I wanted a GUI. The Rust GUI situation is not very mature and special considerations required for vst plugin windows complicate the situation further. I discovered baseview at some point. With the mentoring of wrl and others, I was able to contribute code to get it working on macOS.
I went with iced for the GUI, using the excellent iced_baseview. Iced has been a pretty good experience so far, but the high resource consumption due to how GPU calls are (not) batched is a pain point. If I started over, I might consider other options such as egui.
Preset and parameter handling with VST is tricky since locking must be avoided. It took a while to get there, but I think my current abstraction is workable.