GithubHelp home page GithubHelp logo

atisharma / bellini Goto Github PK

View Code? Open in Web Editor NEW
12.0 12.0 0.0 1.21 MB

A music spectrum analyser and visualisation program for squeezelite

License: MIT License

Makefile 0.89% Shell 0.27% C 93.20% M4 5.64%
audio logitechmediaserver raspberry-pi squeezelite

bellini's People

Contributors

anko avatar antiprism avatar arthurlutz avatar binarii avatar chelovechishko avatar czinsii avatar dgrisham avatar dnalor avatar emilgedda avatar hartwork avatar hashhar avatar hsheth2 avatar iamsubhranil avatar jasminhacker avatar jubalh avatar karlstav avatar larsks avatar livibetter avatar maxbittker avatar nikp123 avatar orthographic-pedant avatar phijor avatar quantum5 avatar sionleroux avatar sjef avatar thecsw avatar tivervac avatar vectorcell avatar xyene avatar yash-garg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

bellini's Issues

Question: How to get the input buffer correcty?

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

Segfault using fft mode at 44.1kHz

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];

Use SDL to write text to textures

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.

Use of bellini?

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!

A thank you, an offer to help, and a feature request

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

Question concerning Equation (Reference or so)

Sorry to bother you again:
I am trying to understand the ppm part of your code.

Could you help me to explain this line:

ppm_l = exp(-1.3545 * dt) * ppm_l + fmax(20 * log10(peak_l) - 80.3, min_dB) * dt;

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...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.