learning programming. the best path?

DSP, Plug-in and Host development discussion.
JCJR
KVRAF
2895 posts since 17 Apr, 2005 from S.E. TN

Post Sun Sep 22, 2019 11:37 am

parricide wrote:
Sat Sep 21, 2019 11:41 pm
JCJR wrote:
Sat Sep 21, 2019 10:52 am
... And there is nothing wrong with long paths if you have the motivation to stay on the path. Just that is a different goal than "learn about audio processing."

I mean, just as a ferinstance, eventually you will spend days and weeks learning about various tricks about window z order and graphic updating. Days and weeks learning about various tricks of hiearchical menus, both menu bars and popup menus. Days and weeks on buttons, sliders and knobs. Days and weeks on freakin file access, opening, closing, copying, erasing, renaming, reading and writing frikkin files.

That is all great to know but it isn't directly related to sound or music. Thats all I'm sayin.

Not trying to be Debbie Downer scaring you away from a long path. I'm just pointing out that it is a long path. :)
to be honest it is not just the idea of creating plugins that is motivating me, i just think i will enjoy coding in general. i have used other visual programming environments as well as audio ones to create things like games and apps just for fun and i have really enjoyed it, even the debugging processes :)
Great! Sounds like you know what you want. Good luck on the adventure. It can be fun depending on your definition of fun.

Personally I am chauvinistic about C/C++ dialect. I don't have anything against other dialects but like C good enough. I personally probably would not consider a "simplified" audio environment such as jsfx of plug'n'script unless it happened to read "fairly similar" to C syntax.

Just wanted to point out the "significant hidden costs" of doing it without the training wheels. :) Of course there are significant benefits as well.

parricide
KVRist
115 posts since 21 Nov, 2010

Re: learning programming. the best path?

Post Mon Sep 23, 2019 10:09 am

JCJR wrote:
Sun Sep 22, 2019 11:37 am

Great! Sounds like you know what you want. Good luck on the adventure. It can be fun depending on your definition of fun.

Personally I am chauvinistic about C/C++ dialect. I don't have anything against other dialects but like C good enough. I personally probably would not consider a "simplified" audio environment such as jsfx of plug'n'script unless it happened to read "fairly similar" to C syntax.

Just wanted to point out the "significant hidden costs" of doing it without the training wheels. :) Of course there are significant benefits as well.

Thanks.

The language is nowhere near as difficult as i thought it would be. It looked hard before i started the tutorial but its coming together quite easily, for now anyway, ive barely scratched the surface.

User avatar
Blue Cat Audio
KVRAF
4051 posts since 8 Sep, 2004 from Paris (France)

Re: learning programming. the best path?

Post Tue Sep 24, 2019 3:20 am

parricide wrote:
Fri Sep 20, 2019 11:46 pm
if i was to jump straight into C++ how would i go about doing that? what tools would i need?
as for plug n script, i assume the plugin is all i would need? and what are the exported plugins native to? are they hosted in a blue cat plugin or something? as much as i am not looking to create commercial plugins yet, it would be nice to share my tools to as many people as possible :)
Plug'n Script actually supports both scripting (using the angelscript language, very similar to C++ or java syntax) and native C or C++ development. Both options use the same APIs, so that switching from one to another is very simple.

By the way, once you export a plug-in created with this tool (in VST, VST3, AU and AAX formats), it is 100% independent and can be distributed to customers.

The advantage of using scripting over native coding is that the development cycle is much faster, and debugging algorithms is easier (it is much harder to crash). You can then translate scripts to C++ to get the best performance (you cannot be C/C++ when it comes to raw performance for dsp). In the end, I guess it depends on what you want to focus on learning first.

In my point of view, the main interest of a simplified environment is not using a simplified language (as you have noticed, core C++ is not that hard), but to avoid dealing with everything else (GUI, plug-in APIs, threading, system specifics etc.).

parricide
KVRist
115 posts since 21 Nov, 2010

Re: learning programming. the best path?

Post Wed Sep 25, 2019 12:19 am

Blue Cat Audio wrote:
Tue Sep 24, 2019 3:20 am
parricide wrote:
Fri Sep 20, 2019 11:46 pm
if i was to jump straight into C++ how would i go about doing that? what tools would i need?
as for plug n script, i assume the plugin is all i would need? and what are the exported plugins native to? are they hosted in a blue cat plugin or something? as much as i am not looking to create commercial plugins yet, it would be nice to share my tools to as many people as possible :)
Plug'n Script actually supports both scripting (using the angelscript language, very similar to C++ or java syntax) and native C or C++ development. Both options use the same APIs, so that switching from one to another is very simple.

By the way, once you export a plug-in created with this tool (in VST, VST3, AU and AAX formats), it is 100% independent and can be distributed to customers.

The advantage of using scripting over native coding is that the development cycle is much faster, and debugging algorithms is easier (it is much harder to crash). You can then translate scripts to C++ to get the best performance (you cannot be C/C++ when it comes to raw performance for dsp). In the end, I guess it depends on what you want to focus on learning first.

In my point of view, the main interest of a simplified environment is not using a simplified language (as you have noticed, core C++ is not that hard), but to avoid dealing with everything else (GUI, plug-in APIs, threading, system specifics etc.).
i didnt realise you could use C++ in plug n script. i thought it was limited to angelscript. although they are similar i didnt want to confuse myself at this early stage.
thanks for the info, i will look into it once ive got the basics down. maybe it would help as a learning tool too.



edit:

i just had a look at the product page. am i correct in thinking you can load C++ scripts into plug n script, but you cannot write or view the code as C++?

DaveClark
KVRist
183 posts since 8 May, 2007

Re: learning programming. the best path?

Post Wed Sep 25, 2019 8:07 am

Sorry, update became new post.
Last edited by DaveClark on Wed Sep 25, 2019 3:16 pm, edited 1 time in total.

DaveClark
KVRist
183 posts since 8 May, 2007

Re: learning programming. the best path?

Post Wed Sep 25, 2019 8:08 am

As an alternative to Plug'n Script that is closer to VST3 coding, I would recommend buying this book by Will Pirkle, a professor willing to help new folks:

https://www.amazon.com/Designing-Audio- ... 1138591939

You would download the latest versions of his free software, then work your way through all of the examples, many of which are presented with a great deal of hand-holding by someone used to dealing with students. Although it may seem a bit tedious, you would learn all about most of the fundamental algorithms for audio processing such as all the basic filters, compression, flangers, phasers, choruses, limiters, reverb algorithms, etc. Not only would you learn the theory, but you would actually implement different versions of these processors. All of what may seem like drill will prove to be worthwhile.

His free software RackAFX is a laboratory for building new stuff as well as measuring characteristics. You would also be introduced to GUI design, albeit simple designs. Another free software package is used in conjunction with MSVC++ community versions to build plugins. All you have to pay for is the book. You can distribute plugins for free or commercially, as you see fit.

The biggest problem with some of the other suggestions is that there is not anywhere near as much knowledgable guidance as is provided by Will in his books which are based on his university courses. The one above is the second edition of the audio effects book. There is also a synth book, but that's more advanced and quite frankly has a lot of errors in it due to the haste of publishing. The publisher should have provided more editorial support. I believe that Will is working on a second edition of that book. It does have some more modern filtering algorithms. The book listed above is really clean so far as I can tell, so I have great hopes for the second edition of the synth book.

Will does not teach C++ per se, rather by example; but if you know anything about programming, I believe that this approach I recommend here would still work out as long as you have access to C++ reference materials, and these are now quite abundant.

Good luck!

Regards,
Dave Clark

JCJR
KVRAF
2895 posts since 17 Apr, 2005 from S.E. TN

Re: learning programming. the best path?

Post Wed Sep 25, 2019 8:40 am

Blue Cat Audio wrote:
Tue Sep 24, 2019 3:20 am
...In the end, I guess it depends on what you want to focus on learning first.

In my point of view, the main interest of a simplified environment is not using a simplified language (as you have noticed, core C++ is not that hard), but to avoid dealing with everything else (GUI, plug-in APIs, threading, system specifics etc.).
Exactly the point I was trying to make but you expressed it much better.

User avatar
Blue Cat Audio
KVRAF
4051 posts since 8 Sep, 2004 from Paris (France)

Re: learning programming. the best path?

Post Thu Sep 26, 2019 2:32 am

parricide wrote:
Wed Sep 25, 2019 12:19 am
i just had a look at the product page. am i correct in thinking you can load C++ scripts into plug n script, but you cannot write or view the code as C++?
You simply use your favorite IDE to compile C++ into binaries that are loaded into Plug'n Script. It is not as fast as directly writing & reloading scripts (you have an extra compilation step), but it is still much faster than closing the DAW, re-compiling the entire plug-in with its dependencies, relaunching the DAW and reloading the plug-in to test the changes.

C++ DSP "scripts" compiled for Plug'n Script are very small and just contain the core signal processing functions.

You can browse and download the C++ DSP source code and the Xcode/Visual Studio projects for all the built-in binary scripts.

parricide
KVRist
115 posts since 21 Nov, 2010

Re: learning programming. the best path?

Post Sat Sep 28, 2019 11:10 am

DaveClark wrote:
Wed Sep 25, 2019 8:08 am
As an alternative to Plug'n Script that is closer to VST3 coding, I would recommend buying this book by Will Pirkle, a professor willing to help new folks:

https://www.amazon.com/Designing-Audio- ... 1138591939

...
Thanks for the info. I gave made a note and will check it out when im ready to make that step.
Thanks

parricide
KVRist
115 posts since 21 Nov, 2010

Re: learning programming. the best path?

Post Sat Sep 28, 2019 11:15 am

Blue Cat Audio wrote:
Thu Sep 26, 2019 2:32 am
parricide wrote:
Wed Sep 25, 2019 12:19 am
i just had a look at the product page. am i correct in thinking you can load C++ scripts into plug n script, but you cannot write or view the code as C++?
You simply use your favorite IDE to compile C++ into binaries that are loaded into Plug'n Script. It is not as fast as directly writing & reloading scripts (you have an extra compilation step), but it is still much faster than closing the DAW, re-compiling the entire plug-in with its dependencies, relaunching the DAW and reloading the plug-in to test the changes.

C++ DSP "scripts" compiled for Plug'n Script are very small and just contain the core signal processing functions.

You can browse and download the C++ DSP source code and the Xcode/Visual Studio projects for all the built-in binary scripts.
Thanks for the info. I think im sold on plug n script. Once i start moving into plugin design i think it seems to be a no brainer.
After spending all my spare time over the last week learning the basics of C++ i can really see what a few people have said in this thread about the footwork needed to just make the program usable. Plug n script would really help cut that back.

Thanks

User avatar
Blue Cat Audio
KVRAF
4051 posts since 8 Sep, 2004 from Paris (France)

Re: learning programming. the best path?

Post Mon Sep 30, 2019 2:25 am

parricide wrote:
Sat Sep 28, 2019 11:15 am
Thanks for the info. I think im sold on plug n script. Once i start moving into plugin design i think it seems to be a no brainer.
After spending all my spare time over the last week learning the basics of C++ i can really see what a few people have said in this thread about the footwork needed to just make the program usable. Plug n script would really help cut that back.
:tu:
You may also want to have a look at the independent Plug'n Script developers group on FB by the way: there are some very active users there (posting questions, sample code and demos almost every day).

parricide
KVRist
115 posts since 21 Nov, 2010

Re: learning programming. the best path?

Post Wed Oct 02, 2019 1:10 am

Blue Cat Audio wrote:
Mon Sep 30, 2019 2:25 am
:tu:
You may also want to have a look at the independent Plug'n Script developers group on FB by the way: there are some very active users there (posting questions, sample code and demos almost every day).
thanks for the link

parricide
KVRist
115 posts since 21 Nov, 2010

Re: learning programming. the best path?

Post Sun Nov 17, 2019 10:22 am

huge thanks to everybody who helped me in this thread.
i have been working hard every time i get some free time and i have created a command line game in C++ with a player and enemies, touchplates that open doors, the ability to fire at enemies, all with health and the ability to seek out the player etc.
i feel like ive come a long way in the amount of time ive been working on it and its all thanks to you guys helping me get started.
i just wish this forum was an appropriate place for C++ questions. i havent found any well structured C++ forums yet.

thank you all! <3

User avatar
syntonica
KVRian
545 posts since 25 Sep, 2014 from Specific Northwest

Re: learning programming. the best path?

Post Sun Nov 17, 2019 12:26 pm

parricide wrote:
Fri Sep 20, 2019 11:46 pm
if i was to jump straight into C++ how would i go about doing that? what tools would i need?
Since C++ is pretty much the de facto standard for coding plugins, I'd start there. There are probably a dozen or more "Learn C++ in 30 Days" type books out there to start you off. Take it slowly and you might even start with C++11 rather than a newer version (yeah, I know... I'm a bad, bad person for suggesting it. :hihi: )

A C++ programming class at your local school/college is not a bad idea either since it will be structured and you can get help from the teacher. You might talk with them beforehand to see if it will fit your learning style. Which leads me to, you know you best when it comes to learning something and how you best absorb the knowledge. Go with it for when you start.

Starting with a different language might confuse you since they all tend to have different paradigms compared to the C family. If you do go the scripting route, go with one of the two previously suggested ones (Reaper or BlueCat) since they are designed and optimized for audio DSP. I poked at Reaper and tried a few things when I first started, but I was already a programmer, although with no knowledge of C++, just C. Avoid Python and Ruby for now since they're meant as a general purpose languages and need to be hacked into a VST.

As for tools, that one's a little tougher. On Mac, Xcode to start, don't even argue for something else for the beginner. On PC, MSVC is probably best to start. Both are free and want to lock you in, but everything you need is right there. After a year or so, you can then explore other options. I ditched MSVC for CodeBlocks/MinGW when my year was up with MS and I could find my password to re-up the license. :lol: Unfortunately, on the Mac, Xcode does a number of things automatically, like create universal binaries (32/64-bit), create the ancillary bundle files, and create the program bundles that just make my life easier right now, so ditching it would not be fun.

Edit: Doh! I didn't see this was a slightly undead thread. :lol: I'm leaving my answer for others who may follow...

User avatar
Frantz
KVRAF
5243 posts since 18 Jul, 2008 from New York

Re: learning programming. the best path?

Post Sun Nov 17, 2019 12:33 pm

Here's how Steve Duda, the Serum guy, learned. Quite interesting.

https://youtu.be/Cp0rtLaXBio

Return to “DSP and Plug-in Development”