Coder Social home page Coder Social logo

Unable to Run about cava HOT 11 CLOSED

karlstav avatar karlstav commented on August 17, 2024
Unable to Run

from cava.

Comments (11)

 avatar commented on August 17, 2024

Try using mpd's FIFO: cava -i fifo -p /tmp/mpd.fifo (/tmp/mpd.fifo is path to your mpd's fifo)

from cava.

karlstav avatar karlstav commented on August 17, 2024

Are you using a loopback interface?

If so are you using the correct alsa device with cava?

Cava uses hw:1,1 by default. can you give me the output of your 'aplay -l'?

from cava.

austinphilp avatar austinphilp commented on August 17, 2024
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC1150 Analog [ALC1150 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 1: ALC1150 Digital [ALC1150 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

from cava.

austinphilp avatar austinphilp commented on August 17, 2024

using celestrial walrus' suggestion(except replacing mpd's fifo with piano bar's) works to start the application but the bars stay at minimal height and don't move. the connection to the fifo is comfirmed by pianobar

from cava.

karlstav avatar karlstav commented on August 17, 2024

If you want to capture audio straight fom the output (not just mic or line-in), you must create an ALSA loopback interface, then output the audio simultaneously to both the loopback and your normal interface (either with asounc.conf settings or pulseaudio's "combined-sink"). Look in the readme for more info.

Reading about pianopar's fifo here http://linux.die.net/man/1/pianobar, it doesn't look like pianobar's fifo is an audio output, but a control input. So I guess your stuck with the options above.

from cava.

livibetter avatar livibetter commented on August 17, 2024

I think I just discovered an interesting way to test and run with FIFO for very rough testing. I don't have MPD and have no idea what data MPD feed into FIFO, never ran cava with FIFO input before.

I was thinking about send in some PCM audio, though not sure if that would work, better to check the code first before wasting time. So I opened up the cava.c and skimmed through the fifomusic function.

Immediately, I typed in this:

./cava -i fifo -p /dev/urandom

@austinphilp I believe that you could test with this, if you see bars bouncing that means cava does work with FIFO. As @karlstav stated, either you get some input or switch to MPD. (Does MPD have plugin for Pandora?)

Off-topic: since urandom is uniform, I was expecting to see most of bars are somewhat leveled, but they ain't. More or less like an uphill slope. Hmm, what are those frequency ranges of the bands/bars?

2015-04-29--19 33 25

(2015-04-29T11:43:24Z edited: I might be presuming the RNG's property over to the audio wrong)

from cava.

karlstav avatar karlstav commented on August 17, 2024

@livibetter that's indeed an interesting way to check the fifo input.

The reason for it not being level is because cava equalizes the Fourier-transformed audio signal quite heavily. If it didn't the higher frequencies would be almost invisible. I'm still not 100% sure why this is. But i have three theories:

  1. the FFT does something with the audio signal
  2. I'm using the fftw library wrong
  3. In most audio treble is generally lower then base in amplitude value.

from cava.

 avatar commented on August 17, 2024

@livibetter see #8

from cava.

 avatar commented on August 17, 2024

@livibetter @karlstav cava -i fifo -p /dev/null -b 60 gives somewhat weird output. /dev/zero is OK.

from cava.

livibetter avatar livibetter commented on August 17, 2024

@CelestialWalrus the read reads zero bytes, so every iteration, whatever in buf[] is used, which is never initialized, if:

memset(buf, (signed char) 0, 1024);

It would look like using /dev/zero.

I think that else clause in the loop should be like:

else if (bytes > 0) {
  // ...
} else {
  // read zero bytes, sleep some time, or hogging CPU
}

Apologizing to @austinphilp, guess we are hijacking with /dev/*.

After @CelestialWalrus mentioned, /dev/null, I tried this:

cava -i fifo -p /dev/stdin

Press some keys, then [Enter] as a few times. Just for fun.

from cava.

karlstav avatar karlstav commented on August 17, 2024

closing this as it sort of drifted of topic. I hope @austinphilp made it work eventually, if you need more help just reopen or send me an email.

from cava.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.