59 comments

[ 2.1 ms ] story [ 112 ms ] thread
I built this as a christmas fun project, so feel free to ask if you'd like me to explain something.
Have you got an example file - ogg/mp3 to listen ?
No, because I'm afraid that providing one would cause me quite some legal problems. Over here (in Germany), a lot of movies / sounds get blocked by GEMA or you have to pay horrendous fees to be allowed to use them.

But for development, I used this 5.1 YouTube video for testing the surround simulation: http://youtu.be/juIJGBxj-4w

And for testing the music enhancer module, I used Far Too Loud, Circle of Alchemists and OVERWERK. So these should sound pretty cool with my app: https://soundcloud.com/overwerk/conquer?in=overwerk/sets/con... https://soundcloud.com/far-too-loud/far-too-loud-doomsday-ma...

Use some creative commons songs.
Great idea, thanks :) I used my favorite CC song, which is Pocketpod - Hybrid:

Original: http://www.hajoheadphone.com/assets/417586_hybrid_orig.mp3 Virtualization: http://www.hajoheadphone.com/assets/417586_hybrid_hahe.mp3

Thanks for letting the non OS-X'ers in! :)
There's lots of distortion (like digital clipping but low-passed, if that makes sense) at the louder parts of the song. It also seems that the processed sample has its dynamic range reduced by a lot.
(comment deleted)
It seems like there's a possibility you could work with one of these artists in some kind of promotion deal. You could have limited distribution of their track as a test app, and they could get a little promotion along with your cool space-age idea. I bet a nice email to their PR people would be worth it.
I am not from Germany, but I seem to remember reading that the GEMA licensing is mandatory even for bands that give their music away for free. Can anyone clarify if that's the case?
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...
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 :)
I was skeptical but this is actually really noticeable - great work! :)
I can't figure out how to get this to work, if I set my output device to Hajo I get nothing
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.

I guess it is not detecting my USB turtle beach headset. It says 'off' in the icon.
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%
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
I got an extremely loud noise when I used it for the first time, so be careful after installing it.
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.
Yosemite, Macbook Retina 13". I hope it doesn't trigger again as I still can hear my ears ringing.
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.
OK I just replaced the installer on the website with a fixed version. When you re-install, please choose custom and deactivate installation of the kernel driver (otherwise you need to reboot afterwards, which can be avoided).

After the update, the app should be version 1.6.7 :)

I've been looking for something like this for so long. And now it's here, and it is gnarly good. Thankyou.
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 :)

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.

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...

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.
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.

Actually I also just remembered that I do, in fact, reduce the highs a bit on both "Hajo's" virtualization engines to make them sound closer to my living room stereo system. The "NEW AUDIO TECHNOLOGY / Music" engine should give more highs at the expense of also introducing a bit more room echo.
The installation failed. The installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.
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?

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
OK it seems that the installer was working on 10.10.1 but not on an unpatched 10.10 Yosemite. I just replaced the installer with a new version that also works on an unpatched 10.10 system.
The installation failed. The installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.
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

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

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...

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.

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.

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.
The latency kills the videos.
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 It's pretty neat (try it with ordinary stereo headphones).

this is really interesting, there is no need for the enhancer to works. I just works @@ What is the magic behind this ?
A head related transfer function (HRTF) has already been applied to the stereo mix.
someone pre-applied the same processing that my app does in real-time to the song before mastering
Are there any Windows versions of this?
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...

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.

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

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.

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.
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).
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 !
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).

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 ;)
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?

Does something like this exist for iOS, iPhone?
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).