OLED spectrum display on Volumio on Raspberry Pi Zero W

Hi,
I run this command but is not working… When I run. /cava from cava2 the window is open but the graph is not shown
It is very strange
Thanks

Hi Lintbf

I have just installed mpd_oled on a fresh copy of Volumio, following the installation instructions, and the install went fine and produced a working spectrum display.

I am not sure what went wrong for you, but there was some kind of error during the cava build configuration before the output you posted. Your copy of cava in cava2 appears to be working. If you have installed it you should be able to run the following command without getting an error that the command is not found

cava

In which case, try restarting your machine and see if mpd_oled is now displaying the spectrum.

Otherwise, you could consider that some of the existing directories are not in a good state, and could delete all your mpd_oled and cava directories and start again. When you install cava and mpd_oled again any old installed copies will be overwritten.

Adrian.

Hi,
The comand cava is ok, but nothing is shown,
Tommrow I will delete al folders and start again the process.
Thanks for your support and have a nice evening.

Hello,
I have deleted cava and mpd oled dor, install again, no error reported, but graphs is not shown…
I use default values in mpd oled service values.
What can I do more?
Can I conect an 0.96 inch directly without any config?
Many thanks

did you modify the mpd template configuration?

Configure copy of audio

The MPD audio output needs to be copied to a named pipe, where Cava can read it and calculate the spectrum. This should be configured in /etc/mpd.conf, but changes to this file will be overwritten by Volumio. Instead, edit the mpd.conf template file

sudo nano /volumio/app/plugins/music_service/mpd/mpd.conf.tmpl

And add the following lines at the end

audio_output {
        type            "fifo"
        name            "mpd_oled_FIFO"
        path            "/tmp/mpd_oled_fifo"
        format          "44100:16:2"
}

After editing the file it is important to force Volumio to regenerate mpd.conf and restart MPD. To do this, open the Web UI and go to Settings > Playback Options then click on Save in the Audio Output section.

Hi Darmur,
The save option from web UI did the trick :slight_smile:
Now it is working and I live it :))). I will full the house with players… And lcd screen. And the watch feature when is not playing is great.
Thanks for your continuous help

1 Like

great, well done! :wink:

Hello,

I currently run kodi on an Odroid C4 (previously a C2) and I’ve long wanted to add a front panel display that includes a sound spectrum. Researching the topic a bit more recently, I came across a thread from 2015 that suggests the kodi doesn’t make the necessary data easily available (though it’s been of interest to a number of people) and then I found vol_ / mpd_oled.

All of my music resides on a Windows 10 PC and gets streamed via UPnP / DLNA. In reading through mpd_oled details on the moode forum this morning, I became concerned when I read this posting:

http://moodeaudio.org/forum/showthread.php?tid=155&pid=24048#pid24048

which suggests that, for moode anyway, the UPnP renderer bypasses MPD, so no spectrum display is possible.

Is that information accurate? How about with Volumio, since it’s supposed to be “a UPnP frontend to MPD”? Does all Volumio audio pass through MPD, such that anything that is playing can get the corresponding sound spectrum displayed?

At this point, I’m entirely in a “research” phase. I don’t yet have any display, or a finished case in which to place everything. I don’t even know whether I’ll stick with the Odroid C4 or switch to a Raspberry Pi! The Odroid C4 has (I think) I2C and SPI available on its GPIO connector. There’s seemingly a much larger community around the Pi, though. So, any and all advice is welcome!

Thanks!

[EDITS: spellliing]

Hi mlovell

In order to visualise the audio that is playing you need to create a copy of it. Volumio and Moode play the audio through ALSA streams, and it is possible to use a custom ALSA configuration to create the copy of the audio. See

https://github.com/antiprism/mpd_oled/issues/4

[Note: As I recall, streaming to Moode as DLNA receiver uses MPD, and so MPD can be used to make the audio copy in that case.]

If you are using kodi maybe the system you are running on is using (or could use) a sound daemon, like PulseAudio, and you could use that to create a copy of the audio.

Adrian.

Hi Adrian,

Volumio and Moode play the audio through ALSA streams, and it is possible to use a custom ALSA configuration to create the copy of the audio.

Is that the default approach that’s now used for mpd_oled installation on Volumio? (Since I don’t have yet have any display hardware, I’ve not read through the installation instructions.) Volumio seems to bill itself as a “UPnP frontend” for MPD, but I have no knowledge of what the audio path ends up being. That was really my motivation for posting – whether normal DLNA playback with Volumio yields a sound spectrum with mpd_oled or not.

The post to the Moode audio forum made it sound like DLNA/UPnP playback with Moode would not yield a spectrum display.

If you are using kodi maybe the system you are running on is using (or could use) a sound daemon, like PulseAudio, and you could use that to create a copy of the audio.

I’m perfectly content moving away from kodi, if it lets me get mpd_oled working :smile: That setup gets used also exclusively for audio, so I’m willing to give Volumio (or Moode) a try. I can also give an RPi 4 a try rather than the Odroid C4.

I guess the only other item worth mentioning is that I’m using an external USB DAC. Does that add any wrinkles for mpd_oled working?

Thanks,
Matt

Hi Matt

The installation instructions for Volumio are:
https://github.com/antiprism/mpd_oled/blob/master/INSTALL_VOLUMIO.md

I don’t provide instructions for setting up a copy of the audio using ALSA configuration as it is not easy for me to provide support when the instructions fail.

My experience with DLNA on Moode was streaming the audio from another machine, and this produced a working spectrum. Volumio uses upmpdcli, which plays through MPD, and so I would expect the usual mpd_oled installation instructions to produce a working spectrum for DLNA/UPnP, but I haven’t tested this.

If your DAC works with Volumio then I wouldn’t expect any issues using it with mpd_oled.

Adrian.

(P.S. You would only expect the kodi solution to be compaible with mpd_oled if you were playing the music through MPD on the machine with the display)

My experience with DLNA on Moode was streaming the audio from another machine, and this produced a working spectrum. Volumio uses upmpdcli, which plays through MPD, and so I would expect the usual mpd_oled installation instructions to produce a working spectrum for DLNA/UPnP, but I haven’t tested this.

Great! I look forward to trying things out once my display arrives in the mail.

I also have a character display on order, to play with LCDproc in kodi. Growing up, though, my father’s main system had an AudioControl C-101 in it:

As a consequence, I’ve always felt a proper stereo needs some bouncing lights. :smile:

In one of the issues discussed on your github page for mpd_oled, I saw that taking the sound display full screen can be done with a code change. I may give that a try. (The semi-persistent peaks that were suggested would also be cool.)

https://github.com/antiprism/mpd_oled/issues/18

Thanks for putting mpd_oled together!

Hi,
I am using mpd oled and I really like it but I have one minor observation
When I am using qobuz and stop the music the display does not show the watch like when I stop an internet radio. It will just not show the bar graph. In order to show the watch I need to start a radio station then stop it.
Thanks

Hi Lintbf

Thanks for reporting this. It should be because Volumio is reporting thr player state as “pause”, and mpd_oled is showing the “pause” screen.

I have previously noticed (when using various player OSs) that the difference between “pause” and “stop” is not always clear (to me), especially when there is only one button on the UI to pause/stop the particular thing that is playing.

In mpd_oled the “pause” screen is the same as the “play” screen, but it might be an idea to add an option to make the “pause” screen the same as the “stop” screen. I’ll take a look at this when I have some time.

Adrian.

1 Like

hello i make a fresh install on pi oled before is working very well but now i can setup its just black nothing any idea or help thnx!

Hi L_PI

Check all the wires are connected well. Run through the mpd_oled install instructions again, check every step. If your display is still black then run the following command and post the output

i2cdetect -y 1

Adrian.

1 Like

0 1 2 3 4 5 6 7 8 9 a b c d e f
00: – -- – -- – -- – -- – -- – -- –
10: – -- – -- – -- – -- – -- – -- – -- – --
20: – -- – -- – -- – -- – -- – -- – -- – --
30: – -- – -- – -- – -- – -- – -- 3c – -- –
40: – -- – -- – -- – -- – -- – -- – -- – --
50: – -- – -- – -- – -- – -- – -- – -- – --
60: – -- – -- – -- – -- – -- – -- – -- – --
70: – -- – -- – -- – --
after the restart MPD from the UI is black… is the adafruit MAX98357 the the right choice? or mast finish all the setup to see the clock? i have tried ./mpd_oled -o 3 or ./mpd_oled -o3 3c or sudo ./mpd_oled -o 6 -b 10 -g 1 -f 20 but nothing… in first time I was lucky to work :joy: :joy: because I am a beginner sorry
if I tire you…
p.s the wire is ok with the 5v
I did not change anything there i change only the sd nothing else
tnx!

Hi L_PI

Your display is being detected correctly and the address is 3c, which is the default, so the address does not need to be specified in the mpd_oled command.

I recommend that you complete the Volumio installation, then you can isolate the issue to the mpd_oled installation.

I power my display with 3.3V. You should use the voltage that your display needs. Do you have a link to the display you bought?

Were there any errors when running the commands in the install instructions? There has been a problem with cava in recent days that has just been fixed. If cava is not installed it may be that you don’t see anything on the screen. Run ‘make’ in the cava directory and see if there is an error reported.

Is there any error when you run mpd_oled?

Could you post the output from running the following command twice: once when running an mpd_oled test command (use two terminal wndows to run the two commands simultaneously), and again when not running an mpd_oled test command.

ps ax | grep “cava|mpd_oled”

Adrian.

1 Like

mpd_oled: error: option -o: must specify a 128x64 oled
setterm: terminal xterm does not support --blank
Linux kernel module “snd_aloop” does not seem to be loaded.

:thinking: :thinking:

A valid mpd_oled test command could be one of (depending on your display)

sudo ./mpd_oled -o 3
sudo ./mpd_oled -o 6

1 Like