Fundamentals of Digital Audio

Mac Audio Optimization Guide

When streaming audio through an interface connected to your Mac, there are many factors that can cause performance problem:

  • audio artifacts such as pops or clicks, stutters, or dropouts as you play or record
  • erroneous firmware messages, performance issues, or other strange behavior.

Use this guide to optimize your Mac computer to reduce the chances of this from happening, or as a starter if you have any issues.

Please keep in mind these steps are not required to use our product, but have solved problems for customers in the past. It is best to test these known fixes first and see if they relate to your issue.

Turn off Automatic Sleep Mode

In Apple Menu > System Preferences > Energy Saver set Computer Sleep to Never.
Make sure “Put hard disks to sleep when possible” is NOT checked.
(These settings may vary on different Mac Models)

This will mean that Sleep Mode does not come on automatically, but you can still put your computer to Sleep when you like, by going to Apple Menu > Sleep.

This is one of the most important steps to prevent problem behavior with an audio device because Sleep Mode works by suspending drivers in a hibernate state, rather than unloading them fully. When waking up the computer does not “enumerate” the drivers fresh as with a newly connected device, but just attempts to proceed as if nothing changed.

However your Audio Device will think it has been disconnected during Sleep, as the driver was no longer available. During Sleep the unit may shut off or go into a standalone mode depending on it’s model/design/features. When the computer wakes from Sleep the Audio Device doesn’t receive a good connection because the driver is not reloaded fresh as with a true unplug/replug, called “driver enumeration.”

Automatic Sleep can lead to situations where you get up for a quick break during your session and come back to glitchy audio, artifacts, no audio, a full disconnect, and other performance issues. Very short Sleep Mode settings, such as every 1 minute, can even create situations where you turn to do something in the studio like adjust your outboard mixer and before you are done the whole unit has been disconnected, or an erroneous firmware message has popped up.

If you must use Sleep Mode, then for best performance first turn off/unplug your interface and then choose Sleep from the Apple Menu. When you come back to work you can Wake the computer and then plug in/power the interface and get a freshly loaded driver.

Remove or Disable Unused Network Adapters

In Apple Menu > System Preferences > Network and make sure to remove any Network Adapters you are not currently using for a LAN or Internet Connection.

For example remove “Bluetooth PAN” “Thunderbolt Bridge” “Firewire” et al.

Having a port that shares a USB, Firewire or Thunderbolt Bus with your Audio Hardware here can limit its bandwidth.

When a certain Port Type, for example “BlueTooth PAN” is listed here, but not in use the computer will constantly “ping” that Port, looking for a connection to appear. This can create a lot of Network Traffic where it isn’t needed, such as on your USB Bus, since BlueTooth is an internally connected USB Device. This can lead to those constant pings knocking your audio device off the USB Bus, disconnecting it.

Turn off your Firewall

In Apple Menu > System Preferences > Security & Privacy > Firewall make sure Firewall is Off.

Networkingis one of the most common sources of audio problems on all computers, Mac and PC. This could be Network Activity on the computer, but also Firewalls for specific programs or computer blocking connections. In general it is best to disable the Firewall on any Audio Production computer.

If you do have important Firewall tasks that need to be done, like opening a Port Forward for your Video Games, it is best to do this on your Router instead, as that device is better equipped. It won’t cause so many audio interactions when done on a different device.

Remove Startup Items

In Apple Menu > System Preferences > Users & Groups > Admin Account > Login Items: remove any Startup items.

Startup Items can be control panels for other audio gear, like Digidesign loader, or programs like Spotify that go online and can interrupt other audio programs. Also things like Adobe Creative Cloud, or even Anti Virus Software will run in the background and slow down your computer.

In this screenshot you can see the computers has iTunes, Flux a color temperature program, and Dropbox all starting up when the computer loads. As iTunes and Dropbox can go online in the background, and Flux may affect graphics performance, these could all potentially affect audio or CPU performance negatively. It is best to remove them if having audio troubles.

There are no Startup Items by default on the Mac so you can remove all of them with no issue.  If you are worried about removing some items, then take a screenshot of them so you can restore them at a later time: https://support.apple.com/en-us/HT201361

Repair Disk Permissions

In Applications > Utilities > Disk Utility: select Macintosh HD and click First Aid (Repair Disk Permissions on older Macs). Repeat this for any other Hard Drives you have connected.

Choose your best USB or Thunderbolt Port and cable

If you are using a USB Audio Interface (such as Duet), try all the USB ports on your computer. One may work better than another due to how the internal ports are hubbed.

Be sure you have tried another USB, Thunderbolt or Firewire Cable.

Turn off Analytics and Location Services

In System Preferences > Security & Privacy > Privacy Tab > Analytics (could say Diagnostics and Usage), un-check the boxes for Share Mac Analytics, Share with App Developers, and Share iCloud Analytics.

You may also want to disable Locations services found in this same Privacy Tab to further reduce background network traffic.

Turn off Sound Notifications for Apps

Turn off sound notifications for all your apps: In System Preferences > Notifications, select an app then un-check the box for “play sound for notifications. Repeat this for all apps in the left side-bar.

After these steps please RESTART the Computer

While you are Recording

  • Check that any Virus Scanners or Backup software (i.e. Hightail or Carbonite) that run in the background are disabled.  High background activity especially over the Network can cause glitches.
  • Close any unnecessary applications while recording (i.e. Skype or Browsers you are not actively using.)

Can I record my session on the the startup hard drive?

It’s an accepted “best pactice” of most audio software providers that audio files should be recorded on a hard drive other than the Mac’s Startup drive (i.e. the drive on which the operating system is installed). You can probably get away with recording a few tracks to your computer’s Startup disk, but for the best performance of your Apogee recording system, record onto a separate ATA/IDE, SATA, or FireWire drive whose spindle speed is at least 7200 RPM.

What is jitter?

What is jitter?

It’s the undesired deviation of a periodic signal from the ideal timing…

Right…

OK then…

So, even though the above definition is correct, it doesn’t really let you know why jitter is bad for a digital audio signal, how jitter actually degrades the signal or what the aural effects of jitter are. Let’s take a closer look at jitter in order to answer these questions.

First, it’s helpful to understand a bit about word clock. Here’s a graphical representation of a word clock signal:

A word clock signal acts like a conductor, providing a timing signal to all the parts of a digital audio system so that each process may be triggered at a precise moment. If you think of your digital audio system as an intricate mechanical device, the word clock is analogous to the teeth of the gears that make various parts of the device move together. Think of Charlie Chaplin in “Modern Times”:

Here’s another way to think about how a digital audio system works. Start with an analog waveform:

Now, in order to digitize this waveform (i.e describe it using numbers), let’s overlay a piece of graph paper:

Using the graph, we can describe the waveform with letters and numbers:

At A  the wave is 8;

at B the wave is 11;

at C the wave is 14,

at D the wave is 15, and so on.

We could store these numbers and use them to recreate the waveform later. Please don’t bust our chops about the obvious inaccuracy between the red waveform and the blue points, it’s an analogy, people.

So, to forge on with the analogy, imagine that the letters are samples and the numbers are bit levels. Now we’re recording digital audio. It might look like this:

At sample 1, digital level is 0111;

at sample 2, digital level is 1011; and so on.

Notice our word clock signal at the top of the graph. It’s the signal that triggers each sample in a digital audio system.

Once we’ve recorded our waveform as numbers, we can “re-plot” the points and re-draw the waveform to get back our original signal. We’ve just recorded and played back a digital audio signal.

The process of converting our waveform to numbers is called analog to digital conversion – here’s what it might look like:

 

 

 

 

 

 

 

 

 

 

The process of converting the numbers back into a waveform is called digital to analog conversion – here’s a movie of that process.

 

 

 

 

 

 

 

 

 

 

Now, throughout this whole process we’ve assumed that the vertical lines on our graph paper are evenly spaced. Imagine that we got some faulty graph paper where the vertical lines weren’t evenly spaced and we attempted to re-draw our waveform using the numbers we previously recorded. Clearly the resultant waveform would not be like the original:

 

Look at the top of our graph, that’s what a jittery word clock looks like. Notice that the distance between the transitions is uneven – this is jitter.

Though we’ve greatly exaggerated the amount of jitter in this graphic, it does show how a jittery word clock causes samples to be triggered at uneven intervals – this unevenness introduces distorsion into the waveform we’re trying to record and reproduce.

For another take on jitter, let’s think again about Charlie Chaplin and “Modern Times”. A film functions in a similar manner to digital audio, in that a film camera doesn’t record every instant of a scene, but rather “samples” a scene by taking a series of still pictures at a fast enough rate to fool the eye into thinking it sees fluid movement. As you can imagine, the regularity of the exposure (and subsequent projection) of film frames is crucial to maintaining the illusion of fluid movement. Back in the days of Chaplin, early film cameras weren’t so even – frame jitter made the movement seem jerky and unnatural.

If jitter gets into our D-to-A stage, it degrades the playback. The original digital recording is intact, and we just need to remove the jitter or get a better D-to-A converter to resolve the issue. Going back to our film analogy, if our projector is uneven, our film is probably fine, we just need a better projector.

On the other hand, if jitter gets into the A-to-D stage, those errors are “baked into” the digital data – there’s no recovering the original waveform. If you’ve shot your film with a hand cranked film camera, there’s no way you’re getting that jerky motion out of the film. This is why getting the A-to-D stage of a digital recording system right is so crucial.

So, what does digital audio affected by jitter sound like? To answer this question, imagine a recording of an orchestra made with a perfectly placed stereo pair of mics. If you listen to the analog output of the mic pres, ideally you’ll have a precise and wide image of the orchestra. If you closed your eyes, you could point to the triangle player, there, behind the second violins.

Smaller amounts of jitter start to cloud the precision of the stereo image – you can’t pinpoint sources as clearly. As greater amounts of jitter degrade the system, the stereo image starts to shrink – your orchestra isn’t so wide. With increasing jitter, changes in timbre occur that accentuate ugly harmonics.

To avoid jitter, use a finely engineered clock source as found in all of Apogee’s interfaces. If you’re using multiple digital devices, use a Master clock like Apogee’s Big Ben and make word clock connections using our Wide Eye cable.

Finally, be aware that frequency drift, often mentioned when discussing digital audio clock, isn’t jitter… see here!

https://knowledgebase.apogeedigital.com/?p=2093

 

 

 

 

 

 

 

 

 

Word Clock – What’s the difference between jitter and frequency drift?

When evaluating digital audio clocks, two attributes are often discussed – jitter and frequency drift. One attribute is crucial to the quality of your digital audio system, the other is certainly important but less critical.

To understand the difference between jitter and frequency drift, here are a few graphical representations of a word clock signal. Here’s a good word clock signal compared to a jittery one – notice that the space between the vertical transition lines is consistent in the good clock, but inconsistent in the jittery clock.

Now, here’s a good clock compared to one with whose frequency has drifted. Note that the space between vertical transition line is consistent in both examples, just smaller in one.

It’s crucial that digital audio clocks have the lowest jitter possible, above all in the A-to-D and D-to-A conversion stages. To learn why, check out this KnowledgeBase entry:

https://knowledgebase.apogeedigital.com/?p=1500

It’s also important that a clock’s frequency is stable, but at a certain point an improved frequency stability offers no real benefit to a digital audio system. Features such as “atomic” or “oven-controlled” clocks provide a level of frequency stability that provides no audio benefit, just marketing talking points.

To get a better idea of the difference between jitter and frequency drift, think about the projection of a film. A film in which frame jitter occurs will result in jerky and unnatural movement – something immediately perceptible. A film in which frame frequency drifts may play for 2 hours, 10 minutes and 2 seconds instead of 2 hours, 10 minutes and 0 seconds – no one could ever perceive a difference.

Here’s an analogy to understand this issue – imagine a home builder that advertised precision carpentry when framing your house. He might advertise that all 2x4s are measured with a digital micrometer and cut with a laser saw. This sounds like something you’d want, but would this result in a sturdier house? Probably not – it’s a level of precision that’s not necessary when framing a house. Worse, if a home builder is focused on his high tech process while ignoring the fundamentals of construction, it may turn out worse!