HIDAMARI is a controller for MPD ( music player daemon ).
You can control MPD from your PC or Futurephone browser.
You can easily select songs from the library, manipulate the playlist and play/stop the songs.
Also, the visual animations will make you feel good while playing.
Japanese document is here
It is under development.
It is under development.
Install the following
By using the FIFO output of mpd, make the following settings in /etc/mpd.conf and restart mpd.
audio_output {
type "fifo"
name "my_fifo"
path "/tmp/mpd.fifo"
format "44100:16:2"
}
$ systemctl restart mpd.service
To enable the bluealsa profile, modify the /lib/systemd/system/bluealsa.service script as follows
[Unit]
Description=BluezALSA proxy
Requires=bluetooth.service
After=bluetooth.service
[Service]
Type=simple
User=root
ExecStart=/usr/bin/bluealsa -p a2dp-source -p a2dp-sink
$ systemctl daemon-reload
$ systemctl restart bluealsa.service
Install the libraries needed for the build.
$ apt-get install libasound2-dev libflac-dev libflac8 libogg-dev libogg0
$ apt-get install libdbus-1-dev libdbus-1-3 libsystemd-dev libsystemd0 liblz4-dev liblz4-1 liblzma-dev liblzma5 libgcrypt20-dev libgcrypt20 libgpg-error-dev libgpg-error0
For libflac, do the following to avoid a compile error
$ cd /usr/lib/x86_64-linux-gnu
or
$ cd /usr/lib/arm-linux-gnueabihf
$ ln -s libFLAC.so libflac.so
Get the source and compile it.
$ git clone https://github.com/zuntan/hidamari.git
$ cd hidamari
$ cargo build --release
Add a bluetooth group to the group of executing (or compiling) users. Without this, you will not be able to control bluetooth from HIDAMARI.
$ usermod -G bluetooth -a <<User>>
Check hidamari.conf. See below for the values in hidamari.conf.
Execution.
$ cargo run --release
As a prerequisite, you should be able to compile with Debian as described above.
Install a toolchain. For example, install ~/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf.
$ cd ~
$ wget https://dl.armbian.com/_toolchains/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf.tar.xz
$ tar xvJf gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf.tar.xz
$ vi ~/.profile
export PATH="$HOME/.cargo/bin:$HOME/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin:$PATH"
Add the raspbian repository to the APT system.
$ cat <EOT > /etc/apt/sources.list.d/raspbian.list
deb [arch=armhf] http://archive.raspbian.org/raspbian jessie main contrib non-free
EOT
$ wget https://archive.raspbian.org/raspbian.public.key -O - | apt-key add -
$ dpkg --add-architecture armhf
$ dpkg --print-foreign-architectures
Implements a library for armhf.
$ apt-get update
$ apt-get install libasound2-dev:armhf libflac-dev:armhf libflac8:armhf libogg-dev:armhf libogg0:armhf
$ apt-get install libdbus-1-dev:armhf libdbus-1-3:armhf libsystemd-dev:armhf libsystemd0:armhf liblz4-dev:armhf liblz4-1:armhf liblzma-dev:armhf liblzma5:armhf libgcrypt20-dev:armhf libgcrypt20:armhf libgpg-error-dev:armhf libgpg-error0:armhf
For libflac, do the following to avoid a compile error
$ cd /usr/lib/arm-linux-gnueabihf
$ ln -s libFLAC.so libflac.so
Build with cargo. We need to set some environment variables.
$ export PKG_CONFIG_armv7_unknown_linux_gnueabihf=1
$ export PKG_CONFIG_PATH_armv7_unknown_linux_gnueabihf=/lib/arm-linux-gnueabihf/pkgconfig
$ cargo build --release --target armv7-unknown-linux-gnueabihf
Check the built file.
$ file target/armv7-unknown-linux-gnueabihf/release/hidamari
target/armv7-unknown-linux-gnueabihf/release/hidamari: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, with debug_info, not stripped
Transfer the generated executable file to your Raspberry Pi and then run it on your Raspberry Pi.
#
configdyn = "hidamaridyn.conf"
bindaddr = "0.0.0.0:18080"
mpdaddr = "127.0.0.1:6600"
mpdhttpdurl = "http://127.0.0.1:8080"
selfurlformpd = ""
mpdprotolog = false
mpdfifo = "/tmp/mpd.fifo"
mpdfifofftmode = 0
contentsdir = ""
albumartupnp = false
albumartlocaldir = "/var/lib/mpd/music"
```
- configdyn : file path
- Specify the file path for hidamaridyn.conf.
- bindaddr : ipaddr
- Specify the port on which HIDAMARI listens for HTTP services.
- mpdaddr : ipaddr
- Specify the service listen port of MPD from HIDAMARI's point of view.
- mpdhttpdurl : URI
- Specifies the listen port for the HTTP stream service in MPD as seen by HIDAMARI. This will be used for stream proxies. If you don't need it, set it to "".
- selfurlformpd : ipaddr
- Specify the HIDAMARI alsa stream protocol to be presented to MPD. If this value is "", then http://127.0.0.1:<
todo.
todo.