Menu

Curved envelope segments - what am I doing wrong?

2018-01-13
2018-07-09
  • søren andreasen

    Hello Daniel (if you're still around here),

    I bought your book a few months ago, hoping it would be a good entry point to getting some hands-on with DSP. I have a lot of coding experience from other environments, and music production / sound design experience.

    My first bump on the road seems to be the curved envelope code in your book, page 43. I have implemented this exactly as you say (so I believe) but it's not working as expected. I would love to see an implementation of this code that actually works while I don't understand what the "range" variable is for, and how this code can ever work due to the fact that expX will always be =< 1.0, which in turn will make sure that powering expX doesn't have any effect.. But maybe I just misunderstood something?

    Here's a link to my implementation, and discussion thereof https://forum.bela.io/d/443-adding-an-envelope-to-basic-sine-patch/3

    Regards
    Søren

     

    Last edit: søren andreasen 2018-01-13
  • Daniel Mitchell

    Daniel Mitchell - 2018-07-09

    Hi Soren,

    Sorry for the delay in responding. I checked the link you posted and that looks like a good solution.

    If you look at the Example02 code you will find a different, and much easier, way to produce a curved attack. (simply use volume^2 since the value varies from 0-1)

    And, yes there are typos in the book and the examples are pseudocode. Unfortunately, I had a stroke in 2012 and can't work on corrections. :(

    Dan

     

    Last edit: Daniel Mitchell 2018-07-09

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.