Image 01
profile-image

ianimal

Ian Halpern
Conky
Impulse - PulseAudio visualizer

Conky 202 comments

Score 85.7%
Dec 12 2010
A quick fix is to run the command:
$ pacmd set-source-mute 0 0

The first '0' is the index of the source. To find the index of the source you are using run the command:
$ pacmd list-sources - Nov 25 2010
The latest ubuntu update broke impulse, i am investigating the issue and will hopefully have a fix out soon. - Nov 25 2010
It works fine on my 10.04 and 10.10. Please just double check for me that libfftw3-3 is installed in the Synaptic Package Manager and that you are downloading the correct architecture for your comp. - Oct 13 2010
Yes, make sure you have all requirements installed in synaptic. Mainly libfftw3-3. - Jun 05 2010
You can grab it off the launchpad website, https://launchpad.net/impulse.bzr - May 07 2010
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 - Feb 16 2010
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) - Jan 24 2010
The source is provided on launchpad.net. Go to https://launchpad.net/impulse.bzr . This is also where the download packages are hosted. The download links as well as a link on Impulse's homepage link to the launchpad page. - Nov 16 2009
Rotation is on the spec for the next release. The next release will also have a feature to display the current song as well as the album art! - Oct 19 2009
90%! really? Thats extremely high, very strange. It runs at an average of 3% CPU on my system. I can't imagine your computer is that dated. I see you are a programmer, if you feel inclined I'd be interested to see a profile of impulse on your system. You can get the code here: https://launchpad.net/impulse.bzr - Aug 07 2009
Make sure you downloaded the right version to match your cpu. Make sure pulse audio is installed and running correctly. If those are both right everything should work fine. If they are right and its still not working, let me know and we can dive in further to try and figure it out. - Jul 31 2009
This is very strange, what videocard/driver do you both use? What other screenlets (if any) do you use and do they work fine? - Jul 21 2009
Ah, ok. So go into the Screenlets manager, click on Impulse and click uninstall. Then click the 1st download link on this site, it is labled "Impulse screenlet x86", download it, and install that one. You must have just downloaded the 64 bit version whereas your cpu is 32 bit. - Jun 21 2009
Click on Impulse in the screenlets manager and click "Close All" on the left side bar. Hit "Alt+F2" and type in "gnome-terminal", then click run. When the terminal pops up type in this command:

.screenlets/Impulse/ImpulseScreenlet.py

If the output is long just P.M. it to me otherwise just reply to this comment with the output. - Jun 20 2009
So i've looked more into OSS 4.1 over the past few days and am very impressed. I installed it on my laptop to test it out and it is great, so much better than PulseAudio and I hope the Ubuntu team will drop PulseAudio as the default and switch over to OSS. I did a bit of research into capturing the mixed audio using OSS and I think i've got a good direction. When I get some free time I am going to try and port Impulse to OSS. - Jun 20 2009
Impulse only works with PulseAudio unfortunately. I chose PulseAudio because it seems to be the most popular and the one that I use. I don't know if it would be possible to do with OSS, it would take some time and research to figure out. Unfortunately I probably won't do it unless I get enough request for OSS support. - Jun 18 2009
As I mentioned above Impulse performs an FFT on the audio stream at 30 fps, redraws the animation at 30 fps, and the PulseAudio system doesn't have the greatest performance track record...as a result Impulse takes some CPU usage. I have a fast dual core which is why my CPU is at 6%, which, if I had a single core would automatically jump to 12%. If your system is twice as less powerful as mine and has a single core it could easily slip up to your aforemetioned 30%. All of the heavy processing is done in C (natively) and is as fast as it can get. The best option I have is to offload the fft to the GPU. Also a cairo graphics backend that utilizes the GPU would also help. - Jun 14 2009
Thank you. Yes it does use some CPU. On my system its an average of 6% while playing audio and 2% without music. Since impulse needs to perform an fft on the audio stream which is O( n*log(n) ) and at 30 frames a second its expensive. I have thought about offloading the fft to the GPU using something like OpenCL (http://en.wikipedia.org/wiki/OpenCL) which might be able to cut the CPU load in half if it works! - Jun 09 2009
Is your comment directed specifically towards this screenlet because your point of view really applies to all screenlets as being worthless. The whole point of this concept is to be unobtrusive. There is no reason to have Impulse in your face all the time since it is just something cool and interesting rather than functional. And it all depends on how you set up your desktop and whether you keep windows always maximized or not. For instance I have a dock on the bottom and put Impulse in the bottom left corner. Even maximized windows do not cover that space where the dock, and Impulse, and another screenlet showing the current song being played are. And yes I think most people do like it, or are at least intrigued by it considering it is currently the highest rated submission on this website. So by odd, I assume you mean different and original? Free yourself from the constructs of the window... - May 28 2009
btw, thank you all for your appreciative comments of my work! I'm glad its being enjoyed. - May 25 2009
The colors can be made permanent, and you can remove already running impulses. These are not bugs with impulse but with screenlets. I have hacked a way to support customization by theme since they are all so different, global customization doesn't make sense. I would quit all four, then start them again. Whenever you select a different theme you have to close the options window before you try and edit the colors. - May 25 2009
So, it does work you just can't change it, right? If this is the case then there is probably no problem. Screenlets have this problem where you cannot click on semi-transparent pixels. Just really try and click on it, it will take a few times but you should get it. If you really still can't then let me know. - May 03 2009
That is strange. Is PulseAudio set up correctly and running on your machine? What distro are you using? - Apr 13 2009
Oh ok, Connection failure: Connection refused means that in the cimpulse module the PulseAudio context that was created failed to connect. Could you send me the output of "pactl list" for me. Its going to be long so it might be best to send me a private message. - Apr 13 2009
Oh ok, Connection failure: Connection refused means that in the cimpulse module the PulseAudio context that was created failed to connect. Could you send me the output of "pactl list" for me. Its going to be long so it might be best to send me a private message. - Apr 13 2009
Does the screenlet install? When you try and run it can you see it but it doesn't move or do you see nothing? Do you see any errors if you run it from a terminal? - Apr 13 2009
Hey guizmos, what version of screenlets are you using? I am using 0.1.2. I googled Error in screenlets.services.get_service_by_name and it seemed to come from older screenlets versions. - Apr 13 2009
hey dspencer82, I've been working on improving impulse. You can now switch themes but you cannot change the colors unless you edit the code. Menu's to change them will be in the next release. Just like any other screenlet if you click on it a gear and X button appear in the top right corner of the screenlet. If you click the X, the screenlet closes, if you click the gear, the options menu will appear, and that is where you can switch between the themes. Now it can be difficult to click on Impulse because you must click on a pixel that is not the desktop background for the icons to appear. This is a bug in screenlets. The icons should really appear when you hover over any screenlet, not by clicking a filled pixel. - Apr 13 2009
awesome! eventually i still want to make a version where you can select different versions, and also change the colors, ext. - Mar 10 2009
NOW Compatible with PulseAudio. After an hour of messing around Spectrolet now uses PusleAudio directly and not ESOUND. So there ya go! - Mar 09 2009
it is ready because I use the esound compatibility package with pulseaudio. You have to install the complatibility package as well as esound-clients (not esound-common, sorry my documentation was wrong). I am using esdmon which you probably don't have installed so now that you have esound compatibility installed you can install esound-clients and it should work with pulseaudio. I am hoping within a month I can find a way to use pulseaudio directly. - Mar 09 2009
In Ubuntu and Debian the package is called pulseaudio-esound-compat - Mar 08 2009
yea, realize esound is becoming depreciated and I will need to find a better alternative when i get the time to figure it out but i am on Ubuntu 8.10 and pulseaudio is the standard sound server for it. you can load a ESOUND compatibility module which is what i am doing that implements a compatible protocol for most all ESOUND compatible programs so esdmon is really monitoring the pulseaudio socket. - Mar 08 2009
Well there are two ways currently, if you enable "Move Window" compiz plugin then you can use alt + left click to move it where ever you want.

You can also edit line:
273: win.move( screen_rect.width / 2 - width / 2 + screen_rect.x, screen_rect.height / 2 - height / 2 + screen_rect.y )

and change it to:
273: win.move( screen_rect.width / 2 - width / 2 + screen_rect.x, screen_rect.height - height + screen_rect.y )
- Mar 03 2009
Will do, i am working on adding fourier transform option to visualize the frequency by power instead of visualizing the straight sound wave. I'll let you know about updates.

You can do anything you want with this without my permission as long as it abides by the GPL license , which is pretty much anything you want!

and thanks for appreciating my work! - Feb 23 2009
Well currently its just hardcoded, eventually i will have a theme, animation editor but if you want to change it, you can go into the code and change it on line 77:


77: cr.set_source_rgba( 0.0, 0.6, 1.0, 0.8 )


obviously the first number is red, second is green, third is blue, and fourth is alpha. if you only know the html (hex) color representation like #CC9966 you can convert that by entering it like:


77: cr.set_source_rgba( 0xCC / 255.0, 0x99 / 255.0, 0x66 / 255.0, 0.8 )
- Feb 22 2009
Try the new revision, Spectrolet 0.1a1r6. It should fix the problem you were having - Feb 21 2009
Hmm, that is because i'm guessing you are using compiz and have the Fading windows plugin enabled which dims unresponsive windows. I didn't have this enabled originally but with it enabled i now see the gray problem you are experiencing. This should be a simple fix in my code. I am assuming it is because I don't start gtk.main and instead am using my own loop. But anyway I will fix this and post the update today or tomorrow. - Feb 21 2009
Equinox GTK Engine

GTK2 Themes
by tiheum

Score 71.4%
9   Nov 27 2010