Friday, 10 April 2020

True Tone display abruptly changing tint? Try not covering the sensor!

On various forums, one can find complaints about the True Tone display of the more recent MacBook Pro models suddenly changing tint, or the intensity of the screen flickering. Some of those forums will tell you to disable the True Tone or Night Shift feature. If you don't care about those features, it's an effective workaround, but it is kind of stupid to buy a machine with all these advanced features and then disabling them.

I have also experienced this, and found no rhyme or reason behind it—until now.
I'm pretty sure there are some other causes for this problem, including hardware or software faults, but before you go bringing your MacBook Pro to a service center, you might want to check the following first.

Many people cover the camera built into laptop screens with a sticker or something else, for reasons of privacy and/or security. The problem is that the True Tone sensor is very close to the camera. If your sticker is large enough, it will partially or fully cover the sensor. Even if that's not the case, maybe you often do use the camera, and then have to park the sticker somewhere, and a convenient place is right next to the camera—possibly right on top of the sensor.

When covered, the sensor will receive much less light than it should, possibly filtered in some strange way, and this can cause the True Tone system to react wildly to tiny changes in ambient light. I still don't understand why the adaptation algorithm allows such quick changes at all, but one can't really blame the system for starting to act weirdly in a very poorly conditioned situation.


The sensor is very hard to see, which is why most people are unaware that it exists at all, let alone avoid covering it. On my MacBook Pro model (2018 15 inch), the sensor proves to be at 17 mm to the right of the (more visible) camera, as can be seen by shining a strong flashlight across it. You may want to verify on you particular machine where the sensor really is situated.

So the morale of this story is: if you have any thingamajig that covers the camera, make sure it stays well away from the sensor. If you then still have strange variations in the tint of the display, then you may start worrying about a deeper problem. As a matter of fact, in my case the problem still occurs occasionally. It looks like the sensor gets confused in situations where there is little light, or rather weak light coming from a direction mostly parallel with the screen surface. What usually helps in such cases, is to provide a stable source of light closer to the computer, so just turn on a lamp.

Saturday, 21 March 2020

Calibrating a cheap digital Chinese hygrometer

This article describes an method that could be used to get reasonably correct read-outs on a digital hygrometer even if it has no provisions for calibration at all. This was mostly an experiment but it has proven to work for the few cases where I tried it. Don't expect miracles from this method, but it may keep the hygrometer readout pretty reliable around the point where it will normally be used.

Introduction

Very cheap combined digital thermometer and hygrometer units can be bought from the usual Chinese marketplaces. The thermometer part of these things is usually reasonably accurate, but the hygrometer part is a game of roulette. Especially if you allowed the sensor to become truly wet by placing the meter in a room with 100% humidity, the risk is high that the calibration will be way off. A proper hygrometer should have a calibration button or button combo that has to be pressed after leaving the unit in an enclosed space with a saturated salt solution, which will stabilise at 75% RH after many hours. These cheap things however rarely have such button.



In the hopes that the device shown in the above photo would have some secret button combo to reset the measurement to 75%, I have tried inserting the battery while holding down buttons in various combinations, or mashing the buttons while the unit was already on, but without any success. I doubt whether devices like this contain any EEPROM at all, the measurement tables are probably hard-coded in ROM, and it is assumed that the humidity sensor will be accurate enough.

Hence the only way to correct the read-out, is to modify the signal coming from the sensor itself. There are two possible approaches:
  1. Add resistors to either increase or reduce the electrical impedance of the sensor. This is probably a bad idea however, because it will change the slope of the humidity response curve. The meter will only be correct around a very limited set point, and deviate increasingly when moving away from this set point. It would take some fancy op-amp circuitry to truly shift the impedance curve without altering its slope, and this is way too much effort for a cheap device like this: just buy a better unit for the money that would go into buying parts and spending time on building this circuit!
  2. Physically alter the sensor itself. These sensors are simple: it is a substrate sandwiched between two metal plates, or with two intertwined grids of metal ‘fingers’ at one side. The substrate contains some mildly hygroscopic material that will absorb moisture from the air, and the more humid the substrate, the better it conducts electricity and the lower the impedance. Therefore if we can alter the degree to which the substrate wants to absorb water, we can shift the impedance value. I'm not sure whether this won't also alter the slope of the impedance curve, but from my initial tests this seems pretty OK when using the right substances.


I have tried approach 2 with reasonable success. While in theory you could use only a saturated salt solution to check the correctness of your adjustments at 75% RH, it is better to also rely on a true calibrated hygrometer to verify that the cheap meter gives more or less correct readings around the humidity level where you will use it the most.

The method (updated 2020/11/25)

A warning in advance: to get good results, you will need a ton of patience. This is not something you can get right in a few hours unless you are extremely lucky. This takes multiple iterations of a cycle that takes at least 2 days. If time is money, buying a good and reliable meter is much more economical.

I have encountered two styles of sensors and they react somewhat differently to manipulation, but in the end the following strategy seems to work best. We'll start out by applying too much of a substance that is hygroscopic, in other words that likes to absorb water. Then we'll gradually wipe away some of this substance until the read-out is correct. The tricky thing is that wiping the sensor will somehow disturb it in such a way that one needs to wait several days until it stabilises.

Initially I used only hand sanitiser gel as the hygroscopic substance. Such gels will always contain something that attracts water, because otherwise the alcohol in the gel would dehydrate your skin. Typically it will be glycerine (glycerol) but it doesn't really matter what exactly it is. The concentration of this additive is also usually quite low in these gels, which makes it easier to apply small adjustments. The hand gel worked OK for the first type of sensor I tried to tweak. For the second type of sensor however, I had to use a calcium chloride (CaCl2) solution, mixed with a bit of the sanitiser gel to make it more sticky. I obtained the CaCl2 from the typical passive humidity absorbers that use a bag or brick of CaCl2. This absorbs humidity from the air and gradually turns into a brine solution that drips down into a container. These devices are mostly useless as far as dehumidification goes, but they are a good source of CaCl2. I simply took a drop of the brine solution, mixed it with a bit of the gel, and applied it to the sensor, wiping off the excess such that it wasn't entirely soaked and gave a read-out below 99%.

Next to the hygroscopic substance, you'll also need a classic hygrometer calibration box. This consists of a watertight sealed box, with inside it a small container filled with a saturated salt solution. Take a small cup like a shot glass, fill it with salt, then add water until the salt has become a wet sludge with the water just not spontaneously flowing out of it. This kind of salt sludge has the interesting property that when placing it in a sealed box, it will make the relative humidity inside that box gradually become almost exactly 75%.

So to recap, the things you need are:
  • Some hygroscopic substance that sticks to things. What seems to work best is a mix of hand sanitiser and calcium chloride brine.
  • A sealed box with inside it a small cup of saturated salt solution,
  • a reasonably well-calibrated hygrometer,
  • a lot of time.

Steps

The general strategy is to start with too high a read-out and then gradually wipe the sensor to bring it closer and closer to the correct value. The most tricky thing is not to wipe too much, because then you have to start all over again. Wiping the sensor disturbs it only a little. Re-applying the hygroscopic stuff brings it totally out of whack and it takes many iterations to make it stable after that. Therefore you will want to avoid bringing the sensor to a state of too low read-out. Wipe carefully!

  1. Start by ensuring the sensor is clean. If there is any residue on it from a previous failed experiment, remove it with water or rubbing alcohol, whatever works best.
  2. Cover the sensor uniformly with the hygroscopic stuff. Most likely this will cause the read-out to jump to 99%. Wipe off the excess until it drops below 99%.
  3. Now rely on the calibrated hygrometer to continue wiping the sensor until it is near the actual humidity value. Needless to say, take care not to breathe humid air towards the general direction of either meter. This is the most tricky step. In my case I had to wipe until the read-out was 5 to 10% below the actual value. I can't really explain why, and it is possible you may need to aim for a different offset. This is one of the things that makes this process tedious. It seems the required offset became smaller with each cycle, so you should become more careful as the error on the read-out decreases with each cycle of this procedure.
  4. Now put the hygrometer in the calibration box with the salt sludge and leave it alone for at least 36 hours. After that, see what value it settled at and remember this value, then take the hygrometer out of the box and let it settle again for at least 12 hours.
  5. Now look at the final value and compare to the known humidity. Ideally you will want to do this at a humidity level where you want the hygrometer to be the most accurate.
  6. If the read-out is very close to correct, resist the temptation to get it right to the last percent: most likely you will mess it up and will have to start all over. Just stop and be content with what you have. Remember, it is much harder to correct too low a read-out than too high.
  7. Otherwise, if the value is still too high and it also was well above 75% in the box, go back to step 3 and wipe, but take care to make increadingly small corrections.
  8. If on the other hand the value is too low, it depends. If it is way too low and the value in the box was also well below 75%, you have over-done the wiping and you will have to go back to step 2 and prepare yourself for several more days of going through the same cycle over and over. If it is just a bit too low but the read-out in the sludge box was very close to 75%, then most likely you will never get a perfect reading from this meter across the whole range. You could try to apply a different mix of hand gel and CaCl2 in the hopes of getting a better overall response curve, but in the end you might just have to be content with slightly too low readings at lower humidities.

The 75% calibration box has a double purpose. First, it offers an initial test to see if the sensor has any chance of being close to correct. Second, it speeds up the stabilising of the sensor after it has been disturbed by the wiping. Again, I cannot really explain why it behaves like this, but in the end it does provide a good result.

As you can see, this method is tedious and involves a lot of trial and error. This is what makes it mostly useless, unless you're in the middle of a virus pandemic and are looking for things to kill your time and gain some usable measurement devices during this process…

Even if you can perfectly nail the calibration to 1% accuracy, of course you still shouldn't trust these things to be reliable. Also never use these simple hygrometers in environments where relative humidity get near to 100%, because in extreme cases, a drop of water may form on the sensor and disturb the hygroscopic layer. Just buy a good hygrometer that can be calibrated if accuracy and reliability is important.

Wednesday, 26 February 2020

Get rid of the bottom toolbar in Google Chrome on Android

In a recent update, Chrome on Android introduced a change that caused the previously experimental ‘duet’ feature to be enabled by default. This places an additional toolbar at the bottom of the screen with buttons for new tab, search, and share. This bar is supposed to disappear at the same time when the top toolbar disappears (typically when scrolling down), but on my phone this was often not the case, especially on pages that are not long enough to allow scrolling. Worse, the bottom part of such pages could then become permanently obscured by the toolbar, pretty damn annoying.

It does make sense to place controls at the bottom because this makes them usable with one's thumbs, but then everything should be put at the bottom, not both at the top and bottom! Because the latter is currently impossible in Chrome however (as far as I know), the best you can do to avoid the possible nuisances of this bottom toolbar, is to disable it.

This used to be controlled by a single setting called “Chrome Duet” in the chrome flags. Now however, there seems to be a new one called “Duet TabStrip Integration” that also enables this feature. It is unclear how these interact.

To completely disable the bar, enter “chrome://flags” in the address bar, and then enter “Duet” in the Search flags box. Set both “Chrome Duet” and “Duet TabStrip Integration” to “Disabled”. Then restart Chrome. If the bar is still present, toggle the flags back to “Enabled” and then “Disabled,” and restart Chrome yet again. Keep repeating this dance and eventually it will work.

I'm inclined to try another browser but unfortunately Google managed to lock me into their ecosystem because I use Chrome on other devices and it is pretty handy to have everything synchronised, like bookmarks. If they keep annoying me with unexpected changes like these however, I may just become motivated enough to migrate all devices to another browser.

Thursday, 19 December 2019

The State of Thingiverse, End of 2019

In June 2016, I bought a 3D printer on a whim, I only had one real concrete idea for something useful to print. But no worries, because there proved to be a website containing a few millions of free 3D models. Granted, the vast majority of models posted on it proved to be useless junk, but some were either very cool or truly useful. That site was Thingiverse. It was, and still is, the de facto standard for 3D printable model sharing. At that time, the site worked pretty well and had a very active and mostly friendly community. Questions would most often be replied to with useful advice, and if there was a problem with the website, there would at least be an acknowledgement even if the problem was not soon fixed.

The Good

Thingiverse used to be one of the main things that kept feeding my interest in 3D printing. Not just because of the new models coming in every few minutes, but also because of the community, and because it was pretty easy to share my own models, many of which started out as improvements upon someone else's. I am now the co-author of the “Flexi Rex with stronger links,” one of the models a present-day buyer of a new 3D printer seems likely to print as one of their very first attempts. I never anticipated this, I only improved upon an existing model because it broke way too soon when my grandson was playing with it. This is what I like about this community, one can easily take an existing model and improve it, and share this improvement for everyone to enjoy.


The Bad

Today however, things have changed for the worse. The turning point was somewhere in 2017, when one of the main moderators of the website, called ‘glitchpudding’, suddenly left. After this, it became much harder to get any response from whomever was responsible for maintaining the site. At the increasingly rare times that there was some kind of announcement, each time it was from a different person I had never heard of before, as if the previous one had been fired. This would not have been that bad if the website would have maintained its same quality level, but it did not. All kinds of annoying issues started popping up, like the website becoming very slow at times or throwing 500, 501, 502, … HTTP errors at random moments.
Complaining about this seemed to be of no use, because only rarely would there be a response from what might either be a Thingiverse employee or maybe just some random joker — there was no way to verify that whoever was replying on the discussion forums, was an actual Thingiverse / Makerbot employee, it was often a different username, more often without than with the “Thingiverse” badge.

Then it got worse: apparently the nearly invisible Oompa-loompas now running the site, were trying to make certain changes for… reasons. One can only guess when something has changed, because there is barely any communication when this happens. The most obvious sign of a change is an increase in the number of issues. Suddenly all photo previews were broken. Then suddenly they worked again, but any photo that was not in a 4:3 aspect ratio, would be shown distorted. This was not the case before: photos used to be letterboxed and/or cropped in reasonable ways. What was the point of this change? It only made the user experience worse.
Now at the end of 2019, there are finally some advance warnings or notifications that some issue is being worked on. For instance in December there was a site-wide banner telling that there would be “maintenance”. One would expect that this maintenance was aimed at improving the state of the website, but instead when it had ended, we had an extra HTTP error in the 500 range and random 404 errors as well, even on the main page. A website gives a very bad impression if its main page throws a 404 error.

Overall the website in its current state gives a strong impression of lack of professionalism, sometimes downright amateurism. It seems that whoever is maintaining it, does no more effort in testing their changes than trying something once and then assuming it will always work. I wonder if they have a testing environment at all. Often it feels as if they make changes to the production servers directly. The changes give an impression of lack of skill in developing a modern cloud-based website, rather it looks like trendy hipster frameworks are just being thrown on top of a rickety organically grown base without much vision. I am not saying the (obviously few) developers working on the site are amateurs, but the end result does give that kind of impression. This is likely to be merely because management does not allow the developers to spend enough time to implement things properly, so they are forced to only quickly hack things together.

These are all ‘feelings’ and ‘impressions’ due to the total lack of communication. Only from the recent 504 error pages I could see for instance that they had either thrown ‘openresty’ into the mix, or had already been using it but had now broken something about it. There has been no announcement for this or an explanation why.

I have created my own issue tracker on GitHub just to make all the most obvious problems with the website more visible, in the hopes that this would help the maintainers to decide what to fix next, but it seems to be completely ignored.

The Ugly: my guess at what is going on here

In case you didn't already know, Thingiverse is owned by Makerbot and since 2013, Makerbot is a subsidiary of Stratasys, a company that already marketed 3D printers way before the big 3D printer boom started around the year 2010. Makerbot has changed from a small company selling affordable open source printers, to a big company selling rather expensive walled-garden machines aimed at the education market. I guess most of the original enthusiastic team wanting to change the world (like glitchpudding) have either been fired and replaced by people only interested in milking profits from whatever looks vaguely promising without actually caring about it, or they have transformed into such people themselves.

Thingiverse was part of the original vision of making 3D printing affordable for the home user, a vision that does not really fit with Stratasys, the company selling industrial machines at industrial prices. I guess that at every moment since 2013 when a decision about Thingiverse had to be made, the decision has been biased towards gradually sunsetting the website. Nobody at those companies seems to understand the value of this huge playground that encourages anyone to buy, experiment with, and get familiar with 3D printers. It doesn't matter that no beginner will immediately buy a horribly expensive Makerbot or Stratasys printer: the mere fact that there is a low threshold to gain experience with 3D printers, will increase the chance that these same tinkerers will later on generate profits for those companies. That however is probably way too much thinking-ahead for the average marketeer who has been brainwashed to always take greedy short-term decisions and lodge themselves into a cozy local optimum.


What Really Is Going On

Shortly after writing this article, someone notified me about this blog post: https://xyzdims.com/2019/11/21/misc-formnext-2019-aka-just-too-much-for-one-day/
It contains a part about Makerbot's presence on the Formnext 2019 exhibition. The author had the chance to talk to Jason Chan, who is responsible for Thingiverse. Many of my suspicions are confirmed: only two developers are assigned to the site (and I guess only part-time), and the company greatly underestimates the importance of Thingiverse. There seems to be some commitment to improve it, but again it looks as if the ones holding the bag of money do not share this commitment… Still no concrete indication of what will actually happen to the site.


“But it's free!”

Every time someone posts a complaint about the broken state of the website on the Thingiverse Group forums, there will be replies in the vein of: “but it is free, you have no right to complain.” I disagree. There is no such thing as a free lunch. Everyone who uploads content to the website, somehow invests in it. Some more than others, depending on how much effort they put in crafting the presentation and documentation of their Things. I have invested quite a lot, with about 120 published Things, each with pictures and an extended description. What I am now getting in return, is a pile of issues that make it harder to upload and edit Things, and I have no idea where the site is heading because of the lack of communication from the part of the maintainers. This lack of communication and lack of care to properly test each change, feels very disrespectful, even though only in an indirect manner. It almost makes me feel like an idiot for having put all this effort in my uploads during the years I have been on the site.

There are a few particular users on the Thingiverse groups who will react religiously against any complaint, one of whom has a pretty apt username given his writing style, which makes it seem as if he is drunk (he probably just is). Ignore them, because they are either trolls feeding on the anger, Makerbot employees paid to hold a denial campaign, idiots, or all of the above. None of them upload much of anything, therefore they don't even have any ground to stand on with their claims that the site works perfectly fine.

The content creators are the only reason of existence for Thingiverse. These creators deserve a little more respect than being ignored and being handed increasingly cumbersome tools to upload their content, without any explanation of what is being changed about the website, when, and why. There is no excuse for such poor communication in this era with so many different digital communication methods (and no, Twitter is not really a good communication method). I know it can be done better, because I was pretty content with how the site was maintained and how changes were communicated when I joined it in 2016. I have the feeling that the main breaking point for the website, was when the aforementioned glitchpudding left somewhere in 2017. It seems to have gone downhill ever since. I am not the one who demands infinite progress in everything, but I do expect that when something is good, people do the effort to keep it good.

Solutions, alternatives?

Obviously any sane person witnessing such evolutions on a certain website, would start looking for an alternative. That however proves to be a big problem with Thingiverse: there is no real alternative. I have looked at some other sites, but Thingiverse's biggest trump card is its sheer library of things. No other site comes close to it, therefore it doesn't matter if Makerbot only keeps Thingiverse at a level where it is just usable enough, people will keep coming for the content.

YouMagine looks decent at a first glance: its interface is the most similar to Thingiverse's I have found so far. It is owned by Ultimaker, alhough this is not explicitly mentioned on the site's main page. After trying it out however, it is obvious that YouMagine suffers from the same lack of maintenance, or worse. The ‘blog’ part has not been updated in ages, the featured things remain the same for a very long time, and reporting spam is impossible because the ‘report’ link only points to a dead support e-mail address. The 3D model previews and the ‘assembled view’ feature are mostly broken. Links and bold text do not work in the description text, which is incredibly annoying (I can imagine that they disabled links due to the spam, but bold text: why?!)
The site still runs, but it looks like a ghost ship. Maybe the only good thing about this is that if nobody changes anything about it, they also cannot break anything about it…

There are other sites like MyMiniFactory, against which I have grown an aversion due to the apparent shills promoting it on Thingiverse groups as the best thing since sliced bread. There is also Cults3D but just as with MMF, I find that there is too much emphasis on hiding content behind a paywall.

I have no concrete ideas for a solution. The best thing would be if a new website would be constructed by a community that does care about it, not tied to one particular manufacturer, and with a strategy to keep the community and website alive in the long term. Ideally, somehow the Thingiverse library would then be migrated to this site, but that is optional. I have made backups of all my uploaded models and their descriptions and photos, and I will happily re-upload them to a new website that is worth it. Maybe it would be better this way because to be honest, I estimate 80% of all Thingiverse models to be junk that would better be garbage collected. Starting from a clean slate might be better…

Friday, 6 December 2019

A ‘solar’ USB power bank with a fake solar panel, really?

A while ago I bought a ‘solar USB power bank’ from an eBay seller, with the idea that this thing would charge itself by merely sitting on a windowsill, at least cutting down on the time to recharge it.

When I received it, I immediately got a bad feeling about it. The solar panel looked weird. However, an LED on the power bank did react to the amount of incoming light, so I assumed it was just a strange new manufacturing process for solar panels. It did however not take long before I took the whole thing apart and found out that it was actually an elaborate scam: the panel was fake, just a piece of plastic with a sensor in it.

On my main website I explain in detail how this scam is designed, how you can recognise it if you suspect you also have a fake solar power bank in your hands, and how I eventually converted this scam into a real working solar power bank by adding a real solar panel and the necessary components. Buyer beware!

Read the full article

Een ‘solar’ USB powerbank met namaak zonnecel, echt?

Een tijdje geleden kocht ik een ‘solar USB powerbank’ van een eBay-verkoper, met de idee dat dit ding zichzelf zou opladen door louter op een vensterbank te liggen, en zo op zijn minst de tijd zou verkorten om hem helemaal op te laden.

Toen ik het ding ontvangen had, had ik meteen in de mot dat er iets niet pluis was. Het zonnepaneel zag er vreemd uit. Echter, een LED op de powerbank reageerde netjes op de hoeveelheid binnenkomend licht, dus nam ik aan dat het gewoon een vreemd nieuw fabricageproces voor zonnepanelen was. Het duurde echter niet lang eer ik het ganse ding toch uiteenhaalde, en erachter kwam dat het inderdaad een hoop vernuftig bedrog was: het paneel was namaak, gewoon een stuk plastiek met een lichtsensor erin.

Op mijn website beschrijf ik in detail hoe dit bedrog ontworpen was, hoe u het kan herkennen als u vermoedt dat u ook zo'n namaak powerbank op zonne-energie in handen heeft, en hoe ik uiteindelijk dit stuk bedrog omgetoverd heb tot een echte powerbank op zonne-energie, door een echt zonnepaneel en de nodige componenten toe te voegen. Caveat emptor!

Lees het volledige artikel (Engels)

Wednesday, 17 July 2019

Google Chrome ignores ‘enter’ keypresses within 3 seconds after clicking the address bar

To reload a page in a web browser, I often click the address bar and then press the enter key, for two reasons: first, I prefer this over clicking the ‘reload’ button because it guarantees that I won't re-submit form data. It is the best way to cleanly reload a page. Second, the cursor is usually very near to this bar anyway, and my hands are much nearer to the enter key than F5, and I'm of course way too lazy to press ctrl-R or command-R.

Since several years however, Google Chrome has started to sabotage this behaviour in a very annoying way. I noticed that my first enter keypress was often totally ignored. A while later I noticed the second press was also becoming ignored. This only got worse, now usually I have to press the key 4 times before the page is reloaded. The more it annoyed me, the worse it got.

Finally someone else also brought up this issue on SuperUser.com. It was still a mystery why the first presses were ignored and why there is variation in the number of presses before Chrome finally responds. The only reasonable explanation is that there must be a deliberate delay programmed in Chrome that ignores enter keypresses within a certain time period after clicking the address bar, unless something has been typed. Experiments have confirmed this, and the delay seems to be exactly 3 seconds in the current version of Chrome. This explains why the more one becomes aware of this issue, the worse it becomes: pressing Enter at a faster rate only results in more ignored keypresses. The only solution is to do absolutely nothing within 3 seconds after clicking the address bar. Of course it then becomes quicker to use one of the other reload methods, but only in a backwards kind of way because the most efficient method has been sabotaged. And if you need to use this method to reload a page without re-sending any POST data, then waiting the full 3 seconds is the only option.

My question is: why on earth was this implemented? What is the motivation? I cannot think of any good reason. Some developer must have spent time on implementing this and I have no clue why. The 3-second ignore period does not exist when bashing random keys immediately after clicking the bar—why would it need to exist when nothing has been typed? The only effect this has is to annoy people. Maybe it is yet another side effect of some change that caters for smartphones and tablets, because obviously laptops and desktop computers are totally identical to those devices [/sarcasm].
Please Google remove this “feature.”

Sunday, 3 February 2019

Enhancing headphones or earphones with Audio Hijack 3

Long ago there was an awesome audio enhancer for Mac OS X that could improve system-wide audio in various ways. It started out as ‘OSS 3D’ by Subband Technologies, later on it was bought by Joesoft and rebranded to ‘Hear,’ and it eventually migrated to the Prosoft brand name. This program offered various effects like 3D audio, a straightforward equalizer, a virtual subwoofer, and various other things that were both useful and gimmicky. Everything was fine until the program became unable to enhance audio coming from iTunes, arguably its most important target. Prosoft was never able to fix this and eventually the program stopped working altogether with the latest major OS X updates. Rest in peace, Hear.

I have been looking for a way to simulate at least part of Hear's functionality. I especially relied on it to obtain a more natural listening experience with headphones. If you have ever listened to e.g. Beatles songs on headphones, you will have noticed first-hand that headphones do not offer the same listening experience as loudspeakers. With loudspeakers, sound from the left speaker will not only reach your left ear but your right ear as well and vice versa, both directly and indirectly through reflections. With head- or earphones however, the left and right channels are fed strictly to the respective ear only. If the music was mixed with sound coming only from either left or right (as was often the case with the first stereo recordings like from the Beatles), this offers an unnatural experience. Even today a lot of music is mixed with loudspeakers in mind and will not sound ‘right’ when listening with headphones.


A good solution is to preprocess the music before sending it to the headphones, simulating it being played on loudspeakers. The most basic way to do this is to mix a bit of the right channel into the left and vice versa. This already makes Beatles songs less awkward to listen to but it's not quite it. To add more realism, the tiny delay caused by the longer audio path from the left loudspeaker to the right ear and vice versa must also be taken into account. From my DSP courses I remember that a realistic delay is 390µs (this can be derived from the geometry of a typical stereo setup and the shape of a human head). To further increase realism, there must be some low-pass filtering as well because higher frequencies will have a harder time reaching the opposite ear. And finally to get the sensation of listening in a real room, some reverb can be added.

This idea can be implemented with Audio Hijack from Rogue Amoeba Software. It is not for free but is well worth its price for anyone who needs to do more with audio than merely playing some music. So let's see how we can implement our fancy headphone enhancer with Audio Hijack.


The above image shows the setup. The upper part is the one that simulates a room. A slight reduction in volume is applied to compensate for the fact that we will be adding a cross-mix of the channels later on. A reverb effect makes the sound less ‘dry’ by simulating it bouncing off walls, floors and ceiling. The configuration of the reverb unit is a matter of personal taste. I started out with the defaults of the Matrix Reverb and reduced the ‘large’ parameters to have a faster drop-off.

The lower part is the most important one, it represents the cross-mix between loudspeakers and ears, the extra delay due to the longer audio path, and the attenuation of high frequencies. The 390µs delay cannot be obtained with the standard effects available in Audio Hijack, a custom plug-in is needed. I've found this free sound delay audio unit from Voxengo to be adequate. You need to reboot after installing the AU plugin to make it available in Audio Hijack. Enter a value of 0.39 msec in the effect configuration. People with really fat heads might try a larger value but it should never deviate much from this.
The exact value for the low-pass filter isn't crucial. This filter has two purposes: first, simulate the actual attenuation of higher frequencies that would occur in the situation depicted above, which is difficult to quantify anyway. Second, avoid interference between trebles in the original audio and the delayed copy. Without the low-pass filtering, there would be a comb filter effect that can make some trebles sound weird. If you still notice this, you may want to use a lower frequency than the 6 kHz I used here.

After mixing everything together, there is another volume control and an equalizer. These are optional but unless you have extremely high-end headphones, a little extra EQ can get that bit of extra fidelity out of them. The reason why you may need to precede the EQ with a volume reduction is that if you need a considerable bass boost, you'll need to attenuate the input to avoid sending the audio into overdrive. You may add other effects to your liking, e.g. a dynamic range compressor in case you're listening in a noisy environment (although a lot of modern music has no dynamic range to begin with…)