Creating YOUR OWN DIY amp sim plugin

Discussion in 'Beginners/FAQ' started by Gmork, Apr 3, 2020.

  1. Gmork

    Gmork SS.org Regular

    Messages:
    2,031
    Likes Received:
    1,324
    Joined:
    Apr 3, 2014
    Location:
    B.C. Canada
    Surprisingly ive never thought of it before, but id absolutely love to learn how to start making my own plugins.
    I dont even know where to start and know it would be a long and arduous path, but never the less i really want to look into it.

    Anyone out there work on their own plugins and can help point me in the right direction with DIY amp sims?
     
    Chebax likes this.
  2. TedEH

    TedEH Cromulent

    Messages:
    8,357
    Likes Received:
    5,360
    Joined:
    Jun 8, 2007
    Location:
    Gatineau, Quebec
    This sounds like a similar question to "how do I make my own video game?" - as in you probably couldn't sum it up in a forum post. I've never made a plugin, and I have no idea what your skill sets are, or what tools you might be starting with, but I think a good start might be to look up the vst sdk.

    This might be it:
    https://www.steinberg.net/en/company/developers.html
     
    fantom and laxu like this.
  3. odibrom

    odibrom .

    Messages:
    4,797
    Likes Received:
    2,680
    Joined:
    Dec 2, 2014
    Location:
    ... perto de onde a terra acaba e o mar come├ža...
    Programming and audio analysis, lots of math. then, you will also need a User Interface or someone who can draw it for you. Those that are appealing have lots of design there. Every software have a huge team working together. I say that you'd need at least a team of 2, one for the graphic design / User interface and another for the programming stuff. Both in one person is an almost impossible mission to do in a useful time frame. Then, there's the testing and marketing and debugging and...

    Don't get me wrong, I think it's wonderful for one to think about it and get hands on the subject. If you can handle this, just go for it.
     
    Solodini likes this.
  4. Gmork

    Gmork SS.org Regular

    Messages:
    2,031
    Likes Received:
    1,324
    Joined:
    Apr 3, 2014
    Location:
    B.C. Canada
    Oh for sure, never thought itd be an easy thing but as theres Unity for those interested in game design
    which is even free! i wondered if perhaps theres some base program available for vst audi plugins.
    Its pretty interesting and id just genuinely like to know how theyre made lol.
     
    Solodini and odibrom like this.
  5. Mvotre

    Mvotre SS.org Regular

    Messages:
    269
    Likes Received:
    43
    Joined:
    May 2, 2007
    Location:
    SP, Brazil
    odibrom likes this.
  6. TedEH

    TedEH Cromulent

    Messages:
    8,357
    Likes Received:
    5,360
    Joined:
    Jun 8, 2007
    Location:
    Gatineau, Quebec
    The arduino advice seems a little backwards to me - that's just tacking on additional skillsets that aren't needed to write audio plugins.

    I linked the VST sdk in the first reply I made. It looks like you just need that kit, some C++ knowledge, some signal processing knowledge probably, and the time to invest in the project. Probably a lot of time.
     
    Solodini likes this.
  7. Splenetic

    Splenetic SS.org Regular

    Messages:
    1,172
    Likes Received:
    595
    Joined:
    Apr 30, 2012
    Location:
    Toronto
    There is. It's called RackAFX, and the dude has a book out with it. http://www.willpirkle.com/

    That said, better brush up on your math, and I'm talking HEAVY math. Oh and know/learn C++ or you're not going anywhere with it.
     
    TedEH likes this.
  8. nickgray

    nickgray SS.org Regular

    Messages:
    817
    Likes Received:
    753
    Joined:
    Dec 29, 2008
    I imagine you need a fair bit of knowledge in DSP programming and electrical engineering, both will be pretty heavy on the applied math side of things. Probably a good way of starting would be to look up intro-level college books and figure out what's lacking in your math background, as well as looking up syllabus for EE degree, and you'd likely need some basic CS background as well.

    Of course, all of that is for serious shit. For just dicking around, there's probably something like SynthEdit that could be used for modeling valve preamps and power amps, which should be a tiny little bit easier.
     
    Solodini and Gmork like this.
  9. fcv

    fcv SS.org Regular

    Messages:
    68
    Likes Received:
    37
    Joined:
    Jul 31, 2019
    I'm just taking a complete shot in the dark here, but I'd tend to guess you chunk up the audio data, apply some sort of window like a hamming window, do a Fourier transform to get frequency information, boost the frequency levels, but cap them to certain thresholds for gain, further adjust the frequency levels for eq, then run it through an inverse Fourier transform, probably use another windowing function, and reassemble.

    Not sure why so many of you are focusing on stuff like interfaces. Don't need to look pretty to work.
     
    CerealKiller and Gmork like this.
  10. TedEH

    TedEH Cromulent

    Messages:
    8,357
    Likes Received:
    5,360
    Joined:
    Jun 8, 2007
    Location:
    Gatineau, Quebec
    I would wonder if it might make sense to start even smaller than that. Step one -> just clip your sample to get some really bad sounding fuzz. Step two or three is probably what's recommended above.
     
    Solodini likes this.
  11. R34CH

    R34CH Counter Culture Bullet Vulture

    Messages:
    207
    Likes Received:
    351
    Joined:
    Sep 19, 2017
    Interesting topic. I guess I always just assumed people would model the amp they are trying to recreate (i.e. resistor of this value goes here, such and such capacitor there) in something like Mathworks Simulink and then wrap a fancy UI around it.

    I'm sure I'm simplifying it way too much, but it doesn't seem that hard if the amp you're trying to model has a schematic freely available.

    Doing it well, however, heh...
     
    Gmork likes this.
  12. TedEH

    TedEH Cromulent

    Messages:
    8,357
    Likes Received:
    5,360
    Joined:
    Jun 8, 2007
    Location:
    Gatineau, Quebec
    I'm not familiar with simulink, but if it can spit out C / C++ implementations of your model, then I don't see why that wouldn't work, outside of maybe performance concerns.

    I've not really done any proper audio programming, but my understanding is that it has to be fast. The odd time I've had to do anything audio related for games, any performance hiccups in your audio was very audible.

    I'm curious whether this is not far off from the process used to create some plugins.
     
    Gmork likes this.
  13. astrocreep

    astrocreep SS.org Regular

    Messages:
    395
    Likes Received:
    34
    Joined:
    Aug 12, 2005
    Location:
    Edinburgh
  14. fcv

    fcv SS.org Regular

    Messages:
    68
    Likes Received:
    37
    Joined:
    Jul 31, 2019
    That's also a valid approach, however accurately modelling how real components actually behave in real life conditions can be incredibly difficult, and performance intensive.
     
  15. Chebax

    Chebax SS.org Regular

    Messages:
    50
    Likes Received:
    48
    Joined:
    Feb 24, 2012
    Location:
    California
    Funny enough, I also started doing some research on my own on the topic today.
    (I'm a software engineer with some background on signal processing so I thought this would be an interesting project)

    I found a few posts that look interesting, but I haven't had time to start playing with them yet. Look at this one:

    http://www.martin-finke.de/blog/articles/audio-plugins-001-introduction/

    Also, I'm interested in the idea of black-box profiling of amps with deep learning. This is hardcore nerdy stuff:
    https://www.mdpi.com/2076-3417/10/3/766

    Is this how the Neural DSP plugins work?

    Let us know if you end up building anything!
     
  16. Gmork

    Gmork SS.org Regular

    Messages:
    2,031
    Likes Received:
    1,324
    Joined:
    Apr 3, 2014
    Location:
    B.C. Canada
    Probably safer to say, YOU let us know when YOU build something. Im dumb as a bag of bricks lol. Its probably more likely ill build an actual amp as its more hands on, follow the instructions type work. As much as i love diving into the audio side of things like frequencies and all that i just cant see myself learning c++, but i guess we'll see.

    Kind of wish i could just work WITH someone and sit in the passanger seat and make suggestions etc.

    But like others have said, definitely an interesting subject!
     
    Chebax likes this.
  17. bostjan

    bostjan MicroMetal Contributor

    Messages:
    16,464
    Likes Received:
    5,305
    Joined:
    Dec 7, 2005
    Location:
    St. Johnsbury, VT USA
    Heh, well, building an amp is a totally different skills set than designing an amp.

    C++ isn't really that difficult at all, but honestly, is that what you'd use to make a plug-in for a DAW?

    I'm pretty good at mathematics, or at least I took a lot of classes and got good marks, but I really think that the bottle-neck stopping people from doing this sort of thing on their own is *time*. I can crank out code to do all sorts of stupid stuff, and I can play with numbers and circuits and all of that jazz, but I don't have the time nor the patience to take on a task like this.
     
  18. Chebax

    Chebax SS.org Regular

    Messages:
    50
    Likes Received:
    48
    Joined:
    Feb 24, 2012
    Location:
    California
    As a father of 3 young kids and working for a startup I guess I'd be fooling myself if I think I can find time for this. :(

    But well, I'll play a bit with it and let you guys know if the idea ever goes anywhere. At least I'm sure it'd be easy to find beta testers here.
     
    Gmork likes this.
  19. Sumsar

    Sumsar SS.org Regular

    Messages:
    1,555
    Likes Received:
    611
    Joined:
    Aug 29, 2014
    Location:
    Copenhagen, DK
    Tbh I don't think you need that much math knowlegde. You need to get an intuition for what the math means and does (like convolution filters etc), but you don't need to prove it, assume some math guy/girl already did that for you and you just have to implement it - can you tell I have a masters in physics and not in math :lol: ?

    I also thought about this a couple of years ago, but quickly realized it is a black whole to get stuck into to learn all that is needed.
    I guess it does depend on your approach as was mentioned earlier. Do you try to model every component and how they play together or do you just do a lot of analysis of an actualy amp with sine curves, white noise etc to measure EQ, time, harmonics, compression, input volume dependency of the aforemention etc.
    In the later case I guess you should start by modelling an idealized guitar sound, as in what comes out of the pickups, since that is the input signal that your amp will mathematically speaking transform to the output signal and you seek the function that does that transformation given not any input signal, just the guitar input signal.
    Anyway ranting, but you can see how you can quite easily spend an eternety on this :lol:
     
    Chebax likes this.
  20. TedEH

    TedEH Cromulent

    Messages:
    8,357
    Likes Received:
    5,360
    Joined:
    Jun 8, 2007
    Location:
    Gatineau, Quebec
    I dunno that I'd say that. The basics are as "easy" as any programming, but audio isn't a beginners topic, IMO, and it needs to be performant, which can lead you down some potentially deep and complicated rabbit holes of optimization. Writing performant C++ has a lot of pitfalls. Arguably, writing any C++ has a lot of pitfalls. It's not a "become good at in it a weekend" kind of skill. I say this as someone who uses C++ pretty regularly, started learning it a decade ago, and still haven't really put a dent in getting good at it.

    I made a really basic synthesizer in C++ for midi playback in a game about a year ago, using WASAPI, and it was a significant challenge. Building an amp sim from scratch without existing programming knowledge, math knowledge, etc., is going to be a huge uphill battle. I won't call it impossible, but it's a huge undertaking IMO. It's like saying "I want to build my own car, but I've never so much as changed a tire before".
     
    laxu, bostjan, odibrom and 1 other person like this.

Share This Page