Experimenting with Adobe AIR and jQuery – Part 1

A few days ago, I was at a TOP-100 party, where the dj’s played their 100 most favorite songs. The venue had a few large screens, that showed the number, the artist and the title of each song.
It looked like this:

Whenever the next song started, the new number, artist and title would appear, using some standard PowerPoint-like animation (wipes, blinds, checkerboard, …).

Trying to build something myself seemed like a nice opportunity to experiment with Adobe AIR and jQuery.

  • Adobe AIR is a framework to build rich Internet applications that run on the desktop.
  • jQuery is a “fast, concise, JavaScript Library that simplifies how you traverse HTML documents, handle events, perform animations, and add Ajax interactions to your web pages”.

I am a heavy DreamWeaver user, so I had downloaded the Adobe AIR extension for Dreamweaver before. I had worked through the “Hello World” Getting Started demo successfully, but I hadn’t gone further with AIR yet, as I did not have a good experiment in mind. This TOP-100 app would change that.

The first step was to create an AIR application that would simply display the 3 elements on a screen: a number, an artist and a title.

The first step is to create a Site in DreamWeaver. I created the site “Top100” and a new file “step1.html” in it. I added the 3 elements and used some CSS to make it look like the example. This is the code:

The result in a browser was:

which looked pretty much like I wanted it.

The next step was to make this screen show in an AIR application. I will explain how that went in part 2.


♦ Related files: step1.html

Share

Dj stuff

2 weeks without updates, I should be ashamed 🙂
My new toy (the Behringer BCD-2000) is partly to blame, because a new version of the B-DJ software was released.

So I played with it again for a while, and I ran into the issue of inconsistent volume levels of my MP3-collection: some mp3’s sound a lot louder than others.

After some ‘googling’, I found a fantastic open-source program to adjust mp3 files so that they have the same volume: MP3Gain. This little piece of software is super! The changes MP3Gain makes are completely lossless, because it adjusts the mp3 file directly, without decoding and re-encoding: the mp3 format stores the sound information in small chunks called “frames”. Each frame represents a fraction of a second of sound. In each frame there is a “global gain” field. This field is an 8-bit integer (so its value can be a whole number from 0 to 255). MP3Gain analyzes the song, and then adapts this value without touching the rest of the mp3 information.

Better yet, MP3Gain does not do a simple peak normalization but it analyzes mp3 files to determine how loud they sound to the human ear. It can then adjust the mp3 files so that they all have the same loudness. This is based on the Replay Gain algorithm (detailed information).

Probably best of all: MP3Gain is completely freeware. No registration, no time limits, no disabled features, no annoying pop-up messages, or anything like that.

Share