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

How to make unity gain buffer?

Discussion in 'Building With Reaktor' started by Misha Davidoff, Mar 5, 2016.

  1. Misha Davidoff

    Misha Davidoff Member

    Messages:
    79
    Hello my friends! How to make unity gain buffer in Reaktor (or op-amp)? I need it for Freqbox emulation. Thanks!
     
  2. chaircrusher2

    chaircrusher2 NI Product Owner

    Messages:
    155
    A unity gain buffer in analog circuits is there to isolate the input from other signal paths the input connects to, and to to minimize voltage sag due to load.
    Neither problem exists in the digital domain, so it isn't necessary. To fully simulate it, you'd either need to simulate an op amp circuit, or implement a transfer function approximating the op Amy's nonlinearity.
    TL;DR skip it and see how it sounds.

    The quick and dirty simulation might be a gain boost followed by a saturated followed by the same gain reduction.
     
    • Informative Informative x 1
  3. Misha Davidoff

    Misha Davidoff Member

    Messages:
    79
    Hello! How I can make gain boost followed by a saturated followed by the same gain reduction?
     
  4. colB

    colB NI Product Owner

    Messages:
    3,969
    Why do you need it?

    In analog electronics, unity gain buffers are designed to have as little effect on the signal as possible - basically, if it colours the sound, then it is badly designed.
    If your emulation is sounding almost exactly like the original, but high level inputs don't quite have the right 'warmth' then there is a small chance it would be worth trying some sort of subtle saturation. Otherwise, there will be lots of other areas to work on that will give you better results than focusing on unity gain buffers.

    Developers emulating analog gear love buffers because they simplify the analysis process - you don't emulate the buffer, but it does mean that the stuff you do emulate is simpler and more efficient to implement. As chaircrusher said, buffers isolate sections of circuit from each other - if they are not isolated in this way, each needs to be part of the emulation of the other!
     
    • Informative Informative x 2
  5. mosaic_

    mosaic_ Guest

    1. Multiply the input X by a parameter P, where P > 0 and -1 < X < 1.
    2. Run P*X through a suitable function f(x) (like arctan) to saturate it.
    3. Divide the output by f(P). In other words, saturate P and divide by that.

    You should get a formula like Y = arctan(P*X)/arctan(P). As long as P is not zero, this will compensate for the gain very well.
     
    • Informative Informative x 2
  6. chaircrusher2

    chaircrusher2 NI Product Owner

    Messages:
    155
    It's just math.
     
  7. Misha Davidoff

    Misha Davidoff Member

    Messages:
    79
    Hello Colin! I decided to recreate the device from the beginning. Primarily signal goes to Unity gain buffer. Our Freqbox doesn't sound right yet, I think there some issues in the input and output levels between elements. As I understand -5v to 5v of Freq input is for expression pedal, but not for input audio signal.
    I think here is a key: AUDIO IN 1⁄4” phone jack – accepts any instrument-level or line-level
    signal from –16 dBm to +4 dBm. Input impedance is 1 Megohm.
    How to make this dB range and this input impedance?
    What about saturation? - very interesting, but how much of saturation is needed. This is a truth that Freqbox saturates (colours) the signal even signal comes thru bypass? Or I'm wrong?
    I've tried Michael Hetrick's Shaper for this purpose. I don't know why but it sounds well to me. 1.png

    2.png
    I'm doing everything right?

    If your emulation is sounding almost exactly like the original - you think so?=) I think Freqbox provides some sort of amping the signal (even in bypass). Maybe I'm wrong..

    Otherwise, there will be lots of other areas to work on that will give you better results than focusing on unity gain buffers. - tell me my friend (and how I can make it)
     
  8. colB

    colB NI Product Owner

    Messages:
    3,969
    Primary signal goes into a buffer to prevent the circuitry of whatever you are plugging into it from altering its performance. In digital emulation you can pretend that it doesn't exist. If you try to 'emulate' an input buffer by introducing some arbitrary waveshaper that you are purely guessing 'could' work, there is a 99.9% likelihood that you will end up further away from your goal. If you really want an accurate model of the buffer because you think everything else is near perfect (you would need golden ears to hear the effect the buffer is having), then you need to take the lid off your freq box, get a signal generator, a scope and a frequency analyser, then wire the test equipment up to just before and just after the buffer. You then measure the effect it's having on various signal levels, create a graph of the result, then use some math/dsp engineering to generate code that models that graph as closely as possible. If you want to get really close, you need some way of measuring and modelling transient behaviour as well.
    If you don't have the kit and/or knowledge to do this, probably best just to ignore the buffer. I suspect that the folks who do have and use this kind of kit to emulate hardware would probably not even bother looking at the input buffer - they would happily ignore it.
    That is a very wide range.
    Makes me think that there might be some sort of compression going on in the circuit to equalize the levels - if so you would need to model that in some way. Which brings up an important point. If you are trying to emulate hardware, it's pretty important to have a schematic and understand it well enough to at least recognise basic functionality (or find somewhere on the web where some expert has kindly done that job for you)

    (btw, the 1 Megohm is partially due to the buffer, and means that the circuit is well protected from input loading - you can ignore it)
    The only way to know how much saturation is to analyse the actual freqbox and work it out - you could use test equipment, circuit analysis techniques, or just trial and error with lots of listening tests.

    I can't help you with any of that because I don't have a freqbox. I can't tell you whether your emulation is close or not either, for the same reason.
     
    • Like Like x 1
  9. Misha Davidoff

    Misha Davidoff Member

    Messages:
    79
    I don't have a freqbox too.
    Ok, I'll ignore the buffer

    From manual:
    The Drive signal is also used as the input to the envelope follower
    and the FM signal for the VCO. This means that the setting of the Drive
    control has an affect on the response of both the envelope amount
    control and the FM Amount control, as both rely on the dynamics of
    your playing. For optimum use of the envelope follower, you’ll want to
    set the Drive control so that your normal signal causes the Level LED
    to light yellow-orange. A little red is OK for the peaks of your playing.
    If overdrive is desired, turn the Drive control up until the Level LED is
    mostly RED. Now the drive signal will no longer be clean. One result
    of increasing the Drive control is that you also increase the level of
    the signal available for FM. Another is that the drive signal becomes
    compressed and the envelope follower is not as responsive to the
    dynamics of your playing. It is perfectly OK to use the FreqBox with the
    Drive control all the way up.

    Env. Amount:
    The Env. Amount control sets the amount that the
    envelope follower CV is applied to the VCO frequency. Note that the
    envelope follower CV is ADDED to the setting of the Freq control.
    The VCO frequency can be swept by the envelope follower CV over 8
    octaves, more than the Freq control on the front panel. Be aware that the
    setting of the Env. Amount control depends a great deal on the setting
    of the Drive control, as it is the drive signal that is used to extract the
    dynamic information. The optimum setting of the drive control is such
    that average levels cause the Level LED to light mostly Yellow-Orange,
    and peak levels might cause a little red. If the Drive control is cranked
    for distortion, then the performance of the envelope follower is reduced
    in responsiveness as the drive signal is compressed somewhat from the
    clipping of the signal.


    I found that http://freestompboxes.org/viewtopic.php?f=1&t=13419
    Maybe some Freqbox's owner could help?

    But we used it for FM amount. I'm a little confused here