Go Back   Home > Forums > >

PC Based Computer music servers, crossovers, and equalization

PeppyMeter
PeppyMeter
Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools
Old 23rd September 2021, 09:31 PM   #481
chicks is offline chicks  United States
diyAudio Member
 
Join Date: Sep 2008
Location: The Big Valley, CA
Same, plenty of data flowing through, no moving needle.

A simple sprites demo of pygame works fine, as does the Space Invaders sample app, plenty of on-screen motion.
  Reply With Quote
Old 23rd September 2021, 09:41 PM   #482
rpi is offline rpi  United States
diyAudio Member
 
Join Date: Apr 2015
Location: San Francisco
Weird, the only thing I can think of is the Pygame version, that I'm doing something that is not supported in the new version. One way to test that is to install the older version:
pip3 install pygame==1.9.4
It will need the older version of SDL, hopefully it will get it.
  Reply With Quote
Old 25th September 2021, 12:43 AM   #483
chicks is offline chicks  United States
diyAudio Member
 
Join Date: Sep 2008
Location: The Big Valley, CA
Well, I switched to bellini, which can grab data from squeezelite directly via shared memory, doesn't require SDL2 or Pygame, writes directly to the framebuffer. Works nicely on a Pi Zero with Hyperpixel 4" display.

Click the image to open in full size.
  Reply With Quote
Old 13th October 2021, 05:34 PM   #484
fdealexa is offline fdealexa  Italy
diyAudio Member
 
Join Date: Aug 2020
Location: Rome - Italy
Default Spectrum data flow

Hello Rpi, hello everybody,
I am working on my initiative to group some information on the same screen: in this particular case I would like to insert frequency spectrum, info on the input and output music flow and a bar VU Meter.
As you can see from the attached image everything is working but I had to use CAVA as the source for the spectrum and, of course, peppyalsa as the source of the VU meter.
My goal is to use peppy alsa's two FIFO files for both applications, but unfortunately I failed. In particular, if I insert "spectrum_size 30" in the configuration I expect to receive 60 bytes with the info: High and Low Freq.1 ..... up to ..... High and Low Freq.30, and instead I receive 120 bytes of which the first pair is significant and the second is not (only zero). It would seem as if, even for the spectrum, there is "LEFT and RIGHT" even if the second pair (the one that could, according to this theory be the right channel) is always at zero.
Trying to decode the info it would seem that the frequencies are not like what I hoped to expect (25, 32, 40, 50, 63, 79, 100, 126, 157, 197, 250, 320, 400, 500, 630, 790, 1000, 1260, 1570, 1970, 2500, 3200, 4000, 5000, 6300, 7900, 10000, 12600, 15700, 19700).
Is anyone able and willing to help me?
Thanks in advance and best regards to all,
Francesco
Attached Images
File Type: jpeg WhatsApp Image 2021-10-13 at 18.25.59.jpeg (263.6 KB, 92 views)
  Reply With Quote
Old 14th October 2021, 06:43 PM   #485
rpi is offline rpi  United States
diyAudio Member
 
Join Date: Apr 2015
Location: San Francisco
Hi Francesco,

Sorry for confusion. The signal for Spectrum Analyzer is actually 4 bytes:
peppyalsa/spectrum.c at ff7c1b92a961953f6be3b9ac73998f1241a33f6f * project-owner/peppyalsa * GitHub
I should probably use 'unsigned short' (2 bytes) instead of 'unsigned int' (4 bytes) as the code only handles values < 64K.

Best regards
  Reply With Quote
Old 15th October 2021, 06:33 AM   #486
fdealexa is offline fdealexa  Italy
diyAudio Member
 
Join Date: Aug 2020
Location: Rome - Italy
Hi rpi,
Thanks for the reply, the result is unfortunately not changed because I was already taking the least significant bytes into account; probably the frequencies I have considered are not correct: would you be kind enough to show me where I can find them?
Sincerely and thanks again,
Francesco
  Reply With Quote
Old 15th October 2021, 07:29 AM   #487
phofman is offline phofman  Czech Republic
diyAudio Member
 
Join Date: Apr 2005
Location: Pilsen
IMO the frequencies are generated by processing FFT bins here peppyalsa/spectrum.c at master * project-owner/peppyalsa * GitHub
  Reply With Quote
Old 15th October 2021, 08:05 AM   #488
rpi is offline rpi  United States
diyAudio Member
 
Join Date: Apr 2015
Location: San Francisco
You can use the Spectrum screensaver code from the Peppy player as an example of handling the data from the pipe:
Peppy/spectrum.py at 5a78420ffbb0d0fe03353f88830b2baa8b54254b * project-owner/Peppy * GitHub
  Reply With Quote
Old 15th October 2021, 08:18 AM   #489
fdealexa is offline fdealexa  Italy
diyAudio Member
 
Join Date: Aug 2020
Location: Rome - Italy
Hi Phofman,
Thanks for your reply, but I have problems to interpreter that program.
I have tried with some fixed frequency source and the results are many different from the expected: changing the "windows" parameter on the config, I always see 4 or 5 bars raising.
Thanks a lot again and best regards,
Francesco.
P.S. in the afternoon I will try to take some pictures to explain better
  Reply With Quote
Old 15th October 2021, 08:29 AM   #490
fdealexa is offline fdealexa  Italy
diyAudio Member
 
Join Date: Aug 2020
Location: Rome - Italy
Thanks rpi,
As you probably understand, I am not able to work on C.
I am trying to go forward.
Thanks a lot, again and greatings,
Francesco
  Reply With Quote

Reply


PeppyMeterHide this!Advertise here!
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


New To Site? Need Help?

All times are GMT. The time now is 11:52 PM.


Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2021 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 15.00%
vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2021 DragonByte Technologies Ltd.
Copyright ©1999-2021 diyAudio
Wiki