Skip to content

Commit 14dfc19

Browse files
authored
Merge pull request #2 from thoelf/development
Development
2 parents 1f579fd + be64929 commit 14dfc19

4 files changed

Lines changed: 64 additions & 11 deletions

File tree

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ LSP is tested to work with Ubuntu Server on the server and Ubuntu Desktop on the
88
# Playing music locally on the server
99
LSP uses LMS (Logitech Media Server/Squeezebox server) with SqueezeLite as the player. Both programs are installed on the server and plays local and streamed music. My source of streamed music is mainly Deezer, but other streaming services (e.g. Spotify and Qobuz) are supported and available as plugins to LMS.
1010

11-
Personally, I prefer to run LMS in a Docker container. LMS can also be installed as a .deb file.
11+
Personally, I prefer to run LMS in a Docker container. LMS can also be installed from a .deb file.
1212

1313
LMS/SqueezeLite is controlled from a web browser on the client or from a mobile app, for example the LMS app from the F-Droid app catalog. The LMS app requires you to use Material Skin (a plugin to LMS on the server). Material Skin is strongly recommended and is easily installed from the browser when you have installed LMS (the server).
1414

15-
In this play mode, the audio stream is piped from SqueezeLite to CamillaDSP (for room EQ) and then to the DAC. No resampling is taking place from the source to the DAC. This is intentional and is based on the believe that it is better to leave any resamling to the DAC. In this play mode, your DAC must support the sample rate of the source.
15+
In this play mode, the audio stream is piped from SqueezeLite to CamillaDSP (for room EQ) and then to the DAC. No resampling is taking place from the source to the DAC. This is based on the believe that it is better to leave any resamling to the DAC. In this play mode, your DAC must support the sample rate of the source.
1616

1717
# Playing music on the client and streaming it to the server
1818
In this play mode, the music is streamed from the client to the server. I use Firefox to stream music from the Deezer webpage. I use Firefox as the music playing browser, just to make my preferred browser (Brave) free for all other browsing activities.
@@ -21,7 +21,7 @@ If you prefer Spotify, you might be better off with the Spotify application for
2121

2222
You can use only LMS and SqueezeLite for your audio streaming. If doing so you cannot use the user interface, that for example Deezer among other streaming services, provide via their web pages. I have come to use LMS the most, but it can be good to have the ability to stream from the client.
2323

24-
When streaming from a browser, the environment for the browser on the client is set up so that the browser plays to the nullsink. The audio sent to the nullsink is inaudible on the client. While streaming to the nullsink on the client, it is possible to play audio on the client from other audio players.
24+
When streaming from a browser, the environment for the browser on the client is set up so that the browser plays to the nullsink. The audio sent to the nullsink is inaudible on the client. While streaming to the nullsink on the client, it is still possible to play audio on the client from other audio players.
2525

2626
An audio stream is set up from the nullsink using cvlc. MPD on the server receives the stream and pipes it to CamillaDSP (for room EQ) and then to the DAC.
2727

@@ -30,7 +30,7 @@ The audio stream is resampled to 44.1 kHz on the client. If you like, you can co
3030
# Controlling LSP
3131
When all is set up and working, the browser starts automatically and the latest play mode is selected when you log in. The browser can also be started from Cairo dock, any other dock you prefer or just by runnning the start script. Another script (or button in a dock) is for selecting the play mode. The selection of play mode is shown using GNOME notifications.
3232

33-
In the files for the client there is a one-liner "script" for Conky, if you want to use Conky to show which player that is selected.
33+
In the files for the client there is a one-liner "script" for Conky, if you want to use Conky to show the selected player mode.
3434

3535
# Room EQ with CamillaDSP
3636
LSP uses CamillaDSP for room EQ. You can get the filter parameters from measurements using a USB microphone and REW. When starting out, you can start with no filters and then add filters in the future, by ear of from your own measurements. The frequence response in untreated rooms can have a big bump in the base region, which it should be able to lower by ear.
@@ -49,4 +49,4 @@ LSP uses CamillaDSP for room EQ. You can get the filter parameters from measurem
4949
Follow the procedures in [server_install.md](./server_install.md) to install software and files on the server. Follow the procedures in [client_install.md](./client_install.md) to install software and files on the client.
5050

5151
# A note about the software used or referenced
52-
The software in LSP and all software used by LSP, is free and open source software. The REW application, which is not strictly needed, is closed source software that is free of cost, i.e. freeware.
52+
The software in LSP and all software used by LSP, is free and open source software. The REW application, which is not strictly needed, is closed source software that is free of cost, i.e. freeware. Donating to these projects are encouraged.

server/camilladsp.yml

Lines changed: 56 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# This is an example file for filter configuration in CamillaDSP,
2-
# to be used when using LMS with SqueezeLite. The file is a template
3-
# file, that will be copied to /tmp and be updated when the samplerate
4-
# changes. For every change in the samplerare, CamillaDSP will be updated
5-
# with the new configuration.
1+
# This is an example file for filter configuration in CamillaDSP.
2+
#
3+
# The samplerate below (44100) is just a value to start with. For
4+
# every change in the samplerate, CamillaDSP will be updated with
5+
# the new samplerate.
66

77
devices:
88
samplerate: 44100
9-
chunksize: 2048
9+
chunksize: 4096
1010
silence_threshold: -60
1111
silence_timeout: 3.0
1212
queuelimit: 1
@@ -20,13 +20,20 @@ devices:
2020
device: "hw:1"
2121
format: S32LE
2222

23+
# Adjust the clip gain if you see information about clipping from
24+
# CamillaDSP in /var/log/syslog.
2325
filters:
2426
clipgain:
2527
type: Gain
2628
parameters:
2729
gain: -5.0
2830
inverted: false
2931

32+
# The filter definitions can include IIR filters of different kinds
33+
# and or FIR filters.
34+
#
35+
# IIR filters
36+
# The filters are used for all samplerates.
3037
peaking_L1:
3138
type: Biquad
3239
parameters:
@@ -57,17 +64,60 @@ filters:
5764
q: 2.749
5865
gain: -6.3
5966

67+
# FIR filters
68+
# Prepare a convolution file for each samplerate.
69+
# Long story short:
70+
# - Filters from REW -> rePhase (wine ./rePhase).
71+
# - Fix the phase response (Paragraphic Phase EQ).
72+
# - Export the convolution files (in e.g. txt format) for
73+
# each samplerate and channel (e.g. R/L).
74+
#
75+
# Wav should work too, but for today that seems to a problem
76+
# with the latest release:
77+
# https://github.com/HEnquist/camilladsp/issues/109
78+
#
79+
# In rePhase I exported with these settings:
80+
# f taps
81+
# 44100 65536
82+
# 48000 65536
83+
# 88200 131072
84+
# 96000 131072
85+
#176400 262144
86+
#192000 262144
87+
#352800 524288
88+
#384000 524288
89+
# Make sure to have the samplerate in the filename.
90+
# Then, when refering to the files with $samplerate$ in
91+
# the filename property, the correct file will be
92+
# selected automatically.
93+
fir_L:
94+
type: Conv
95+
parameters:
96+
type: Raw
97+
filename: /etc/camilladsp_left_$samplerate$.txt
98+
format: TEXT
99+
100+
fir_R:
101+
type: Conv
102+
parameters:
103+
type: Raw
104+
filename: /etc/camilladsp_right_$samplerate$.txt
105+
format: TEXT
106+
107+
# Putting it all together.
60108
pipeline:
61109
- type: Filter
62110
channel: 0
63111
names:
64112
- clipgain
65113
- peaking_L1
66114
- peaking_L2
115+
- fir_L
67116

68117
- type: Filter
69118
channel: 1
70119
names:
71120
- clipgain
72121
- peaking_R1
73122
- peaking_R2
123+
- fir_R

server/squeezelite.service

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Restart=on-failure
1616
RestartSec=1
1717
StandardError=syslog
1818
SyslogIdentifier=squeezelite
19+
Nice=-10
1920

2021
[Install]
2122
WantedBy=default.target

server_install.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ audio_output {
2626
```
2727
There might be other settings you might want to do in this file.
2828

29+
You might also want to alter the niceness for the mpd process and its subprocess CamillaDSP. To do that, add for example ```Nice=-10``` in the ```[service]``` section of ```/lib/systemd/system/mpd.service```.
30+
2931
# SqueezeLite
3032
## Getting the binary file - Alt 1: Compile from source
3133
Download the zipped files:<br/>

0 commit comments

Comments
 (0)