## About The Applicability of Over-Sampling Theory

One fact which I have described in my blog, is that when Audio Engineers set the sampling rate at 44.1kHz, they were taking into account a maximum perceptible frequency of 20kHz, but that if the signal was converted from analog to digital format, or the other way around, directly at that sampling rate, they would obtain strong aliasing as their main feature. And so a concept which once existed was called ‘over-sampling’, in which then, the sample-rate was quadrupled, and by now, could simply be doubled, so that all the analog filters still have to be able to do, is suppress a frequency which is twice as high, as the frequencies which they need to pass.

The interpolation of the added samples, exists digitally as a low-pass filter, the highest-quality variety of which would be a sinc-filter.

All of this fun and wonderful technology has a main weakness. It actually needs to be incorporated into the devices, in order to have any bearing on them. That MP3-player, which you just bought at the dollar-store? It has no sinc-filter. And therefore, whatever a sinc-filter would have done, gets lost on the consumer.

## Testing the Focusrite Scarlett 2i2 external sound device, with my Samsung Tab S Tablet

I have tested, whether this external USB recording tool, works with my Samsung Galaxy Tab S Tablet, using a ‘StarTech.com’ OTG adapter. The results were resoundingly affirmative.

In This Earlier Posting, I had tested the same USB Sound Card, with my Samsung Galaxy S6 Smart-Phone. At that time, an attempt also to use it with my Tab S tablet had failed. In order to get the Scarlett 2i2 to work with the Tab S, the following two conditions need to be fulfilled:

1. The amount of current that the USB Slave Device may draw, needs to be reinforced, in principle, with a self-powered OTG adapter, or with a similar arrangement. The ‘StarTech.com’ is Not a self-powered OTG adapter, and with it, the Scarlett 2i2 is bound to draw too much current, for the likes of the Tab S. It was after all meant as an audio workstation workhorse, and not as a replacement for a simple USB Microphone.
2. The Master / Host Device, the Tab S, needs to have the correct drivers.

Condition (1) is something I was able to fulfill for now, in a roundabout way. I bought a ‘j5create USB 3.0 4-Ports Mini HUB’, with the part number ‘JUH340′. This is a self-powered hub by default, with its own power cord, and has Type A USB connectors up-stream and down-stream. Granted, it has a special up-stream cable, that connects to the hub with a special connector, just so that the user does not get this socket confused with the down-stream sockets. But then, the far side of that cable has a standard Type A USB jack.

This USB jack can be plugged, into the far side of the OTG adapter. Since the hub is self-powered, the current requirements of the Scarlett 2i2 are met by it, and not by the OTG adapter, and thus not by the micro-USB port on the Tab S, the latter of which now faces a minimum current load.

## Testing the Focusrite Scarlett 2i2 external sound device, with my Samsung S6 Smart-Phone

I have tested, whether this external USB recording tool, works with my Samsung Galaxy S6 Smart-Phone, using an ‘StarTech.com’ OTG adapter. The results were mixed. In An Earlier Posting, I had tested whether this external USB Sound Card, works under Linux. And the answer to that question was a resounding Yes.

When we plug an OTG adapter into a smart-phone or tablet, this puts the mobile device into Master / Host Mode, that would otherwise normally work in Slave Mode. Thus, we can then plug in a USB storage device, and hopefully have that recognized, while by default, we can only plug our mobile device into a computer, and have the computer recognize this mobile device, as the storage device.

But it is also plausible to connect other external devices to our mobile device, when using an OTG adapter. All this happens because the OTG adapter itself contains an additional chip, that gives it the ability to act as a USB Host. Whether such external devices will work or not, generally depends on two factors:

1. Whether the micro-USB port on the mobile device can output enough current, to supply the external / Slave device, and
2. Whether the mobile device possesses the drivers needed, for the USB device in question. Under Linux, this last question is more likely to be answered in the affirmative.

The OTG adapter I was using, uses its micro-USB side as the only power-supply. This means that if the connected device draws a full 500mA of supply current, we are pushing the limit, that is generally set for USB 2.0  PC ports.

## A Note on FLAC -Compressing 24-bit

One note which I had commented about before my blog began, was that if authors decide to capture sound at 96k samples /second, the resulting sound should compress well using FLAC.

But now that I have experimented with ‘QTractor‘ and an external sound card, I have realized that we will probably also be capturing that sound in 24-bit sample-format, instead of 16-bit. And the sad fact is, that FLAC will not compress the 24-bit format as well, as it did 16-bit.

The reason seems clear. Using ‘Linear Predictive Coding’ means that FLAC will be able to predict the next sample in a set of so-many, to maybe 8 bits of precision, except that the next sample will always deviate from this prediction by a small residual. So 8-bit sound should compress brilliantly.

But then with 16-bit, the accuracy of the encoding stays the same. So again, the ‘LPC’ is really only 8-bits accurate at best, meaning that we get a larger residual. The size of that residual is what makes up most of a FLAC File.

Well at 24-bit, again, the LPC will only predict the next sample, accurately to within 8 bits. And so the residual is likely to be twice as large, as it was with 16-bit, completing 24-bit accuracy this time. We are not left with much compression then.

When I recorded my 14-second sound session the other day, I selected FLAC as my capture file format. I had a noisy air-conditioner running in the background. Additionally, the compression level defaults to Fastest, because the file needs to be written in real-time, and not chewed on.

At 96 kHz, 24-bit stereo, raw audio will take up about 4.6 mbps. At 44.1 kHz, 16-bit stereo, raw audio takes up about 1.4 mbps.

Well I was capturing to a stereo FLAC File, but was only using one channel out of the two. So the FLAC File that resulted, had a bit-rate of 2.3 mbps. This means that FLAC recognized the silent track and used ‘Run-Length Encoding’ on it, but that was about all this CODEC could do for me.

Now, we do have a command-line tool which will-re-compress that file:

$flac -8 infile.flac -o outfile.flac$ flac -8 infile.flac --channels=1 -o outfile.flac
\$ flac -8 infile.flac --channels=1 --blocksize=8192 -o outfile.flac

The -8 means to use maximum compression.

For me, the bit-rate went down to 2.2 mbps either way.

It beats using a raw format, because using the latter would have meant, nothing would have detected my silent stereo channel, and the file would have been twice as large.

Dirk