1. IMPORTANT:
    We launched a new online community and this space is now closed. This community will be available as a read-only resources until further notice.
    JOIN US HERE

learning DSP design

Discussion in 'Building With Reaktor' started by Tun, Jun 18, 2013.

  1. Tun

    Tun NI Product Owner

    Messages:
    224
    hi everyone
    im pretty new to DSP design (other than very basic stuff) and i want to build a reverb.
    while looking around i have realised that i will need to know a lot more about the maths behind reverb to create a nice sounding one.

    i learnt enough about the main structure from a few resources and from looking at some reverbs from the user library and factory library to build my own, but it doesnt sound anything like i want it to and is just a makeshift version of certain sections of the spacemaster reverb.

    the thing im asking more than anything is where do i start when learning all this stuff?
    when i look at pages like these...

    https://ccrma.stanford.edu/~jos/Reverb/

    ... i see that i would clearly benefit from learning DSP design from the ground up, but i cant find any resources to learn from. i cant afford college courses at the moment (as much as i would love to take some), so does anyone have any advice or links to get me going?

    thanks
    ---
    i probably should add. i obviously want to aim my DSP design at audio related builds. but i assume the concepts are the same
     
  2. salamanderanagram

    salamanderanagram NI Product Owner

    Messages:
    3,454
    if you have the time you can often audit math classes at your local college for free (i think this means they won't grade your homework or let you take tests but you can sit in on the class itself, but i've never done it so i'm not sure of the specifics). once you understand the math most of DSP is pretty easy to understand.

    you could work your way up to discrete math which deals with a lot of DSP concepts if i remember correctly (it was a long time ago and i didn't know what DSP was then).

    that said - reverb is a terrible place to start. within the first section of the page you linked you are expected to know what a transfer function is, which you should learn about filter design first.

    the second page wants you to know convolution, also a filter design topic.

    etc...

    i think a decent command of math and a lot of patience is required to make a reverb that doesn't sound like a tin can. i've never made a reverb that i would bother to share.

    the 'ideal' reverb sound is basically exponentially decaying white noise.
     
  3. Tun

    Tun NI Product Owner

    Messages:
    224
    i wouldnt be able to find the time to go to maths classes anyway with work, family and trying to build my sound design career :/

    i will look into discrete maths and filter design first. i already looked into filter design a little bit, but it still seems overall over my head. actually the only guide i found to be useful to me so far was yours on your tutorials site :) thanks for that whole site by the way, ive learnt a lot from it!

    i will put reverb aside for now and look more into filter design and figuring out where i am at with the maths.

    thanks
     
  4. salamanderanagram

    salamanderanagram NI Product Owner

    Messages:
    3,454
    glad to hear it, grasping filter lingo literally took months of going through documents that were way over my head to piece together everything. i really want this sort of thing to be more accessible.

    i'll try to put up some reverb stuff in july maybe. it won't be anything special, just a few implementations of known algorithms (which tend to not be so great, since the best designs are usually kept secret). but it will show the general idea, which is to use an array of dispersion delays.
     
  5. Tun

    Tun NI Product Owner

    Messages:
    224
    thanks for the help. i will start with filters then, i think once im familiar with those the rest should fall together quite easily. well, easier :)

    i would love to see some reverb stuff on your site!
    although i already understand roughly what makes them work (the diffuser delays thing), i still dont understand why, or more importantly, the maths behind it all and what changes in the math cause what changes in the sound.

    thanks for all your help.
     
  6. salamanderanagram

    salamanderanagram NI Product Owner

    Messages:
    3,454
    think of a sound wave emanating from a source, bouncing off a wall or two (diffusing), and then arriving at a listeners ear as an echo, or delayed version of itself.

    the trick then becomes to spread out the delays so that they don't create noticeable 'metallic' ringing sounds but more of a white noise sound, that's the basic idea.
     
  7. muirscape

    muirscape Forum Member

    Messages:
    28
    From what I've learned synthesized Reverb design is still quite a quirky/complex skill. Historically, reverberators were created basically using a rough trial-and-error approach to zero in on the best "exponential decaying white noise" impulse response. There's an AES paper that an employee at Lexicon wrote up, basically telling how the Lexicon engineers would test different arrays of reverb modules (Delaying all pass filters, delaying comb filters, etc..) & tweak the knobs till the sound was "ideal", hardwire most of those knobs and only give the user a few controls that wouldn't mess up the sound. I think Lexicon fired and sued the guy, but lost.

    My professor told us stories of grads that would splice in random feedback lines all over the place and whip up franksteinish reverb designs. Last AES he himself presented a paper on using genetic algorithms to come up with values that create impulse responses as close possible to that coveted exponential white noise decay.

    He wrote a book http://www.amazon.com/Designing-Audio-Effect-Plug-Ins-Processing/dp/0240825152/ref=sr_1_18?s=books&ie=UTF8&qid=1339611970&sr=1-18&keywords=pirkle that has some really excellent content for those new to DSP (like me 4 months ago!). As Salam. said, reverb's got more bulk to it, which is why he put the reverb chapters in the back of the book. He goes through all the complex number maths very pragmatically. Good stuffs.
     
  8. Tun

    Tun NI Product Owner

    Messages:
    224
    i see. that was the problem with my reverb, it sounded very metallic. i managed to hide it slightly with a LP filter dampening the reverb, but it still sounded metallic. do you mean you spread them out in time? so that there are inconsistencies in the spacing?
    ---

    thanks
    i will look into these things. i think that book could be a great help too! i will definitely be putting money aside over the next couple of weeks to get hold of that. i am interested in programming DSP effects in code too in the future, but for now is it easily translated to things like reaktor and synthedit?

    thanks
     
  9. salamanderanagram

    salamanderanagram NI Product Owner

    Messages:
    3,454
    yes, you need to space things out so that so particular frequency is accentuated by the echoes themselves. for example if you have delays of 5, 10, 15, and 20 milliseconds, those all have a common denominator of 5 ms ( = 200 Hz) which creates the 'metallic' sound that is common with bad reverb algorithms (no offense, mine sound like that too!).

    this is why cubic spaces are shunned for studios - the ways the walls reflect sound allows certain frequencies to build while others are dropped.
     
  10. muirscape

    muirscape Forum Member

    Messages:
    28
    I've never used synthedit, but I started on Reaktor. Half way through my class I realized that Reaktor core could be transcribed into C++ very easily. Thus, I'm working on a AU/VST emulator of Space Master with a few custom tweaks ;)

    Primary level isn't quite as similar to C++ as core, but it all runs on the same fundamental DSP principles.
     
  11. Tun

    Tun NI Product Owner

    Messages:
    224
    i see!
    is that what this graph is showing?
    http://www.acoustics.hut.fi/~riitta/.reverb/comb_imp.jpg
    ---
    excellent! i will look into getting hold of a copy of that book, and look into more C++ stuff too.

    thanks for the help
     
  12. creart

    creart Forum Member

    Messages:
    47
  13. colB

    colB NI Product Owner

    Messages:
    3,969
    The main difference is that a c++ vsti will need to manage the processing and juggling of buffers while in reaktor we can ignore that part of the puzzle.

    Also be careful that you have permission to use the code. Reaktor code comes under copyright law just like any other code. If you lift and reuse code from a Reaktor core module in your c++ project without permission, you are technically breaking the law. You'll be ok if it's just for personal use, but if you start sharing it or selling it, you could get in trouble.
     
  14. Tun

    Tun NI Product Owner

    Messages:
    224
  15. creart

    creart Forum Member

    Messages:
    47
    You're welcome Tun, I hope you understand more from the math than I do :)
    And the biggest problem will be to 'convert' that to Reaktor...
    I'm reading up on core at the moment and find it harder to grasp....
    The primary stuff is pretty easy depending on what you want but this is REALLY deep!
    cheers
    Hans
     
  16. Tun

    Tun NI Product Owner

    Messages:
    224
    some of the math is hit and miss, but they are definitely great links to have in my bookmarks! anything that i dont understand now i know i will understand and make good use of further down the line anyway.
    ive been learning core recently too. its much more complicated than primary, but actually a lot more simple than i first thought.
    converting things to reaktor can be difficult, but once you understand why something works the pieces kind of fall together.
     
  17. creart

    creart Forum Member

    Messages:
    47
    will give it a try - will need to start with simple things I'm sure...
    but like with yourself it's the things like reverb, convolution etc that sounds the most interesting to me... but apparently they're also the most challenging.
     
  18. muirscape

    muirscape Forum Member

    Messages:
    28
    Aye about the copyrights. I have no intention of ever hurting the Reaktor's development, and especially no intention of obtaining profit on this, but it' be cool to be able to post it to my site. How far changed/customized does one have to render the code until it's lawful? When you get far down enough, most of those core modules in Space Master are delaying all pass filters with frequency damping, which, there is quite a lot of published public knowledge out there about.
     
  19. creart

    creart Forum Member

    Messages:
    47
  20. wehkah

    wehkah Guest