• Posts
  • RSS
  • ◂◂RSS
  • Contact

  • Balancing Audio in Software

    March 6th, 2022
    music, tech, whistling
    A few months ago I ported my whistle controlled synthesizer to the Raspberry Pi. I configured it with mono output, and ran it through a DI box to get a balanced XLR output I could send to a sound board. I realized a few weeks ago, however, that I don't actually need a DI box, and I can balance the audio in software. Now that I've made the change I wanted to write about how it works.

    To send an audio signal, you need two conductors: the signal and a reference (ground):

    This works fine, unless you get radio frequency interference. There's energy in the air, from intentional broadcasts or noisy devices, and the weaker your signal or longer your cable the more it will shift the signal:

    There are a few different technical solutions, but the most common one in audio is to use a balanced signal. In addition to our signal, we add an "anti-signal" which is the same signal but reversed:

    Instead of interpreting the signal relative to ground, we now interpret it relative to the anti-signal. Absolute magnitude is unimportant, what matters is the delta. Now when we get interference, it still shifts our signal, but it makes an almost identical change to our anti-signal, and the difference between the two signals is almost unchanged:

    Normally you create the anti-signal with a transformer, in a DI box, but my software already has access to stereo output. If I want to send X, I can write X to the left channel and -X to the right. With a 3.5mm to 1/4" TRS cable I can be as far as I need to be from the board without worrying about interference.

    (Do be careful not to use a 3.5mm to XLR cable: you need to connect to the mixer's "line" and not "mic" input. The latter often will provide "phantom power", which is designed to feed microphones power backwards, through their output. The soundboard provides +48V to both the signal and anti-signal pins, relative to ground. This could break your sound card, since that's a lot of voltage to something that was probably not designed to receive it. You might think you could turn off phantom power on inputs that don't need it, but on the (cheaper) mixers you would typically see at a contra dance or bar there is typically one switch for the entire board.)

    Comment via: facebook, lesswrong

    Recent posts on blogs I like:

    Futurist prediction methods and accuracy

    I've been reading a lot of predictions from people who are looking to understand what problems humanity will face 10-50 years out (and sometimes longer) in order to work in areas that will be instrumental for the future and wondering how accurate thes…

    via Posts on September 12, 2022

    History of group sleeping

    Not as normal as it once was The post History of group sleeping appeared first on Otherwise.

    via Otherwise August 10, 2022

    On the Beach

    I really like going in the water and this beach is a great place for building sand castles and boogie boarding. I also like trying to float on top of big waves. I'm not very good at it. I only float on the flat waves.

    via Anna Wise's Blog Posts July 12, 2022

    more     (via openring)


  • Posts
  • RSS
  • ◂◂RSS
  • Contact