Impulse - PulseAudio visualizer

Conky

Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net

44
Score 85.7%
Description:

Impulse is a bit of eye-candy for your desktop. It is a widget that displays a graphical spectrum analyzer on your gnome desktop. It is written in c and python and uses GTK and cairo graphics to generate the animation. the impulse library creates a pulse audio connection context that reads the output stream from pulseaudio in a thread natively which can then be read from python. You can specify impulse to either output the raw stream or output the fft of the raw stream.


Requires:
screenlets 1.2
libfftw3-3
libpulse0


Install:
1) Download and extract Impulse.tar.bz2
2) mv Impulse ~/.screenlets/
then open up the screenlets manager and start Impulse or open screenlets manager and click Install, navigate to the Impulse.tar.bz2 archive and click ok.
Last changelog:

9 years ago

Impulse 0.5.5
Fixed issue cause by latest Ubuntu update and added ability to change the audio source. Also updated the default theme.

Impulse 0.5.0
New structure. Themes now editable.

Impulse 0.2.4
Fixed screenlet menu bug and use a smarter way to identifying the pa monitor source.

Impulse 0.2.2
Added new screenlet themes

Impulse 0.2.0
Project is under a new name, Impulse. Now natively captures PulseAudio output source

Spectrolet 0.1.4:
Switched from ESOUND to Pulseaudio

Spectrolet 0.1.2:
Now preforms an fft on the audio stream

Spectrolet 0.1.0:
Now uses gtk.main correctly







din

9 years ago

I had trouble with this the screenlet not doing anything as well until I installed the pulseaudio mixer. This lets you choose which output to use with the screenlet. It's a panel applet so you have to add it first.

Report

9

Naf71

10 years ago

how can I have the version 0.1.2 or if i can made some change to get it work on my archlinux? because arch use esound.

Naf

Report

C

ianimal

10 years ago

You can grab it off the launchpad website, https://launchpad.net/impulse.bzr

Report

9

Naf71

10 years ago

Thanks, but I switch my archlinux from esound to pulseaudio and everything work fine with your latest version.

Naf

Report

sgl

10 years ago

One thing: I'd like customize colours in this one but I cannot. But it's great anyway!!!

Report

CLEARview

10 years ago

Very weird. Because I can edit colors.

Report

CLEARview

10 years ago

Great screenlet!
Congrats!

Report

wlourf

10 years ago

Hi, this is great work but is it possible to use the python script by itself?

For example, I've done that :
Quote:
if __name__ == "__main__":

try:
import ctypes
libc = ctypes.CDLL('libc.so.6')
libc.prctl(15, os.path.split( sys.argv[ 0 ] )[ 1 ], 0, 0, 0)
except Exception:
pass


audio_sample_array = impulse.getSnapshot( False ) #True or False make any difference
print (audio_sample_array)

but the output is only zeros :
(0.0, 0.0, ... 0.0)

Can I except to get some informations returned with the code above ?
It's because I don't use gnome but openbox with conky and want to port this to conky (you can see my widget http://u-scripts.blogspot.com/2010/02/equalizer-widget-11.html but now I would like to do an audio equalizer)

Thanks

Report

C

ianimal

10 years ago

impulse is simple to reuse.

Quote:
import impulse, time
while 1:

time.sleep( .3 )
print impulse.getSnapshot( True )



should print out an array of floats each between 0 and 1, which represents the height of the wave as a percent. Passing True into getSnapshot will make impulse perform a fft (fast fourier transform) on the audio snapshot. I am not sure why you are getting all zeros. Either (sorry for asking this) no audio is playing when you run your script or you have multiple output devices and the output device used is not the first device recognized by PulseAudio. Impulse has a current limitation that it picks the first output audio device from PulseAudio and does not provide an interface to choose a different output device. If at any point you are interested in contributing code to the project I can add you to the impulse development team on launchpad.net

Report

wlourf

10 years ago

Hi , thanks for your answer.
It now works except for the first run of the loop which return an array of zeros. (It's only this first run I tested before).

Conky works with Lua (and Lua use cairo like your python script), so in my Lua script I called the python script. I think it can be faster if the Lua script call the impulse.so directly. I have no skills in C but I will try to adapt your code for Lua.
Don't know if it's easy, I've found a tuto here :
http://www.wellho.net/mouth/1844_Calling-functions-in-C-from-your-Lua-script-a-first-HowTo.html

I will contact you on Launchpad if I manage to do something

Report

wlourf

10 years ago

Hi,

I managed to compile the impulse.c with some modifications for Lua. But now I'm stucked when I run it, I wrote my experiments on this post, so if you have any idea
http://ubuntu-ky.ubuntuforums.org/showpost.php?p=8846190&postcount=174
... thanks in advance !!

Report

wlourf

10 years ago

Hi
Finally, I stay with the python stuff. I managed to do something, what do you think about it?

Here it is:
http://ubuntuforums.org/showpost.php?p=8861782&postcount=175

Can I distribute the two .so librairies with my script or not?
Thanks

Report

bearcatsandor

10 years ago

Like a few others, it's just a bar sitting there. Pulseaudio is working just fine.

I've adjusted volumes and nothing makes it move. I have an hdmi card and switching to that doesn't make it move either. No error messages in terminal when run. I see a "cimpulse" under the Applications tab of the pulse audio sound preferences, but moving that slider doesn't do anything to make it move either.

pygtk:2.14.1-r1
pycairo: 1.8.8
pulseaudio: 0.9.19
fftw: 3.2.2
screenlets: 0.1.2
kernel 2.6.31
Gentoo system.

Any ideas at all?

Thanks.

Report

nocountryman

10 years ago

open sound properties.
go to hardware
select the HDMI
and in the settings for the selected device, choose off, should do the trick :)

Report

larryni

10 years ago

Nice one, that did the trick :o)

Report

bearcatsandor

10 years ago

Like a few others, it's just a bar sitting there. Pulseaudio is working just fine.

I've adjusted volumes and nothing makes it move. I have an hdmi card and switching to that doesn't make it move either. No error messages in terminal when run. I see a "cimpulse" under the Applications tab of the pulse audio sound preferences, but moving that slider doesn't do anything to make it move either.

pygtk:2.14.1-r1
pycairo: 1.8.8
pulseaudio: 0.9.19
fftw: 3.2.2
screenlets: 0.1.2
kernel 2.6.31
Gentoo system.

Any ideas at all?

Thanks.

Report

Cyorg

10 years ago

For some reason, when I select the download button I get sent to a screen showing nothing but a full page of gibberish.

Report

Cyorg

10 years ago

That's weird... I'm able to download in Chromium, but not with Firefox... Oh well. Very nice screenlet, thanks.

Report

fionex

10 years ago

I realized there's no built-in support for people who have two sound output devices. Since I have a Radeon HD video card with HDMI, Impulse doesn't realize that my default sound device is not the first one! I went through the code in impulse.c and added an offset. I just made it skip the first sound device.

Report

C

ianimal

10 years ago

I would like to eventually add a dropdown list to select the card you want to use. If you want, go ahead a implement it and send it over. I will add it in and release an update (and give you credit of course)

Report

dizmul

10 years ago

i was forgetting the "-9" in the killall command wrote i tiny script to kill it and hooked two shortcuts one to start and one to stop, now it's alot simpler to use for me :) sorry for useless posts

Report

dizmul

10 years ago

right clicking that little bar is such a pain, so i was trying to hook a command to kill it... my question is does the killall command work for others? cuz i don't for me, also i can't close it through the system monitor... i just thought that was strange. any ideas?

Report

webmastir

10 years ago

how hard would it be to edit the default theme, for instance, to make it stand vertical instead of horizontal?

thanks.

Report

querk

10 years ago

combination with http://timonchristen.metacomplex.ch/visuals/wallpapers/index.html

Report

hubfred

10 years ago

Hey everyone,

this screenlet is really awesome but in order to make it a 100% perfect for me I would like to have it hidden (resp. no initial bars) when no playback is present. As soon as the screenlet perceives playback it should start to measure the spectrum as usual. Is that possible?

Thx,
Fred

Report

9 years ago

Impulse 0.5.5
Fixed issue cause by latest Ubuntu update and added ability to change the audio source. Also updated the default theme.

Impulse 0.5.0
New structure. Themes now editable.

Impulse 0.2.4
Fixed screenlet menu bug and use a smarter way to identifying the pa monitor source.

Impulse 0.2.2
Added new screenlet themes

Impulse 0.2.0
Project is under a new name, Impulse. Now natively captures PulseAudio output source

Spectrolet 0.1.4:
Switched from ESOUND to Pulseaudio

Spectrolet 0.1.2:
Now preforms an fft on the audio stream

Spectrolet 0.1.0:
Now uses gtk.main correctly







12345678910
33
product-maker KDE4WasBetter Oct 14 2017 9 excellent
product-maker tavaresgerson May 27 2017 9 excellent
product-maker apocrifa Jan 03 2015 9 excellent
product-maker Brahimsalem Apr 16 2013 9 excellent
product-maker Xephexx Aug 19 2012 9 excellent
product-maker draco23hack Mar 15 2012 9 excellent
product-maker posixru Jan 04 2012 9 excellent
product-maker lolsas Oct 22 2011 9 excellent
product-maker Ahmose Jul 21 2011 9 excellent
product-maker tobaj Jul 19 2011 9 excellent
product-maker Thalic Jun 24 2011 9 excellent
product-maker kolesky Apr 11 2011 9 excellent
product-maker XNight Mar 15 2011 9 excellent
product-maker brainpower Feb 11 2011 9 excellent
product-maker linuxbear Feb 04 2011 9 excellent
product-maker thenameisadib Jan 08 2011 9 excellent
product-maker LGD Dec 31 2010 9 excellent
product-maker rafeviper Dec 26 2010 9 excellent
product-maker sw2 Dec 13 2010 9 excellent
product-maker kenpou7 Dec 13 2010 9 excellent
product-maker Drakon Dec 05 2010 9 excellent
product-maker li9ux Dec 05 2010 9 excellent
product-maker drxnele Dec 03 2010 9 excellent
product-maker areco23 Dec 02 2010 9 excellent
product-maker Naf71 Dec 02 2010 9 excellent
product-maker mixalns Dec 01 2010 9 excellent
product-maker nickcloy Dec 01 2010 9 excellent
product-maker mr32 Nov 28 2010 9 excellent
product-maker likimoki Nov 27 2010 9 excellent
product-maker lor-anonymous Nov 26 2010 9 excellent
product-maker scottiw2000 Nov 26 2010 9 excellent
product-maker ubuntico Nov 26 2010 9 excellent
product-maker mystica Nov 26 2010 9 excellent
product-maker Base: 4 x 5.0 Ratings
MojoMan
Feb 12 2016
simon9007
Feb 01 2012
tobaj
Jul 19 2011
bmfc187
Feb 12 2011
brainpower
Feb 11 2011
LGD
Dec 31 2010
sw2
Dec 13 2010
mystica
Nov 30 2010
mr32
Nov 28 2010
Dawei87
Nov 27 2010
masstrider
Aug 30 2010
CruelAngel
Jul 18 2010
wasabi
Jul 15 2010
MRTOA5T
Jun 18 2010
nanderz
Jun 09 2010
peacewithall
May 29 2010
Naf71
May 10 2010
sgl
Apr 23 2010
CLEARview
Feb 28 2010
gimox
Feb 27 2010
swano
Jan 21 2010
webmastir
Jan 04 2010
larryni
Dec 12 2009
raulmanoelr
Dec 05 2009
linux4ever
Dec 03 2009
btdwn
Oct 21 2009
romerotek
Aug 31 2009
Keidon
Aug 23 2009
shankru85
Aug 09 2009
momokatte
Jul 31 2009
gnuf
Jul 21 2009
switzak
Jul 19 2009
LaGaDesk
Jun 25 2009
maxo64
Jun 02 2009
Simmeson
May 26 2009
Telperien
May 24 2009
mixman2009
May 19 2009
berot3
May 16 2009
dilomo
May 03 2009
CookedGryphon
Apr 27 2009
dspencer82
Apr 12 2009
Ausmosis
Apr 12 2009
techie
Mar 09 2009
4tis
Mar 09 2009
File (click to download) Version Description Downloads Date Filesize DL OCS-Install MD5SUM
*Needs pling-store or ocs-url to install things
Pling
0 Affiliates
Details
license
version
0.5.5
updated Dec 12 2010
added Feb 14 2009
downloads 24h
1
mediaviews 24h 0
pageviews 24h 23