atisharma / bellini Goto Github PK
View Code? Open in Web Editor NEWA music spectrum analyser and visualisation program for squeezelite
License: MIT License
A music spectrum analyser and visualisation program for squeezelite
License: MIT License
I do not know how to contact you in any other way so please mind the question here:
I am trying to combine cava/bellini with squeezelite in a way to steer a hue light system via sound for the Logitech Media Server.
Therefore I use a program by philippe44 which checks for the player "the hue system" and then start analyzing the music stream...
Right now I have some issues that the music is not in sync with my "light output" and I get segfault during its run.
Therefore, I mainly copied & adapted the respective lines of code in cava.
My question now to you:
Is there a possibility that you might have a look onto my "buffer import" into the sound analysis part? I fear that I simply do something wrong there.
Any help, even with some explanation on how that might be done (overlapping of the old buffer with the new one; my biggest problem) is welcome.
Thank you very much in advance for any kind of answer.
The sound stream is to be processed here: https://github.com/chincheta0815/LMS-to-Hue/blob/5ba86894666fed31a4032e594eddf3c12f979a1c/helper/LMS-to-Hue/squeezetiny/output_huebridge.c#L87
and the responsible function is here: https://github.com/chincheta0815/LMS-to-Hue/blob/5ba86894666fed31a4032e594eddf3c12f979a1c/helper/LMS-to-Hue/huebridge/hue_analyze.c#L150
Running under 32-bit Raspberry Pi OS on a Pi Zero. Ppm mode works fine at 44.1kHz, but fft mode would immediately segfault when music started. Fixed it by one change in the make_bins() function in sigproc.c:
double power[number_of_bins+1];
Hello,
I want to change the default black background color to match my terminal colorscheme.
Is there any option to change it on compiling, which section if any?
Thank you very much.
ProjectM is a visualisation library that inherits Milkdrop's awesomeness.
It would be great if bellini could use those visualisations.
Use SDL to pick up keypresses. E.g.:
q - quit
v - change visualisation
At the moment freetype is used to write text directly to the bf_* arrays.
This means a direct dependency on freetype and a lot of code.
It would probably be simpler to use SDL's TTF_RenderText_Solid or similar to write the text.
The clock would be the easiest place to start.
A lot of the visualisation logic is in bellini.c.
It would be cleaner to break it out into a separate library.
This isn't really a bug I don't think, but is it possible to use Bellini on a Linux desktop like Ubuntu? Or is it "hardwired" to the display on a Raspberry Pi? I got it compiled on Ubuntu, hooked up some fonts, and ran 'bellini', and nothing happens. Well, something does happen, it shows a cursor. According to strace it is constantly scanning for changes in the config file.
Edit : I should mention I'm using Alsa input and have the same input working fine in Cava.
Edit 2 : Never mind, figured out how to see it. Learn something new every day in Linux!
OMG this project is so sexy! The OSC is my favorite but all visualizations open such window of possibilities! So THANK YOU so much for this! ❤️
I found that the Readme and the default config could use some help in clarifying some items (like which font to choose) and maybe guidance on the shem device? However, I found that 'pulse' and 'auto' works fine for me. I'll create a PR for that, if you're open to that?
The framerate of the OSC is a bit low... Do you think this is due to using pulsaudio as the input or is there another way to improve performance?
Also, is it me or is the OSC rotated 45 degrees? I would expect a mono sound to be a straight vertical line. <-- Never mind! This is required to be compatible to oscilloscopemusic.com. Got it!
Here's my config, by the way:
[general]
noise_floor = -80
#text_font = /home/pi/bellini/fonts/DOTMATRI.TTF
text_font = /usr/share/fonts/TTF/OpenSans-Light.ttf
audio_font = /usr/share/fonts/TTF/OpenSans-Light.ttf
persistence = .97
vis = osc
[output]
# it's best to restart after modifying output rotation or size
rotate = 0
# The width and the height refer to the resultion of the internal software
# buffer canvas used before copying to the SDL texture.
# It is nice to match your screen's aspect ratio so that fullscreen does not
# cause any unsightly stretching.
# If these buffer dimensions are too large, things slow down.
width = 480
height = 480
fullscreen = false
[input]
method = pulse
# name the correct source in /dev/shm here
source = auto
[color]
plot_r = "#B9FF00"
plot_l = "#3307FF"
ax = "#C1BDB2"
ax_2 = "#B33B2D"
text = "#FF2100"
audio = "#C1BDB2"
oscilloscope = "#20FF00"
# some nice phosphor colours
#56ff00 # P1
#8cff00 # P2
#ffb700 # P3
#d2ff00 # P4
#3300ff # P5
#007bff # P6
#b9ff00 # P7
#007bff # P11
#ffdc00 # P12
#ff2100 # P13
#00ff61 # P15
#610061 # P16
#00ff61 # P17
#92ff00 # P18
#ffdf00 # P19
#b3ff00 # P20
Sorry to bother you again:
I am trying to understand the ppm part of your code.
Could you help me to explain this line:
Line 488 in d911b0b
I do not get the part with the exp(): Where does that come from?
and
Why os there a dt involved? I thought ppm is an average of the samples having a amplitude unit without time (e.g. V and not V/s)....
A reference where I can read that on my own would help I think, but I do not know where to look...
My target overall goal is changing the decay time to a lower value and I do not see how...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.