Making a signal balanced via DSP?

Discussion in 'Effects and the DSP' started by Cradle22, Apr 15, 2003.

  1. Cradle22

    Cradle22 New Member

    Joined:
    Feb 10, 2003
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    0
    Hi!

    I was wondering if it is possible via kxProject's DSP (and with the give plugins) to change an unbalanced (Mono) signal (= normal signal) into a balanced signal (+ / -), which then in turn gets delivered via a stereo output (making my own cable, 3.5 mm on one side, XLR on the other side)?

    I ask this because of some amps I have lying around :)) :) :) :) :) ) which can / must use balanced inputs...

    Of course I also have some OPA134, but I want to avoid pre-amp stages whenever possible...

    Any suggestions? Simply using the "Phase" plugin does not seem to be enough...


    Thanks,

    Cradle22
     
  2. blcl

    blcl New Member

    Joined:
    Dec 13, 2002
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    0
    Theoreticly it is possible. But i think not easy to program.
    Following steps are to do:

    You have to separate the positiv and the negativ period of the signal.
    So, because the sound is represented by binary numbers which are from 0 to 65535 (in case of 16 bits) a full sinus period goes from 0 to 65535. So if you want to separate the positive and the negative half wave you have to draw a line in the middle at 32K which is 15 bit.
    You have to create a program that leads the signal above the 32K to the let us say left side, and rhe signals below it to the right side.
    This is the first step. If it works, you only have to assure that your signals DC offset is 0, which means that null (when nothing is coming) is exactly at 65535/2.
    May you should ask EYAGOS to create this code.

    BLCL
     
  3. eyagos

    eyagos New Member

    Joined:
    Dec 11, 2002
    Messages:
    259
    Likes Received:
    0
    Trophy Points:
    0
    Well, the code is simple (think that signal goes from -32k to +32k). Here you have it:

    But I think it is not a good idea to do this with the sound blaster. I supouse you want to get a balanced output to avoid losses or noise with a very long cable. But think that AC7 is a very noisy input...

    And although the signal is correct inside the DSP, it may not be "exact" in the analog output...
     
  4. eyagos

    eyagos New Member

    Joined:
    Dec 11, 2002
    Messages:
    259
    Likes Received:
    0
    Trophy Points:
    0
    Well, wait a moment... The two outputs must be positive?? In this case replace the last code line for:

    macsn out2,0,tmp2,1
     
    Last edited: Apr 19, 2003
  5. eyagos

    eyagos New Member

    Joined:
    Dec 11, 2002
    Messages:
    259
    Likes Received:
    0
    Trophy Points:
    0
    Or maybe the one you need is this other:

    hot output -> in pahse
    cold output -> out of phase

    In this one you have the same signal in the two outputs, but with oposite sign. I think that this is a "correct" balanced output, instead of the one blcl told... ?¿ (correct me)

    The only limitation with this plugin is the input you use: If you are going to use the AC97 input, it would be better to forget this and use some other method. But if you use the Live Drive..., it could give you enough quality for your "professional" amp.
     
    Last edited: Apr 19, 2003
  6. Max M.

    Max M. h/h member-shmember

    Joined:
    Dec 7, 2002
    Messages:
    2,690
    Likes Received:
    9
    Trophy Points:
    63
    >In this one you have the same signal in the two outputs, but with oposite sign. I think that this is a "correct" balanced output, instead of the one blcl told... ?¿ (correct me)

    absolutely agreed... of course it's just a matter of inverting phase, nothing more...
     
  7. Cradle22

    Cradle22 New Member

    Joined:
    Feb 10, 2003
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    0
    Hi all!

    Thanks a lot! I actually began fiddling around with the DSP assembler for myself, but it takes some time getting used to it (my last assembler experiences go back to the good old C=64....).


    So thanks for providing a quick solution. I will try it out sooner or later (have to finish another amp I'm building first).

    The balanced signals should make it easier to use longer interconnects to my amps without adding distortions...

    Keep up the good work!

    Cradle
     
  8. Cradle22

    Cradle22 New Member

    Joined:
    Feb 10, 2003
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    0
    Hi!

    Well, I will try it, and also build a professional balancing circuit based on the Burr Brown DRV134 (not OPA134 like I said above...). That OP is regarded as the best integrated balancing IC, and if kx comes even close to its performance, I will stick to kx... less parts in signal path...

    Thanks,

    Cradle
     
  9. doppler

    doppler New Member

    Joined:
    Jan 18, 2005
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    0
    Cradle, did you get this DSP balanced-out thing working?

    I was wondering the same (have an sblive): inverting "a copy" of one channel's signal in the DSP and routing the resulting original and inverted signals say to front out; the same for the other channel (right) routed to centre out, so i'd simply had to make a suitable cable for converting those 3,5mm jacks to 1/4" TSRs or XLRs. Thought of using front out and center out cause they've both supposed to have AC97 outputs (so at least they'd be equal in sound).

    Do not have a bal-input mixer near-by to try it out now; however, as we occasionally do live perfomings with our band (we use a bunch of PC's) it could be handy. Though - which would do better, the less noisy rear out (i2s?) with an unbalanced cable or the balanced front/centre output (the cables tend to be around 10 metres and those lovely sound engineers always raise their eyebrows "what!? no balanced output??")
     
  10. TravelRec.

    TravelRec. Alternative Audioproductions

    Joined:
    Sep 8, 2003
    Messages:
    1,710
    Likes Received:
    3
    Trophy Points:
    0
    Also a very easy way to make a balanced out is to make a little circuit with a single (FET) Op-amp (such as TL071) that acts like an inverter with 1:1 amplification. Wire the original soundcard output to the hot pin of XLR and invert the same signal with the Op-amp and wire it´s output to the cold pin. Cost around 5 $ / EUR and half an hour of work...
     
  11. doppler

    doppler New Member

    Joined:
    Jan 18, 2005
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    0
    Right, that's not too complicated but requires +V / -V voltage. Those TL071's cost as little as one euro and I could just find a suitable power supply box in my shelves, however as a concept that DSP-driven inverter sounds alluring, doesn't it. So no-one given the trick a try? Guess then it's a 'do it yourself, Doppler-boy' ;)
     
  12. TravelRec.

    TravelRec. Alternative Audioproductions

    Joined:
    Sep 8, 2003
    Messages:
    1,710
    Likes Received:
    3
    Trophy Points:
    0
    Yep, hardware needs a power-supply, that´s right. But it works also with a single supply (9V battery...) if you make a voltage divider on the non-inverting input of the OP-amp and it has great performance. Done this for a DI-Box application and it works like a charm. Power consumption is around 3mA active... BTW: A direct balanced out from the card is also a nice idea, but it kills 2 stereo outs, I for myself need all possible outs for monitoring and fx insert.
     
  13. doppler

    doppler New Member

    Joined:
    Jan 18, 2005
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    0
    this thread is years old and i can't get the code working in current kX.
    i use the editor, copy the code and export it as dane source. but importing to the DSP is unsuccessful. why?

    Code:
    name "balanced";
    copyright "eYagos, Copyright (c) 2003.";
    created "04/19/2003";
    engine "kX";
    guid "2b539566-a863-43e9-8288-e2eef25c4b7c";
    
    input in
    output hot,cold
    macs hot,0,in,1
    macsn cold,0,hot,1
    
    end
     
  14. dj_stick

    dj_stick Apple Fanboy?

    Joined:
    Jun 3, 2003
    Messages:
    17,575
    Likes Received:
    204
    Trophy Points:
    88
    that's what I was thinking

    should be a simple matter of, in the dsp, connecting the same pin on the fXBUS (or whatever input you choose) to both a "Phase" plugin to invert the phase, a Delay plugin (to compensate for the delay induced by the phase effect - not sure the exact number of samples though, if present) and then connect those to seperate output pins (though try to use the same stereo jack) - you should now have a balanced output
     
  15. Russ

    Russ Well-Known Member

    Joined:
    Jan 17, 2005
    Messages:
    5,722
    Likes Received:
    13
    Trophy Points:
    48
    What version of kX are you using? With older versions of kX, you need to make sure that there is a blank line after 'end' (otherwise you will get an invalid plugin library error).

    Note: You do not need to use the kX Editor, you can use notepad or whatever... just paste in the above code and save it as whatever.da, and then double-click on the file to register the plugin.
     
    Last edited: Apr 9, 2009
  16. doppler

    doppler New Member

    Joined:
    Jan 18, 2005
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    0
    it registered successfully now, allthough i did not change the .da file at all. probably some error which got cured with a reboot.

    i'm actually going to use this plugin for getting a balanced mono input to get rid of some noise that appears in long cables. for this i load two copies of the plugin, just to be sure there is no delay between the signals that i get from the input. one gets inverted, the other gets not. i record it as a stereo file and then mix the channels together, after what i get a mono file sans all the interference that happened in the cables.



     
  17. janez

    janez Active Member

    Joined:
    Oct 7, 2008
    Messages:
    190
    Likes Received:
    4
    Trophy Points:
    28
    I guess the best, but more expensive way, would be to use a digital output and convert it with some external device, like a professional DAT recorder with balanced outputs.

    The cheap and easy way might be to simply use a DI Box. It might sound better with an active one but its a little more expensive and you need a battery or a power supply.
     

Share This Page

visited