Transfer function?

Discussion in 'Effects and the DSP' started by Nappylady, May 19, 2005.

  1. Tiger M

    Tiger M kX user

    Joined:
    Apr 14, 2004
    Messages:
    851
    Likes Received:
    0
    Trophy Points:
    0
    The first one is alright. You multiply by 2 after the signal has been trasformed so it could not exceed 0.5 and you finally get no overflow and saturation.

    The second one is a problem, since you can't use 2 in macsn, and the implementation is not as simple, you'd probably have to acces the accumulator.
     
  2. radiocolonel.it

    radiocolonel.it New Member

    Joined:
    Jan 16, 2005
    Messages:
    192
    Likes Received:
    0
    Trophy Points:
    0
    Ok, would u please do a code implementation of the formula i wrote above?

    x*(2-abs(x))
     
  3. radiocolonel.it

    radiocolonel.it New Member

    Joined:
    Jan 16, 2005
    Messages:
    192
    Likes Received:
    0
    Trophy Points:
    0
    ok... i think i can do this, correct me if i'm wrong:

    x*(1+(1-abs(x)))

    and it should be the same of

    x*(2-abs(x))
     
  4. Tiger M

    Tiger M kX user

    Joined:
    Apr 14, 2004
    Messages:
    851
    Likes Received:
    0
    Trophy Points:
    0
    There is no need to do things the hard way, use the other formula. This again won't work, since you get overflow (above 1).
     
  5. radiocolonel.it

    radiocolonel.it New Member

    Joined:
    Jan 16, 2005
    Messages:
    192
    Likes Received:
    0
    Trophy Points:
    0
    ......
    where is the code u posted? i tried it and it aint work!:(

    i was just making tries to see if i could write a function that does the same thing, i was doubtful the fact the value the "sound" coming into a plugin is between 0-1.
     
  6. Max M.

    Max M. h/h member-shmember

    Joined:
    Dec 7, 2002
    Messages:
    2,690
    Likes Received:
    9
    Trophy Points:
    63
    >x*(1+(1-abs(x)))

    that won't do the trick. let's see:
    result of 1-abs(x) is 0...1
    then 1 + (0...1) produces value > 1 and is saturated to 1.
    (you have unsaturated value in accum but you cannot do accum*x).

    (oops, a bit late ;)
     
  7. Russ

    Russ Well-Known Member

    Joined:
    Jan 17, 2005
    Messages:
    5,722
    Likes Received:
    13
    Trophy Points:
    48
    Sorry, that was my code... I wrote it quickly off the top of my head and then realized (as Max just stated) that you cannot do the necessary multiplication: accum * x.

    I deleted it, a moment after I posted it, but with email notifications...
     
  8. Max M.

    Max M. h/h member-shmember

    Joined:
    Dec 7, 2002
    Messages:
    2,690
    Likes Received:
    9
    Trophy Points:
    63
    well, 2*x*(1-abs(x)/2) will work, but do not forget to optimize this for .25 unity gain (but the code should hold >0dB input correctly as well).
     
  9. Tiger M

    Tiger M kX user

    Joined:
    Apr 14, 2004
    Messages:
    851
    Likes Received:
    0
    Trophy Points:
    0
    Yep, that's what I had in mind but decided not to elaborate things;)

    Russ' code doesn't work, because it does the opposite, it goes under -1.
     
  10. radiocolonel.it

    radiocolonel.it New Member

    Joined:
    Jan 16, 2005
    Messages:
    192
    Likes Received:
    0
    Trophy Points:
    0
    .. Hy guys , i'm glad other people are getting interested about this argument!
    Right now i'm understanding the limit of doing things in dane, it's too bad i don't know c++, maybe i should start learning!!!
     
    Last edited: Jun 14, 2005
  11. radiocolonel.it

    radiocolonel.it New Member

    Joined:
    Jan 16, 2005
    Messages:
    192
    Likes Received:
    0
    Trophy Points:
    0
    I didn't want to make things harder with no reason, i just wanted to make something similar but in a different way since i didn't think about the saturation with macs and the problem of using 2-...:duh:

    i'm doing these things... while i wait for your waveshaper, the one for the electric gutar! I would love to try it! It's a pity i' m not able to program in c++ so i have to wait "some good men" release cool plugins so ignorant fools like me can use it!:lol:
     
    Last edited: Jun 15, 2005
  12. Tiger M

    Tiger M kX user

    Joined:
    Apr 14, 2004
    Messages:
    851
    Likes Received:
    0
    Trophy Points:
    0
    You don't need to know C++ to make a waveshaper, the dsp code is much more complicated than the cpp part, which is used only for the dialog (and a very bad timer if needed) nothing more.

    EDIT: and if you need to control registers with midi of course.
     
  13. radiocolonel.it

    radiocolonel.it New Member

    Joined:
    Jan 16, 2005
    Messages:
    192
    Likes Received:
    0
    Trophy Points:
    0
    ok, i understand what u say, so i'm wondering how to do certain things since the macs instruction goes on overflow and that kind of things...:duh:
    Thanks of course of your help, i hope i'm not annoying u!;)
     
  14. Max M.

    Max M. h/h member-shmember

    Joined:
    Dec 7, 2002
    Messages:
    2,690
    Likes Received:
    9
    Trophy Points:
    63
    >how to do certain things since the macs instruction goes on overflow

    it's just a matter of proper scaling and operations order. yep, that is kind of art but it's quite simple art - just some expirience and a bit of magic ;)
     
    Last edited: Jun 15, 2005
  15. radiocolonel.it

    radiocolonel.it New Member

    Joined:
    Jan 16, 2005
    Messages:
    192
    Likes Received:
    0
    Trophy Points:
    0
    ... Hey Guys! It would be cool to be able to do something like this:cool::


    amount should be in [-1..1]


    x = input in [-1..1]
    y = output
    k = 2*amount/(1-amount);

    f(x) = (1+k)*x/(1+k*abs(x))


    Tiger, Max, Russ, any idea about how implement this in dane?
     
  16. Max M.

    Max M. h/h member-shmember

    Joined:
    Dec 7, 2002
    Messages:
    2,690
    Likes Received:
    9
    Trophy Points:
    63
    :) lol.
    no problem. but before we get into details could you inform us of your final goal?
    are you looking for a "good sounding" waveshaper?
    are you trying to learn how to implement good overdrive/distorion effect?
    do you want to study fx8010 programming cake or need a ready-to-use solution?
     
    Last edited: Jun 15, 2005
  17. kokoon

    kokoon New Member

    Joined:
    Feb 18, 2003
    Messages:
    269
    Likes Received:
    0
    Trophy Points:
    0
    i say we build a fully-customizable waveshaper!
     
  18. Tiger M

    Tiger M kX user

    Joined:
    Apr 14, 2004
    Messages:
    851
    Likes Received:
    0
    Trophy Points:
    0
    It's already been done...
    EDIT: Image link removed by me.
     
    Last edited: Jun 15, 2005
  19. radiocolonel.it

    radiocolonel.it New Member

    Joined:
    Jan 16, 2005
    Messages:
    192
    Likes Received:
    0
    Trophy Points:
    0
    Please let us have it!:duh::duh::duh::eek::eek::eek:
     
    Last edited: Jun 15, 2005
  20. Tiger M

    Tiger M kX user

    Joined:
    Apr 14, 2004
    Messages:
    851
    Likes Received:
    0
    Trophy Points:
    0
    I want to finish the whole 'guitar suite', and then release everything as a package.
     

Share This Page

visited