How Much C++ D'you Need to Know to Make An Re?

This forum is for discussing Rack Extensions. Devs are all welcome to show off their goods.
User avatar
Creativemind
Posts: 4875
Joined: 17 Jan 2015
Location: Stoke-On-Trent, England, UK

06 Dec 2017

Hi All!

Pretty self explanatory title but how much programming d'ya need to know to create a VST?

I was looking on the Propellerhead site the other day and it kind of looked like modules you could link together but I'm a novice.

Thanks!
:reason:

Reason Studio's 11.3 / Cockos Reaper 6.82 / Cakewalk By Bandlab / Orion 8.6
http://soundcloud.com/creativemind75/iv ... soul-mix-3

avasopht
Competition Winner
Posts: 3931
Joined: 16 Jan 2015

06 Dec 2017

For the DSP you can get away with knowing the basics of C.

C++ is the most complex of the popular languages due to incremental additions of new features while maintaining backwards compatibility.

C on the other hand is pretty lean. C is a sort of subset of C++.

The first hurdle is not the language but the basic concepts of algorithms and programming in general.

If you're interested I'd say just go for it. Find either a book or free online course on DSP, learn the basics of C, and make a simple volume knob.

After C I would go straight for a pure OO language like Ruby or Smalltalk. I think you'll be a much better C++ programmer with that background.

There's nothing special about programmers. Most of us are self taught. You just have to commit to overcoming the paradigm shifts and learning to think systematically.

Hackerrank has some brilliant in browser tutorials.

Oh, and you'll need to use some Lua for rack extensions, but you should know by now that languages are just a means to an end.

VSTs require a little more GUI code, but it's all within arm's reach.

User avatar
Oquasec
Posts: 2849
Joined: 05 Mar 2017

06 Dec 2017

I thought you needed to know:
C++, Lua & Python to make one
Producer/Programmer.
Reason, FLS and Cubase NFR user.

avasopht
Competition Winner
Posts: 3931
Joined: 16 Jan 2015

06 Dec 2017

Oquasec wrote:
06 Dec 2017
I thought you needed to know:
C++, Lua & Python to make one
No, just C or C++, and Lua. There is a miniscule amount of Python in one of the scripts, but all you'll be doing is listing which files are in your project, so you don't really need to learn Python. You don't need to know much Lua either. There's also a bit of XML, but again it's just basic configuration. All minor details.

You can learn enough of C++ to understand the SDK examples, but starting out I would advise just focusing on procedural programming in C. Little is gained starting out with a C++ focus IMO.

Learn pure OOP with Ruby and Smalltalk (I recommend Smalltalk) before trying to grok OOP in C++. You will thank me later.

User avatar
selig
RE Developer
Posts: 11685
Joined: 15 Jan 2015
Location: The NorthWoods, CT, USA

06 Dec 2017

To answer generally, it's like saying how much language do you need to know to write a book. You can write a book that's unreadable with little to no language understanding, and one that's readable with a little more. But to write a truly great book you will need a LOT!
Selig Audio, LLC

User avatar
Loque
Moderator
Posts: 11170
Joined: 28 Dec 2015

06 Dec 2017

When i started C++ as a professional (i had already 15 years of coding experience) someone said, in 8 years you realize you knew nothing and you still have a lot to learn. He was so true...
Reason12, Win10

Goriila Texas
Posts: 983
Joined: 31 Aug 2015
Location: Houston TX
Contact:

06 Dec 2017

My son is in his second semester for programming be trying to find out what he needs to know too. Watching thread.

avasopht
Competition Winner
Posts: 3931
Joined: 16 Jan 2015

06 Dec 2017

Goriila Texas wrote:
06 Dec 2017
My son is in his second semester for programming be trying to find out what he needs to know too. Watching thread.
Okay, this might help.

I started learning about computers and programming with Usborne Computer and Coding books. It was not difficult as they were designed for kids.

I then went on to other books such as the For Dummies and Made Simple series for various different languages. This was 1996-1998 by the way.

You don't need to know that much starting out. Most of the meat is in just creating programs or games and reflecting on them. The theory is rich and much more easily digested with experience. You will figure out what does and does not work. While programming also read books on strategic approaches, best practices, methodologies and programming paradigms. But make them secondary to the act of programming.

If he really wants to kick ass, he can try The Art of Computer Programming ;)

Also check out Honey & Mumford learning cycles. Knowing how you prefer to learn can make your life a lot easier. Basically you have the ongoing cycle of abstract conceptualisation, active experimentation, experiencing, and observation. Your learning style will determine which one of these steps is most ideal to start with, after which you can continue to drive the ongoing learning cycle :thumbs_up:

Don't overthink it. It can feel frustrating and difficult at first while you are training your mind to think in specific ways and notice details you are normally happy to keep ambiguous.

GRIFTY
Posts: 658
Joined: 16 Jan 2015

06 Dec 2017

I'm about to finish a CS degree. What do i need to sign up for to start making RE's and testing them in reason? Do they provide example code? Where can i study DSP programming specifically?

Goriila Texas
Posts: 983
Joined: 31 Aug 2015
Location: Houston TX
Contact:

06 Dec 2017

avasopht wrote:
06 Dec 2017
Goriila Texas wrote:
06 Dec 2017
My son is in his second semester for programming be trying to find out what he needs to know too. Watching thread.
Okay, this might help.

I started learning about computers and programming with Usborne Computer and Coding books. It was not difficult as they were designed for kids.

I then went on to other books such as the For Dummies and Made Simple series for various different languages. This was 1996-1998 by the way.

You don't need to know that much starting out. Most of the meat is in just creating programs or games and reflecting on them. The theory is rich and much more easily digested with experience. You will figure out what does and does not work. While programming also read books on strategic approaches, best practices, methodologies and programming paradigms. But make them secondary to the act of programming.

If he really wants to kick ass, he can try The Art of Computer Programming ;)

Also check out Honey & Mumford learning cycles. Knowing how you prefer to learn can make your life a lot easier. Basically you have the ongoing cycle of abstract conceptualisation, active experimentation, experiencing, and observation. Your learning style will determine which one of these steps is most ideal to start with, after which you can continue to drive the ongoing learning cycle :thumbs_up:

Don't overthink it. It can feel frustrating and difficult at first while you are training your mind to think in specific ways and notice details you are normally happy to keep ambiguous.
Thanks

User avatar
Oquasec
Posts: 2849
Joined: 05 Mar 2017

06 Dec 2017

Def not a programmer but it is interesting reading these. The idea is interesting, however.
(I do not think OOP counts)
Producer/Programmer.
Reason, FLS and Cubase NFR user.

avasopht
Competition Winner
Posts: 3931
Joined: 16 Jan 2015

07 Dec 2017

GRIFTY wrote:
06 Dec 2017
I'm about to finish a CS degree. What do i need to sign up for to start making RE's and testing them in reason? Do they provide example code? Where can i study DSP programming specifically?
Sign up here: https://www.propellerheads.se/developers

They provide example code, plus the Devs are friendly and there's a thread with lots of DSP resources.

Dspguide.com has a brilliant book, which I'd available for free on the site. Stanford has their DSP lectures available online and have a free complete course on coursera.com

User avatar
Gorgon
Posts: 1233
Joined: 11 Mar 2016

07 Dec 2017

Creativemind wrote:
06 Dec 2017
Hi All!

Pretty self explanatory title but how much programming d'ya need to know to create a VST?
If you don't know the difference between a RE and a VST (because I assume you're asking about programming a RE), you should stay far away from programming.
"This is a block of text that can be added to posts you make. There is a 255 character limit."

User avatar
Ahornberg
Posts: 1904
Joined: 15 Jan 2016
Location: Vienna, Austria
Contact:

07 Dec 2017

I would refine the question: How much DSP knowledge and experience do you need to make a good sounding and CPU friendly synth or audio effect?

If you want to code a synth plugin you need to know how to code aliasing-free oscillators and smooth sounding filters that use CPU as less as possible.

Maybe start programming with SuperCollider (free), PureData (free) or Max/MSP (not free but the one with the most in-depth tutorials in DSP coding) and try to get something to work.

Then refine your work and translate it into an RE or VST. You have to run tests by your own and you have to involve other testers before releasing your plugin.

And beside all this there's the GUI. How much knowledge and experience do you need to design a GUI that fits the needs of the users and that simply looks good enough to get people to buy your RE or VST?

After releasing your plugin you have to deal with annoying users (your customers) who never stop mailing you bug reports and feature requests.

If your goal is making music, then just grab some good synths and effects (and today there's already an overwhelming market out there) and simply make music.

From my personal experiences in developing plugins: I coded an additive synth that never could hold on with Parsec or NI Razor. But it used much more CPU and had bugs with hanging notes and so on. I did a lot of planning and designing for an RE that does advanced microtonal retuning and I got a RemoteMap and a prototype to work consisting of existing REs assembled in a combinator. Also this was not a CPU friendly solution. At the end I found a plugin (that only works well inside of Reaper) that can do a lot more than I ever planned for my RE and last week I bought it for $100,- and saved all my future time for making music instead of programming an RE.

Conclusion: If that VST or RE you have in mind doesn't exist actually, and if that plugin you plan to code is something you essentially need for making your music, then go and make it.

Good luck!

User avatar
Oquasec
Posts: 2849
Joined: 05 Mar 2017

07 Dec 2017

I kept it simple as hell and stuck to Reason, Synthedit & Cubase for everything lol :cool:
Producer/Programmer.
Reason, FLS and Cubase NFR user.

User avatar
teddymcw
Posts: 432
Joined: 13 May 2016

07 Dec 2017

selig wrote:
06 Dec 2017
To answer generally, it's like saying how much language do you need to know to write a book. You can write a book that's unreadable with little to no language understanding, and one that's readable with a little more. But to write a truly great book you will need a LOT!
I feel one could also make the analogy of how much producing and sound engineering knowledge does one need to produce and mix a hit record?
The answer is still a ton, and thus I'd say pick a specific problem or goal for your DSP coding and focus on that while learning how to use the language. This would be akin to pick a specific genre and maybe even song to produce while learning about sound dynamics.

Depending upon what the budding programmer would like to accomplish they may only have to key in on their desired specific problem e.g. arranging samples in certain patterns, or the previously mentioned problem of microtuning. Maybe one can just work out the math to do a great type of delay engine and then seek friendly or paid assistance to make it into usable software.

Just trying to offer my two cents on how to stay focused is the ocean that is programming. Would be great fun to delve into DSP and very fruitful as a learning journey.

User avatar
JiggeryPokery
RE Developer
Posts: 1174
Joined: 15 Jan 2015

07 Dec 2017

selig wrote:
06 Dec 2017
To answer generally, it's like saying how much language do you need to know to write a book. You can write a book that's unreadable with little to no language understanding, and one that's readable with a little more. But to write a truly great book you will need a LOT!
The obvious inverse of that coin is that plenty of books are quite unreadable even with a thorough understanding of its lanuage and literary history. :puf_wink: :lightbulb:

User avatar
Loque
Moderator
Posts: 11170
Joined: 28 Dec 2015

07 Dec 2017

JiggeryPokery wrote:
07 Dec 2017
selig wrote:
06 Dec 2017
To answer generally, it's like saying how much language do you need to know to write a book. You can write a book that's unreadable with little to no language understanding, and one that's readable with a little more. But to write a truly great book you will need a LOT!
The obvious inverse of that coin is that plenty of books are quite unreadable even with a thorough understanding of its lanuage and literary history. :puf_wink: :lightbulb:
Its the same for a lot of code out there, good AND bad code :lol:
Reason12, Win10

User avatar
Oquasec
Posts: 2849
Joined: 05 Mar 2017

07 Dec 2017

Coding is its own galaxy. After a certain point, some prods feel like they need to learn instruments, code or both.
I know for damn sure I'd be hardpressed trying to code, so I will be sticking to Synthedit, Reason's little ecosystem & Cubase for its built-in notation view and calling it a day :cool:
Last edited by Oquasec on 07 Dec 2017, edited 2 times in total.
Producer/Programmer.
Reason, FLS and Cubase NFR user.

User avatar
Ahornberg
Posts: 1904
Joined: 15 Jan 2016
Location: Vienna, Austria
Contact:

07 Dec 2017

for VST coding, maybe take a look at http://faust.grame.fr/

PeterP
Posts: 84
Joined: 26 Apr 2016
Location: Gothenburg, Sweden

07 Dec 2017

Before embarking on programming your own RE or VST I would strongly recommend that you prototype your effects or instruments in a high level tools like NI Reaktor or Ableton Max4Live. That way you can develop your understanding of DSP and various sound algorithms without having to learn a programming language at the same time. You can make some truly excellent "plugins" like that without writing a single line of code and it's a quick way to test ideas and to see how feasible something is.

If your aim is to become a professional programmer in the audio world I would actually recommend that you start with modern C++ directly instead of taking the roundabout way of starting with C and then learning Ruby before you start C++. It is not harder to learn than C and you get to the destination quicker. A good book is "Programming: Principles and Practice Using C++" by Bjarne Stroustrup.

Now, that being said, almost every programmer have different preferred methods and way of learning, so I recommend that you look around for different paths and opinions before embarking. I do think it's a good idea to learn several different languages, but that will come naturally once you get some experience and want to try different thing.

dana
Posts: 335
Joined: 29 Apr 2015
Contact:

07 Dec 2017

Learning C++ on its own, you might create a command line app that asks for your name and spits out Hello {your name}

Its kind of useless because none of those paradigms are useful to dsp /RE / dsp development.

Its not just the coding, there is a lot of math involved.

There are specific tools to create filters that spit out dsp code making it easier.

When you're dealing with bufffers, timing, etc. like any coding you really have to have a good imagination to be able to imagine how the code works, then be able to write it.

You're in the end, manipulating arrays of 32-bit numbers for an effect, and generating them for a synth (either from tables or .

A synth is a lot harder to make than an effect. Effects are numbers in, numbers out.

A volume control is just each channel (left and right) multiplied with a number between 0 and 1.

You will have to scale whatever input parameter down, from say 0 to 255 to 0 to 1 - divide by 255.

To make a delay, you have to deal with timing - so each sample must be delayed by the correct amount.

So you need to know the sample rate, and how many milliseconds you have, the feedback amount reduces the volume of the delay, then puts it into a buffer (array) so that it gets added to a future sample.

So you have to mix two samples.. Here is some info on different methods of mixing two samples:

https://dsp.stackexchange.com/questions ... t-clipping

In the end, you're manipulating time. A filter or flange in its simplest form is just a really a delay.

End of braindump

User avatar
Gorgon
Posts: 1233
Joined: 11 Mar 2016

07 Dec 2017

Creativemind wrote:
06 Dec 2017
Hi All!

Pretty self explanatory title but how much programming d'ya need to know to create a VST?

I was looking on the Propellerhead site the other day and it kind of looked like modules you could link together but I'm a novice.

Thanks!
All my sarcasm aside (which is a lot), how much programming experience do you actually have?
"This is a block of text that can be added to posts you make. There is a 255 character limit."

User avatar
Ahornberg
Posts: 1904
Joined: 15 Jan 2016
Location: Vienna, Austria
Contact:

07 Dec 2017

Gorgon wrote:
07 Dec 2017
Creativemind wrote:
06 Dec 2017
Hi All!

Pretty self explanatory title but how much programming d'ya need to know to create a VST?

I was looking on the Propellerhead site the other day and it kind of looked like modules you could link together but I'm a novice.

Thanks!
All my sarcasm aside (which is a lot), how much programming experience do you actually have?
This is a good question ... and another question that came in to my mind is:

What kind of VST do you want to create?

There's a wide spectrum between e.g. Serum and Cthulhu.

User avatar
teddymcw
Posts: 432
Joined: 13 May 2016

07 Dec 2017

Oquasec wrote:
07 Dec 2017
Coding is its own galaxy. After a certain point, some prods feel like they need to learn instruments, code or both.
I know for damn sure I'd be hardpressed trying to code, so I will be sticking to Synthedit, Reason's little ecosystem & Cubase for its built-in notation view and calling it a day :cool:
Hmm synthedit looks interesting, though I've really lost all my patience for coding these days and esp c++. To be somewhat fair, programming a complex new combi patch is akin to programming and I certainly feel a bit of the programming mind state when sitting down to seriously mix a track.

Yet an osc as an initial value for manipulation in the chain of events is more fun and sound to me is usually much more instant if not also long term gratification.

Post Reply
  • Information
  • Who is online

    Users browsing this forum: drno and 18 guests