Phunky

App Image

 Download Latest Version 

This application uses:
Bugsound Bugmotion 
   October 8th, 2008   ·   3031 views  /  3954 downloads

Admin Administrators: Bug Labs teamfinsprings
Collaborator Collaborators: Bug Labs teamkgilmer, Bug Labs teamjconnolly

Category: Games/Fun    Maturity: Beta    API version: not specified
Tags: BUGMotion  BUGAudio 

R1.4 ONLY: Tested with bug-image-production-bug-20081231023422.rootfs.ext3 and zImage-2.6.27.2+svnr7773-bug-20081231020035 with BUGmotion in slot 0 and BUGaudio in slot 1.

Rewritten from scratch to use IAudioPlayer interface. The app now reads in 3 samples for each of the X, Y and Z axes at startup from its resource bundle. It then chooses between them at runtime based on the accelerometer input given to it via its update() method.

The accelerometer readings determine which sample will be used for each axis and the chosen three are then “mixed” and used as what’s played.

Thus by moving the BUGbase you can change the sound that’s being played.

The samples provided were generated in Hydrogen
However, it’s easy to replace them with your own if you like. If you look at the constructor for the SampleStream class you will see 9 lines loading in the existing samples, such as cowbell.raw. If you expand the Phunky application in Eclipse you will see a folder called resources. In there you will find the existing samples. Just put your own sample files in there, change SampleStream’s constructor to load them instead of the default ones and redeploy the application to your BUG.

Keep in mind that the BUG isn’t a desktop computer, so you probably want to remove the existing samples before you redeploy, and you will want to keep your samples on the small side.

The new samples should all be raw 44.1kHz 16-bit samples, stereo, little-endian. You can create a WAV file in that format and use something like sox to make it into a raw file (“sox foo.wav foo.raw” will do it).

(BUGaudio supports other formats but the list wasn’t available at the time of this writing.)


Download Download Latest Version

Version Date Uploaded by Notes  
Version 12 March 16th, 2009 finsprings  (1.0.6 in manifest) Added retry logic for when the accelerometer... (more) (1.0.6 in manifest) Added retry logic for when the accelerometer input stream can't get a sample; previously it would treat this as a fatal error and shutdown. (collapse) download
Version 10 February 5th, 2009 jconnolly  changed service string to com.buglabs.bug.module.audio.pub.IModuleAudioPlayer (more) changed service string to com.buglabs.bug.module.audio.pub.IModuleAudioPlayer (collapse) download
Version 9 February 5th, 2009 jconnolly  (more) (collapse) download
Version 8 February 5th, 2009 jconnolly  (more) (collapse) download
Version 7 February 5th, 2009 jconnolly  Changed references to IAudioPlayer to new IModuleAudioPlayer. (more) Changed references to IAudioPlayer to new IModuleAudioPlayer. (collapse) download
Version 6 January 2nd, 2009 finsprings  Fixed mixer and changed samples to all percussion. (more) Fixed mixer and changed samples to all percussion. (collapse) download
Version 5 December 31st, 2008 finsprings  Restrict sample changing to every 4 bits (previous fix was... (more) Restrict sample changing to every 4 bits (previous fix was every 2) since the sample data is stereo so there are 2 16-bit samples that go together. (collapse) download
Version 4 December 31st, 2008 finsprings  Prevent it from switch streams mid-sample, since we return 8-bits... (more) Prevent it from switch streams mid-sample, since we return 8-bits at a time but samples are 16-bit. (collapse) download
Version 3 December 31st, 2008 finsprings  Now uses IAudioPlayer (more) Now uses IAudioPlayer (collapse) download
Version 2 December 23rd, 2008 finsprings  ? (more) ? (collapse) download
Version 1 October 8th, 2008 finsprings  original (and basically useless) bugbeep version (more) original (and basically useless) bugbeep version (collapse) download

This application is licensed under the MIT license agreements.

Viewing Phunky   Link