Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 2 of 2
  1. #1
    Junior Member
    Join Date
    Jul 2008

    piCorePlayer with cava and tmux (so far)

    I have pCP running on a Pi 3 B+ connected via HDMI to my Denon receiver which then connects via HDMI to my TV. I had jivelite going which is cool but the TV isn't a touchscreen so the "now playing" info was all I was really interested in. I've been messing around this weekend with a console style status screen. Still in its' infancy and it took some head banging to get the alsa config correct. Just thought I'd show you what I'm working on and use this thread to keep some notes - I'm usually pretty bad about doing that.

    tmux let's you carve up the screen (amongst a bunch of other things) which is something I thought would be critical for this effort. So far I've only got cava working and haven't really investigate what other console apps would be useful. Converting album art to ascii art for display in one of the console sections would be cool.

    cava is a console based audio visualizer.

    Let's see if the .gif works. This is captured via an ssh session but it works on the locally attached monitor also (but not at the same time yet.)

    Last edited by sodface; 2018-11-04 at 13:50.

  2. #2
    Junior Member
    Join Date
    Jul 2008
    Had to compile tmux and cava from source and made a .tcz package for each, the contents of which may need to change. This is what I have in my .dep files for each thus far:



    So far everything has been in the piCore 9.x repo (except tmux and cava).

    Changes I've made so far:
    cmdline.txt - added lang=en_US.UTF-8
    config.txt - added hdmi_force_hotplug=1 and hdmi_drive=2 so audio/video would still work if Pi boots up without the stereo on (doesn't see the hdmi otherwise)
    modprobe snd_aloop (needed to create the loopback device for cava)
    /usr/local/sbin/config.cfg - changed OUTPUT="default" (not sure if this is necessary yet, still experimenting but this is working)
    changed /etc/asound.conf - see below, this sends the squeezelite output to the HDMI interface and to the loopback simultaneously, cava uses the loopback
    created /home/tc/config - cava config, start with cava -p /home/tc/config
    TERM - this environment variable was set to "xterm" in the above gif otherwise you don't get colors and the bars are made up of numbers, tmux explicitly tells you TERM should be "screen" or you could get unexpected results, but cava didn't understand "screen", need to sort that out still.

    For the cava config file, the only thing I've changed from the example config is to uncomment the ALSA loopback lines:
    method = alsa
    source = hw:Loopback,1
    Here's the working /etc/asound.conf - will be edited further since I took out some stuff pCP had in there by default.
    pcm.multi {
        type route;
        slave.pcm {
            type multi;
            slaves.a.pcm "output";
            slaves.b.pcm "loopin";
            slaves.a.channels 2;
            slaves.b.channels 2;
            bindings.0.slave a;
            bindings.0.channel 0;
            bindings.1.slave a;
            bindings.1.channel 1;
            bindings.2.slave b;
            bindings.2.channel 0;
            bindings.3.slave b;
            bindings.3.channel 1;
        ttable.0.0 1;
        ttable.1.1 1;
        ttable.0.2 1;
        ttable.1.3 1;
    pcm.!default {
            type plug
            slave.pcm "multi"
    pcm.output {
            type hw
            card ALSA
    pcm.loopin {
            type plug
            slave.pcm "plughw:Loopback,0,0"
    pcm.loopout {
            type plug
            slave.pcm "plughw:Loopback,1,0"
    Last edited by sodface; 2018-11-04 at 15:08.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts