naztronaut / dancyPi-audio-reactive-led

Real-time WS2812b LED strip music visualization using Python and the ESP8266 or Raspberry Pi.
https://www.easyprogramming.net/raspberrypi/audio_reactive_holiday_leds.php
MIT License
240 stars 87 forks source link

Jack music source #43

Closed jamesgeddes closed 3 years ago

jamesgeddes commented 3 years ago

It would be great to have the signal source be the jack output. If the RPi was playing the music, it would remove the need for an external microphone and give a cleaner audio signal.

jamesgeddes commented 3 years ago

I see that this is already a thing. Sorry!

naztronaut commented 3 years ago

Glad you found the info! Was just about to link to it :)

The audio jack on the pi doesn't work, there's some hardware limitation with that and PyAudio. You'll have to use an USB adapter with an aux port.

Good luck!

jamesgeddes commented 3 years ago

That's a shame, would be good to have it all within the RPi. Is it a hardware limitation or a library limitation?

naztronaut commented 3 years ago

From what I read on a thread on the official RPi forums about it a while ago, it's a hardware issue (different project but the issue still applied). I'll try and the thread but it's one of those times where I've been googling for a few hours trying to find a solution so I don't even remember what I searched for, but I clearly remember reading it and then giving up and going to get lunch.

For some reason the Pi won't allow you to loopback the audio from the aux port to a virtual device. Allows one or the other. But USB/Bluetooth devices allow this without an issue.

There may be a way to trick the software into doing it, but I haven't found it. USB adapter was just way easier.