Could we finally ditch C++ for VSTs?
-
- KVRian
- Topic Starter
- 1091 posts since 28 May, 2010 from Finland
Could we finally ditch C++ for VSTs?
Upon doing uni courses around DSP, I tend to see quite few mentioning of C++. It's usually Python or Matlab and then, if there's a need for real implementation, then they have started to rave about Julia, Quorum and the sorts.
I tend to find that the developments in programming languages ought to be reflected to application domains and then it seems like keeping using old technology just disallows one from taking advantage of new developments.
But what kind of process would this kind of transition be? Does Steinberg or someone necessarily have to report their libraries? Or is it possible to approach this using some "wrapper"?
I think having more elegant syntax makes DSP algorithms noticeably easier to understand and share.
Upon doing uni courses around DSP, I tend to see quite few mentioning of C++. It's usually Python or Matlab and then, if there's a need for real implementation, then they have started to rave about Julia, Quorum and the sorts.
I tend to find that the developments in programming languages ought to be reflected to application domains and then it seems like keeping using old technology just disallows one from taking advantage of new developments.
But what kind of process would this kind of transition be? Does Steinberg or someone necessarily have to report their libraries? Or is it possible to approach this using some "wrapper"?
I think having more elegant syntax makes DSP algorithms noticeably easier to understand and share.
- KVRian
- 872 posts since 6 Aug, 2005 from England
When you say "we" do you mean - "I wanna use what I got schooled in - WAAAH!" !
C++ is chosen because it's fast AND flexible. So it became popular as the professional's choice in DSP and the game dev community.
C++ can be very elegant, and yes, it's sometimes abstracted to hell by idiots, but it doesn't have to be. I personally like it.
It's not really a surprise that a popular language becomes the go-to language - for now...
I personally would love to use C# but it's just not fast enough, yet.
C++ is chosen because it's fast AND flexible. So it became popular as the professional's choice in DSP and the game dev community.
C++ can be very elegant, and yes, it's sometimes abstracted to hell by idiots, but it doesn't have to be. I personally like it.
It's not really a surprise that a popular language becomes the go-to language - for now...
I personally would love to use C# but it's just not fast enough, yet.
Dave Hoskins. http://www.quikquak.com
-
- KVRAF
- 2279 posts since 20 Dec, 2002 from The Benighted States of Trumpistan
Actually, there are quite a few other options in daily use. I've seen plugs coded in Delphi, Java, and C#; and there have been plugs that use Lua and Ruby for live coding. Then there's Reaktor, SynC, SynthEdit, and SynthMaker/Flowstone. Oh, and Faust, SuperCollider, Max/MSP and even more obscure environments. However, C++ (or at least C-with-Classes) easily outperforms all of them, so it's not going away.
Wait... loot _then_ burn? D'oh!
-
Obsolete236871 Obsolete236871 https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=236871
- Banned
- 821 posts since 4 Aug, 2010
For straightforward programming languages for the audio DSP domain take a look into one of these two options: a) FAUST and b) the newly anounced SOUnd Language (SOUL) by JUCE / Roli.
-
- KVRian
- Topic Starter
- 1091 posts since 28 May, 2010 from Finland
FAUST is possibly reasonably elegant, since it's functional, but lately I've started to think as to whether SOUL is "just another Reaktor (i.e. a musical DSP -specific language)". I don't like the idea of "musical DSP -specific language", because I think musical DSP is not a "proper subdomain" in order to require a DSL, rather than "an extra library".Izak Synthiemental wrote: ↑Sun Sep 15, 2019 7:13 pm For straightforward programming languages for the audio DSP domain take a look into one of these two options: a) FAUST and b) the newly anounced SOUnd Language (SOUL) by JUCE / Roli.
My idea is not so much in creating new languages, but if there's a language where one already does e.g. DSP work, say Julia, then wouldn't it make sense to write DSP plug-ins using that same language?
One could argue e.g. that:
-Making a language do too many things could bloat the language.
But on the other hand:
-Using similar language for many things would offer less translating between "different endeavors".
On the other hand, if the language doesn't take long to learn (some languages take, such as Haskell), then jumping from one to another might not be that much of a hassle.
The main argument in this thread is that I think that C++ definitely isn't a very elegant language. It has a lot of redudant syntax.
Last edited by soundmodel on Sun Sep 15, 2019 7:31 pm, edited 6 times in total.
- KVRian
- 872 posts since 6 Aug, 2005 from England
-
Jeff McClintock Jeff McClintock https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=56398
- KVRist
- 413 posts since 30 Jan, 2005 from New Zealand
>Actually, there are quite a few other options in daily use. ... there's Reaktor, SynC, SynthEdit, and SynthMaker/Flowstone.
All coded in C++ BTW
All coded in C++ BTW
- KVRAF
- 7890 posts since 12 Feb, 2006 from Helsinki, Finland
Most general-purpose managed languages have garbage collectors that don't provide any real-time guarantees and for serious audio programming that is simply a "no go" irrespective of the actual performance of any given language. If you want your plugins to be safe for live performance, you really don't want to gamble with any of that. This really the main reason C++ remains the king of the hill.
- KVRAF
- 7890 posts since 12 Feb, 2006 from Helsinki, Finland
Inline assembly with C++ is rarely a good idea these days (at least on mainstream hardware), since compilers these days are quite decent at low-level optimization and intrinsics let you write SIMD code directly from C++ while still leaving register allocation and instruction scheduling/selection to the compiler. Last I checked, MSVC didn't even support inline assembly for 64-bit targets, although you could certainly still link separately compiled assembler files if you really wanted... but honestly it's rarely worth it.
- KVRAF
- 15265 posts since 8 Mar, 2005 from Utrecht, Holland
Python & Matlab are great for prototyping & education, but not so much for production-ready stuff where efficiency is more important than fast bashing out a concept to see whether the idea works as expected.
We are the KVR collective. Resistance is futile. You will be assimilated.
My MusicCalc is served over https!!
My MusicCalc is served over https!!
-
- KVRAF
- 7400 posts since 17 Feb, 2005
Unless you really need to use inline assembly, because the language itself does not provide a method of using a platform-specific instruction, it's best to be avoided. That does not include using an API either, for example try using the rdtsc instruction without inline assembly, it may appear after a call through the api and some odd levels of indirection, but that's not necessary. But save some time and let the compiler figure most stuff out, that's what it's made to do.
- Beware the Quoth
- 33159 posts since 4 Sep, 2001 from R'lyeh Oceanic Amusement Park and Funfair
You 'tend to find' that something ought to happen?soundmodel wrote: ↑Sun Sep 15, 2019 5:08 pm I tend to find that the developments in programming languages ought to be reflected to application domains
Erm, that sounds more like opinion than a solid technical reason. What 'developments' that cant be leveraged in C++ impact on software plugins?
You really need to provide evidence of that. Lisp and Prolog still have a very significant toehold in AI development, for example, and Python, which seems to be one of the most common languages is nearly 30 years old.and then it seems like keeping using old technology just disallows one from taking advantage of new developments.
C++ is perfectly suitable for VST development. Argument smacks a little bit of 'the world should adjust to me.'
my other modular synth is a bugbrand
- KVRAF
- 4590 posts since 7 Jun, 2012 from Warsaw
Exactly that. Every language has its purpose.
You can create great plugin in Python I suppose, but then hundreds of people around the world can create plugins in C++ which are many times faster. Or, from user's perspective, yours is slower.
The possible alternative to C++ is Rust, which is however not conceptually different being, it's just streamlined for modern patterns and hardware.
Blog ------------- YouTube channel
Tricky-Loops wrote: (...)someone like Armin van Buuren who claims to make a track in half an hour and all his songs sound somewhat boring(...)
Tricky-Loops wrote: (...)someone like Armin van Buuren who claims to make a track in half an hour and all his songs sound somewhat boring(...)
- KVRAF
- 15265 posts since 8 Mar, 2005 from Utrecht, Holland
Given that Python is interpreted instead of compiled (unless you cross-compile it with e.g. Cython) and depends on garbage collection to clean up unreferenced objects, I doubt it's easy...
We are the KVR collective. Resistance is futile. You will be assimilated.
My MusicCalc is served over https!!
My MusicCalc is served over https!!