# DSP Engine: Sample Rate Conversion --- ## Overview Most people using the sample rate conversion features in Roon will be performing _upsampling_, which is generally considered to provide an enhancement. This effectively increases the resolution of the audio signal leaving Roon. Roon's sample rate converters use fully synchronous, polyphase interpolation. Most are "apodising", and they roll off slowly to minimize ringing. Both minimum phase and linear phase options are available. Roon also supports DSD output--with a choice of 5th order and 7th order modulators available. DSD output is performance-intensive and requires a powerful CPU. ## Reasons to upsample ### 1. There's a decent chance that your DAC is upsampling anyways, and Roon has the resources to do a better job. Most DACs today upsample the signal internally into a form that's more like DSD, and then convert that to Analog. This is often done in an environment where there aren't really enough hardware resources to do the best job possible. Roon runs on powerful PC-class hardware. All of the CPUs we support have DSP-oriented features that we can take advantage of to process signals at rates that most DACs cannot approach. The general rule with upsampling is: the closer you are to the source material, the bigger a difference the implementation makes. For example, in a multi-stage conversion that goes from 44.1kHz -> 352.8kHz -> DSD256, the first step is dramatically more important than the second step. This means that even getting _part_ of the way to the "native" sample rate of your DAC is often a benefit. There are exceptions of course. Some DACs have expensive FPGA-based up-sampling stages that are both very good and tuned to that specific piece of hardware. Other DACs do not upsample at all. ### 2. CD quality content almost universally benefits from upsampling with an apodising filter CD-quality content is generally mastered with a very steep linear-phase filter that introduces substantial "ringing" around 22kHz. Upsampling to a higher sampling rate enables the use of an "Apodising" filter--which rolls off a bit sooner and more slowly, rendering the ringing inaudible. High resolution content generally doesn't benefit from this effect ## Reasons not to upsample ### 1. It can exacerbate performance problems Upsampling can place a heavy load on your CPU, particularly when targeting high sample rates. It can also stress your network if you are using network streaming. Nothing is worse for sound quality than dropouts. If it doesn't work on your gear, turn it off! ### 2. There are quality bottlenecks elsewhere in the system Upsampling produces a subtle enhancement. It probably won't be audible on a $49 bluetooth speaker, or the all-weather speakers you keep on the patio, or the zone that is only used by your spouse for 64kbps internet radio. ### 3. You're using "System Output" Typically when using "System Output", the operating system is going to resample the audio stream again, probably using a not-so-great implementation. If you're sending content to "System Output" it's usually best not to bother with upsampling. ### 4. You paid for some really great hardware that has its own DSP/upsampling Hardware manufacturers are in a unique position to produce DSP that is tuned to their gear. If you paid for it, use it! ### 5. You use bit-streamed content, like MQA and don't want to lose the benefits Upsampling an MQA stream means it's not MQA anymore. (More comprehensive MQA support in Roon is forthcoming. Stay tuned). ## Minimum Phase vs Linear Phase This is a personal choice. ### Why Minimum Phase? All digital filters introduce "ringing" into the audio signal. When using a linear-phase filter, the ringing is distributed equally around an impulse, like this: <img src='http://roon-kb.s3.amazonaws.com/de1a95d1-32b8-44e1-b7cb-cba5f4bec8e6.png'/> When using a minimum phase filter, the ringing comes _after_ the impulse, like this. <img src='http://roon-kb.s3.amazonaws.com/0645886f-0cb7-4651-b7bd-b889969fa926.png'/> Some psychoacoustics research suggests that "pre-ringing" is significantly more perceptible than "post-ringing", thus it makes sense to keep the initial impuse as clean as possible. Some people prefer linear-phase filters for recordings made with few microphones in a "natural" space like a concert hall, and minimum-phase filters for studio recordings and electronica. ### Why Linear Phase? Linear phase filters have...a linear phase response. Minimum phase filters...don't. This means that minimum-phase filters introduce a frequency-specific delay within the audio signal, whereas with linear phase filters, sounds at all frequencies will arrive at the same time if they appeared at the same time in the source material. Decades ago, linear phase response was considered a very important characteristic of a digital filter. More recently, the perceptual importance of linear phase has been disputed, and the benefits of avoiding pre-ringing have become more popular. ## DSD: 5th order vs 7th order Both modulators should out-perform what you'll find inside of DAC chips. This is entirely down to personal preference. The 7th order modulator is more technically accurate than the 5th order modulator. It has a lower noise floor due to the more aggressive noise shaping that the higher-order design enables. It is slightly harder on the CPU. The--general--tradeoff with DSD modulators is that higher order modulators are more prone to instability. If you run into this situation, you won't miss it--the DAC will start making nasty sounds and you'll rush to turn off the music. If this happens, consider applying a negative "DSD Gain Adjustment", or adding some headroom in the - [[Headroom Management|DSP Engine: Headroom Management]] section.
Page last changed Wed Feb 01 2017