

Show HN: Headphone Enhancer for Techno and 5.1 Movies - fxtentacle
http://www.hajoheadphone.com/

======
super_tycoon
Worth noting that this kind of processing has been present on some PC
soundcards for a while.

Creative has its 'surround' processing for the Z series and a similar feature
whose name I forget for the x-fi series. Processing done in hardware.

Dolby also has its own virtual surround processors that come with some of
Asus' Xonar offerings. I'm not sure what degree of processing is done in
hardware/software.

A lot of home theater receivers also support pro-logic.

I've bought a few x-fi's and a SBZ just for their surround abilities alone.

A youtube video I found comparing the above techs doing stereo->headphones:
[https://www.youtube.com/watch?v=Y6ROujJ8Ae8](https://www.youtube.com/watch?v=Y6ROujJ8Ae8)

I know the Creative cards can work off a multichannel input as well, not sure
about the Dolby tech.

~~~
fxtentacle
Haha yes you're absolutely spot on. The knowledge on how to do this has been
around since 1988:
[http://staffwww.itn.liu.se/~karlu/courses/TNM086-2011/papers...](http://staffwww.itn.liu.se/~karlu/courses/TNM086-2011/papers/localization.pdf)

I tried out Dolby's Headphone offering a while ago and I just didn't like the
way it sounds. My guess is that they are using equalizers to fake the FIR
filters without accounting for the delay-dependent part of the EQ. But that's
just my speculation.

I didn't know that Creative was offering this, too.

BTW, I believe that the Razer Kraken 7.1 Headset is technically also just a
stereo USB headset with an app not unlike mine.. but that is also just my
speculation, as I didn't try out their product yet.

~~~
super_tycoon
Yeah, I agree the Dolby headphone tech isn't quite right. But the Creative one
has really impressed me over the years. I've even panic muted my speakers
before when I was wearing my headphones because I thought I forgot to switch
outputs.

Unfortunately, I don't have a Mac, so I can't compare it your implementation.

------
fxtentacle
I built this as a christmas fun project, so feel free to ask if you'd like me
to explain something.

~~~
douglasheriot
Did you look at creating a user-space audio driver instead of the kernel one?
10.9+ only, but if you built this recently it probably makes a lot more sense.
[https://developer.apple.com/library/mac/samplecode/AudioDriv...](https://developer.apple.com/library/mac/samplecode/AudioDriverExamples/Introduction/Intro.html)

~~~
fxtentacle
Thanks for the link. I went with a kernel driver because I knew that approach
would work on old OSX (starting with 10.5), but since i'm delivering two kexts
anyway, switching to an user-space driver for 10.9+ would probably reduce CPU
usage :)

------
not_a_test_user
I got an extremely loud noise when I used it for the first time, so be careful
after installing it.

~~~
fxtentacle
That shouldn't happen. Would you be so kind as to tell me your OSX version and
Mac/MacBook model? I probably won't be able to spot and fix the bug right away
(it's new years tomorrow, after all) but on the long term I of course want to
squash this kind of bug.

~~~
not_a_test_user
Yosemite, Macbook Retina 13". I hope it doesn't trigger again as I still can
hear my ears ringing.

~~~
fxtentacle
Ouch you're right. There's a case where I skip zero-ing out the history
buffer. That means you hear the echo simulation for white noise... for a few
ms. Sorry about that, will fix and report back.

------
vsilves
I'm still getting a non-cleared buffer played a bit louder/incorrectly/not-in-
sequence when I start playing a AC3 music in .m4a files using the latest
Hajo's 1.6.7 in Mac 10.10.1 in a MacBookPro 15 Retina. The buffered audio is
clearly from whatever was playing when your engine was shut down because if I
was playing a silent portion of a song when I closed the previous .m4a then
opening the next .m4a with Quicktime X plays that silence (unnoticeably). But
if I was playing a loud song before closing previous .m4a then opening the
next plays an stray buffer with the previous song. So maybe you need to clear
the buffer one more time when the engine detects that audio is coming into
your genuine fake sound card (processing engine).

~~~
fxtentacle
Yes it seems that on some Yosemite machines, the ring buffer that I use to
transfer the audio is being read before it is being written. That caused the
noise in the beginning and that's probably also what's causing the high delay
that dodysw reported. I'll work on the fix tomorrow and then report back.
Happy new years, everyone !

------
vassy
Wow, I'm loving this. I was looking into something to improve the V shaped
sound of my Sennheiser Momentums. Are you going to continue working on this?
Or is it a one time project?

Also, would it be possible to add a currency converter on your website? 10
bucks should be about £6.50

~~~
fxtentacle
Since I've been using this myself for 2 weeks now and I still like it (and use
it daily), I'll continue to maintain and (if needed) bugfix it. But at the
moment, I don't have any intentions of adding more features. That said, what
would you need?

I'll be on the bus to my new years party for the next 4 hours or so.. I'll
look into the shop tomorrow. That said, I already got quite a few emails about
sales from FastSpring, so in general it seems to work OK.

~~~
vassy
Can't really think of any features now, because I like the default sound and I
wouldn't want to customise it. I'm just thinking of bug fixing and future
proofing the app.

------
mva
Would be great if I could adjust the bass myself a bit. Some songs are now
just a bit too much. Furthermore vocals are missing that spark and sound quite
dull. I have the idea that you are boosting the mids which pushes high freqs a
bit to the background.

~~~
fxtentacle
If you click the Icon and then on Sound Engine, you can select from different
virtualization engines.

My default engine does a 1.5 gain on <200 Hz. If you don't like that, choose
"Hajo's echo-free 5.1 system without bass boost" or one of the "(ear plugs)"
NEW AUDIO TECHNOLOGY engines. Those don't apply my Headphone Equalizer.

------
fredkelly
I was skeptical but this is actually really noticeable - great work! :)

------
acrefoot
So, is this crossfeed, or something more magical? Forgive my ignorance.

PS. This thread led me down a rabbit hole for simulated surround sound and
other tech (I'm on linux, so I wanted to see what my options were), ending
with this cool demo of Cetera: [http://juneja.info/binaural/v-i-r-t-u-a-l-_-
b-a.mp3](http://juneja.info/binaural/v-i-r-t-u-a-l-_-b-a.mp3) It's pretty neat
(try it with ordinary stereo headphones).

~~~
nXqd
this is really interesting, there is no need for the enhancer to works. I just
works @@ What is the magic behind this ?

~~~
TD-Linux
A head related transfer function (HRTF) has already been applied to the stereo
mix.

------
bburky
I want to see someone implement surround sound with head tracking. Some
Googling turns up some research projects that have done this with either face
tracking or accelerometers. And at least one (expensive) commercial product.

I wonder if someone could do it with a software implementation that just takes
5.1 input and uses only a camera or some inexpensive hardware?

------
vsilves
Also noticed that when playing 5.1 music in .ma4 files using Quicktime X the
engine does not shut down immediately when pressing the pause button in
Quicktime X, but it does shut down a few seconds later (~ 15 sec).

It would be nice if it shut down the engine immediately like it does when you
close the .m4a in Quicktime X (or any other player I suppose).

~~~
fxtentacle
Sadly, I cannot do that because I have to wait for OS X to release the audio
stream. And if you only pause the playback, it takes a while for OS X to sleep
the sound card. So when that happens isn't exactly my decision ;)

------
neardark
The installation failed. The installer encountered an error that caused the
installation to fail. Contact the software manufacturer for assistance.

~~~
fxtentacle
That should only happen if: 1\. the driver cannot be loaded 2\. the app
doesn't start

I included two drivers in the installer, one unsigned for OSX 10.7 and 10.8
and a signed for OSX 10.9 and 10.10.

Which OS X version are you using?

~~~
phelm
I am having the same issue, on OSX 10.10 A quick look would appear that the
is_new_os script is not behaving correctly, OS_Version=$(sw_vers
-productVersion) = 10 not 10.10

------
Sone7
I've been looking for something like this for so long. And now it's here, and
it is gnarly good. Thankyou.

~~~
fxtentacle
I made it to sound the way I like ;) but you may or may not agree with my
taste.. If you click the Icon and choose Sound Engine, you can choose one of 6
different virtualization engines.

Also, please tell me if there's easy that I could do to improve the app :)

~~~
Sone7
Honestly the only thing I could ask you to do, would be perhaps make it more
clear that you have to actually run the app to get it to work. I thought it
was just a matter of switching the driver. Since I plan to tell all my music
minded friends about this I hope they get it clearly :D

And a nitpick: The uninstall dialogs act as if I'm installing something, it
was a bit confusing (10.9.2)

I'm really loving this though. I plan to buy it the very day I get my online
banking sorted, and I'll be grateful for the opportunity.

~~~
fxtentacle
Yes I know about the odd uninstaller. I included it anyway because I want to
make it easy for everyone to try my app and to cleanly remove it if they don't
like it. I personally feel offended if some trial app wants to stick around on
my MacBook so I thought it'd be a matter of honor to make my app behave better
:)

The app itself will switch between Apple's built-in and its internal driver
for you when you plug in or unplug the headphones. That way, my driver is only
used if you use headphones which makes sure that I don't waste any CPU usage
(and hence battery life) when you don't actually use headphones.

Thanks for the praise :) Please take your time to try everything out and you
can always just click "Continue Trial" as often as you like ... ^^ This too,
is me trying to fix what annoys me with regular time-limited trials which
always seem to expire one day before I get the time to look at them...

------
fxtentacle
just a quick note.. it's really late here so I'll go to sleep. But i'll come
back to answer more questions/comments tomorrow morning.

------
aa_memon
Does something like this exist for iOS, iPhone?

~~~
fxtentacle
I'm not aware of any solution. The problem for building an iOS app to deliver
this is that you'll need to provide the 5.1 player inside the same app as the
virtualization engine. My engine works on iOS and Android, in case you know
someone who has a working 5.1 movie player app for iOS ;)

I'm also already discussing the possibilities with one Android app developer
company for getting my headphone enhancer engine into their music player
(because their player is what I personally use on my S4 mini).

------
benbristow
Are there any Windows versions of this?

~~~
fxtentacle
I only built a Mac app because I mostly use Mac and so it'd be hard for me to
make a well-tested windows version. I heard that Razor has a similar software
for Windows, although I don't like the sound quality of their implementation.
Also, with my cooperation partners at NEW AUDIO TECHNOLOGY, I built a
professional Windows app that works similarely:

[http://www.newaudiotechnology.com/products/spatial-sound-
car...](http://www.newaudiotechnology.com/products/spatial-sound-card/)

But that one is targeted towards learned audio professionals, so the GUI is
more complex and it has many more features and a different audio engine and is
also way more expensive.

------
dyscrete
I can't figure out how to get this to work, if I set my output device to Hajo
I get nothing

~~~
fxtentacle
Is the app running? I.e. can you see the Headphone icon in your menu bar (top
right corner)? If the app is running and has detected that headphones are
plugged in, it should show the Headphone icon with an empty plus sign. If it
has additionally also detected that music is playing, the plus sign will be
filled.

Maybe try changing volume through the volume keys on your keyboard. That
usually triggers the Apple "click sound" to demo the new volume, so then you
should see that the Apps icon switches from an empty plus to a filled plus
sign.

~~~
dyscrete
I guess it is not detecting my USB turtle beach headset. It says 'off' in the
icon.

~~~
fxtentacle
Yes, at the moment it only works with the Built-in Audio Device. The reason is
that I'd like to use the private DSP API inside Apple's HDA Driver in the
future, which would further reduce CPU usage to approx 0.5%

~~~
nXqd
it seems to work great :D At the same time, this doesn't seem to work with
Hackintosh Mac, since they may use different driver, headphone not detected.
But it works great with my macbook :D

------
dodysw
The latency kills the videos.

