Practical Wireless

Virtual Audio Cables – Under the Bonnet

Mike Richards G4WNC starts with a look at Virtual Audio Cables before turning to the latest developmen­ts with SDR-Console and a quick mention of Nose-Red.

- Mike Richards G4WNC practicalw­ireless@warnersgro­up.co.uk

Iskimmed over virtual audio cables a couple of months ago but, as ever more operators move to pure SDR based rigs, there is a growing need to have a good working knowledge of how audio signals are routed around the computer. In this month’s column I’ll cover a bit more detail on how Virtual Audio Cables (VAC) work and how to use them. Pre-SDRs we just needed a set of dedicated leads to connect the rig with the computer so we could run our data modes. This has progressed to the point where many of the mainstream manufactur­ers now provide a standard USB connection that carries the digital audio and rig control signals. However, there is another breed of pure SDR rigs where the main controls of the rig only exist in software. Popular examples of this are to be seen in the Flex, Apache Labs and Hermes transceive­rs. In most of these rigs there are no physical controls on the rig.

When it comes to managing the audio, we could physically patch the ins and outs if we have a couple of soundcards installed in the PC. However, that is an unwieldy solution that degrades the signal. The degradatio­n occurs because we would be putting our signal through two sets of analogue-to-digital conversion­s, Fig. 1. As the analogue-to-digital conversion process samples the signal in discrete steps, the process will lose some of the original informatio­n and add some new quantisati­on distortion. In a modern high-quality soundcard, the degradatio­n is quite small, but we can completely avoid the analogueto-digital conversion if we keep the audio in digital format. Referring back to Fig. 1, you can see that our SDR rig deals in digital audio streams and so does the data modes software. The obvious step is to link the digital audio streams together, so the entire process remains digital. Not only does this maintain the audio quality, but it simplifies the connection­s.

Although this sounds like a straightfo­rward solution, you will soon discover Windows audio has very limited routing options. We can easily send an audio output to the speakers, headphones, etc. but there isn’t a way to send the audio output from one device to the input of another device. In our case we want to take an audio output stream from the rig and connect it to the audio input of our data modes software. We have the same problem when dealing with transmit audio because there’s no way to connect the audio output from the data modes software to the input audio of the rig. This is where what’s become known as a VAC steps in. The reason it’s called virtual is because it is just software, there’s no cable involved, though it often helps to visualise it as a cable. In this case, the VAC can link any digital input to any digital output and vice versa, which is exactly what we need. In order to do this, the VAC reads the selected digital stream and sends an exact copy to the chosen destinatio­n. Under the bonnet it’s not quite as simple as that. Windows is a multi-tasking operating system, which means the processor is hunting around the PC for jobs that need to be done, a bit like spinning plates. When it comes across an audio stream, it sends a burst of that data to a memory location known as a buffer and moves on to the next task, Fig. 2. Any device that needs the audio data will read it from the buffer. The use of a buffer introduces a small delay between when the data is created and when it is available to the destinatio­n program. This delay is known as latency. You can probably spot a problem here; if the program

Fig. 1: Audio data between SDR rig and data modes software. Fig. 2: Reading audio data from a buffer. Fig. 3: Using a repeater to monitor a VAC. Fig. 4: VAC control panel. Fig. 5: Audio flows when connecting WSJT-X using VACs. Fig. 6: SDR-Console all the HF FT8 bands on one screen.

reading the data goes faster than the processor can supply the data, there will be a gap in the audio. This is quite a common problem that shows up as stuttering in the final audio. The normal solution is to either slow down the data rate (sample rate) or increase the buffer size, to give more time for the data to be populated.

To create a practical VAC, the software simply transfers the data on its input to the output, maintainin­g the same format. This simple transfer enables the VAC to feed audio to multiple devices. For example, if you’re working a RTTY contest, you could have several different decoders running in parallel from the same VAC output in an attempt to get the best decode. All these decoders would read the audio data from the VAC output buffer.

PracticalV­ACs

There are two VACs available that are in common use. The first is VB-Cable from VBAudio. This is a free applicatio­n that installs a single VAC and can be useful for many applicatio­ns. If you need more VB-Cables, the software is donationwa­re, but with a twist, where you decide how much you want to pay! You can find VB-Cable here: https://vb-audio.com/Cable/index.htm

I have been using Eugine Muzichenko’s excellent VAC for many years and have found it to be very stable and trouble-free despite the wide range of software combinatio­ns I have thrown at it. VAC is a paid for product, but the perpetual licence cost is just $30US (£22) and that gives you an unlimited number of VACs. In addition to the virtual cables, VAC comes with a couple of useful repeaters. The repeaters let you monitor any audio path. For example, when I’m using FT8 with my Hermes Lite rig and SDR-Console software, I route the audio out to a VAC and then on to WSJT-X, but that means I can’t hear any audio because there’s only one output option. This is where the repeater helps. I can set the repeater to monitor the VAC and send the output to my speakers, Fig. 3. Although not particular­ly relevant to amateur radio usage, Eugine’s VAC also fully supports surround sound audio. The VAC is available from: https://vac.muzychenko.net/en

UsingVACs

While it’s good to understand what’s happening under the bonnet, VACs are actually very easy to use as you rarely need to change any settings. I’ll run through configurin­g Eugine Muzychenko’s VAC. This VAC is installed with a dedicated control applicatio­n where you can configure the VAC parameters, Fig. 4. You will need administra­tor privileges to add cables, so you need to run the VAC control panel by right clicking on the program and choose Run as administra­tor. Here’s how to perform a standard setup:

With the VAC control panel open, head up to the top left and set the cables to 2.

There’s no need to change any other settings, so you can click Exit to close the panel

If you’re asked to restart your computer, go ahead and do that.

Next check that the new cables have been created.

Go to the speaker icon in the bottom right of your computer screen, right-click and choose Open sound settings

In the Sound panel under Output, you will see a drop-down that lists all your sound devices

The VACs will normally show up as Line 1 (Virtual Audio Cable) and Line 2 (Virtual Audio Cable)

You should see the same listing under the Input section

One thing that often confuses people is the Device Manager entry as there is just a single device shown in the Sound section. However, if you go to the top of Device Manager and open the Audio inputs and outputs you will see two entries for each installed VAC, one for the input and the other for the output.

One important point to note about VACs is that they are unidirecti­onal, which is why you need two cables, one for the receive audio and another for the transmit. When using Eugine’s VAC, I normally use Line 1 for receive audio and Line 2 for transmit. Here’s an exam

ple of how to link WSJT-X to an SDR, Fig. 5.

In your SDR software, set the audio out to use Line 1 (Virtual Audio Cable)

Set the transmit audio input to use Line 2 (Virtual Audio Cable)

Next move to WSJT-X and open the Settings panel, Audio tab

Set the Soundcard Input to Line 1 (Virtual Audio Cable)

Set the Soundcard output to Line 2 (Virtual Audio Cable)

At this point, the sound settings will let you transmit and receive data modes, but you won’t hear anything through the speakers. This is where the audio repeater fits in. Locate Virtual Audio Cable in the Windows program list and select Audio repeater (MME). This will open the repeater panel where you set the Wave in to Line 1 (Virtual Audio Cable) and Wave out to your PC’s speakers. Once set, just hit the Start button to begin monitoring the audio. That completes the setup and you can use the same virtual cables for other data modes software.

SDR-Console –

One Screen to RuleThem All

SDR-Console applicatio­n continues to evolve and is an extremely powerful tool for a wide range of popular SDR radios. I use it to run my Hermes Lite 2 transceive­r but it also works very well with my RX888 MkII wide range SDR. In addition to adding features, Simon has been working hard to reduce the processor loading so that it will run on very modest PCs. The latest addition is a big step forward and takes full advantage of the extreme bandwidth offered by full range direct sampling SDRs such as the RX888. The new Multi-Band window lets you simultaneo­usly monitor as many bands or band segments as you like. It comes with a good range of preconfigu­red options such as the FT8 view shown in Fig. 6. This simultaneo­usly shows the FT8 segment on every band from 160m to 10m! Viewing all this informatio­n is very impressive but you can also mouse-click on any band to instantly retune to the chosen band. Customisat­ion of the band combinatio­ns has been well thought through and uses a Bands Organiser panel, Fig. 6. This provides an editor where you can quickly add and delete band segments. Once you’ve specified the required segments you can use the graphical organiser to move the blocks around to your preference. Resource usage is well controlled and on my main PC (10th gen i7 processor and GTX1650 super graphics card) I see around 6% processor usage and around 50% of the GPU. That’s with the RX888 MkII receiver and the Multi-Band display showing all FT8 channels.

Node-Red

Node-Red is a free visual programmin­g language developed by IBM that specialise­s in processing events and messages from a wide range of systems. Originally designed to help IBM developers prototype software for their customers, it has since taken on a life of its own. Node-Red programs are known as flows and there is an online repository where users can share their code. The main website for informatio­n and for downloadin­g flows is: https://nodered.org

The system is built with Node.js and programs are built using flow-charts so it is easier to get to grips with than many other programmin­g languages. My main reason for mentioning it here, is the growing number of amateur radio specific flows appearing in the repository. I recently noticed a flow that connects to WSJT-X and decodes FT8 messages. This could form the basis of an alarm or filtering applicatio­n to spot specific transmissi­ons or callsigns. Flex users may be interested in the flow that communicat­es with Flex 6000 series rigs and provides several nodes for sending and receive commands. There is also a meters node in developmen­t that identifies and reads the internal meters of these Flex radios. For WSPR users there’s a flow that uses the ALL_WSPR.txt file on your computer to create a local map of all your spots. One of the many enhancemen­ts that’s been added since I first came across NodeRed is the dashboard user interface. This makes it relatively easy to add a friendly interface with buttons, dials, etc. If you want to try Node-Red, the Raspberry Pi is a good place to start because it’s included in the standard operating system. You can also install NodeRed on just about any other computer system. Instructio­ns can be found in the Getting Started section of the Node-Red website.

 ?? ??
 ?? ??
 ?? ?? 4
4
 ?? ?? 3
3
 ?? ?? 6 6
6 6

Newspapers in English

Newspapers from United Kingdom