magicusernames
Posts: 2
Joined: Sat Nov 28, 2020 2:52 am

Recording Currently Playing Audio

Sat Nov 28, 2020 2:56 am

Hello,

I am working on a project that changes lights based on the audio currently playing. Is there a way to record the current playing audio in python? Sorry if this sounds simple, or has been already answered, I am a NOOB. Thanks again!

:D

cleverca22
Posts: 2880
Joined: Sat Aug 18, 2012 2:33 pm

Re: Recording Currently Playing Audio

Sat Nov 28, 2020 2:02 pm

cleverca22 wrote:
Thu Nov 26, 2020 4:58 pm
last time i played with loopback capture, it required pulseaudio to function right

if you can install and start pulseaudio, it should allow capturing audio coming from applications
pulseaudio lets you treat the loopback (mix of all playing audio) as a capture source, like any other input

mmkw43
Posts: 699
Joined: Tue Dec 24, 2013 6:18 pm

Re: Recording Currently Playing Audio

Sat Nov 28, 2020 2:11 pm

If you do any python, you could have a program identify the mp3 title then manipulate the gpio pins -- could even use multiple pins and decode the binary data for a ton of songs. -- or, if you don't want a specific light show for a song you could simply have the start of each song play a random light show. why record it?

magicusernames
Posts: 2
Joined: Sat Nov 28, 2020 2:52 am

Re: Recording Currently Playing Audio

Sat Nov 28, 2020 2:31 pm

Thanks for all the help!

I will look into using pulseaudio to record the audio track. That should allow me to dynamically change the light sequence while the song is running. This helps a real lot. Thanks!

Return to “General discussion”