Moode Forum
[How to do instruction] 128x64 OLED with Song Status and Spectrum Display on Raspberry Pi - Printable Version

+- Moode Forum (https://moodeaudio.org/forum)
+-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3)
+--- Forum: FAQ and Guides (https://moodeaudio.org/forum/forumdisplay.php?fid=9)
+--- Thread: [How to do instruction] 128x64 OLED with Song Status and Spectrum Display on Raspberry Pi (/showthread.php?tid=155)



RE: 128x64 OLED with Song Status and Spectrum Display on Raspberry Pi - MRamone - 01-13-2022

(01-13-2022, 07:14 AM)adrii Wrote: Hi MRamone

Great that the install went well!

The spectrum is calculated by the cava program, and the bar height is automatically adapted to audio levels using the cava autosens option

   https://github.com/karlstav/cava/blob/master/example_files/config

Cava determines an optimal bar height quickly when audio first starts, and then adapts slowly to audio level changes after that.

The audio levels of the copy of the audio that is passed to cava to calculate the spectrum depend on where, during the audio processing by Moode, the copy is made by Moode. They probably also depend on the audio source (MPD, spotify, etc).

On my system the volume control does not change the bar height, but it sounds like on your system the volume change occurs before the audio copy is made, which affects the bar height in the short term. However, the bar height should adapt over a few minutes to the audio level change to a more appropriate display.

Adrian.

Thank you again, that makes sense, will observe better the behavior of the bars. If it autocorrects in a few minutes, that's good enough!w


RE: 128x64 OLED with Song Status and Spectrum Display on Raspberry Pi - TheOldPresbyope - 01-20-2022

Arduinos work but I'd think this project would be a perfect excuse to use the new Raspberry Pi Pico. Smile

Regards,
Kent


RE: 128x64 OLED with Song Status and Spectrum Display on Raspberry Pi - TheOldPresbyope - 01-21-2022

If not already familiar with programming microcontrollers then I'd suggest tackling a single functionality first to get one's feet wet.  Armed with that experience, grow the project. I suggested trying a Pico but of course there are many other possibilities. Arduinos are ubiquitous; the Teensy lineup isn't as well known, perhaps, but extremely capable; yada yada yada.


As for starting a separate thread, I'd suggest instead creating and working in a github repo. The issues log is a better place to track ideas than a series of posts to a forum thread.

Just my 2 cents worth.

Regards,
Kent


RE: 128x64 OLED with Song Status and Spectrum Display on Raspberry Pi - adrii - 01-21-2022

Hi Ghoostknight

mpd_oled communicates with the display using the linux /dev/i2c-1, etc, devices. So long as the USB I2C device driver sets up a similiar device node, and provides a fast enough i2c bus, then it seems reasonable that it could work with mpd_oled.

Adrian.


RE: 128x64 OLED with Song Status and Spectrum Display on Raspberry Pi - ROCH23 - 07-02-2022

Hey adrii!
After updating moode to 8.1.1, the display stopped working.
As soon as I give a command via SHH
sudo mpd_oled_service_edit -o1 -b 32 -g 1 -f 60 -c alsa,plughw:Loopback,1
Everything works, but on the next restart the display does not work again


RE: 128x64 OLED with Song Status and Spectrum Display on Raspberry Pi - adrii - 07-02-2022

Hi ROCH23

After the restart has completed, and with the display not working, could you post the result of the following command
Code:
sudo systemctl status mpd_oled | cat

Adrian.


RE: 128x64 OLED with Song Status and Spectrum Display on Raspberry Pi - ROCH23 - 07-02-2022

(07-02-2022, 10:22 AM)Андрей Wrote: Hi ROCH23

After the restart has completed, and with the display not working, could you post the result of the following command
Code:
sudo systemctl status mpd_oled | cat


● mpd_oled.service - MPD OLED Display
     Loaded: loaded (/etc/systemd/system/mpd_oled.service; enabled; vendor prese                                        t: enabled)
     Active: failed (Result: timeout) since Sat 2022-07-02 17:30:32 +07; 5min ag                                        o
    Process: 452 ExecStartPre=/usr/bin/mpd_oled_launch_test (code=killed, signal                                        =TERM)
        CPU: 1.818s

Jul 02 17:28:45 moode systemd[1]: Starting MPD OLED Display...
Jul 02 17:30:32 moode systemd[1]: mpd_oled.service: start-pre operation timed ou                                        t. Terminating.
Jul 02 17:30:32 moode systemd[1]: mpd_oled.service: Control process exited, code                                        =killed, status=15/TERM
Jul 02 17:30:32 moode systemd[1]: mpd_oled.service: Failed with result 'timeout'                                        .
Jul 02 17:30:32 moode systemd[1]: Failed to start MPD OLED Display.
Jul 02 17:30:32 moode systemd[1]: mpd_oled.service: Consumed 1.818s CPU time.



RE: 128x64 OLED with Song Status and Spectrum Display on Raspberry Pi - adrii - 07-02-2022

Hi ROCH23

Thanks. I'll install Moode 8.1.1 and investigate what is happening.

Adrian.


RE: 128x64 OLED with Song Status and Spectrum Display on Raspberry Pi - ROCH23 - 07-02-2022

(07-02-2022, 10:44 AM)adrii Wrote: Hi ROCH23

Thanks. I'll install Moode 8.1.1 and investigate what is happening.

Adrian.

adrii!
I figured it out, everything works, deleted the test line, and everything starts!
Many thanks for the help!


RE: 128x64 OLED with Song Status and Spectrum Display on Raspberry Pi - adrii - 07-02-2022

Hi ROCH23

Great, thanks for letting me know. I'll need to review the mpd_oled launch test though, as mpd_oled should not start until Moode has finished starting.

Adrian.