Forum
    • Categories
    • Register
    • Login

    [Blog] My Favourite C++ Open Source DSP References

    Scheduled Pinned Locked Moved Blog Entries
    8 Posts 4 Posters 76 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • griffinboyG
      griffinboy
      last edited by griffinboy

      Back From Hibernation: My Favourite C++ Open Source DSP References

      Hi HISE forum!

      It’s been a while since I’ve made a proper post here. I used to be a lot more active, then work swallowed me whole for what feels like a couple of years.

      In that time I’ve mostly been writing C++ DSP, analog modelling, optimisation, and the little details that make audio code really solid.

      1aa92f1b-56a0-4532-a4df-342cad49319f-image.png

      So for my first post in a while, I thought I’d share something useful:
      some of my favourite DSP references.

      These are the papers, codebases and blogs I keep coming back to.

      Not an ultimate list. Just a few of my favourite resources I personally use and think are worth studying if you’re learning C++ DSP.

      disclaimer: This is all intended for intermediate to advanced DSP coders.


      ResearchGate

      ResearchGate

      This is one of the places I use to find research papers. I use other sites as well, but ResearchGate is my first go-to.

      This site has research from lots of different fields, so not everything will be useful for DSP. You’ll have to search.

      If you find a paper you like, you can click the author's profile and see what else they’ve written.

      Good for: finding papers by topic and discovering the best authors working in that research area.


      DAFX Paper Archive

      DAFX paper archive

      The papers are all relevant to DSP.

      DAFX is one of the main places I check when I want to see what is happening on the cutting edge.

      Virtual analog modelling, Neural Effects and AI, reverbs, advanced physical modelling, new optimization methods. That sort of thing.

      Good for: serious audio DSP research and finding techniques you probably won’t see in open source codebases


      Vital

      Vital GitHub

      This is the older open source version of Vital.
      The later versions of Vital are not open source, but the old version is still on GitHub.

      A really nice resource for seeing how a full wavetable synthesiser codebase is organised. The wavetable oscillator engine is worth studying, and the parameter / modulation systems are written with performance in mind.

      The effect DSP is not the best part of the codebase. I would look elsewhere for more rigorous effect implementations.

      Good for: wavetable synthesis, modulation/parameter systems, full plugin architecture.


      chowdsp_utils

      chowdsp_utils GitHub

      This is one of my favourite open source DSP codebases.

      It contains a lot of practical building blocks for audio effects: buffers, filters, delays, math utilities, and lots of other useful pieces.

      The reason I like it so much is that it is clean, modern, and very performance-aware.
      I look at this repo constantly when I want to check how someone else has approached optimizing the essential basics of DSP.

      Good for: highly efficient DSP, modern C++ style.


      chowdsp_wdf

      chowdsp_wdf GitHub

      WDF circuit simulation framework.

      ...You can tell I like Jatin Chowdhury?

      This library is not a complete “simulate any circuit you can imagine” framework. There are many circuits it will not handle. But it's cleanly written and efficient, and it is a great starting point for understanding realtime WDF circuit simulation.

      If you are interested in analog modelling, this is a good repo to study slowly. WDFs can feel pretty alien at first, but seeing a practical implementation helps a lot.

      Good for: learning WDF structure and getting started with realtime circuit modelling.


      Valhalla Reverb Blogs

      Valhalla DSP blog
      Old Valhalla DSP blog
      Reverb Subculture thread on Gearspace

      Getting started with reverb design?

      There are some great snippets on the Valhalla blogs, and a lot of useful information spread across old forum threads if you are patient enough to dig.

      Reverb design is one of those areas where the useful knowledge is scattered across blogs and forums. It's all a bit secretive.

      Good for: algorithmic reverb design, historical context around classic digital reverbs.


      Laurent de Soras

      Laurent de Soras source code

      High performance implementations of FFT, oversampling, resampling, and digital filters.

      This is excellent material for studying a slightly older style of DSP coding.
      The optimisation strategies are different from chowdsp_utils, so it makes a good contrast.

      I like looking at code like this because it reminds you that modern C++ is not the only way to write optimized audio code. Sometimes older DSP code has a directness that is worth studying.

      All of the implementations are efficient, and scientifically rigorous. If I'm not mistaken, this is the man who wrote the antialiasing algorithm for Xfer "Serum" synth.

      Good for: FFT, oversampling, resampling, digital filters


      libsamplerate

      libsamplerate GitHub

      High quality sample rate conversion.

      This is a well regarded implementation if you are interested in resampling quality. The interesting part is the resampling filter design: how the signal is reconstructed when changing sample rate / pitch / playbackspeed, and how the implementation balances quality against cost.

      Resampling is one of those things that looks simple until you try to do it without artefacts.

      Good for: sample rate conversion, resampling filter quality, and understanding aliasing / artefact tradeoffs.


      RipplerX

      RipplerX GitHub

      Basic physical modelling synth.

      It is not fully optimised, but it is a good starting point because the code is easy to read and follow.

      Sometimes that is exactly what you want. A codebase doesn't need to be the most advanced thing on earth to be useful. Sometimes the best learning resource is one where you can clearly see what is happening inside.

      Good for: simple resonator / exciter structures and basic physical modelling before moving on to more optimised implementations.


      How Do I Study These?

      I usually open the example code or research paper on one monitor, then keep ChatGPT or Codex open on the other, and ask it to explain what I’m looking at.

      Repeat until I understand the whole thing.

      While doing this, I write my own code, compare against the example codebases, read related papers, and look at other implementations of the same idea. Yes, this process takes years!

      There isn’t any particular secret, I’m afraid! Just a lot of time and hard work.

      Once you’ve studied enough papers and codebases, you start seeing extra techniques the original author didn’t use, and that’s where you can improve the accuracy or efficiency, and create a piece of DSP that is better than your reference.

      Nowadays I always benchmark my own work against the next best open source implementations. When I write new DSP, I want to make sure it outperforms the best public examples.
      Fun challenge for yourself ; )

      Anyway, that’s enough from me!
      Hopefully this is interesting to someone out there.

      If there is an area of DSP you’re looking into, feel free to send me a message or comment on this thread! I’d be more than happy to share my favourite resources / chat.

      ustkU 1 Reply Last reply Reply Quote 9
      • ustkU
        ustk @griffinboy
        last edited by

        @griffinboy This is goldmine...

        Hise made me an F5 dude, any other app just suffers...

        griffinboyG 1 Reply Last reply Reply Quote 1
        • ChazroxC
          Chazrox
          last edited by

          Im barely learning right now but im excited to dig through this info! Thanks! 🙏

          Im still getting beginner errors while trying to compile a network to dll. lol Making a new post about that if anyone here can help. --->

          1 Reply Last reply Reply Quote 0
          • griffinboyG
            griffinboy @ustk
            last edited by griffinboy

            @ustk

            Glad it's interesting!
            These are a few very select references.

            But the actual number of codebases and papers I look at when I'm writing DSP is well over 500 that I keep on my harddrive. Obviously it would be silly to paste that many links, and would take too long to explain each one.

            But I can share more of my finds for specific DSP areas if people are interested.

            1 Reply Last reply Reply Quote 2
            • OrvillainO
              Orvillain
              last edited by

              Yep! Done a similar thing. The Valhalla links were how I first got into reverb design, as well as the SignalSmith stuff:
              https://signalsmith-audio.co.uk/writing/2021/lets-write-a-reverb/

              Musician - Instrument Designer - Sonic Architect - Creative Product Owner
              Crafting sound at every level. From strings to signal paths, samples to systems.

              ustkU 1 Reply Last reply Reply Quote 1
              • ustkU
                ustk @Orvillain
                last edited by

                @Orvillain Yes that was my first attempt at making a nice reverb too and I learned a lot fro Geraint! I did it first with a network so the efficiency was bad but I've added some really fun stuff to it! But next time I'll obviously go C++...

                Hise made me an F5 dude, any other app just suffers...

                OrvillainO 1 Reply Last reply Reply Quote 0
                • OrvillainO
                  Orvillain @ustk
                  last edited by

                  @ustk said in [Blog] My Favourite C++ Open Source DSP References:

                  @Orvillain Yes that was my first attempt at making a nice reverb too and I learned a lot fro Geraint! I did it first with a network so the efficiency was bad but I've added some really fun stuff to it! But next time I'll obviously go C++...

                  It's probably a conversational side-quest, but I've stopped using scriptnode tbh, other than for wrapping my custom nodes and attaching parameters so the UI can access them. I don't like the workflow at all really.

                  Musician - Instrument Designer - Sonic Architect - Creative Product Owner
                  Crafting sound at every level. From strings to signal paths, samples to systems.

                  griffinboyG 1 Reply Last reply Reply Quote 1
                  • griffinboyG
                    griffinboy @Orvillain
                    last edited by griffinboy

                    @Orvillain

                    Yes, I'm mostly using hardcoded slots myself nowadays rather than scriptnode : )
                    There seem to be a few bugs still left with modulation and C++ nodes, but once those are ironed out, this is the way!

                    37cf8fbd-fa43-4600-9442-e03516f8e768-image.png

                    But I still make scriptnode nodes for other users who are into that workflow.
                    And I do think Scriptnode can be good for a fair few things, like when you need a multiband chain:

                    40813827-1737-451f-a668-475d67a743f1-image.png

                    1 Reply Last reply Reply Quote 1
                    • First post
                      Last post

                    17

                    Online

                    2.4k

                    Users

                    13.7k

                    Topics

                    119.5k

                    Posts