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 May 7, 2006, 04:08 PM   #1
HardwareHeaven Senior Member
 
Join Date: Jan 2004
Location: St. Cloud, MN
Posts: 492
Rep Power: 0
Chester01 is on a distinguished road

Binaural headphone code

http://bs2b.sourceforge.net/
I do not know how I would go about 'converting' this to dane source but in foobar2000 it sounds VERY good. It is a stereo to binaural converter (takes the headphone sound out from between your ears). The algorithm is on the site for anyone interested.

-Matt
__________________
COMP: Dual Intel PIII 733 Mhz; GeForce 4 Ti 4600; 1.128 Gb RAM; SB0350 (Audigy 2 ZS Platnium)
STEREO(I UPGRADED):Crown Audio K1 and K2 amplifiers (4000 watts at .1% THD ), JL 13w7 Subwoofer (6.5 CF) (2) 18" PR's, Klipsch SB-1's, some cement blocks for speaker stands...
Chester01 is offline   Reply With Quote


Old May 7, 2006, 06:41 PM   #2
Tail Razer
 
Maddogg6's Avatar
 
Join Date: Jun 2005
Location: Bernyurass, AZ - USA
Posts: 4,027
Rep Power: 0
Maddogg6 will become famous soon enoughMaddogg6 will become famous soon enough

It doesnt appear to be too difficult..
AFAICT - it looks like a crossmixed (L<>R) of a small delay of the low freqs.

A DSP config could emulate this..Like:
http://fileanchor.com/26034.jpg

But an inherent problem with time delays in the KX DSP are that the increments are 1/48000 of a second. Which seems to me like a *potential* problem, or at least different than say a VSTi potential ability for more accurate delay time increments. Not sure if that makes much difference tho.

But I do like that DSP config better than the winamp plugin - as I have control of the LPF and delay - where the plug seems only allow a crossmix mix control.
Maddogg6 is offline   Reply With Quote
Old May 7, 2006, 08:29 PM Threadstarter Thread Starter   #3
HardwareHeaven Senior Member
 
Join Date: Jan 2004
Location: St. Cloud, MN
Posts: 492
Rep Power: 0
Chester01 is on a distinguished road

I noticed while looking at the graphs that the low frequencies are delayed by approx 300-400 mcs (microseconds (or .3-.4 ms). The delay you were using in your picture was 10 ms... microseconds would make sense to me, the width of a human head is approx 5-6 in. sound travels roughly 1130 f/s. If you take (.41-.5)/1130 you get .000368-.000442 seconds of time (.3-.4 ms) that it takes sound to travel from one ear to the other.
I am not sure how one could find the proper slope of LPF and crossover frequency to accurately represent the human head... May be an experimental kind of thing. I have found that using the low output of a 2nd order crossover, crossed over at 1600-1700 hz works well... I have also been reducing the delayed mix by 6 db, two sounds being played, one 6 db quieter is 'half the volume' *(10 db is actually half the volume, but when two independent sources are played together, 6 db SOUNDS like half the volume, psycoacustics...) If anyone has any modifications or suggestions or corrections please share!

-Matt
__________________
COMP: Dual Intel PIII 733 Mhz; GeForce 4 Ti 4600; 1.128 Gb RAM; SB0350 (Audigy 2 ZS Platnium)
STEREO(I UPGRADED):Crown Audio K1 and K2 amplifiers (4000 watts at .1% THD ), JL 13w7 Subwoofer (6.5 CF) (2) 18" PR's, Klipsch SB-1's, some cement blocks for speaker stands...
Chester01 is offline   Reply With Quote
Old May 7, 2006, 09:32 PM   #4
Tail Razer
 
Maddogg6's Avatar
 
Join Date: Jun 2005
Location: Bernyurass, AZ - USA
Posts: 4,027
Rep Power: 0
Maddogg6 will become famous soon enoughMaddogg6 will become famous soon enough

Quote:
Originally Posted by Chester01
I noticed while looking at the graphs that the low frequencies are delayed by approx 300-400 mcs (microseconds (or .3-.4 ms).
-Matt

I seen someone had a VST - and it showd 10ms... - and the LFE set 700HZ...

But if you want mor delay - a simple xTRAM could be available or made for more delay.. but Id think 300-400ms - would sound like a 'boomy' reverb..??

The DSP I posted seems to sound good - for what ever reason - But Im no psychoaccoustic engineer ... not so good sounding through speakers either. Other than a boosted bass effect.

Its seems the straight should be High pass boosted as well (as I seen in a simple diagram)
:
IN LEFT - MIX LEFT - OUT LEFT
IN LEFT - HighPass Boost - MIX LEFT - OUT LEFT
IN RIGHT - LOW PASS - DELAY - MIX LEFT OUT LEFT

Adding the high boost does seem to 'even out' the sound. ??

Interesting to play with either way. Id imagine combining the lo-pass with a delay and x-over would be somewhat simple to do in dane (cut n paste exisiting).. I may give it a try when/if I get bored enough... Set aside my vMidi mixer (winAPI) programming thats been giving me headaches, for a bit.. hehe
Maddogg6 is offline   Reply With Quote
Old May 7, 2006, 11:36 PM Threadstarter Thread Starter   #5
HardwareHeaven Senior Member
 
Join Date: Jan 2004
Location: St. Cloud, MN
Posts: 492
Rep Power: 0
Chester01 is on a distinguished road

no , MICRO-seconds (as in millionths of a second...) so instead of 10 ms, its 0.3-0.4 ms...

EDIT: ms= MILLI-seconds (1/1000 of a second)
micro-seconds= (1/1,000,000) of a second...

The small delay delays in 48000ths of a second (individual samples):
0.0208333... MILLIsecond incriments
20.8333... MICROsecond incriments

the edit wasnt to be an asshole and rub it in, it was for clarity
__________________
COMP: Dual Intel PIII 733 Mhz; GeForce 4 Ti 4600; 1.128 Gb RAM; SB0350 (Audigy 2 ZS Platnium)
STEREO(I UPGRADED):Crown Audio K1 and K2 amplifiers (4000 watts at .1% THD ), JL 13w7 Subwoofer (6.5 CF) (2) 18" PR's, Klipsch SB-1's, some cement blocks for speaker stands...

Last edited by Chester01; May 7, 2006 at 11:42 PM.
Chester01 is offline   Reply With Quote
Old May 7, 2006, 11:53 PM   #6
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!

@Chester01
μs is the common abbreviation for microseconds (in case you were wondering)
Russ is offline   Reply With Quote
Old May 8, 2006, 12:08 AM Threadstarter Thread Starter   #7
HardwareHeaven Senior Member
 
Join Date: Jan 2004
Location: St. Cloud, MN
Posts: 492
Rep Power: 0
Chester01 is on a distinguished road

all that is really needed is a relatively good stereo setup, someone sitting in the sweet spot, then we measure the distance from one speaker to one ear, then to the other ear... calculate out the delay in microseconds (to be precise) for the sound to travel both distances, subtract... we then have the delay

the lowpass would be dependant on what sounds normal to a person, depending on the amount of hair they have

All we need then is to figure out the volume difference from one ear to the other... I have been using -6db as of now, only based on a little reasoning though and no hard facts. -6db sounds realistic though, if i mute the left channel going into the effect, it sounds like i dont have headphones on but am listening to my stereo...

ASSUMED relationships:
-x db: greater the number, the WIDER the stereo field, as you move the speaker further out to your left and right, more of the sound would be blocked by your head

lowpass freq: depends on the absorption coefficents of your head of course. the more your hair or face absorb at higher frequencies, the lower the lowpass should be set

delay time: also dependant on stereo imaging, the shorter the delay, the closer in the speakers would be; an extreme example would be a speaker directly infront of you, there would be no delay between ears because the sound would have the same distance to travel to arrive at each ear. the MAXIMUM delay would be (x inches wide head)/12-> generally .41 or .5 (tenths of a foot), divided by the speed of sound in air (1130 f/s), as i stated earlier this is a delay of approx .3-.4 MILLIseconds. anythign less than this, approaching zero will place the speaker somewhere between infront of you and directly by your ear.
-NOTE: there would be a relationship between moving the speaker away from the front of your head and the reduction in volume, the farther left or right the speaker is, the quieter you need to make the signal because your head will absorb more sound. example; stand next to an acoustically absorpant surface and have one ear towards a sound source, one towards the absorber, as you turn your head you will slowly hear more and more from the far ear

corrections and comments are welcome
__________________
COMP: Dual Intel PIII 733 Mhz; GeForce 4 Ti 4600; 1.128 Gb RAM; SB0350 (Audigy 2 ZS Platnium)
STEREO(I UPGRADED):Crown Audio K1 and K2 amplifiers (4000 watts at .1% THD ), JL 13w7 Subwoofer (6.5 CF) (2) 18" PR's, Klipsch SB-1's, some cement blocks for speaker stands...
Chester01 is offline   Reply With Quote
Old May 8, 2006, 12:09 AM Threadstarter Thread Starter   #8
HardwareHeaven Senior Member
 
Join Date: Jan 2004
Location: St. Cloud, MN
Posts: 492
Rep Power: 0
Chester01 is on a distinguished road

thanks russ... forgot about the μ
__________________
COMP: Dual Intel PIII 733 Mhz; GeForce 4 Ti 4600; 1.128 Gb RAM; SB0350 (Audigy 2 ZS Platnium)
STEREO(I UPGRADED):Crown Audio K1 and K2 amplifiers (4000 watts at .1% THD ), JL 13w7 Subwoofer (6.5 CF) (2) 18" PR's, Klipsch SB-1's, some cement blocks for speaker stands...
Chester01 is offline   Reply With Quote
Old May 9, 2006, 08:46 AM   #9
Tail Razer
 
Maddogg6's Avatar
 
Join Date: Jun 2005
Location: Bernyurass, AZ - USA
Posts: 4,027
Rep Power: 0
Maddogg6 will become famous soon enoughMaddogg6 will become famous soon enough

Quote:
Originally Posted by Chester01

The small delay delays in 48000ths of a second (individual samples):
0.0208333... MILLIsecond incriments
20.8333... MICROsecond incriments
Ah - ok - I had already mentioned this,
Quote:
Originally Posted by Maddogg6
But an inherent problem with time delays in the KX DSP are that the increments are 1/48000 of a second. Which seems to me like a *potential* problem, or at least different than say a VSTi potential ability for more accurate delay time increments. Not sure if that makes much difference tho.
so i thought you were making a different point..

I also mentioned I used 10ms because it was used in a pic of a VST thats linked to from the OP link. But it was also the time I noticed a 'significant' change in sound.
Maddogg6 is offline   Reply With Quote
Old May 15, 2006, 04:11 AM Threadstarter Thread Starter   #10
HardwareHeaven Senior Member
 
Join Date: Jan 2004
Location: St. Cloud, MN
Posts: 492
Rep Power: 0
Chester01 is on a distinguished road

after further experimentation, I have noticed that if you have too low of a lowpass frequency, it turns the sound into a 'behind the head' experience, not infront. I tested this with some techno that pans quite a bit... If you mute one channel and then play with the lowpass freq, you can position where you hear each speaker from, based upon your personal hrtf (head related transfer functions). I have found 5570 hz a good lowpass for myself (i have simulated my speakers I have setup at my computer, i found the difference in distance that the sound travels between ears (5.34 inches *note; this is finding the hypotonuse length to each ear, taking into accound the width of my head)
http://n.1asphost.com/Chesteta/head%20delay.JPG If this isnt very clear I can explain more, it was more a tool for me to keep the numbers straight when calculating the time delay... Basically it all boils down to a delay of 13 samples for me...
http://n.1asphost.com/Chesteta/DSP.JPG
the entire dSP is there... top half is the main speaker system, lower is the headphones
__________________
COMP: Dual Intel PIII 733 Mhz; GeForce 4 Ti 4600; 1.128 Gb RAM; SB0350 (Audigy 2 ZS Platnium)
STEREO(I UPGRADED):Crown Audio K1 and K2 amplifiers (4000 watts at .1% THD ), JL 13w7 Subwoofer (6.5 CF) (2) 18" PR's, Klipsch SB-1's, some cement blocks for speaker stands...
Chester01 is offline   Reply With Quote
Reply

Thread Tools