HardwareHeaven.com

HardwareHeaven.com

Looking for the skin chooser?
 
 
  • Home

  • Hardware reviews

  • Articles

  • News

  • Tools

  • Gaming at HardwareHeaven

  • Forums

 

Go Back   HardwareHeaven.com > Forums > Hardware and Related Topics > kX Project Audio Driver Support Forum > Effects and the DSP


Reply
 
Thread Tools
Old Apr 15, 2003, 08:48 PM   #1
DriverHeaven Newbie
 
Join Date: Feb 2003
Posts: 13
Rep Power: 0
Cradle22 is on a distinguished road

Making a signal balanced via DSP?

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
Cradle22 is offline   Reply With Quote


Old Apr 18, 2003, 10:15 AM   #2
DriverHeaven Newbie
 
Join Date: Dec 2002
Location: Budapest, Hungary
Posts: 13
Rep Power: 0
blcl is on a distinguished road

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
__________________
BLCL
Budapest
Hungary
blcl is offline   Reply With Quote
Old Apr 19, 2003, 12:29 AM   #3
DriverHeaven Addict
 
Join Date: Dec 2002
Posts: 259
Rep Power: 0
eyagos is on a distinguished road

Well, the code is simple (think that signal goes from -32k to +32k). Here you have it:

Quote:
name "balanced";
copyright "eYagos, Copyright (c) 2003.";
created "04/19/2003";
engine "kX";
guid "2b539566-a863-43e9-8288-e2eef25c4b7b";


input in
output out1,out2
temp tmpin,tmp1,tmp2

macs tmpin,in,0,0
macs tmp1,0,0,0
macs tmp2,tmpin,0,0
skip ccr,ccr,0x4,0x2
macs tmp2,0,0,0
macs tmp1,tmpin,0,0

macs out1,tmp1,0,0
macs out2,tmp2,0,0


end
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...
eyagos is offline   Reply With Quote
Old Apr 19, 2003, 12:53 AM   #4
DriverHeaven Addict
 
Join Date: Dec 2002
Posts: 259
Rep Power: 0
eyagos is on a distinguished road

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 by eyagos; Apr 19, 2003 at 01:14 AM.
eyagos is offline   Reply With Quote
Old Apr 19, 2003, 01:50 AM   #5
DriverHeaven Addict
 
Join Date: Dec 2002
Posts: 259
Rep Power: 0
eyagos is on a distinguished road

Or maybe the one you need is this other:

Quote:
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
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 by eyagos; Apr 19, 2003 at 02:13 AM.
eyagos is offline   Reply With Quote
Old Apr 19, 2003, 03:20 AM   #6
h/h member-shmember
 
Join Date: Dec 2002
Location: Evil Empire
Posts: 2,639
Rep Power: 69
Max M. is just super!Max M. is just super!Max M. is just super!Max M. is just super!Max M. is just super!Max M. is just super!

>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...
__________________
Max M. is offline   Reply With Quote
Old Apr 19, 2003, 01:40 PM Threadstarter Thread Starter   #7
DriverHeaven Newbie
 
Join Date: Feb 2003
Posts: 13
Rep Power: 0
Cradle22 is on a distinguished road

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
Cradle22 is offline   Reply With Quote
Old Apr 19, 2003, 01:47 PM Threadstarter Thread Starter   #8
DriverHeaven Newbie
 
Join Date: Feb 2003
Posts: 13
Rep Power: 0
Cradle22 is on a distinguished road

Hi!

Quote:
Originally posted by eyagos

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...
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
Cradle22 is offline   Reply With Quote
Old Apr 28, 2005, 08:43 PM   #9
DriverHeaven Newbie
 
Join Date: Jan 2005
Posts: 17
Rep Power: 0
doppler is on a distinguished road

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??")
doppler is offline   Reply With Quote
Old Apr 29, 2005, 06:35 AM   #10
Alternative Audioproductions
 
TravelRec.'s Avatar
 
Join Date: Sep 2003
Location: Germany / Sachsen-Anhalt
Posts: 1,710
Rep Power: 0
TravelRec. will become famous soon enoughTravelRec. will become famous soon enough

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...
__________________
Always take a look behind.

TravelRec. is offline   Reply With Quote
Old Apr 29, 2005, 08:14 AM   #11
DriverHeaven Newbie
 
Join Date: Jan 2005
Posts: 17
Rep Power: 0
doppler is on a distinguished road

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'
doppler is offline   Reply With Quote
Old May 1, 2005, 06:08 PM   #12
Alternative Audioproductions
 
TravelRec.'s Avatar
 
Join Date: Sep 2003
Location: Germany / Sachsen-Anhalt
Posts: 1,710
Rep Power: 0
TravelRec. will become famous soon enoughTravelRec. will become famous soon enough

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.
__________________
Always take a look behind.

TravelRec. is offline   Reply With Quote
Old Apr 8, 2009, 08:52 PM   #13
DriverHeaven Newbie
 
Join Date: Jan 2005
Posts: 17
Rep Power: 0
doppler is on a distinguished road

Re: Making a signal balanced via DSP?

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
doppler is offline   Reply With Quote
Old Apr 9, 2009, 01:01 AM   #14
Apple Fanboy?
 
dj_stick's Avatar
 
Join Date: Jun 2003
Location: Basement of the first floor
Posts: 17,485
Rep Power: 190
dj_stick is godlike in his statusdj_stick is godlike in his statusdj_stick is godlike in his statusdj_stick is godlike in his statusdj_stick is godlike in his statusdj_stick is godlike in his statusdj_stick is godlike in his statusdj_stick is godlike in his statusdj_stick is godlike in his statusdj_stick is godlike in his statusdj_stick is godlike in his status
System Specs

Re: Making a signal balanced via DSP?

Quote:
Originally Posted by Max M. View Post
absolutely agreed... of course it's just a matter of inverting phase, nothing more...
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
__________________
Chris - The Aussie Super Mod
Hardwareheaven Rules - Sig Request Thread

How you can help HardwareHeaven by using Digg!

Hardwareheaven Super-Moderator

Quote:
Originally Posted by OmegaRED View Post
You know, there's "off topic" and then there's so freakin' off topic it you gotta wear a straitjacket to join the conversation.
dj_stick is offline   Reply With Quote
Old Apr 9, 2009, 02:24 AM   #15
HardwareHeaven Extreme Member
 
Join Date: Jan 2005
Posts: 5,563
Rep Power: 62
Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!

Re: Making a signal balanced via DSP?

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 by Russ; Apr 9, 2009 at 02:32 AM.
Russ is offline   Reply With Quote
Old Apr 12, 2009, 05:02 PM   #16
DriverHeaven Newbie
 
Join Date: Jan 2005
Posts: 17
Rep Power: 0
doppler is on a distinguished road

Re: Making a signal balanced via DSP?

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.



Quote:
Originally Posted by Russ View Post
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.
doppler is offline   Reply With Quote
Old Sep 27, 2009, 01:01 AM   #17
HardwareHeaven Lover
 
Join Date: Oct 2008
Posts: 131
Rep Power: 28
janez is a glorious beacon of lightjanez is a glorious beacon of lightjanez is a glorious beacon of lightjanez is a glorious beacon of lightjanez is a glorious beacon of lightjanez is a glorious beacon of light

Re: Making a signal balanced via DSP?

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.
janez is offline   Reply With Quote
Reply

Thread Tools