Moode Audio Player for Raspberry Pi

Hi Tim,
for trying brutefir you first of all need a filter to implement.
There is an image for rspi from the german electronic manufacturer abacus-electronics.de (arioOS). He uses the image for streaming and convolving in his products but also provides a free download of this image. In this image brutefir is integrated and it seems that the filter needed has 65536 taps. The software used is acourateCV. You can make a room measurement with the rspi and a miniDSP UMIK-1 with the arioOS. This measurement is used in the acourate software to create roomcorrection filters. These filters you can select in the brutefir UI and listen to your music convolved on the fly with your roomcorrection.
I think this would be a great update for all that use moode with speakers. The acourate software costs 100.-€ and needs windows (AcourateCV - AudioVero)
Unfortunately it seems that this part of the audiovero website is not translated to english.
For further investigation I could provide you with a filter 44.1 kHz 65536 taps 64-bit double prescision *.dbl which could be -6dB linear to 1000Hz and after that steady falling down to -11 dB at 22050 hz.
You would hear immediately if the filter is active.

Regards
Heiner
 
Hi Tim,

Can you add this to your list of features to consider for vNext:
Add links to the artist/album in the currently playing section in the playback tab?
They should jump to the browse/search box for the artist and the library/album for the album.

Hi,

If you click on the cover art in the Playback tab it launches a google search using the song title for Radio Stations and artist + album for Song Files.

-Tim
 
Hi Tim,
for trying brutefir you first of all need a filter to implement.
There is an image for rspi from the german electronic manufacturer abacus-electronics.de (arioOS). He uses the image for streaming and convolving in his products but also provides a free download of this image. In this image brutefir is integrated and it seems that the filter needed has 65536 taps. The software used is acourateCV. You can make a room measurement with the rspi and a miniDSP UMIK-1 with the arioOS. This measurement is used in the acourate software to create roomcorrection filters. These filters you can select in the brutefir UI and listen to your music convolved on the fly with your roomcorrection.
I think this would be a great update for all that use moode with speakers. The acourate software costs 100.-€ and needs windows (AcourateCV - AudioVero)
Unfortunately it seems that this part of the audiovero website is not translated to english.
For further investigation I could provide you with a filter 44.1 kHz 65536 taps 64-bit double prescision *.dbl which could be -6dB linear to 1000Hz and after that steady falling down to -11 dB at 22050 hz.
You would hear immediately if the filter is active.

Regards
Heiner

Hi Heiner,

Seems like a lot of moving parts. I think if there were a full DRC package available that included the signal sweep function and could be configured by simply manipulating conf files I could probably work with it.

The other concern I have is whether the Pi has enough horsepower to run convolution DSP on top of other DSP for example SoX resampling.

-Tim
 
Hi Heiner,

Seems like a lot of moving parts. I think if there were a full DRC package available that included the signal sweep function and could be configured by simply manipulating conf files I could probably work with it.

The other concern I have is whether the Pi has enough horsepower to run convolution DSP on top of other DSP for example SoX resampling.

-Tim

This chap has been very helpful to me in the past and apparently he does some "convolving".

At least, it might be an interesting read if one understands what it is about:confused:

ConvoFS.net — ConvoFS documentation

I have no idea if it could be used in conjunction with MoOde.

Ronnie
 
Hi Kent,

Stretch testing is just beginning for me. I'm still squashing the last few bugs in the Jessie build of moodeOS and moOde. Stretch brings new versions of ALSA, Samba etc and will take some time figure out.

Its nice to see that after the BlueZ project for some strange reason deleted ALSA support in Jessie is now supporting it again in Stretch.

-Tim

My personal opinion is that Bluetooth output should take a backseat to everything else. Pairing and connecting to a Bluetooth device from the command line in Linux is very fiddly. It'll take some doing to make it as easy with moOde Player as it is, for example, with my Android phone.

According to the ReadMe at GitHub - Arkq/bluez-alsa: Bluetooth Audio ALSA Backend, "This project is a rebirth of a direct integration between Bluez and ALSA." No explanation is given for the project getting renamed BlueALSA (dropping the "z") along the way. A quick scan of the "Configuration & Usage" section and I had aplay playing through the JBL.

It isn't clear to me how mainstream this project is. There's only two contributors to the repo of whom "Arkq" seems to be the initiator and main coder.

There's two particular open issues on the github repo dating back to February which I'm reading through now. One has to do with the tribulations of someone trying to implement this in Volumio 2, and the other with high cpu-loading observed with mpd (0.19.x) playing through BlueALSA. The first BlueALSA source code "release" was v1.0.0. The current is v1.2.0, dated April. Don't know what's in the Raspbian bluealsa package. It says it's v0.4:confused: Time to get my compilation mojo on.

Regards,
Kent
 
Last edited:
Hi Tim,
acourateCV is the thing to measure and produce filters. But you need brutefir to convolve them with your music.
By the way, convoFS is very good but it is used like brutefir, especially if you have a synology NAS with intel processor.
So you will also need a software for measurung and generating filters.
And yes, maybe it will stress the rspi convolving and upsampling. I use DRC now for about ten years and I can assure you, that there is no need for furhter DSP or upsampling if you use proper filters.
Maybe there are other products than aourate. I do not know as acourate works very fine for me.

Heiner
 
My personal opinion is that Bluetooth output should take a backseat to everything else. Pairing and connecting to a Bluetooth device from the command line in Linux is very fiddly. It'll take some doing to make it as easy with moOde Player as it is, for example, with my Android phone.

According to the ReadMe at GitHub - Arkq/bluez-alsa: Bluetooth Audio ALSA Backend, "This project is a rebirth of a direct integration between Bluez and ALSA." No explanation is given for the project getting renamed BlueALSA (dropping the "z") along the way. A quick scan of the "Configuration & Usage" section and I had aplay playing through the JBL.

It isn't clear to me how mainstream this project is. There's only two contributors to the repo of whom "Arkq" seems to be the initiator and main coder.

There's two particular open issues on the github repo dating back to February which I'm reading through now. One has to do with the tribulations of someone trying to implement this in Volumio 2, and the other with high cpu-loading observed with mpd (0.19.x) playing through BlueALSA. The first BlueALSA source code "release" was v1.0.0. The current is v1.2.0, dated April. Don't know what's in the Raspbian bluealsa package. It says it's v0.4:confused: Time to get my compilation mojo on.

Regards,
Kent

Hi Kent,

I haven't really looked at Stretch yet but what is output from

dpkg -l | grep blue

-Tim
 
Hi Kent,

I haven't really looked at Stretch yet but what is output from

dpkg -l | grep blue

-Tim

Hi, Tim.

Code:
pi@raspberrypi:~ $ dpkg -l|grep blue
ii  bluealsa                        0.4                          armhf        Bluetooth ALSA Audio backend
ii  bluez                           5.43-2+rpi1                  armhf        Bluetooth tools and daemons
ii  bluez-firmware                  1.2-3+rpi2                   all          Firmware for Bluetooth devices
ii  libbluetooth3:armhf             5.43-2+rpi1                  armhf        Library to use the BlueZ Linux Bluetooth stack
ii  pi-bluetooth                    0.1.4                        armhf        Raspberry Pi 3 bluetooth
...also...
ii  libsbc1:armhf                   1.3-2                        armhf        Sub Band CODEC library - runtime

Keep in mind I've already installed bluealsa. It pulled in libbluetooth3 and libsbc1, the latter needed for a2dp support.

Regards,
Kent
 
Hi Kent,

Thats odd having to manually install bluealsa since the relnotes for Stretch mention ALSA support included.

2017-08-16:
* Based on Raspbian Stretch (Debian version 9)
* Version 60 of Chromium browser included
* Version 3.0.1 of Sonic Pi included
* Version 6.1.1 of RealVNC included
* Version 0.17.4 of NodeRED included
* Bluetooth audio routed via ALSA rather than Pulseaudio
* SenseHAT extension added to Scratch 2
* Various desktop applications modified to prompt for sudo password if needed
* lxinput control options for mouse speed simplified
* lxpanel plugins moved into separate packages
* Wireless firmware for Pi 3 and Pi 0W modified to address Broadpwn exploit
* Latest kernel and firmware
* Various small tweaks, bug fixes and theme modifications

-Tim
 
No.

However, if you have a Linux computer available (or possibly OS X, but I don't have it so can't comment) you can mount the second partition of the SD card and do some black magic to regenerate the password in the file /etc/shadow. See, for example, How are passwords stored in Linux (Understanding hashing with shadow utils).

If you have only a Windows computer available, you can always live-boot Linux from a USB drive. Google is your friend.



You should be able to reuse the key you used to unzip r3.7.


You're welcome.

Regards,
Kent

OS X won't natively read extN partitions, but it can be done with additional apps.
 
Hi Kent,

Thats odd having to manually install bluealsa since the relnotes for Stretch mention ALSA support included.

2017-08-16:
* Based on Raspbian Stretch (Debian version 9)
* Version 60 of Chromium browser included
* Version 3.0.1 of Sonic Pi included
* Version 6.1.1 of RealVNC included
* Version 0.17.4 of NodeRED included
* Bluetooth audio routed via ALSA rather than Pulseaudio
* SenseHAT extension added to Scratch 2
* Various desktop applications modified to prompt for sudo password if needed
* lxinput control options for mouse speed simplified
* lxpanel plugins moved into separate packages
* Wireless firmware for Pi 3 and Pi 0W modified to address Broadpwn exploit
* Latest kernel and firmware
* Various small tweaks, bug fixes and theme modifications

-Tim

Hi, Tim.

Yeah. The Raspberry Pi blog says "For Stretch, we are using the bluez-alsa package to make Bluetooth audio work with ALSA itself."

Aha, I just checked both Raspbian image files. BlueALSA is installed in 2017-08-16-raspbian-stretch.img but not in 2017-08-16-raspbian-stretch-lite.img. Guess which one I started with for a headless installation:rolleyes:

Regards,
Kent
 
Hi Tim,
acourateCV is the thing to measure and produce filters. But you need brutefir to convolve them with your music.
By the way, convoFS is very good but it is used like brutefir, especially if you have a synology NAS with intel processor.
So you will also need a software for measurung and generating filters.
And yes, maybe it will stress the rspi convolving and upsampling. I use DRC now for about ten years and I can assure you, that there is no need for furhter DSP or upsampling if you use proper filters.
Maybe there are other products than aourate. I do not know as acourate works very fine for me.

Heiner

Hi Tim, Heiner

I think only the convolution has to be intégrated in the same RPI. With the RPI 3 quad core there is definetely enough power from what I read. The measurements and calculation of the coefficient have to be done outside eg with REW + rephase rePhase, a loudspeaker phase linearization, EQ and FIR filtering tool

Brutefir has already be en integrated with Volumio at the output with pipe you enter brutefir. There are a couple parameters I think that could be managed through GUI including the import of the coefficient for correction and the choice of the version of the correction you want to use

See also volumio-plugins/plugins/miscellanea/brutefir at master * volumio/volumio-plugins * GitHub

BR
Jean-Louis
 
Hi,

Here is part of the script i use for what i call hardware buttons. When i press on a hardware button, i can perform play, pause, next, previous, volume up and down.

Code:
while True:
   try:
      prev_switch = GPIO.input(SW_PREV)
      next_switch = GPIO.input(SW_NEXT)
      play_switch = GPIO.input(SW_PLAY)
      volup_switch = GPIO.input(SW_VOLUP)
      voldown_switch = GPIO.input(SW_VOLDOWN)
      if prev_switch == False:
         subprocess.call(['mpc', 'prev' ])
         print "previous"
      elif next_switch == False:
         subprocess.call(['mpc', 'next' ])
         print "next"
      elif volup_switch == False:
         subprocess.call(['mpc', 'volume', '+2' ])
         print "volumeup"
      elif voldown_switch == False:
         subprocess.call(['mpc', 'volume', '-2' ])
         print "volumedown"
      elif play_switch == False:
         subprocess.call(['mpc', 'toggle' ])
         print "play"

The problem is that the volume up and down work well but it does not show on the web interface.
For it to show i need to set the following as a command or argument (tip was given to me by Tim and worked well with IR remote): /var/www/vol.sh up 2 and /var/www/vol.sh dn 2. The problem is that i can't find the correct syntax to integrate it in the above script under volup and voldown. Any help will be appreciated.

Remy
 
Hi,

Here is part of the script i use for what i call hardware buttons. When i press on a hardware button, i can perform play, pause, next, previous, volume up and down.

Code:
while True:
   try:
      prev_switch = GPIO.input(SW_PREV)
      next_switch = GPIO.input(SW_NEXT)
      play_switch = GPIO.input(SW_PLAY)
      volup_switch = GPIO.input(SW_VOLUP)
      voldown_switch = GPIO.input(SW_VOLDOWN)
      if prev_switch == False:
         subprocess.call(['mpc', 'prev' ])
         print "previous"
      elif next_switch == False:
         subprocess.call(['mpc', 'next' ])
         print "next"
      elif volup_switch == False:
         subprocess.call(['mpc', 'volume', '+2' ])
         print "volumeup"
      elif voldown_switch == False:
         subprocess.call(['mpc', 'volume', '-2' ])
         print "volumedown"
      elif play_switch == False:
         subprocess.call(['mpc', 'toggle' ])
         print "play"

The problem is that the volume up and down work well but it does not show on the web interface.
For it to show i need to set the following as a command or argument (tip was given to me by Tim and worked well with IR remote): /var/www/vol.sh up 2 and /var/www/vol.sh dn 2. The problem is that i can't find the correct syntax to integrate it in the above script under volup and voldown. Any help will be appreciated.

Remy

Hi, Remy.

You need additional subprocess calls. Something like:
Code:
...
      elif volup_switch == False:
         subprocess.call(['mpc', 'volume', '+2' ])
         subprocess.call(['/var/www/vol.sh','up','2'])
         print "volumeup"
      elif voldown_switch == False:
         subprocess.call(['mpc', 'volume', '-2' ])
         subprocess.call(['/var/www/vol.sh','dn','2'])
         print "volumedown"
...

I don't have the hardware to replicate your environment, but running the new subprocess calls in a Python script bumps my volume dial up and down.

Regards,
Kent