Use Groovesharks JS API from a Chrome Extension

While writing a Chrome extension to control Grooveshark, I was excited to find out they offered a javascript API, but that excitement quickly faded when I realized Chrome’s sandbox wouldn’t let me touch it.  The existing solution to this is to create script tags and inject them into the page.  This works, except it’s a little messy, and doesn’t work for any function with a return value.

I wrote a quick proxy that mirrors their api, using the ‘GroovesharkProxy’ object instead of the ‘Grooveshark’ object.

Instead of
window.Grooveshark.next();
you call
GroovesharkProxy.next(); // from your extension’s content script.

You can still call any of the methods they support, and even get return values.  If anything’s broken let me know (or submit a patch!).

Find it here: https://github.com/msfeldstein/Grooveshark-Chrome-Extension-Proxy

MacroMeez Visuals Released (alpha)

Download!

So I’ve been working on this system for controlling visuals with a PS3 controller for a while now, and I finally have it in a workable shareable state.  This is the visuals system I used to VJ Heart Deco’s party at burning man.  I’m going to polish this up to be a real app, but for now I wanted to share it with people to just get some feedback. It also has a control panel for those without ps3 controllers.

The basic idea is to have a set of compositions that you can cycle through, and use the ps3 controller to control parameters of the compositions, and effects applied to them.

Special thanks to Love and Light for making the badass jams to work on this with.  http://soundcloud.com/love-and-light

Controls are:
Start: Next composition
X: Freak Out (usually just makes it cycle through colors quickly)
Square: Apply city lights effect
Triangle: Max out audio for comps that use audio inputs.  This button kind of sucks and will be replaced with another effect.
Circle: Switch modes.  Most comps have multiple modes that they can cycle through with this button.
L1: Blur horizontally
L2: Trails
R1: Wobble
R2: Invert Color
Left Stick Y Axis: Feedback image in or out
Right Stick Y Axis: Feedback image rotation
Click Right Stick: Toggle Mirroring
DPad Up: Tap out BPM.  This feature is kind of broken, you need to hold down select and press up to reset it, then tap up 4 times to set the bpm.  I will have a much better solution to this soon.

Let me know what you think!

Exampes: