JimRockford
Posts: 1
Joined: Sat Sep 18, 2021 2:22 pm

Project Advice

Sat Sep 18, 2021 2:26 pm

Been programming a random sound player with pygame and getting great results. Would now like to sync sounds with w2812 or w2813 leds but have been reading sound and led control is not possible at the same time. Would this work if I install the adafruit neopixel library and dive into it?

LTolledo
Posts: 5986
Joined: Sat Mar 17, 2018 7:29 am
Location: Anime Heartland

Re: Project Advice

Fri Sep 24, 2021 10:45 am

you mean like audio reactive LED displays with the w2812 or w2813?
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

ame
Posts: 3732
Joined: Sat Aug 18, 2012 1:21 am
Location: New Zealand

Re: Project Advice

Fri Sep 24, 2021 7:47 pm

JimRockford wrote:
Sat Sep 18, 2021 2:26 pm
Been programming a random sound player with pygame and getting great results. Would now like to sync sounds with w2812 or w2813 leds but have been reading sound and led control is not possible at the same time. Would this work if I install the adafruit neopixel library and dive into it?
If you could link to the things you have been reading, which tell you that it's not possible, it would be helpful. Someone could say that it is genuine, or could say that actually, it's wrong and it is possible.

Or state a little more detail about what exactly you are doing and what exactly you'd like to achieve next.

User avatar
rpdom
Posts: 19152
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Project Advice

Fri Sep 24, 2021 8:35 pm

ame wrote:
Fri Sep 24, 2021 7:47 pm
JimRockford wrote:
Sat Sep 18, 2021 2:26 pm
Been programming a random sound player with pygame and getting great results. Would now like to sync sounds with w2812 or w2813 leds but have been reading sound and led control is not possible at the same time. Would this work if I install the adafruit neopixel library and dive into it?
If you could link to the things you have been reading, which tell you that it's not possible, it would be helpful. Someone could say that it is genuine, or could say that actually, it's wrong and it is possible.

Or state a little more detail about what exactly you are doing and what exactly you'd like to achieve next.
The problem would be in using a WS281x driver that uses PWM at the same time as trying to use the A/V audio output which also uses the same PWM channels (on a Pi 0 to 3). Using other drivers or HDMI audio shouldn't be a problem.
Unreadable squiggle

ame
Posts: 3732
Joined: Sat Aug 18, 2012 1:21 am
Location: New Zealand

Re: Project Advice

Fri Sep 24, 2021 10:45 pm

rpdom wrote:
Fri Sep 24, 2021 8:35 pm
ame wrote:
Fri Sep 24, 2021 7:47 pm
JimRockford wrote:
Sat Sep 18, 2021 2:26 pm
Been programming a random sound player with pygame and getting great results. Would now like to sync sounds with w2812 or w2813 leds but have been reading sound and led control is not possible at the same time. Would this work if I install the adafruit neopixel library and dive into it?
If you could link to the things you have been reading, which tell you that it's not possible, it would be helpful. Someone could say that it is genuine, or could say that actually, it's wrong and it is possible.

Or state a little more detail about what exactly you are doing and what exactly you'd like to achieve next.
The problem would be in using a WS281x driver that uses PWM at the same time as trying to use the A/V audio output which also uses the same PWM channels (on a Pi 0 to 3). Using other drivers or HDMI audio shouldn't be a problem.
Great. So, how about this technique as an option?

https://iosoft.blog/2020/09/29/raspberr ... el-ws2812/

LTolledo
Posts: 5986
Joined: Sat Mar 17, 2018 7:29 am
Location: Anime Heartland

Re: Project Advice

Sat Sep 25, 2021 12:26 pm

this is my version of audio reactive LEDs on the RPi4B-8GB
Music reactive LED projects view1.jpg
Music reactive LED projects view1.jpg (179.25 KiB) Viewed 304 times

also have 2 x WS2812 version as well, its a meter long..... but kept it in storage for now

most will say my version is "...thinking out of the box...." :mrgreen:
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

Return to “Graphics, sound and multimedia”