User Tools

Site Tools


projects:pimpd

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
projects:pimpd [2020/04/18 18:59] – created hibbyprojects:pimpd [2022/10/05 15:52] (current) hibby
Line 2: Line 2:
  
  
-Music in the space is controlled by a Raspberry Pi running MPD. [[User:hibby|hibby]] is responsible for this project.+Music in the space is controlled by a VM on [[projects:alford|Alford]] running MPD. [[User:hibby|hibby]] is responsible for this project. It used to live on a Pi, hence the name.
  
 The address for the Pi MPD is '''pimpd.57north.org.uk''' or '''172.23.152.9''' The address for the Pi MPD is '''pimpd.57north.org.uk''' or '''172.23.152.9'''
- 
 ===== Controlling the Music ===== ===== Controlling the Music =====
- 
  
 You can connect to the player using the webpage interface or via an MPD client. Clients for some architectures are listed below: You can connect to the player using the webpage interface or via an MPD client. Clients for some architectures are listed below:
Line 13: Line 11:
 ==== Webpage ==== ==== Webpage ====
  
-Visit [[http://pimpd.57north.org.uk|http://pimpd.57north.org.uk]] or [[http://172.23.4.9|http://172.23.152.9]] and use the UI to select/queue as required.+Visit [[http://pimpd.57north.org.uk|http://pimpd.57north.org.uk]] or [[http://172.23.152.9|http://172.23.152.9]] and use the UI to select/queue as required.
  
 ==== iOS ==== ==== iOS ====
Line 21: Line 19:
 ==== Android ==== ==== Android ====
  
-[[https://play.google.com/store/apps/details?id=com.namelessdev.mpdroid|MPDroid]] is available in the Play Store. You will need to enter the IP of the Pi - 172.31.4.11 and just leave all the rest of the details at default.+[[https://play.google.com/store/apps/details?id=com.namelessdev.mpdroid|MPDroid]] is available in the Play Store. You will need to enter the IP of the Pi - 172.23.152.and just leave all the rest of the details at default.
  
 ==== Linux ==== ==== Linux ====
  
-[[http://www.musicpd.org/clients/ncmpc/|ncmpc]] is available in the Debian GNU/Linux repositories and likely in other Linux distributions too. To run it, you will need to pass the arguments: "-h 172.31.4.11". You could create an alias like so:+[[http://www.musicpd.org/clients/ncmpc/|ncmpc]] is available in the Debian GNU/Linux repositories and likely in other Linux distributions too. To run it, you will need to pass the arguments: "-h 172.23.152.9". You could create an alias like so:
  
     alias pimpd="ncmpc -h 172.23.152.9"     alias pimpd="ncmpc -h 172.23.152.9"
Line 33: Line 31:
 ===== Adding music ===== ===== Adding music =====
  
-Adding music to MPD is done via our anonymous FTP service!+Adding music to MPD is done via our anonymous FTP service on [[projects:alford|Alford]]!
  
 +==== FTP ====
 It appears to be the fashion to make yourself a user folder, so if you don't have one, do that! It appears to be the fashion to make yourself a user folder, so if you don't have one, do that!
  
-==== Adding via CLI ====+=== Adding via CLI ===
  
 First navigate to the folder on your computer that where you have music kept: First navigate to the folder on your computer that where you have music kept:
     > cd /path/to/music     > cd /path/to/music
-Then connect to the PiMPD vis ssh: +Then connect to [[projects:alford|Alford]] via ssh: 
-    > sftp username@172.31.4.10+    > sftp username@172.23.152.7
 'cd' to your directory: 'cd' to your directory:
     > cd username     > cd username
Line 50: Line 49:
     > sftp --help     > sftp --help
  
-==== Other methods ====+=== Other methods ===
  
 You can also add tracks to your folder with an alternative application such as [[https://filezilla-project.org/|Filezilla]] which is an open-source (GNU GPL) (S)FTP client for Windows, Mac OS X and GNU/Linux. You can also add tracks to your folder with an alternative application such as [[https://filezilla-project.org/|Filezilla]] which is an open-source (GNU GPL) (S)FTP client for Windows, Mac OS X and GNU/Linux.
  
-===== Notes ===== +==== NFS ====
-Each user is allocated 5 gigglebytes of storage (the hdd is not huge!). Also the library is automatically scanned by the MPD player when a change is made.+
  
 +Use NFS to mount ''alford.57north.org.uk:/usr/filestore/Music'' or ''172.23.152.9:/usr/filestore/Music'' if you're on our network. 
  
 ===== Listening to the music ===== ===== Listening to the music =====
  
-The MPD audio plays directly out to the social room speakers. It also broadcasts on the space network via icecast. To listen in, use an icecast player (VLC works well) and play the following network address:+==== Speakers ==== 
 + 
 +Currently, the playback-pi is configured to play whatever mpd is pushing to snapcast. 
 + 
 +This is connected to the loudspeakers at the media workstation, on the audio switch input 1. 
 + 
 + 
 +==== Snapclient ==== 
 + 
 +The mpd server uses [[https://github.com/badaix/snapcast|snapcast]] to broadcast audio to the network and ensure all players are in sync 
 + 
 +On Debian, you only need to do the following while on our network to make your laptop sing in sync: 
 + 
 +<code># apt install snapclient </code> 
 +<code># systemctl start snapclient</code> 
 + 
 +To shut it up,  
 +<code># systemctl stop snapclient</code> 
 + 
 +==== HTTP Stream ==== 
 + 
 +It also broadcasts on the space network via HTTP. To listen in, use an icecast player (VLC works well) and play the following network address:
  
     http://172.23.152.9:8000/Stream.m3u (Note the uppercase S)     http://172.23.152.9:8000/Stream.m3u (Note the uppercase S)
 +
 +This will lag the snapcast stream by some undefined quantity of time.
  
 ===== Blame ===== ===== Blame =====
  
 To figure out who is to blame for adding a track that is currently playing you want (to run bash and then run) either: To figure out who is to blame for adding a track that is currently playing you want (to run bash and then run) either:
-    dirname $(mpc -h 172.31.4.11 search Title "`pimp -h 172.31.4.11 current | tr " - " "\n" | tail -n 1`")+    dirname $(mpc -h 172.23.152.search Title "`pimp -h 172.31.4.11 current | tr " - " "\n" | tail -n 1`")
 or: or:
-    dirname $(pimp -h 172.31.4.11 current)+    dirname $(pimp -h 172.23.152.current)
 if the track didn't have any tags and the current was returning the file name. It should be possible to have a machine decide which command was needed... if the track didn't have any tags and the current was returning the file name. It should be possible to have a machine decide which command was needed...
  
-{{tag>project active}}+ 
 +===== VM Config ===== 
 + 
 +The VM is a standard Debian Testing install, granted 1 core and 1GB RAM. 
 +Alford exposes the music share folder as NFS read only, which is mounted in the vm at /mnt/music 
 + 
 +MPD is run using the stock systemd unit shipped by Debian. 
 +Graphical frontend is [[https://github.com/jcorporation/myMPD|myMPD]] started at boot using the default systemd unit it ships with. It is configured to not provide an ssl service due to certificates being hard.  
 + 
 +Snapcast is provided by [[https://packages.debian.org/stable/sound/snapserver|snapserver]] from Debian, and requires the following config in ''/etc/mpd.conf'': 
 +<code>  
 +audio_output { 
 +        type            "fifo" 
 +        name            "my pipe" 
 +        path            "/tmp/snapfifo" 
 +        format          "44100:16:2" 
 +        mixer_type      "software" 
 +
 +</code> 
 +====== Future Ideas ====== 
 + 
 +https://github.com/badaix/snapcast 
 + 
 +{{tag>project active music hibby alford}}
  
projects/pimpd.1587236341.txt.gz · Last modified: 2020/07/07 20:48 (external edit)