dijous, de novembre 23, 2006

A metronome. Something already related to the expected results

The next step has been to program a software metronom. At this moment I have succeeded in make a very simple metronome nearly without GUI.

I have used the Player class in the MMAPI (Multimedia API) and a little MIDI file to ensure a given tempo (in this case 60bpm).

For now the midlet plays the MIDI file continuosly and I can increase or rate the tempo (with RateControl) having a metronome effect which is quite effective. At the same time I write the bpms in the screen.

The next step will be to make a better GUI showing in some visual way the evolution of the metronome (like in a real one). And I have to arrange too the way in which the changes in tempo are made (not very exact till now).

My first MIDlets

So I have started to do my own (more or less) midlets. The basis for that has been firstly the templates provided for that by Mr. Kaltenbrunner and from a given moment the permament reading of the j2me api, which even being a reduced set of java api, is still quite extense.

The first little MIDlet I've done is a "piano" for the mobile. In other words, when you press a key, it plays a note (from 1 to 7). If you press 8 or 0 it increases or decreases an octave, and if you press the sharp button, the note will increase a semitone. Very simple, but it works! The first I got to make.

Object Oriented Programming

Two months of starting nearly from scratch with Java have been very useful to get the nuts of this language. The course at the UOC is taking me lots of time, but I thing it's accomplishing what I wanted from it.

So I've been programming some easy applications and making several exercices and at this moment I feel like I can start with my mobile applications.

The Java course hasn't still finished but now I already know how to use a Vector!

Getting used to Java and OOP

At first, I tried to start programming directly little midlets starting from templates (courtesy of the fantastic resources in Martin Kaltenbrunner's page). This seems easy at the beginning, but soon I realized that I didn't know enough Java to have success in this way. In a given moment I found myself stuck with the Vector class in Java. It's easy when you have been some time in Java, but very confusing if you don't know anyhing about objecte...

So, I decided to take a course on Java Oriented Programming in the UOC (Open University of Catalonia) which is being very useful to get the fundamental skills about this Object-things.