Looking for building resources for DSP-based guitar effects using microcontrollers

Discussion in 'General Music Discussion' started by Xaios, Oct 4, 2017.

  1. Xaios

    Xaios Foolish Mortal Contributor

    Messages:
    9,710
    Likes Received:
    1,580
    Joined:
    Dec 3, 2007
    Location:
    Nimbus III
    Some context: I've just started my 2nd year of electronics engineering (although technically I'm in a diploma program for techs, but after this I plan to bridge to a university to get my bachelor's degree). In the winter/spring term next year, we spend the entire term working on a capstone project. Naturally, as a guitarist, my mind gravitated towards building circuits for audio effects such as pedals. But I think it would really be great if I could learn how to use DSP (digital signal processing) using a microcontroller in order to accomplish this as well, so I could build a rudimentary digital multi-effects pedal.

    So, I was wondering, has anyone here done this kind of thing before? If so, what are some good references to get my feet off the ground? Also, what are some good choices for a microcontroller to use? We're currently learning basic microcontroller programming (I'm not exactly fond of Assembly code right now, let me tell you, but I know that's just something I'll have to get over) on the Microchip PIC18F452, so something with a comparable instruction set would be preferable (although I also realize that, if I'm going to be using a microcontoller meant specifically for DSP that this isn't terribly likely).

    I realize full well that I might be overreaching given the skills I may or may not acquire between now and January, it's hard to know for sure what I'll be capable of by then without having actually learned it, so I plan to also research analog effects as a fallback. But still, this is something I'd *love* to be able to learn to do.
     
  2. vansinn

    vansinn SS.org Regular

    Messages:
    2,928
    Likes Received:
    165
    Joined:
    Sep 22, 2007
    [FLASHBACK]
    Ahh, the wonderful world of assembly code...
    [/FLASHBACK]

    Firstly, you'll get the hang of assembly. Secondly, many DSP's are build on the same principles, like i.e. the enhanced Harward architecture, so most assy languages share a lot of common ground, so having learned one you'll be able to get into the next.
    And mind ya that most DSP's have highlevel libraries (in C, C++, C#) for a lot of common things.

    I have no direct help to offer; hoiwever, as I'm interested too, has bookmarked this thread and will be back if I spot something.
    You know, you could learn to reverse engineer existing code, not to steal and copycat, but for the learning effect.
    As Ulf Behringer said it, "Don't you think Mercedes has the latest BMW in their lab?"
     
  3. Lemonbaby

    Lemonbaby SS.org Regular

    Messages:
    387
    Likes Received:
    192
    Joined:
    Jun 3, 2015
    Location:
    Germany
    I used to program guitar effects during my university time on a Motorola DSP56303 Evaluation Kit. At that time (1998) it was a whole lot of work, the evaluation kits are a lot more powerful today with better toolchains and more SW/libraries available for free. Of course, being familiar with the mathematical foundation of more complex effects like Reverbs always helps, but simple effects like bit crushers, comb filters or simple modulation FX are implemented in 10 minutes.

    I'd go for a board of one of the big names (ADI, TI or Freescale/NXP), those are usually equipped with line in/out connectors and enough flash memory even for complex DSP applications. Make sure you check for the total system price as some boards don't have the debugger/emulator (OnCE) on the PCB.
     
  4. Xaios

    Xaios Foolish Mortal Contributor

    Messages:
    9,710
    Likes Received:
    1,580
    Joined:
    Dec 3, 2007
    Location:
    Nimbus III
    Awesome, thanks for the advice! Of course, the mathematical aspects of effects is something I also need to learn. Any advice on some good books or resources of other form to use? Thanks.
     
  5. Malevolent_Croatian

    Malevolent_Croatian SS.org Regular

    Messages:
    777
    Likes Received:
    84
    Joined:
    Apr 30, 2012
    Location:
    Toronto
  6. GeckoNox

    GeckoNox SS.org Regular

    Messages:
    4
    Likes Received:
    2
    Joined:
    Nov 9, 2016
    Location:
    London UK
    I saved a bunch of links to DSP projects a while ago but this seems to be the only one that still works:

    http://ldesoras.free.fr/doc/articles/pedale-vite/pedale-vite-en.html

    Unfortunately it's mostly in french, but Google translate might do the job.


    The others were on diystompboxes.com, which seems to be having issues at the moment. But they have an entire DSP section with over 11,000 posts, none of which seem to be showing up right now...



    Good luck! Keep us posted if you make anything cool.
     
    Xaios likes this.
  7. Lemonbaby

    Lemonbaby SS.org Regular

    Messages:
    387
    Likes Received:
    192
    Joined:
    Jun 3, 2015
    Location:
    Germany
    Good question with no easy answer. I'd always go first with the maths part - the programming will be relatively straight-forward once the concepts are clear. The EVMs you get today all come with libraries for all kinds of transformations, analytics and other stuff. E.g. when using an FFT you "only" need to know how to choose the right parameters for the input and how to interpret the output array to use it in a musical way. There's probaby around 10 transformations and numerical methods used for a huge portion of the usual guitar FX, so check first which one you need and examine those. I'd start with FFT, filters (FIR/IIR) and windows functions.
     
    Xaios likes this.
  8. vansinn

    vansinn SS.org Regular

    Messages:
    2,928
    Likes Received:
    165
    Joined:
    Sep 22, 2007
    I have no literature to offer, but you could likely learn a thing or two by downloading opensource audio applications (for Linux), and peek'n'poke the code.

    I'm beyond super busy right now, but will go check and find my list of such applications..
     
    Xaios likes this.
  9. Xaios

    Xaios Foolish Mortal Contributor

    Messages:
    9,710
    Likes Received:
    1,580
    Joined:
    Dec 3, 2007
    Location:
    Nimbus III
    Thanks. I figured FFTs would factor into it, which is something that we haven't learned quite yet (although I think it's coming later this term).
     
  10. Overtone

    Overtone SS.org Regular

    Messages:
    2,308
    Likes Received:
    205
    Joined:
    Dec 3, 2008
    Location:
    USA
  11. Xaios

    Xaios Foolish Mortal Contributor

    Messages:
    9,710
    Likes Received:
    1,580
    Joined:
    Dec 3, 2007
    Location:
    Nimbus III
    Wat?
     
  12. Overtone

    Overtone SS.org Regular

    Messages:
    2,308
    Likes Received:
    205
    Joined:
    Dec 3, 2008
    Location:
    USA
    The song is called "Nerd Alert" ;)
     

Share This Page