You may want to try G-Trigger... Not too familiar with the app but it seems you might be able to use this to program the g-sensor to play your sound... Based on the post it works with media controls...
http://forum.xda-developers.com/showthread.php?t=494267
Yeah I know... It would be kind of a rig but if it works what the heck...