Sample Rates

Why does WriteLog display the Shared Mode sample rates in its Mixer Test panel?

Several WriteLog features merge audio streams from multiple input devices onto a single output device (or recording file). The two primary examples are the Headphones output can have its Left channel from one device, while its Right channel from another. When WriteLog merges audio in this way, it is required by the Windows API to arrange for the sample rates of the output Left and Right channels to match. But the input devices are running at their own sample rates, so conversions might be required.

The short story is that in order to get WriteLog’s full functionality (i.e. to be able to route sound from any of its inputs to any of its outputs, and to use WriteLog’s internal PSK, RTTY and CW decoders) every device must support a “shared mode” rate of “CD Quality 44100Hz.” or “DVD Quality 48000Hz.” Either is OK, but the key is that all devices used by WriteLog must use the same rate. Use the Windows 7 Control Panel, Hardware and Sound, Sound button to bring up this panel:

In both the Recording and Playback tabs, double click in turn on each device you have configured for WriteLog to use. Go to the Advanced tab and change the “Default Format” to “CD Quality, 44100Hz” if that setting is available. Not all devices will show a  CD Quality or 44100Hz (or 48000Hz)setting. In the absence of a 44100Hz or 48000Hz setting, there are multiple caveats about exactly what will and will not work with WriteLog. Those details are discussed below. One additional subtlety in this panel (not related to this Rates discussion) is that Recording devices limited to mono input (i.e. without Stereo, 2 channel) input cannot capture subreceiver audio for rigs that can put a subreceiver on the Right channel.

Also while you are using this panel, the General tab can change the text and the icon of the device’s display to something that corresponds to the way you have your cables connected.

If you really want to know why the “CD Quality 44100Hz” is magic, and exactly what works and what does not if your devices have no “shared mode 44100”, then read on.

In the world of Windows-compatible audio, probably the most significant sample rate matching problem is due to the difference between the two industry standards, “CD quality” at 44100Hz, and “DVD quality” and 48000 Hz. A technical discussion of how to construct a filter that converts one of those sample rates to another, appears on this page. As described in detail there, a 44100 to/from 48000 conversion has 147 samples of the former becoming 160 of the latter. WriteLog has internal conversion capabilities to support sound devices capable of rates differing only in multiples of small integers (2 or 3 or 5, for example). For the purpose of its RTTY, CW and PSK decoders (and only for them) it does have 160 to 147 conversion.

The 44100Hz sample rate is magic for only one reason: WriteLog ships with three signal decoders for audio: one for CW, one for RTTY, and one for PSK31. Those three WriteLog decoders have internal filtering designed only for 44100Hz sampling and therefore if you set all WriteLog’s devices to 48000, it internally runs a 160 to 147 conversion just to run its decoders. By all means, if you must use the 48000Hz setting to get all your hardware to a common sample rate, then set the shared sample rate to DVD Quality and WriteLog will figure it out as long as it can use powers of 2 or 3 or 5 to convert multiple inputs to a common rate.

There are even more “ifs ands and buts” regarding the rates available on the various sound devices WriteLog can use. The “shared mode” setting for the Windows device setting described above is only actually used when WriteLog allocates a device in shared mode, and, by default, it only does shared mode access for rig receiver inputs. All the other allocations are in exclusive mode.The upshot is that normally only those two receiver input devices need be set in the Windows control panel to matching sample rates.

The device driver for the device determines what exclusive mode rates it supports, and almost all devices support more exclusive rate settings than the shared mode. When WriteLog allocates in exclusive mode, it always attempts to set it in CD quality and most (but not all) audio devices will comply with that rate and WriteLog will not complain. Use the Test button in the WriteLog Mixer Control panel to find out.

In order to really know whether WriteLog will configure with your system, its the Test button on the WriteLog Sound Board Mixer control that gives the answer. If you click the Test button and WriteLog brings up the test panel without displaying an error, then it is good to go.