Archive for the ‘Android Development’ Category

Android MediaPlayer looping issues.

Friday, June 19th, 2015

Looping isn’t seamless

I’m finding that some parts of the Android MediaPlayer are perhaps harder to work on.  I’ve been putting some code together to endlessly loop a short 30 second clip for the background of the Bloom project.

The code looks like this:

public class Background {
MediaPlayer mp1;

Background (Context con) {
mp1 = MediaPlayer.create(context, R.raw.soundsample1);

Play() {

The simplicity is breathtaking.  Create an instance of a MediaPlayer object in the constructor then when the user presses “play”, start the sound.  Nice.

The only problem is that there is a discernible gap between the end of the plays in the loop.  It’s about 8 hundredths of a second which isn’t much, but it annoys me and that’s all it takes.

Next up – my attempt to fix this through threading.

More later…

Building an Android Bloom

Friday, June 19th, 2015

Bloom is a generative music program written for the iPod, iPad and iTouch products.  I think it’s one of the coolest programs available, mostly because I seriously love Eno’s sense of ambient and the options available (Shuffle mood, Evolve when idle, etc).  When I press the screen it plays a note and draws a colored circle which expands while the note plays and fades.  This is similar to the tape-delay system introduced with Discreet Music and used in early versions of Frippertronics.


But this app has been available for the Apple for years so it doesn’t appear that the folks who created it have ambitions on the Android platform and other generative music programs just don’t create the environment like Bloom.  So, I’ve decided to try to write it for Android.

Having set this as a challenge to myself, I realize how many years it’s been since I’ve written code but Android development (and any development frankly) has come so far since the days of C++ coding with command line compilers, non-integrated source control and special math libraries, even an old man can put something together.  Maybe.