TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: OctaSine, a FM-based VST2 synthesizer written in Rust

6 pointsby greatest-apealmost 4 years ago

1 comment

greatest-apealmost 4 years ago
OctaSine is a frequency modulation based VST2 synthesizer plugin that I’ve been developing over the last couple of years. It has now reached a somewhat stable state, so I wanted to share it here. The typical way of using it would be to load it in your DAW of choice (Ableton Live, REAPER et cetera).<p>Features:<p><pre><code> * Works on macOS, Windows and Linux * GUI with Iced * Four operators with independent parameters such as volume, panning, modulation index, feedback, three different frequency modifiers (ratio, free and fine) and ADSR volume envelope parameters. The operators can be independently switched to white noise mode * Flexible routing allowing setting the output operator (with some limitations) as well as the percentage of signal that is simply added to the final output, enabling additive synthesis. By default, operator 4 is routed to operator 3, operator 3 to operator 2 and operator 2 to operator 1. * Modulation panning (!), not present in FM8 * Master volume and master frequency parameters * Four LFOs capable of targeting most operator parameters as well as most parameters of lower index LFOs. * 128 voices * Fully automatable * Preset handling * SIMD-accelerated audio synthesis with runtime feature detection </code></pre> Thoughts on development:<p>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.<p>I though I’d write about some things that happened along the way.<p>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.<p>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.<p>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.<p>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.
评论 #27470936 未加载