Lacking C++ and DSP, looking for advice


#1

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


(Jason Wehmhoener) #2

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:


(Jason Wehmhoener) #3

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


(Lars Bjerregaard) #4

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:


(Dale Emery) #5

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.


(Jim T) #6

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

andrew belt is the vcv rack guy :stuck_out_tongue:


(Jason Wehmhoener) #7

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


(Andrew Belt) #8

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.


#9

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.


#10

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.


#11

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.


(Jason Wehmhoener) #12

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.


#13

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.


(Andrew Belt) #14

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.


#15

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.