Thank you for your donation!


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


Idea: Touch screen spectrum analyzer
#1
What a great player Moode is Smile I'm using it more than year and I love it.

It could be nice to add a spectrum analyzer as an option for Cover view. I have built in raspberry with sound card and 3,5 touch screen into an old CD player chassis. Displaying some nice spectrum analyzer animations on that small screen will definitely look good.

thanks
Reply
#2
That would be cool.

If someone posts links to Open Source code that could be implemented in moOde I'll have a look :-)
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#3
Just came across this thread asking about a visualizer in the MPD Forum.

It's interesting that MaxK reacts negatively to the idea of basing a visualizer on MPD FIFO output (and makes a technical argument why not). This is the approach taken to connect to MPD in the CAVA project (Console-based Audio Visualizer for ALSA), which I found before I found the forum post.

Lots of projects out there involving an Ardunio driving an LED display.

It's only eye candy, but it's fun.

Regards,
Kent
Reply
#4
Adrian uses the CAVA project for his oled spectrum analyser....maybe that's a start ?
http://moodeaudio.org/forum/showthread.php?tid=155
----------
bob
Reply
#5
@DRONE7 is exactly correct. Adrian's (@adriiOLED spectrum display for MPD demonstrates that CAVA works great in moOdeOS, at least prior to the bump to Raspbian Buster. [1] 

If I pick and choose parts of Adrian's recipe, build CAVA on a moOde 5.3.1, and interconnect CAVA and MPD, I can easily bring up a bouncing-bar graph in an SSH term (including moOde's built-in Web SSH Term). 

[Image: gQAo00u.png]

@Tim Curtis and/or @swizzle, can one embed such a thing in an iFrame or somesuch to bring it into the moOde UI in lieu of the coverview?

Regards,
Kent

[1] I built CAVA on moOde 5.3.1 without issue. It and moOde seem copacetic. I built CAVA on the testing version of moOde 6 seemingly also without issue. However, it and moOde are not copacetic. I can start a track but the moOde UI becomes unresponsive. CAVA displays a single burst of bars and then the display flatlines. Restarting the MPD service from the CLI seems sufficient to regain control but I've been rebooting. I don't find any mention of Debian/Raspbian Buster in CAVA-related forums. Perhaps @adrii has some insight.
Reply
#6
That would be really messy. I think we need to wait to see of a dev writes the FFT plugin for MPD as was discussed in the MPD forum thread that you mentioned.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#7
(08-05-2019, 02:52 PM)Tim Curtis Wrote: That would be really messy. I think we need to wait to see of a dev writes the FFT plugin for MPD as was discussed in the MPD forum thread that you mentioned.

What, do it right? Where's the challenge in that  Tongue
Reply
#8
Hi Kent

I believe that cava is working fine on Moode 6. The behaviour you saw may be related to pipes and blocking.

When I looked at writing a spectrum analyser my first thought was to write my own, using an FFT library. I then came across Cava, and thought I would hack the code. However, when I looked closer I found that Cava provides all that is need for working with external programs, and using pipes doesn't add much overhead, and so I used it as-is.

I consider the main difficulty in providing a spectrum analyser is getting a copy of the audio that is playing, as it may not come from MPD. It could be in the form of a stereo ALSA stream, and could possibly be supoorted by the music player software by providing an ALSA plugin in the chain that just passes on the audio forwards, but that could be overidden in a configuration file to duplicate the audio and pass one copy forwards as before and the other copy would be available to be read by Cava (see https://github.com/antiprism/mpd_oled/issues/4 ).

The situation is complicated by the fact that other software, e.g. equalisers, might also want to modify the ALSA configuration, which is why it would be useful if the music player software was able to provide some hooks into the ALSA configuration for player plugins and external programs. However, I need to look into this some more before suggesting it as a feature.

Adrian.
Reply
#9
Just a bit extra about Cava and its audio input.

Cava doesn't have options to specify the audio parameters for FIFO input (but could) and what you write to the FIFO must be in a fixed format. It is possible to get FIFO output from an ALSA stream using "tee", but the audio needs to be resampled in order to be in the right format for Cava, which means that it has also been resampled for audio output. On the other hand, Cava will also read an ALSA stream directly, and deal with the sample rate internally, but this consumes the stream, which meanis that the ALSA stream has to have been previously duplicated (as in the link in my last post). I could not find anything like "tee" that would simply duplicate an ALSA stream.

Adrian.
Reply
#10
Thanks for sharing your thoughts, Adrian.

Seems a "JACK"-like functionality is needed here. When it comes to the Linux audio subsystem I feel like Wile E. Cayote does when he finally looks down and realizes he's run off the edge of the cliff! 

I'm caught up in some grandpa projects at the moment (first grandchild off to college in just weeks, yikes!) so will have to let this project percolate for the moment. Since you have a number of users of your nice OLED project I'm sure any moOde 6 problems (assuming they weren't of my own making!) will get fixed tout suite Smile [post edit: looks like you're already taking care of business]

Regards,
Kent
Reply


Forum Jump: