Pages

Sunday, 23 January 2011

The music player I'd like along the running trail..

I do it in periods. Sometimes several times a week, sometimes just once in a while. I am thinking of running. Mostly the procedure is the same. I start the phone tracker software and the music player with Rockbox, tries to remember to start with some easy warm up, do the exercise and if I can I will make some spurting at the end. I started running as exercise when I realized I can listen to music along the way. No music - no running. No can do.

Along the trail when the endorphins start coming to me I usually becomes very creative, after shower I have forgotten most of it :(
 
Any how I have had this idea of a runners music player or perhaps exercisers music player. Music is an important part of my exercise and I can really feel how the musical power helps me give that little extra. There is nothing so good as the perfect song during the end spurt. During the trail I like to have mixed music, some powerful and some a little bit softer making me slow down.

The obvious solution for my needs would be a music player where the music follows the characteristics of the exercise. Say I compile several play-lists, one for warm up, one for the trail, one for the spurting, one for the calm down and stretching. I will then need a mechanism to switch play list as the characteristics of the exercise is changed or about to change. To further support the situation, the switch will be instant, and the play-list will be allowed to have a starting position and a end position for each song so that my spurting is not started in an long soft intro to an otherwise heavy tune.

Naturally the player keeps the position in the play lists as I switch between them and when I switch back it continues where I left it.

If tracking is enabled the music, switching the play lists, pause music, receiving phone calls, and other important events is tracked as well.

As usual I have made a UML model for the system over view; the main use cases, the domain objects and a requirements. The requirements symbol is not a UML symbol I seen elsewhere but it is used in Enterprise Architect  from Sparx Systems which is the design tool I am using. 


The user may listen to music during exercise and may track the path. If enabled, when passing a given way-point with certain conditions (e.g. second time, passing in south direction) the system (here modeled as an actor) will switch play-list for you. 


Tracking of songs, path, play list switching may or may not be used. 


Naturally the music may be normalized - it is very annoying to break the focus to adjust the volume.



Saturday, 15 January 2011

Exploring Andoid

Now when I have two droids, a phone and a MP3 player, I spent some effort to play with Android development the other day. I am in deep need of a audio book player that will not mix my huge amount of audio books with the music, and that will not have easily accessible functions like next track as I only use them unintentionally (frustration!). Android comes with some nice design features that I think have been "concepts in mind" or "slideware" since the 90:s but Google have implemented just nice.

I am talking about the Intents and Activities.

From my point of view (mainly Qt development in C++ when it comes to end user applications) I compare the Activity with a full screen dialog with a special purpose. This is not really the same as an ordinary main window; activities is expected to come with an intention - the Intents. The intents describes the intention of an Activity.

So far nothing special. I design my main window as an activity and next thing is to open an audio file from the book. Now I need to start another activity where I can browse files. At the first glans I though this to be an easy task. Then I stumbled on the Intent and things got complicated. After some reading everything turned impressed instead.

Here goes:
The framework is built so when I need to have something done I find the corresponding Intent (i.e. PickFile in my case) and ask for an activity that will provide me with that intended function. The system will try to match this and if there are alternatives, the user will be asked to chose. The proposed way to make sure I have my own Activity started is to create an unique Intent identifier and fire it of.

So, why is this really cool?
Take a look at http://www.openintents.org/. There you have a database of intents and can download or purchase the module supplying the activity. This means that using Intents you can use and resue, not only open source code by copying it into you application, but you can use closed source modules as well.

Experimenting with Intents
and Activities as Use Cases
I like to express my self using UML or other graphical notations. I started to experiment how to model my Audiobook player (named Narrator and have a yet empty project page at http://gitorious.org/narrator ) using intents. The figure shows how I ended up modelling the Intents as existing and reusable Use Cases. This is the point when I really start liking the concept; it really enables software reuse rather than code reuse. Use Case reuse is on a higher level than code reuse and I think that it is on this level reuse must be made if to make sense. This way I will be reasonable flexible with the requirements around the use case Open File thus allow for alternative solutions.

Thursday, 13 January 2011

Welcome!

My technology blog is born!

Right now I trying out different backgrounds and spend my time being annoyed that Google cannot read out the default language settings for the spell checker.