[Rhythmbox-devel] Python Plugin-LED Cube Visualizations

I build and sell RGB LED cubes. The newest version has a serial interface
that I would like to utilise using Rhythmbox. I know C, but I am using
Python (for the first time) as it is easier.

So far I have the plugin set up so it sends "Hello" over the serial port
when it is started and that works fine. What I need to do now is make it get
information on the sound being played, ie intensity, frequency, etc. Does
anyone know how to do that with Python?

There is no need for an actual UI besides enable/disable.

Here is what I have so far.

> import rhythmdb, rb
> import gobject, gtk
> import serial
> class SamplePython(rb.Plugin):
> 	def __init__(self):
> 		rb.Plugin.__init__(self)
> 	def activate(self, shell):
> 		print "activating sample python plugin"
> 		self.ser = serial.Serial('/dev/ttyS0', 115200, timeout=1)
> 		self.ser.write("hello")
> 	def deactivate(self, shell):
> 		print "deactivating sample python plugin"
> 		self.ser.close()

You can see the original version of the cube 
http://www.youtube.com/watch?v=_SO1J1kP3YQ here . And my website 
http://embeddedmicro.com Embedded Micro .

Justin Rajewski
View this message in context: http://www.nabble.com/Python-Plugin-LED-Cube-Visualizations-tp23117783p23117783.html
Sent from the Gnome - Rhythmbox - Dev mailing list archive at Nabble.com.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]