Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: LCC – Open-Source Spatial Audio from Stereo Speakers (github.com)
103 points by roblkw-asu 14 days ago | hide | past | favorite | 37 comments



A lightweight implementation of real-time crosstalk cancellation


Three great project ideas for LCC:

1. Apply LCC to rear channel speakers to get it running on 4.0 channel systems. The rear channel speaker distance can be digitally positioned with an integrated millisecond delay control, which allows a user’s rear channels to be digitally placed at various perceived physical distances if there is no way to move rear speakers back physically (the speed of sound is roughly 1100 ft./second (depending on temperature and elevation); so, for example, if a user has a rear head to speaker (H2S) distance of 2’0", when the frontal H2S is 6’0", it may be desirable to delay the rear speakers by say 5’0" to avoid erroneous localization to the rear). The system calculates this optimizing distance, e.g., 5'0"/1100 = ~.0045 seconds or ~4.5 milliseconds, and thus allows the user to experience the rear channel speakers optimally as if they were at ~7’0" and not where they are physically located at 2’0". Could also use a 4.0 Bluetooth speaker setup for your VR system. Better than headphones, as you now use your own natural HRTFs in a free field space. Also, headphones cause fatigue and contribute to disorientation. If that is of interest to you, taking it one step further with head tracking would require additional access to LCC's parameters.

2. Rearrange car speakers (see white papers for guidance on placement requirements) and apply LCC to the driver and each passenger. Not only a great idea from an entertainment point of view but also as an auditory safety function as well.

3. Get LCC into a https://www.hifiberry.com and purify your home theater's sound system with the most effective spatial audio solution available.


Bonus project idea: Get LCC to work on horizontal speaker array sound emitters, e.g., soundbars with multiple speakers for each channel. You may need to apply LCC to each driver and adjust LCC parameters accordingly. Another variant is to build your own horizontal speaker array sound emitter that is steerable, e.g., use computer vision to track many heads in a room and send a L/R LCC image to each listener using beam forming speakers. Multiple sweet spots!


Regarding #2: The dashtop will be the tough part for getting closely-spaced stereo speakers integrated for both the driver and the front passenger. The rear channels are easier (integrate into headrests with level and delay controls). Rear passengers are even easier (integrate frontal stereo pairs into back of driver and back of front passenger seats).

This design may one day make things a lot easier: https://ifworlddesignguide.com/entry/273938-bo-for-ford-must...


We'd also love to see LCC integrated into every seat in a movie theater where each person gets their personal 4.0 LCC experience (integrated into each seat) and woofers and subs are located elsewhere (perhaps where they are already located in Dolby and IMAX theaters) and distributed for every patron. This is less of a personal project and more of a partnership.

This really sounds quite cool! It sounds like entering/exiting a bubble in front of my MacBook when I turn it.

If, like me, you didn't turn the sound up enough, you can switch back to 'Internal Speakers', then raise the volume, then back to 'Soundflower (2ch)'.


You got that right!

Thank you.


Will give this a shot later on, thanks for sharing :)

Any plans to make this work on other systems? RtAudio which you use here appears to also support Linux and Windows.


Yeah, I'll plan to toy with this on Windows over the weekend.


Is there any way to know if macOS is doing something like this natively already? I ask because my late 2019 16 in. MPB has ridiculously amazing speakers for its size and format. I’ve always wondered if it was more than just the hardware.


I don't know what the Macbook does, but I do know that simply equalizing even a cheap speaker to match a target response curve produces astonishing results. I once used $$$$ audio hardware with many parametric filters to calibrate the tinny, resonating built-in speakers in an old LCD monitor. It sounded fantastic.


Yes. Apple has added cross-talk cancelation to their macOS devices; albeit, not as wide or flat as ours. See here: http://patft.uspto.gov/netacgi/nph-Parser?Sect1=PTO2&Sect2=H.... Funny, we chatted with them ~1 year before they filed...


Fascinating. Thank you for doing the leg work here! I never would've thought to check patents.


Also, unlike with LCC, Apple's implementation does not route through the output. So, you cannot correct for crosstalk with it to external speaker units.


For a layman: what does this do? How is this useful for me?


It attempts to makes the left ear only hear what is coming out of the left channel and the right ear only hear what is coming out of the right - as if you are using headphones. Normally with speakers, both ears are going to hear both.


Exactly this. One example would be the difference in how pronounced reverb and delay effects are on headphones versus most speaker setups. Each ear is much more isolated, so the separate audio tracks for each ear don’t blend.



Curated playlist to run through LCC: https://open.spotify.com/playlist/0XrqQ8tIVGMKuVIC5mIrNN?si=...

Curated videos (worth finding higher quality versions) to test LCC out with: https://www.youtube.com/playlist?list=PL-lzMEaJTl3p39jZC0iSD...


Wish I still had a mac. I remember Bang and Olufsen doing some spatial audio research a few years back:

https://www.en.tech.aau.dk/news-events/news/new-lab-mimics-t...

It's nice to see it being rolled out into their products too!


For anyone having difficulty installing Soundflower, I used:

https://github.com/ExistentialAudio/BlackHole

It works exactly the same.


Would lcc work with ambisonic audio?

If you are referring to the ambisonic recording technique to capture audio content, we generally do not recommend these methodologies. We prefer binaural microphones with removed pinnae, the Schoeps ORTF-3D, and the Blumlein technique. The short answer is that ambisonic audio will playback better with LCC than it will over other systems, e.g., stereo.

Is there a good open-source tool to convert multichannel audio to binaural? That, combined with LCC, would be nice for watching movies on my desktop setup.


That does not sound like it will end well.

That said, LCC is only concerned in solving psychoacoustic playback issues for loudspeakers.


Actually, we've been using Resonance Audio to convert fully spatialized sound in game engines to binaural and then pumping that through LCC. That seems to work well as a pipeline.


Rob and I going back-and-forth. :)

Not sure we tried this with channel-based audio though...

Prerecorded material not recorded binaurally is not binaural content. I am a purest though. Note: LCC enables all loudspeaker listening experiences to be experienced binaurally, in the free field, acoustically speaking, regardless of the content (unless it is mono content).


Surely you could simulate a theater with N speakers, then convert that to binaural. It would be nice if Blu-ray had spatial audio, but it has channels, so I work with what I got.


Thanks for the pointer. I'll try out using channeled audio in resonance. I don't expect magic, but it will be interesting to see.


Nice work. Does it use some kind of audio abstraction layer so ports to non Mac platforms might be easy?


Yeah, RtAudio. So it should be easy to port it to Windows and Linux. I'll work on that soon, hopefully this weekend.


It already compiles on Linux without any modifications whatsoever:

  g++ -O2 -march=native -mtune=native -D__LINUX_PULSE__ -D__LINUX_ALSA__ -D__UNIX_JACK__ \
      lcc_rtaudio.cpp RtAudio.cpp -o lcc -pthread -ljack -lasound  -lpulse-simple -lpulse
The above will give you a binary with the Jack, ALSA and PulseAudio backends baked in.



Update: We accepted a pull request with a Windows build, including a binary executable and build instructions.


Just tried it out. It's really good Would love to see how you build this out!


Wonder whether two home pod would do the same?


Maybe. If not, space them close apart and use with LCC!




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: