Thank you for your donation!


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


PeppyMeter and moOde
If one is familiar with radio technology, then it can be helpful to realize that PCM in the digital world is analogous to amplitude modulation (AM) in the analog world. DSD, on the other hand, is analogous to frequency modulation (FM). 

Just as AM and FM are encoded and decoded using entirely separate analog technology, so are PCM and DSD in the digital world.

Integrating PeppyMeter with moOde is pretty cool and @fdealexa has put a lot of work into making the process accessible.

Props to him.

Regards,
Kent
Reply
(07-29-2025, 08:16 AM)the_bertrum Wrote:
(07-29-2025, 07:10 AM)nattaphoomd Wrote: i would like to understand why volumio can work with DSD direct option? and  peppymeter also working

Probably need to ask Volumio how they do that, no one here will know.

They might be adding an additional FIFO output to mpd which works at 16/44 (so dsd is converted), and use that as the source for peppy meter.
A good Last.fm scrobbler solution for Moode here, docker image here
Reply
(07-29-2025, 01:56 PM)Tim Curtis Wrote: Couple things.

1. Moode uses the ALSA Loopback device to provide a copy of the PCM output stream to other applications.
2. ALSA Loopback requires the source to be PCM format. It does not support native DSD bitstream. This means that MPD must be set to "DSD over PCM (DoP) and the DAC has to support DoP.
3. Loopback works with ALSA output modes: Default (plughw) or ALSA Direct (hw). The mode has to be set before turning Loopback on.

I don't have any experience with PeppyMeter but I think it requires the source to be PCM format which means DSD would need to be converted to PCM (not DoP) in order for the meters to correctly reflect the waveform.

If I get a few spare cycles I'll try out the excellent guide from @fdealexa and get some experience with PeppyMeter.

็Hi,

That mean they way they implement separate pipe is from MPD. Audio output?
Can we do like this 2x MPD output simutenously?

1.  Direct AUDIO Output  DSD HW:3,0 (my Dac)
2.  Dop "yes" convert to PCM -> send to LOOPBACK and Dummy Plughw for PeppyMeter.

Problem is I can't figureout how to send 2x separate DSD  / PCM pipe from MPD.

Best Regards,
Nattaphoom Tewarun
Reply
(07-29-2025, 01:56 PM)Tim Curtis Wrote: Couple things.

1. Moode uses the ALSA Loopback device to provide a copy of the PCM output stream to other applications.
2. ALSA Loopback requires the source to be PCM format. It does not support native DSD bitstream. This means that MPD must be set to "DSD over PCM (DoP) and the DAC has to support DoP.
3. Loopback works with ALSA output modes: Default (plughw) or ALSA Direct (hw). The mode has to be set before turning Loopback on.

I don't have any experience with PeppyMeter but I think it requires the source to be PCM format which means DSD would need to be converted to PCM (not DoP) in order for the meters to correctly reflect the waveform.

If I get a few spare cycles I'll try out the excellent guide from @fdealexa and get some experience with PeppyMeter.

It's quite beautiful and compliments to the creator of PeppyMeter :-)

   

There's a simplified ALSA config that doesn't need Loopback and it works with CamillaDSP in the pipeline for both PCM and DSD format (MPD auto-converts DSD to PCM). 

- It also works without CamillaDSP but only for PCM format. DSD throws an ALSA error.
- The moode ALSA chain for renderers doesn't work.
- It takes expertise and tooling (image editor) to create the meter image layers, needle and screen background for a given display resolution. 

The attached image is for my 1920x1080 WIMAXIT 10.1" HDMI display. The meters are stock peppy 1280x400 edited to 1280x460 (to cover the white needle origins), a 1280x460x60 semi-transparent foreground to cover the needle bottoms and a 1280x720 background with the moode text.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
Hi all,

just to get update. I'm able to pipe 2 output simutenousely.
And DAC can get the readding of DSD MQA FLAC not being convert by MPD before goto PEPPYMETER pipe.

I include_optional file "sdfsdf.conf" into /etc/mpd.conf.

and create additional AUDIO OUTPUT {} which pass separate date to peppyalsa.
while the actual output. with DOP "no" I redirect it to HW Dac directly wihtout conversion.

Thank you for support. I get peppymeter work with DSD non conversion too. but seem in DSD signal is very less. uncomparable to pcm signal.

Best Regards,
Nattaphoom
Reply
Hi Nattaphomd,
Congratulations! It would be greatly appreciated if you could share the details so I can modify the PeppyMeter installation procedure in the moOde environment.
Thank you and have a good evening,
Reply
Hi Fdealexa,

I post step by step by seem 1reply was limit by number of character.
First I'm assume you are able to use PEPPY meter with Loopback mode PCM as usual.
to try this. I'm working on moode 8.3. if you are using moode9 and it work with Peppy. it should be the same.

1. Deactivate loopback function in Moode WebUI audio setting.
2. create dummy alsa device. (dummy alsa will have no sound just to utilize as additional pipe instead of loopback.)
> sudo modprobe snd-dummy
>sudo nano /etc/modules // add snd-dummy on last line.
3. reboot
4. use script alsa -l you choose see dummy alsa device in the list while Loopback will be gone as we deactivate in first step.
5. Now to do additional AUDIO OUTPUT device modification 2x separate pipe without conversion.

Follow on next reply.

Thank,
NT
Reply
(08-03-2025, 01:31 PM)nattaphoomd Wrote: Hi Fdaealexa,

I post step by step by seem 1reply was limit by number of character.
First I'm assume you are able to use PEPPY meter with Loopback mode PCM as usual.
to try this.   I'm working on moode 8.3. if you are using moode9 and it work with Peppy. it should be the same.

1. Deactivate loopback function in Moode WebUI audio setting.
2. create dummy alsa device. (dummy alsa will have no sound just to utilize as additional pipe instead of loopback.)
  > sudo modprobe snd-dummy
  >sudo nano /etc/modules     // add snd-dummy on last line.
3. reboot
4. use script alsa -l   you choose able to see  new -> dummy alsa device in the list while   -> Loopback will be gone as we deactivate in first step.
5. Now to do additional AUDIO OUTPUT device modification 2x separate pipe without conversion.

Follow on next reply.

Thank,
NT


Second Reply.   How to modify /etc/mpd.conf.  
Please note that mpd.conf will be override everytime you use  Moode WEBUI to modify and save parameter under MPD section..... 
So keep in mind if you save config something in   Mpd config it will override what I'm explain the coding down below. by MOODE MPD CONFIG WEBUI

manual modify 
1.  sudo nano /etc/mpd.conf

2. add first  yellow hightlight.  this optional file will created separate audio pipe feed to PEPPYAlsa FIFO
insert in thefirst line above (music_directory)

include_optional "/usr/mpd/mpd_customer.conf"

3. create the file /usr/mpd/mpd_customer.conf.
paste below configuration.   //  this create additional audio output and receive signal from MPD which is going to used for peppymeter Fifo. of course  dop must be "yes"
peppymeter only accept pcm signal.

audio_output {
        enabled     "yes"
        type        "alsa"
        name        "pippopeppy"
        device      "pippopeppy"
        dop         "yes"
        mixer_type  "none"
        format      "44100:16:2"
}


4. go back to /etc/mpd.conf   look for Alsa Default  and change device name as "Peppyalsa"  with dop "no"
This we are try to send passthrough DSD , PCM ,MQA as it is. (no conversion) to real  Hw:device.


audio_output {
type "alsa"
name "ALSA Default"
device "Peppyalsa"
mixer_type "none"
dop "no"
stop_dsd_silence "no"
thesycon_dsd_workaround "no"
}



Next you need to create Asound.conf  filer with the name of 1. pippopeppy   , 2. Peppyalsa.    they need 2x Asound name to tread 2 pipe signal.

THank you,
NT
Reply
(08-03-2025, 01:41 PM)nattaphoomd Wrote:
(08-03-2025, 01:31 PM)nattaphoomd Wrote: Hi Fdaealexa,

I post step by step by seem 1reply was limit by number of character.
First I'm assume you are able to use PEPPY meter with Loopback mode PCM as usual.
to try this.   I'm working on moode 8.3. if you are using moode9 and it work with Peppy. it should be the same.

1. Deactivate loopback function in Moode WebUI audio setting.
2. create dummy alsa device. (dummy alsa will have no sound just to utilize as additional pipe instead of loopback.)
  > sudo modprobe snd-dummy
  >sudo nano /etc/modules     // add snd-dummy on last line.
3. reboot
4. use script alsa -l   you choose able to see  new -> dummy alsa device in the list while   -> Loopback will be gone as we deactivate in first step.
5. Now to do additional AUDIO OUTPUT device modification 2x separate pipe without conversion.

Follow on next reply.

Thank,
NT


Second Reply.   How to modify /etc/mpd.conf.  
Please note that mpd.conf will be override everytime you use  Moode WEBUI to modify and save parameter under MPD section..... 
So keep in mind if you save config something in   Mpd config it will override what I'm explain the coding down below.

manual modify 
1.  sudo nano /etc/mpd.conf

2. add first  yellow hightlight.  this optional file will created separate audio pipe feed to PEPPYAlsa FIFO
insert in thefirst line above (music_directory)

include_optional "/usr/mpd/mpd_customer.conf"

3. create the file /usr/mpd/mpd_customer.conf.
paste below configuration.   //  this create additional audio output and receive signal from MPD which is going to used for peppymeter Fifo. of course  dop must be "yes"
peppymeter only accept pcm signal.

audio_output {
        enabled     "yes"
        type        "alsa"
        name        "pippopeppy"
        device      "pippopeppy"
        dop         "yes"
        mixer_type  "none"
        format      "44100:16:2"
}


4. go back to /etc/mpd.conf   look for Alsa Default  and change device name as "Peppyalsa"  with dop "no"
This we are try to send passthrough DSD , PCM ,MQA as it is. (no conversion) to real  Hw:device.


audio_output {
type "alsa"
name "ALSA Default"
device "Peppyalsa"
mixer_type "none"
dop "no"
stop_dsd_silence "no"
thesycon_dsd_workaround "no"
}



Next you need to create Asound.conf  filer with the name of 1. pippopeppy   , 2. Peppyalsa.    they need 2x Asound name to tread 2 pipe signal.

THank you,
NT


Let's create Asound.conf for used instead of _audioout

1. Create new files. sudo nano /etc/alsa/conf.d/mpd_peppyalsa.conf

2.  put this as a device  and save file.   Make permissiong chmod 777 for this file.

//This is actual output called. it redirect bypass non process to slave pcm "post" where you can select the actual output playback in there.
pcm.Peppyalsa{
type empty
slave.pcm "post"
}
// THis seem not called. it's like code we used to pipe PCM only to Loopback and peppy duplicate PCM. I don't understand but it must be there.
pcm.peppy1_off {
type plug
route_policy "duplicate"
slave.pcm {
type multi
slaves {
a { channels 2 pcm "post" }
b { channels 2 pcm "pippopeppy" }
}
bindings {
0 { slave a channel 0 }
1 { slave a channel 1 }
2 { slave b channel 0 }
3 { slave b channel 1 }
}
}
ttable [
[ 1 0 1 0 ]   # left  -> a.left,  b.left
[ 0 1 0 1 ]   # right -> a.right, b.right
]
}

// OURs dummy output will be used in here.
// THIS OUTPUT pippopepy will be pipe in FIFO through a dummy out hardware instead of Loopback hw.
pcm.pippopeppy {
        type meter
        slave.pcm "dummy"
        scopes.0 peppyalsa
}

// OURs dummy output will be used in here.
pcm.dummy {
        type hw
                card Dummy
                device 0
}

pcm_scope.peppyalsa {
        type peppyalsa
        decay_ms 400
        meter "/var/tmp/peppyfifo"    // THIS IS Follow your exisiting peppy FIFO
        meter_max 99
        meter_show 0
         smoothing_factor 60
}

pcm_scope_type.peppyalsa {
        lib /usr/local/lib/libpeppyalsa.so
}

// this is REAL HARDWARE you would like to PLAY DSD AUDIO
pcm.post{
type hw
card "3"
}


3.  now your have 2output device on MOODE everyboot. but somehow it will select ALSA defualt which will play to peppyalsa -> post -> your hardware selected above.
PEPPYMETER still not working   don't be worry.

4. every booting up you need to create auto booting shell script after network initialize done.

Here is my script

#!/bin/sh
sleep 30 && mpc clear && mpc enable pippopeppy 


every boot after network initializer  delay 30 minute make sure MPD server is running up.  then   I used  MPC (client) command to Enable pippopeppy device as an output.
Or you can fine MPD client software and looking for output device and try to manual active  pippopeppy is also possible.

But I prefer automatically way to selected every booting.   Now you have 2 output device selected  and PEPPYMETER SHOULD have work.  with  DSD direct no DOP.


Summary.  
1. create dummy out for every boot  for piping PCM to peppymeter instead of loopback. (disable loopback)
2. modify Mpd with optional file. ( additional Audio output for VU peppymeter pipe)
3. modify actual playback device  replace _audioout with PeppyAlsa.  new alsa asound conf file need.
4.  create autostart script to select  peppymeter audio device automaticly enable.  PEPPYMETER will work everybooting automatically. 

Hope it useful and Would like to know if it work well on yourside.

again I'm using moode 8.3.9 not moode 9.

but it should be the same principle. Don't forget Hardware output must be HW:0,0 for example not plughw:0,0 as we want no conversion output and let DAC decode the format.

Best Regards,
Nattaphoom
Reply
After a bit more testing it turns out the Renderers (AirPlay, Deezer etc) also work with Peppymeter using the stock moode ALSA framework and with or w/o CamillaDSP, and for PCM and DSD :-)

Default Config: for Source (PCM or DSD) -> [optionally CamillaDSP] -> PeppyMeter -> Device we get the following.
- DSD is automatically converted to PCM by MPD.
- For AirPlay + CamillaDSP its necessary to set "Disable sync" to "yes" in AirPlay Config otherwise there will be audio glitches (this has nothing to do with peppymeter in the chain).

Special Config: If u want native DSD to the audio device the MPD config needs two alsa outputs and peppymeter needs to send audio to the ALSA Dummy device (must load the driver via modprobe snd_dummy). This configuration won't work with CamillaDSP since that config needs to have peppymeter after CamillaDSP in the output chain and its sending audio to the Dummy device thus we get no sound.

Output 1 (ALSA Default) is enabled    -> PeppyMeter -> dummy
Output 2 (ALSA Native DSD) is enabled -> device 

Next steps:

1. Verify the Default Config works with DAC's that have no hardware mixer
2. Create Debian packages for PeppyMeter and PeppyALSA
3. Create a PeppyMeter sub-section under the Local Display section of Peripheral Config
4. Create the rest of the config plumbing including a cfg_ table, session vars, backup/restore section etc etc
5. Add PeppyMeter as an available "Display mode" item in the CoverView section of Preferences

Some thoughts:

1. What about PeppyMeter + coverart and metadata?
2. What about the Special Config for DSD native?
3. Do people still want PeppyMeter integrated into moode?

Happy Summer :-)
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply


Forum Jump: