As promised here is post number two on external upsampling. This post is
going to focus on the upsampling capability recently included in
Squeezelite which  is based on the SoX resampling code. These filters
can also be used offline with SoX, but the command line arguments for
SoX are very different, even if they are implementing the same thing.
I'm just going to go over the options for Squeezelite, if you want to
try SoX by itself, read the documentation for the filter arguments.

All of these adjustments you can make here are essentially "tweaks",
they are fine tuning the sound. The biggest  improvement by far is just
geting out from under the complex filters in the DAC chip. 

Before getting  into details I want to talk about sample rate. The
filters in many DAC chips get simpler the higher up the sample rate is.
For example the  chip I'm using in the  CSP player has a very simple
filter at 176.4/192 and NO filter at 352.8/384. So in general you want
to upsample to the highest sample rate you  can get to work reliably,
this will probably give you the best advantage from the upsampling. But
if at all possible keep it to an  integer upsampling, for example
upsample 44.1 to 176.4 not 192. If your DAC doesn't do 176.4 but does do
192 and 88.2, you have a choice, upsample to 88.2 or 192, which is best
is going to be system dependant, try both and see which you prefer.. 

The current  implementation in Squeezelite does upsampling to the
highest interger rate your  DAC cupports. Thus if your DAC's maximum
rate is 192, it  will upsample to 44.1 to 176.4. If your DAC  does not 
support 176.4, you can use the -r option (or max sample rate in the gui)
to set the max rate to 96, then squeezlite will upsample to 88.2. Even
upsampling to 88.2 will  usually make a significant improvement. There
has been talk about giving the upsampling more flexibility so you could
choose 192 in this case.

The SoX resampling gives you several different parameters to adjust,
choosing the right one can  be a daunting  task so they came up with
what are usually called "recipes", predefined combinations of
parameters. These are good places to start your exploration. When you
give Squeezelite a set of paramters you first give a recipe, then you
can add modifiers that over ride the parameters in the recipe. 

The upsampling "argumnt" consists of several fields separated by colons
(:). If there is nothing specified for a particular field the default
for the chosen recipe is used. There are up to 7 fields. If you are not
specifying any of the later fields you do not need to include all the
colons. Some examples:
abc           first field only, all others default
abc:xyz     first and second field, others default
abc:::def   first and fourth fields, others default
:xyz:::def   default first field, fourth field and others default

The first field is the basic recipe. It is special, it is made up of
three subfields, each specified by a letter.
The first letter is the  "quality", it can be one of these characters: 
v h m l q    Note the fourth character is the lower case "ell". 
These stand for "very high", "high", "medium", "low" and "q"

A word on these, the differences are not necessarily related to how they
sound, they refer to how far the aliases are attenuated (remember the
engineering community regards the alias attenuation as the primary
figure of merit for a filter). These primarily relate to how long the
filters are. All these filters work by performing calculations on a
series of samples in the file, the longer filters use more samples, the
shorter filters  use fewer samples. The greater the alias attenuation
the longer the filter has to be. This CAN affect what you hear. Do not
just  blindly use the "very  high" setting,  it may  not be the best
sounding. 

The second leter is the "phase". You have  a choice of: L M I   (that 
is upper case "eye"). L is linear phase, M is minimum phase, I is
intermediate  phase. There are LOTS of descriptions of what these are
out  there on the web so I won't go into detail. 

The third letter is: s     It is either included or not. This specifies
a very steep filter curve. If the s is not included a slightly shallower
filter is used.

The deault is hL  (no s). If a letter is left off the default is used.
Thus 'v' is the same as 'vL'. 's' is the same as 'hLs'. 'Ms' is the same
as 'hMs'.

All that just  for the first field!

The second field contains flags. Nobody really knows what these do so
its safest to leave this field blank. 

The third field is attenuation. It is possible that the upsampling can
clip on signals that are at or very  close to maximum, this attenuates
the input so this clipping doesn't happen. The argument is a number,
which is the attenuation in db.  Thus '6' is 6db of  attenuation. The
defualt is '1', which is probably good most of the time.

The fourth field is "precision", it is the  number of bits used in
calculations. We know that 20 and 28 are sometimes used depending on
other parameters,  this over rides that and  uses  the value for
everything. I'm not sure if values other than 20 and 28 actually do
anything.

The next two fields let you tweak the filter curve, how steep it is and
where it  starts. You specify a start frequency and a stop frequency.
This is done by a ratio of the Nyquist frequency, NOT an actual
frequency. Both parameters are in the range 0-100. Thus for  a 44.1
input a start of 90 means starting to roll off at 19.845KHz. An end
(where the curve bottoms out) of 100 would be at 22.05KHz.

The fifth field is the end of the passband (or the point where the curve
starts falling)

The sixth field is the  stop band start (or the point where the curve
bottoms out)

The seventh field is the phase. This lets you specify exactly what you
want the phase to be. 0 is minumum phase, 25 is intermediate phase and
50 is linear phase (these are  equivalemt to the M, I and L defined
above). 100 is maximum phase, but that is not really used. The phase
relates to how much pre and post ringing there is. 0 has just post
ringing, 50 is equal amounts post and pre, 25 is in-between, 100 is all
pre-ringing.

When exploring options its probably a good idea to just limit yourself
to the first field at first. See if you can hear a difference between
very high, high, medium etc. Find the one you like the best then try
that with L M or I. The other I would recommend trying is the precision.
Try a variety of  music with each setting. 

So what do I like? I have not done a full test of all the parameters,
preliminary tests have led to :

mI:::28

I encourage you to do your own exploration, this seems to work well for
my DAC, but something else might sound best to YOU.

Have fun!

John S.


------------------------------------------------------------------------
JohnSwenson's Profile: http://forums.slimdevices.com/member.php?userid=5974
View this thread: http://forums.slimdevices.com/showthread.php?t=99088

_______________________________________________
audiophiles mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/audiophiles

Reply via email to