Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


PeppyMeter and moOde
#41
Hello Peter,
I am glad to know that you are happy about the results.
Best regards, thanks for the photo and...
Enjoy listening music... and its graphic

Francesco
Reply
#42
Hello everybody,
please be aware that I am trying to prepare a repository (probably on GITHUB) to get all the information better and updated.
In the meantime, for those interested in moOde 7.1.0 and PeppyMeter there is only one change, compared to the procedure in post # 5.
In the moOde 7.1.0, the file 

Quote:/var/www/inc/playerlib.php
is slightly different than in 7.0.1.
So change the procedure in:


Quote:At this point we have to patch an important file that create the configuration of moOde MPD:

Code:
Code:
sudo nano /var/www/inc/playerlib.php


Quote: Wrote:"Ctrl -2041" to go to row 2041 and modify the current content from:

Code:
Code:
"name \"ALSA default\"\n" . "device \"hw:" . $device . ",0\"\n",

to the new content:

Code:
Code:
"name \"ALSA default\"\n" . "device \"peppyalsa\"\n",

"Ctrl o" and "Enter" to save and then "Ctrl x" to exit.

Now reboot the system and try to listen any music (a radio is the simplest way) if it is still alive!!! If not we have to troubleshoot where we made a mistake.

That's all folks
Regards,
Francesco
Reply
#43
(03-12-2021, 08:05 PM)adrii Wrote: Hi Francesco

Get well soon!

Adrian.

Hi Adrian,
today I feel much better and therefore I would like to resume studying how to develop a "patch free" PeppyMeter installation.
In this regard, I would like to point out that my knowledge of MPD and ALSA is very limited. First of all I would like to mention how I solved the PeppyAlsa problem which has the task of creating a FIFO file which is necessary for PeppyMeter to work. My only change to the original MPD is to replace the Default output of the Main-Alsa with PeppyAlsa which immediately redirects the traffic to the default output and creates the FIFO file. The first modification is made with a patch to the playerlib.php code, while the PeppyAlsa configuration is present in /etc/asound.conf.
My first tests were aimed at having Main-Alsa with its default output and as secondary PeppyAlsa for the creation of the FIFO file but I could not define any output, I tried with "dummy" without any good result.
Now, from what I understand, thanks to your configuration, it is possible to define the dummy output.
Here are some doubts:
1. can the same dummy be used for two different motors?
2. in the case of PeppyAlsa, is there to add also the configuration of PeppyAlsa itself in the file?
I believe that if you are available, it might be better to use another communication system other than this forum: what do you think?
Thank you, thank you, thank you and greetings,
Francesco
P.S.: sorry for my English
Reply
#44
Hi Francesco

I don't know anything about the Peppy programs, and so this post is just about configuring ALSA on Moode.

If you look at the PeppyAlsa configuration

   https://github.com/project-owner/peppyal...sound.conf

Originally there is a plugin device called 'default' (entry point) and this sends the audio to 'hw:0,0' (exit point).

default -> hw:0,0

The Peppy configuration overrides 'default' with 'pcm.!default', so now you have

default -> softvol_and_peppyalsa -> peppyalsa -> hw:0,0

If you enable the Moode graphic equaliser then you have a well defined entry and exit point

alsaequal -> plug_alsaequal

And you can override 'alsaequal' with 'pcm.!alsaequal' and set up

alsaequal -> softvol_and_peppyalsa -> peppyalsa -> plug_alsaequal

To use PeppyAlsa and the mpd_oled ALSA confiuration the chain could look like

alsaequal -> alsaequal_and_copy -> softvol_and_peppyalsa -> peppyalsa -> plug_alsaequal

Where alsequal_and_copy would set up the loopback copy as in: https://github.com/antiprism/mpd_oled/issues/65

Adrian.
Reply
#45
Hi Adrian
first of all I would like to reiterate (probably I did not do it well previously) that PeppyAlsa (which is the product we are interested in: we do not consider PeppyMeter because it is a derivative) does not need to be in the chain, but only needs to have the input, to then create its FIFO. The reason it was placed in the chain is that I didn't find a different solution: I couldn't use the loopback.
Now that you have found a solution of how to use the loopback, I try to submit my idea:


                                                                                   / -> FIFO          
                                                       /  -> mpd_oled  \
alsaequal - > plug_alsaequal ->                                [b]> loopback                              [/b]
                                                       \  -> peppyalsa  /
                                                                                   \ -> PeppyFIFO /

That's the reason why I asked if a loopback can be shared. What is your opinion about?

Thanks and best regards,
Francesco
excuse me for the strange b
Reply
#46
Hi Francesco

I don't really follow your diagram, but I will explain what I posted

alsaequal -> alsaequal_and_copy -> softvol_and_peppyalsa -> peppyalsa -> plug_alsaequal

alsaequal is the overridden entry point, it passes the audio to alsaequal_and copy, which makes a duplicate copy of the audio and sends one copyto the loopback device for mpd_oled, and passes the other copy on to softvol and peppyalsa this looks like it enables some softvolume control and then passes the audio on to peppyalsa which makes the FIFOs needed by other Peppy programs (etc) and then passes the audio on to plug_alsaequal so it passes through the graphics equalizer and eventually to the hardware device where it is played.

Does this include everything you want?

The loopback copy of the audio cannot be read directly by more than one plugin device, but alsaequal_and_copy could make extra loopback copies.

Adrian.
Reply
#47
Hi Adrian,
I discovered, after many tests, that there is a problem (for the PeppyAlsa) in terms of compatibility with the codec: I am working to try to solve it.
Also, you probably already know, I have problems with the new mpd_oled (alsa) if the SoX is enabled.
Thanks a lot and best regards,
Francesco
Reply
#48
Hi Francesco

I haven't seen an issue about using mpd_oled with SoX enabled.

Adrian.
Reply
#49
(03-26-2021, 05:54 PM)adrii Wrote: Hi Francesco

I haven't seen an issue about using mpd_oled with SoX enabled.

Adrian.

Hi Adrian,
I got the followg error: MPD error - Failed to open "ALSA Graphic EQ" (alsa); Error opening ALSA device "alsaequal"; snd_pcm_hw_params() failed: Invalid argument.
With the following parameters:
SoX Resampling:
Enabled                      Yes
Bit depth                          32
Sample rate kHz              384
Channels                     Stereo
Selective resampling     Disabled 
Quality                        High (Default)
Multithreading              No


I have just tested (after your answer) with lower Sample rate and it is working (may be a limit of the equalizer?).
Thanks and regards,
Francesco
Reply
#50
Hi Francesco

Thanks for the details. I'll have a look tomorrow if I can reproduce this (and hopefully fix it).

Adrian.
Reply


Forum Jump: