Sunday, November 28, 2010

Multimedia introduction

As a child, along with computers I was trying to develop some more “artistic” talents like playing music. I always wanted to learn playing the guitar and rock till the end. Along with guitar and bass, keyboards was really exciting too, and seemed to be easier playing. My parents bought me a small keyboard and I immediately started practicing using study guides and books. Later, they got me a teacher who was coming at my home and helped me develop some basic techniques through playing well-known classic songs.
It was amazing! I could make music! I could write my own music themes, and I could perform. Soon I realized that my computer could be a performer of music too. I thought that it would be a “perfect performer” playing music exactly as it is written on the music book. It could play the music I was “translating” in GW BASIC commands. It would follow my program flow and execute my commands, whatever my program was about, even playing music through that old and odd standard internal speaker. I should admit that listening to the music from my programs seemed perfect to my ears, even through that speaker.
It was then, when I learned that the music notes represent a different frequency, and there is an international code naming system using the first seven letters of the Latin alphabet.
The below table shows the correspondence of the common name, the Latin character, the frequency and the wavelength. (Source: http://www.phy.mtu.edu/~suits/notefreqs.html)
common name Note Frequency (Hz)Wavelength (cm)
doC016.352100.
reD018.351870.
miE020.601670.
faF021.831580.
solG024.501400.
laA027.501250.
siB030.871110.


I tried to remember (but I couldn’t) the command I was using to represent music in my programs. I just remembered that I was using the Latin characters and in some manner, using some numbers, I could declare the duration of each note. I finally googled it and I recalled the command was simply:
PLAY "edcdeee2dfedc4"
(example found at: http://en.wikipedia.org/wiki/GW-BASIC)
Later, I discovered that I could declare new sounds, out of the frequency ranges of the notes, using another command: SOUND. Following this idea, I discovered that this command was responsible for the sound of an explosion when playing the game with the gorillas, or, the sound of that primitive speech in some games, and any other sound effects. Next, I tried my first steps in the algorithmic art of music. Using loops, I created some cool sound effects similar to the simple sound effects of the games of that time.
It is a great experience to expand the possibilities of a tool. It is great to discover that there is one new distance in the tool you already use for some time now. So, I happily realized that the computer could not only output some characters on the screen, but it could also produce some audiovisual data!
It was then, when I realized that the games I was playing, have been written by programmers, not by magicians. I realized that I wanted to become one of them. Behind the graphics, the music, and the sound effects is hidden some pages of beautiful code (or ugly code :-)). Anyway, some lines of code could give some magic audiovisual moments to some people.
Later, I needed an upgrade of my computer and I bought a new 8-bit sound card, and real external speakers. I thought that my already written programs would be executed automatically now using the new equipment. And I was wrong.
Then I started to search and read my books about interacting with hardware. As I had no idea about the existence of the Internet to search for a solution, I had to find a good book. My parents let me order whatever book I needed from my already favorite bookstore, and then I first learned about the DMA (direct memory access) and IRQs (interrupt requests). When I studied some pages of code listings and found many hexadecimal numbers, I quited. I decided that first I could study some more mathematics, and some more computer hardware, and some more operating systems theory.
I was also advised to learn C programming language for better playing with the computer hardware programming. I was warned that it is a difficult programming language, but it is also the best. I knew that soon I would be studying C programming language step-by-step (Waite and Prata).