learning programming. the best path?

DSP, Plugin and Host development discussion.
RELATED
PRODUCTS

Post

ive done a search and seen plenty of helpful information, but nothing that directly answers my questions.

i have no experience with programming other than writing hello world in C++ following a tutorial many years ago, and even that i have forgotten.
i want to learn with the long term goal of writing plugins and other audio software and could do with some advice to get me started.

i was considering starting with ruby (then stepping up to C++ when i understand more about the process) as it seems it is one of the easiest languages from what ive read. it doesnt look like you can write VST plugins with ruby though. is that correct? and is it worth doing this or would i benefit more from starting with C++ straight away?
i also read a little about juce, but im confused, is that language? would it be a better choice than ruby?

i have more questions but i will ask them later to keep things simple.

FYI i have used reaktor for many many years as well as synthmaker and synthedit for a few years a while back. they were great and i learned a lot about DSP in the process, but i want more flexibility.

any help getting started would be great. thanks! <3

Post

Learning basic concepts is important, particularly those that are structures common to most languages.

Maybe start with something like Python and just follow a few online tutorials (there are tons for Python), and once you have basic concepts under your belt it will make learning any other language a lot easier.

Post

Forgotten wrote: Fri Sep 20, 2019 5:12 pm Learning basic concepts is important, particularly those that are structures common to most languages.

Maybe start with something like Python and just follow a few online tutorials (there are tons for Python), and once you have basic concepts under your belt it will make learning any other language a lot easier.
thanks for the reply. i havent read much about python, can you write VSts with python? or is it just a better language to start learning with?

Post

If you've built stuff in visual tools like SE/SM/Reaktor, maybe an intermediate step would be one of the programming language equivalents like ReaJS (https://www.reaper.fm/reaplugs/) or BlueCat Plug'n'Script. Both are based on C-alike languages, and the latter can export native plugins.
my other modular synth is a bugbrand

Post

parricide wrote:can you write VSts with python? or is it just a better language to start learning with?
Short answer is maybe...the answer to that question is much more complex than yes or no.

I suggested it as a general purpose language that is relatively straightforward to learn.

Post

If you'd like to learn Ruby for VSTs, FlowStone, the successor of Synth Maker has the Ruby codebox.
It is an amazingly flexible language, and all sorts of convoluted things can be done with it, the integration into FlowStone means you can interface DSP with Ruby. Soundcard buffers can be translated into Ruby hashes, so some awkward minimal DSP can be done too. There are some fine Ruby examples kicking around, otherwise I can send u some Ruby schems.

I hope you enjoy the coding and all success with it! 8D
imo Ruby is the most intuitive language I have seen

Post

I second whyterabbyt's ideas about Reaper jsfx or Plug'n'Script. I keep meaning to read the Plug'n'Script documentation to find out if I'd want to fool with it. Maybe one of these days. Plug'n'Script looks better if you are ambitious to have a wider audience and output running VST plugins. Maybe there are also included DSP libs and such that would sweeten the pot even more.

I'm retired old programmer. Did more music app programming than plugins over the years, C/C++, object pascal and ASM mostly. Maybe not quite as much for plugins than applications, but making something customers will pay money for has maybe 90 percent of drudgery on GUI and other stuff that doesn't really have much to do with music, EXCEPT that typical civilians will not buy a product that is not easy to use and looks pretty good.

So to make a commercial-polished program or plugin you have to learn and do a lot of crap that doesn't have much to do with the sound, wrapping the sound in an easy-to-use package.

I will occasionally make a Reaper JS plugin that does what I want it to do. No more or less. It is lots less hassle than all the crap you have to do to get a "real program" to work. Mainly just concentrating on the sound. The jsfx syntax is similar to C. It doesn't have to be written to "look object-oriented" but it can be written that way.

I think if written in a style that "looks object oriented" that jsfx could be converted into C++ code fairly easily with some search-and-replace and minor editing. Then add the other 90 percent of code needed to turn it into a "real program" and then alpha and beta test it and solve a zillion mystery bug reports from the customers and there ya go! :)

Its more fun stopping at the "got it sounding right for my own purposes" stage of the process.

http://errnum.com/html/jcjr_rms_compressor.html

http://errnum.com/html/jcjr_peaklimit2.html

Post

At first I was going to suggest starting with Python. It’s a very popular language and easy to start with. But considering that your eventual goal is to learn C++, and probably Juce, I’m not sure there is really much point to the hand-holding of Python. There are hundreds of tutorials for beginner C++ students, and even local college courses you could enroll in. Why not bite the bullet and start learning the correct tool from the beginning. Now, if you had said you wanted to learn a general programming language, but not one optimized for real time audio, or not a platform specific to game development or similar, I would absolutely recommend Python.
Incomplete list of my gear: 1/8" audio input jack.

Post

My advice is to find a tutorial that loosely has something to do with whatever you want to actually create. Follow the tutorial as best as you can and then try to think up something else that uses the same paradigms taught but is slightly different - not necessarily more advanced. Do this. Repeat. Repeat. Repeat.

Since you are at the beginning of your journey, just try to get your hands on as much code as possible. Also, look for open source code bases that are related to what you want to work on, and do something with them. But most importantly, start slow.

Post

wow, so many replies. thanks for the input everyone!
it seems i have many things to consider. plug n script looks like it might be a nice next step, as its close to C and i should be able to move forward relatively easily. but now im also wondering if i should just jump straight into C++
ruby and python are looking less inviting now so i guess im torn between jumping straight into C++ and using plug n script as a stepping stone.

i am not really looking to make commercial plugins. although it is something i would like in the long term, it is not my goal right now.


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 :)


thank you all very much for the help and your time <3

Post

update:
i have been looking at plug n script and it seems you can export plugins as VSTs, or am i mistaken?
it also looks like it would be a nice tool for prototyping in the future when i learn C++.
i am still torn between that and moving straight to C++ though :/

EDIT:
looking further into plug n script it doesnt look like there are many tutorials out there for complete newbies, most of them seem to be geared towards people who already know other languages

Post

parricide wrote: Sat Sep 21, 2019 8:09 am update:
i have been looking at plug n script and it seems you can export plugins as VSTs, or am i mistaken?
it also looks like it would be a nice tool for prototyping in the future when i learn C++.
i am still torn between that and moving straight to C++ though :/
Yeah, it'll export VST, VST3, AU, and, they've just added AAX export
EDIT:
looking further into plug n script it doesnt look like there are many tutorials out there for complete newbies, most of them seem to be geared towards people who already know other languages
The core language is called AngelScript, which is an embeddable C++ variant. I suspect a lot of basic c++ tutorials would be applicable.
if i was to jump straight into C++ how would i go about doing that? what tools would i need?
Microsoft's Visual Studio Community version is free. Their slimmed-down alternative, Visual Code is also free, and a much less bloated install, but I dont think there's as much info on using it for VST development.
There are a couple of open-source tools based around GCC as well, Code::Blocks and IBM's Eclipse, and Ive seen some tutorials on using GCC and Code::Blocks.
The only other current 'name' C++ IDE I can think of is the commercial tool byJetBrains called CLion, but Ive never seen it referenced for plugin development. Their C# IDE Rider has a pretty good reputation though.
my other modular synth is a bugbrand

Post

if i was to jump straight into C++ how would i go about doing that? what tools would i need?
Microsoft's Visual Studio Community version is free. Their slimmed-down alternative, Visual Code is also free, and a much less bloated install, but I dont think there's as much info on using it for VST development.
There are a couple of open-source tools based around GCC as well, Code::Blocks and IBM's Eclipse, and Ive seen some tutorials on using GCC and Code::Blocks.
The only other current 'name' C++ IDE I can think of is the commercial tool byJetBrains called CLion, but Ive never seen it referenced for plugin development. Their C# IDE Rider has a pretty good reputation though.
[/quote]

sorry for my ignorance, but i dont really know what those things are. i hear words thrown around but i dont really know what they mean. for example, i know i need a compiler, but i dont really know what a compiler does exactly (i assume it takes the code and turns it into an executable file or DLL etc?)

a quick google of visual studio suggests that is all i would need?

things like SDKs too. i dont really understand what it is and what it is needed for etc (i assume this is a set of commands that are installed into the language that allow you to write scripts and get results you otherwise wouldnt be able to?)


i think i should start by googling for general programming tutorials for absolute beginners :D

starting like this makes me feel like i should jump straight into C++. if i am learning all the absolute basics using C++ then i should just stick with it, and if i start with something like plug n script then i wont learn these things as it seems to take care of all of that for you.


thanks a lot for the help

EDIT:

i found this tutorial:
https://www.learncpp.com/

i think i will start working my way through it. it seems to explain the absolute basics, such as the lack of knowledge mentioned above.

plug n script is still in the back of my mind though. maybe i will revisit it if i get overwhelmed with C++

Post

parricide wrote: Sat Sep 21, 2019 9:04 amsorry for my ignorance, but i dont really know what those things are. i hear words thrown around but i dont really know what they mean. for example, i know i need a compiler, but i dont really know what a compiler does exactly (i assume it takes the code and turns it into an executable file or DLL etc?)
Sorry. A compiler turns the human-readable-language 'source' code into machine-runnable 'executable' code.

An IDE is an 'integrated development environment'. Generally, you also want a text editor for that source code, (and that can include one which 'understands' your source code to a certain extent to help with certain editing task), a debugger (which lets you interact with running machine code and relate that back to the source code) and a mechanism for compiling and linking multiple source code and library files. These can be separate tools, but an IDE integrates them.
things like SDKs too. i dont really understand what it is and what it is needed for etc (i assume this is a set of commands that are installed into the language that allow you to write scripts and get results you otherwise wouldnt be able to?)
Sort of. In the case of VST plugins its sort of a package of some prewritten definition code that you can access from your own code and almost a set of 'templates' that you have to 'fill in' with your own code.
Since you cant make something into a VST unless it has the functionality that defines what a VST has to do, the templates effectively provide the starting point of a VST that does nothing, and you modify that to do something.
The VST SDK is very bare-bones, it only really covers the data transfer between the host and the plugin; it has no user interface code for example.
So there are also third-party SDKs which sit 'on top' of VST, like JUCE and WDL, that provide a lot more prewritten functionality, especially UI stuff, and which can also sit on top of other audio plugin type consistently thus making it easier to develop cross-platform plugins.
my other modular synth is a bugbrand

Post

Fascinating thread already. I sometimes consider taking up some sort of coding to stave off Alzheimers (hopefully), but I really can't imagine how things have moved on since my Uni days when I learnt Fortran 77...That said, it would be satisfying to make a simple plugin or 2 for my own use.

Post Reply

Return to “DSP and Plugin Development”