Tuesday, December 5, 2023

Audio Pop/Click on Roku Express 4K+ Plex AAC 5.1/7.1 Surround

This is just a quick post about a dumb problem that I had a lot of trouble pinning down: audio popping on my Roku. The tl;dr is: set "direct play" to "auto" instead of "forced." If you'd like to understand why, keep reading.

Background

I got a new TV recently--a Hisense U7H--to replace my crappy, ultra-budget TCL 4-series Roku TV. I was planning to use the built-in Android OS to run the Plex app to stream media from my local server but the app apparently sucks in a number of strange ways, especially when it comes to music and playlists, so I bought a cheap Roku Express 4K+.

The Problem

Some of my videos started having an annoying popping/clicking in the audio. I tried the same videos with the native Android app and that resolved the clicking, so I was pretty sure it was Roku-specific. From there, I did some googling and came up with some possibilities: apparently Roku OS 10 has some sort of issue with AAC and AC3 streams, and there are some issues with Roku's "audio leveling" feature. I tried reencoding the audio on a persistently popping video from AAC to AC3 and the popping went away, so I don't think it was the OS 10 issue, and I didn't have the audio leveling enabled in the first place, so it didn't seem to be that one either.

Additionally, I tried playing the offending video on Jellyfin to rule out any Plex-specific issue and popped/crackled there, too.

One of the posts in the audio leveling thread caught my eye, though:

With a little more searching, I learned that Roku devices apparently cannot playback AAC via hardware at all(?) and will, at best, convert them to something else, but they apparently don't have the grunt to decode multi-stream audio--like 5.1 or 7.1 surround--at full speed, which results in the popping.

The Solution

The solution appears to be changing the "direct play" setting in the player/client from "force," which I had selected to minimize the CPU load on my server, to "auto." Your server will have to reencode the audio more often, but it should get rid of the pops.

Monday, December 12, 2022

How to DIY Universal TRS MIDI Adapter

 MIDI is great. It's been around forever and lets all of our synths communicate with a simple protocol across a sturdy and robust 5-pin DIN connector. Unfortunately, as devices have gotten smaller and space on those devices becomes ever more valuable, many manufacturers have ditched the venerable 5-pin DIN connectors for the smaller (and cheaper) MIDI-over-TRS (TRS stands for Tip/Ring/Sleeve; it's known informally as 3.5mm stereo or "aux" cable). When I first learned of this shift, I didn't think much about it. My device came with a TRS-to-female-DIN adapter and that was that.

Until I got a second TRS-MIDI device and none of my dongles worked with it.

I'm not sure on the history of how this came to be, but there are actually two competing and physically incompatible MIDI-over-TRS standards, known as "type A" and "type B". Some manufacturers tend to use type A connections while others use type B. As far as I've seen, this information--that is, which standard any given device uses--is never printed beside the ports on the device, and it's very rarely on the adapter dongles (I've only ever seen it labeled on third-party adapters, never first-party).

Both standards use the same pins from a 5-pin DIN--the 2, 4 and 5 pins, to be exact--and both use pin 2 (the one at the bottom/middle) as the ground pin:

The only difference between the two standards is whether pin 4 is Rx and pin 5 is Tx or vice versa. Infuriatingly similar.

After buying and selling some synths, I've ended up with all of my devices using the same standard (I can never remember which) and not enough of the right kind of adapter to cover both input and output on all of them. I considered cutting up some of my adapters from the other standard to swap the polarity (i.e., to convert them to the standard my current gear uses), but I didn't want to keep dealing with this problem in the future, so I decided instead to use a DPDT switch I had lying around to make a universal, switchable TRS-MIDI Type A+B cable.

The first step in this process was to cut open my extra TRS-MIDI cable. You could also accomplish this by cutting up a cheap MIDI splitter cable and a spare TRS/3.5mm/aux cable, which would let you make two universal cables at the same time (to cover both your MIDI in and MIDI out). My cable has a green wire, a white wire and a shield around them, which connects to the ground pin.

So, the way a simple 2-way DPDT switch works is you have 2 pins in the middle and when the switch is turned one way, they bridge to the 2 pins on one side and when you flip the switch the other way, they bridge to the other pins, like so:

Now, looking at the underside of our DPDT switch:

we need to do a criss-cross bridge with some tiny jumper wires to connect our outside pins from one side of the switch with the opposite pins on the other side of the switch, like this:

Next, we solder one side of our cable's wires to the outside legs on one side of the switch, like this (it doesn't matter whether you do the TRS side or the DIN side of the cable; either works):

After that, we take the other side of our cable--whichever one you didn't use in the previous step--and solder its wires to the two inside pins, like this:

Once that's done, the last step is to connect your ground lines together. They're not involved in the switching process at all, so just link 'em up:

That's it. You're done.

I don't know why this problem even exists, and I don't know why nobody makes/sells switchable cables like this, but thankfully, we can deal with it ourselves with little fuss/investment.

Analytics Tracking Footer