Change Audio Source Index and Peak Speed for Impulse Screenlet for Linux
Change Audio Source Index and Peak Speed for Impulse Screenlet for Linux
Change Audio Source Index and Peak Speed for Impulse Screenlet for Linux
Change Audio Source Index and Peak Speed for Impulse Screenlet for Linux
The Impulse Screenlet is an awesome looking widget to put on your Linux desktop. Impulse is a graphical spectrum analyzer for your audio sources. However I had some small issues with the widget when I first installed the screenlet.

First, I found that the audio source index is not always persistent after computer shut downs and start ups. This means that your audio may come from Channel 1 like mine, whereas Impulse defaults at Channel 0. It was a bit cumbersome to activate the "Properties" menu every time I wanted to set the index right after start up.

Second, I have a dual monitor setup, and I have 1 Impulse widget across for each screen. However, whenever I create multiple instances of the screenlet, the peak of the widget will move much faster. This may not sound like a big deal, but it's not nearly as aesthetically pleasing. Before now, I used to have 4 instances of the Impulse, which caused the peak bars to travel even faster. It didn't have the nice, pleasing throb to the beat as it did with 1 instance.

Sifting through the code, I found that manipulation of 2 parameters in the source code will fix these minor issues.

Before installing Impulse to the Screenlets program, open the Impulse tarball you downloaded by double clicking it. You can download Impulse here:
http://screenlets.org/index.php/Impulse

Then open the Impulse folder up. Open up the "ImpulseScreenlet.py" file with gedit. Change the audio source index to the value which your audio outputs. It is 0 for default. Mine is 1. If you are unsure of which source index yours is, you will have to install the
Impulse screenlet temporarily; activate an instance of it, and test the audio source index option to see if the Impulse monitors your audio output. You will have to open the properties window of Impulse, and find where it asks you for the source index (picture 3). After you do this, uninstall the Impulse.

Save the file. Close the window. Now for the peak speed.

In the Impulse tarball, open up the "themes" folder and select "default". Open up the _init_.py file here in gedit. Find the code shown in picture 4, and adjust the peak_acceleration to your taste. As default, it is set to .1, and this looks good for 1 instance of Impulse. For more instances the acceleration will be too quick and won't be as graphically pleasing. I'm not sure why it does this; I'm not a great coder. I have thought that .01 looks fine for 2 instances. If you want more instances, you will have to make this value even smaller.

Save the file. Close the window. Install the Impulse tarball to the Screenlets program. Notice when you activate one single instance of the Impulse, the peak bars will probably move very slowly. Activate another instance and you'll see it'll speed right up. Also take note that your audio source index will automatically be set to yours.

Enjoy the Impulse!
 
 

Tag cloud

make build easy simple arduino making homemade solar laser printed portable cheap mini building custom cardboard wooden create super lego turn paracord chocolate your paper light intel