Lacking C++ and DSP, looking for advice

Current comp sci undergrad trying to get into developing a plugin but lacking in C++ and DSP.

So my math skills in terms of DSP are almost non-existent. I’ve returned to college at an older age so I don’t have (or remember) a lot of prerequisites for learning DSP, and my course doesn’t include calculus as a core module.

From researching DSP, to understand it, it seems I need to go Trig, PreCalc, Calc, then DSP. Would that be right? I’m confident I could learn all that, but it seems like overkill to just start developing. Is there any shortcut into getting a basic understanding of it?

In terms of programming experience, I have mostly Java, C (a bit rusty), and assembly. I’m pretty confident I can figure out C++ as I go. Am I wrong? I’m only in 3rd year in my course so I’m not the most experienced programmer.

The reason why I want to start developing a plugin is I feel like I have a unique idea for a clock/trigger system that I’ve looked for but can’t seem to find. Eventually expanding to sequencers. Conceptually this all seems to me like its trigger based so would avoid most DSP. Would I be right in assuming that? I’ve looked up JW’s simple clock as an example, and the step function doesn’t seem to have any DSP.

Any help with those questions would be appreciated. I’m gonna dive into developing anyway and see how I get on, but any advice that would steer me in the right direction would be great. Although my idea doesn’t require DSP (I’m assuming), I might want to develop something using it in the future, so any advice on that would be great, thanks

2 Likes

One reason I like Faust for learning DSP is the fact that you can do it all in context of a web browser (see the “Tools” section of https://faust.grame.fr ).

A free class:

Some tutorials: https://ccrma.stanford.edu/~rmichon/faustTutorials/

and, uh, yeah, I need to go through those myself! :wink:

2 Likes

VCV Rack developer @Blamsoft is a Faust contributor.
https://blamsoft.com/linux-audio-conference-paper/

1 Like

The C++11 used in Rack is very easy on the eyes, and quite easy to read and write, for say a Java or C# programmer, I’d say. It’s a long way from your granddaddy’s crappy, inscrutable code :smile:

2 Likes

The ideas you have in mind don’t need DSP. Just logic and some sensibility for GUI design. For the logic, your skills at Java or any other C-based language will translate quickly to C++. Not to say there aren’t quirks to C++, or to VCV Rack’s API, but you’ll do just fine with the core programming of your plugin.

3 Likes

that’s a different andrew: andrew best. he’s written some great modules tho.

andrew belt is the vcv rack guy :stuck_out_tongue:

Hi @JimT. @Blamsoft is Andrew Best. Andrew Belt is @Vortico.

1 Like

I’m really bad at giving advice for learning C++ because I honestly don’t remember how I learned it, but https://en.cppreference.com/w/ is really all I ever need now. It’s a slimmed down version of the C++ standards and states which features were added to which C++ standard.

Perhaps you could learn C++ entirely by reading code from open-source VCV plugins. If you need DSP knowledge, use https://vcvrack.com/manual/DSP.html.

5 Likes

Cool. Thanks very much for the responses folks. Fantastic community here. I shouldn’t have a problem with C++ so, and in my spare time try to slowly grapple dsp.

1 Like

Truly “learning dsp” is quite difficult, would require a lot of education. I have a BS in electrical engineering, but did not retain much of that. But the good news is you can do a lot without it. As you and someone else said, you don’t need dsp for clock/logic stuff. And many things that do require DSP don’t require that you really “know” all that stuff. So, you may never be able to design your own filters, but if you put in enough effort you can learn how to re-use filter designs from the internet and from other VCV modules.

Someone else said, above, that the c++ in VCV is pretty easy to read. That is definitely true. It is not highly idiomatic. But you will need to learn enough about classes and pointers etc… to get very far.

2 Likes

I did work on Faust a little but not for a while now. I don’t really like Faust actually. I prototyped some of VK-1 Viking Synthesizer in Faust but stopped using it. The code was quite hard to read and was not CPU efficient at that time. Unfortunately, I didn’t learn DSP until going to graduate school. I am not a self taught type person I guess. If you can make your way through them, the books on this website explain the foundation of almost all audio DSP. https://ccrma.stanford.edu/~jos. At the next level there are papers from DAFX, IEEE, and the Audio Engineering Society. I recommend industry standard books like The C++ Programming Language by Bjarne Stroustrup and The C Programming Language by K&R. These are my recommended resources for “book learning” but you may learn better by just digging in and trying to make something with lots of web searching as you go.

4 Likes

Well, you’ve probably saved me a lot of time with Faust then. It’s a nice shiny object though! Especially all that yummy looking physical modeling stuff.

1 Like

I’m not saying you wouldn’t learn something from the course though. If you want to get straight into some meaty examples you could use the books by Will Pirkle. http://www.willpirkle.com/about/books. But I wouldn’t just copy his code, learn the algorithms and peak at the code for help.

3 Likes

Python + Numpy/Scipy, Julia, and MATLAB are good platforms for experimenting and learning DSP algorithms. I often prototype in Python before porting to C++ so that I can easily spawn graphs with Matplotlib and quickly load/dump WAV files for debugging and testing. Olivier Gillet from Mutable Instruments does the same.

2 Likes

Yeah. If you don’t want to buy MATLAB you can use GNU Octave. I could go either way between Python + Numpy/Scipy and MATLAB/Octave. There is a course that uses Python that teaches a lot of theory about spectral analysis. https://www.coursera.org/learn/audio-signal-processing. It isn’t really practical for creating plugins but you will learn a lot about the theory of sounds and think about them in a new way if you haven’t been exposed to it before.

2 Likes

Yes Python is really a good option of learning DSP algorithms. In that case I have also started learning Python and MATLAB from EduHelpHub as it is highly important for the experimental purpose. However I will prefer if there is any kind of course suggestion for straight learning of Python.

First you need to define DSP for you: Is it coding aliasing-free oscillators and stuff like that? Is it coding a mute switch that works without clicks and pops? Is it dealing with pitch-CV (1V/octave)?

Then grab the most important module for you personally that doesn’t exist and try to create it by looking at the source code of somewhat similar modules. Don’t reinvent the wheel :wink:

I have mostly Java, C (a bit rusty), and assembly. I’m pretty confident I can figure out C++ as I go. Am I wrong?

Java is the only language I’m truly confident with, and I figured it out as I went along. You’ll be fine - especially if you’re studying comp-sci!

(edit: oopsie 3 years late lmao)

1 Like

Yeah I am curious to see how this clock and sequencer module are now ! Is @JoeyJoeJoeJrShabadoo still around to give us an update on the learning and output of this ?

How much DSP do you need to know to design a VCO? I ask sincerely. I got it into my head to try to develop something, maybe I can only turn out a poor blank, but my dream would be to realize my complete system. The problem is my DSP knowledge is 0, and my programming knowledge is 10 but on a scale of 0 to 50 hahaha, I’m probably trying to do the impossible, but I’m stubborn. For now I have created my empty plugin and I am designing the first official panel, who knows what will come out…