In order to upsample 16/44.1 stream to, for example, 24/96 and play it on the Transporter you need:
- Download, compile and install SoX (Sound eXchange)
- Tweak convert.conf in the slimserver root directory. It can contain the following:
- Restart SqueezeCenter
- Click on Settings (SqueezeCenter GUIU)
- Go to Advanced-> File Types
- Disable what you don’t need
[sox] -v0.995 –buffer 32768 -t flac -r44100 -2 -c2 $FILE$ -t flac -C0 -3 -c2 -r96000 – polyphase -cutoff 1.0
ape flc * *
[MAC] $FILE$ – -d | /usr/local/bin/sox -v0.995 –buffer 32768 -t wav -r44100 -2 -c2 – -t flac -C0 -3 -c2 -r96000 – polyphase -cutoff 1.0
mp3 flc * *
[lame] –mp3input –decode –silent $FILE$ – | [sox] -v0.995 –buffer 32768 -t wav -r$RATE$ -2 -c2 – -t flac -C0 -3 -c2 -r96000 – polyphase -cutoff 1.0
wvp flc * *
[wvunpack] $FILE$ -wq –skip=$START$ –until=$END$ -o – | [sox] -v0.995 –buffer 32768 -t wav -r44100 -2 -c2 – -t flac -C0 -3 -c2 -r96000 – polyphase -cutoff 1.0
Comments:
Input file parameters
Output file parameters
-v – volume adjustment
-t – file format
-r44100 – sample rate
-c2 – two channels
-2 – 16bit
-3 – 24bit
-C0 – no compression
polyphase – upsampling algorithm
Please note:
- you have to convert 24/96 stream to FLAC, because SlimDevices Transporter has two issues with WAV format:
- plays 96kHz stream too slow
- does not recognize 24 bit stream
(see here)
- Polyphase algorithm is VERY CPU intensive. Don’t be surprised if your CPU is under 100% load.
. . .
PID USERNAME LWP PRI NICE SIZE RES STATE TIME CPU COMMAND
19683 root 1 0 4 8052K 4356K run 0:03 77.23% sox
. . .
# prtdiag
. . .
Version Location Tag
——————————– ————————–
Intel(R) Xeon(R) CPU X5355 @ 2.66GHz CPU1
. . .
Now how it all sounds. The difference is subtle (again, in my system!) but can be described as rough (16/44.1) vs. treated with sandpaper (upsampled to 24/96) surface. More liquid, “rounded up”, with more air between the images with no “splinters” No, not “night and day” but easier to listen. Like a good power cable but for free 😉
More on upsampling:
It seems that polyphase is deprecated on Sox now. They recommend to just use the rate filter, which btw, should also be much less CPU intnsive.
Yeah, it is:
The proper command line will be:
Hi. I have been struggling with these settings in Squeezecenter 7.3.4. (winxp sp3) Eventually I have got the FLAC settings correct and can play music upsampled from 44.1 ksamples to 96 ks on my Transporter.
The problem is when stepping to the next track before the end of the flac file, both the sox.exe and socketwrapper.exe processes will reload again and again without clearing the old instance(s). Do you have any idea of how to do this correct? Best regards Kristian.
Hm, strange… Probably it’s something Windows related. I’ve never seen that on Solaris.
As a suggestion, you may try to use the quiet mode to prevent the processes from waiting for output.