You are here

Audio Vs MIDI Latency, Online Security

Online security, the difference between audio and MIDI latency, and a software world record attempt: all this and more in the latest instalment of PC Notes...

Secunia's Software Inspector will check that all the common components of your operating system, browsers, email clients and media players are secure and up-to-date versions.Secunia's Software Inspector will check that all the common components of your operating system, browsers, email clients and media players are secure and up-to-date versions.Like most other musicians, I'm well aware that having Internet access on a PC can leave you open to all sorts of on-line hazards, and I regularly update my browser, firewall, spyware and virus utilities. However, this month I was reminded how many other media-related utilities also need to be kept up-to-date to prevent possible security risks, after I ran the very handy Online Software Inspector from Secunia (http://secunia.com/software_insp...).

You simply click the 'Start now' button on the web page given above to verify that all Microsoft's Windows patches have been applied and to detect older 'insecure' versions of common applications installed on your PC. If any are found, the page also helps you install the most up-to-date versions by pointing you at the appropriate web site.

Online Software Inspector is reasonably thorough, covering most versions of the popular browsers and their plug-ins, a variety of email and instant messaging clients, software firewalls, and (of particular interest to musicians) media players including Microsoft's own Windows Media Player, WinAmp, RealPlayer, iTunes, Apple Quicktime and Macromedia Flash Player. This on-line scanning service is free, and there's also a free downloadable Personal Edition that you can run off-line, plus a more thorough off-line Business Edition that can scan entire networks to track down insecure software in a more corporate environment.

I ran the on-line version on my Internet-enabled Windows partition, and was surprised to discover that I had slightly older and insecure versions of Apple's Quicktime player and Sun Java Runtime Environment. I was able to update them both, downloading Apple's Quicktime player from www.apple.com/quicktime/download (it automatically cleans up older versions when you install it) and Sun JRE from www.java.com. I uninstalled the older version of JRE manually, using 'Add/Remove Programs' in Control Panel, before installing the latest version, to avoid ending up with multiple versions installed side by side.

PC Snippets

As previously reported in PC Notes July 2008, Windows XP is no longer available for sale from Microsoft, although plenty of retailers who have stockpiled copies will continue selling them for the foreseeable future. This is sad news to the hordes of PC users who still prefer it to Microsoft's newer Vista OS, and particularly to the more than 200,000 people who signed InfoWorld's 'Save XP' petition (www.savexp.com).

A Little Less Flash

Adobe's Flash Player is routinely used on web sites and cover-mount CDs and DVDs to run small SWF (ShockWave Flash) files that add extra multimedia content such as animated graphics, menus and advertisements, but is also particularly popular among musicians for adding streaming audio and video content to their web sites.

It's important to have the latest version of Adobe's Flash Player (the driver software) installed on your PC to minimise the chances of conflicts with the various freeware/open source SWF files routinely embedded in web sites to provide CD-style playback units. So I was rather shocked, after running Secunia's Software Inspector, to discover that I had a total of four instances of Adobe's Flash Player of various vintages installed on my PC: two of a relatively recent version 9 used by Internet Explorer and Mozilla's Firefox 2, but also a redundant version 7 and even an elderly version 6 installed as part of my AOL Internet browser!

While it's perfectly possible for different applications to each install and use a different Flash version, it's generally safer to have just one up-to-date version installed on your PC and accessed by all the Internet browsers you happen to use, to avoid possible conflicts and security issues. It's tricky enough for musicians to check that their web site looks good on every Internet browser as it is, without the potential complications of each one relying on a different Flash version!

Fortunately, you can download a dedicated uninstaller utility (http://kb.adobe.com/selfservice/...) that can track down and remove all Flash Player instances from your PC, so you can start with a clean slate before installing the latest version (www.adobe.com/go/gntray_dl_getflashplayer). Also, unlike Apple's bloated 23MB QuickTime Player, it's a tiny 1.4MB download.

Record-breaking Firefox?

With the launch of Firefox 3, Mozilla not only added lots of new features to their popular web browser, but also attempted a Guinness World Record for the most downloads in a 24-hour period.With the launch of Firefox 3, Mozilla not only added lots of new features to their popular web browser, but also attempted a Guinness World Record for the most downloads in a 24-hour period. The best Internet browser has just got even better! Tuesday June 17th 2008 was the day chosen by developers Mozilla to launch Firefox 3 (www.mozilla.com/en-US/firefox), and they also attempted a Guinness World Record for the most downloads in a 24-hour period. With a staggering 8.3 million downloads during this first day, I suspect they will make it into the next edition of the Guinness Book Of Records, and as I write this the number of downloads is up to nearly 27 million!

Firefox 3 apparently contains more than 15,000 improvements over its predecessor, with a new Smart Location bar (aka the 'awesome bar') that, as you type a new URL, drops in a mixed list of your bookmarks and browser history containing the letters you've already typed, to save you having to type in the whole thing.

You can also save tab collections and entire sessions for future use (handy for opening up your favourite selection of SOS Forums, for instance!), while the underlying engine offers improved browsing speed, reduced memory usage and malware protection, and the Download Manager has been considerably enhanced, with resumable downloading now supported if you want to get a huge file in several stages.

Font rendering has been improved, to make text even more legible, and Firefox 3 also offers an impressive 'full page zoom' function that smoothly resizes the entire page, complete with all images and layout details, rather than just the size of the text. This is great if, for whatever reason, you find the default content size on a particular web site too small to read, although it does have the unfortunate side-effect of making ads larger too!

A few users may revert to Firefox 2 for the time being, for two main reasons. First, anyone who relies on any of the extremely useful third-party Firefox add-ons will find most of them currently incompatible with version 3. Second, the otherwise wonderful graphics 'engine' does result in extremely jerky scrolling on a few graphics-hungry web sites. If either of these issues affect you, it's comparatively easy to temporarily return to Firefox 2: just use the FF3 uninstall option and then download and install the final FF2 version from www.mozilla.com/en-US/firefox/all-older.html. Firefox 3.1 is expected some time in July, with some bug fixes and yet more new features.

Audio & MIDI Latency

Lots of musicians still seem to be confused about the difference between audio and MIDI latency, so perhaps it's worth clarifying here. When you play back audio from your sequencer, the software assembles the audio into short chunks and sends them off to the driver of the audio interface to be placed into 'buffers', from where they're pieced together into one (hopefully) smooth stream by the audio interface.

If you choose to have large interface buffers, it's highly unlikely that any other software task will disturb this on-going process long enough for any one buffer to have finished being streamed out by the audio interface before your sequencer gets the next buffer assembled and forwarded for duty. However, when you're playing software-based instruments, the audio buffer being assembled can only take account of any MIDI key-presses that have already happened, so any MIDI keys that you press once the calculations for a particular audio buffer have been started won't result in any new sounds until your sequencer starts calculating what sounds to put into the next buffer. Follow me so far?

This is why keeping audio buffer sizes as small as possible allows software synths to respond more quickly to MIDI keys being pressed (the shorter the buffer, the quicker your notes can appear in the next buffer), but there's a limit to how small you can make them, depending on how well your PC is set up and the quality of the interface drivers. Once the duration of other incidental tasks that need to be carried out by Windows approaches the length of the audio buffer, it's possible for one buffer to finish being outputted before the next is ready in the queue. We then get an interruption in the audio stream, heard as a click or pop.

Although many musicians grumble about this 'MIDI latency' affecting the responsiveness of software synths being played 'live', in fact they are mostly complaining about audio playback latency only: the duration of each audio buffer.

The Key To It All

MIDI latency is an entirely separate phenomenon caused by the delays in getting MIDI key-presses into the PC. From pressing a key it will probably be at least a millisecond before the keyboard itself sends out the appropriate MIDI data. Then the MIDI input port in your PC (either part of your audio interface, or in some cases a musical keyboard with its own direct USB connection and PC drivers) will also need to process incoming MIDI data, so there will be an additional wait before the key-presses actually arrive at your sequencer to be processed.

All of this adds up to the MIDI latency, and the total time taken for a soft synth to 'speak' after you hit a MIDI key is the sum of the MIDI latency and the audio playback latency. The MIDI latency is nearly always far smaller than the audio playback latency, so the best way to achieve more responsive VST instruments is to make your audio interface buffers smaller, while listening out for clicks and pops. If you hear any, keep increasing the buffer size to the next available setting until they disappear.

If the response still isn't nippy enough, your Windows settings might need further tweaking (see my XP Tweaks For Music in SOS September 2006 for more details on this, www.soundonsound.com/sos/sep06/articles/pcmusician_0906.htm), or you might need a faster PC that can manage lower buffer sizes. However, in a few cases MIDI latency can indeed be the reason for sluggish soft-synth playback. Its value does vary for each keyboard or interface, and although most MIDI input ports manage to get key-presses to your sequencer within a couple of milliseconds (which is almost imperceptible), a few (particularly the MIDI ports on some Firewire-based audio interfaces) can take significantly longer. So, although unlikely, it is nevertheless possible for MIDI latency to result in noticeable time lags when you're playing soft synths, even when the audio buffer size is small.

Unfortunately, MIDI latency is a fixed quantity (there are no buffer sizes to adjust), and barring a driver update you can't improve on it. However, my MIDI port measurements over the last four years have shown that some classes of MIDI port are generally faster than others. Since most musicians use one main music keyboard for performance purposes, it therefore makes sense to connect that to the most responsive MIDI port available.

If you have a MIDI keyboard with its own USB connection to a PC, use that for the lowest MIDI input latency. If not, use the MIDI input on a PCI-based audio interface if available, and then that of a USB-based audio interface. MIDI ports on most Firewire audio interfaces tend to be the slowest.