More Fun With ImpAmp

After another afternoon of playing with impAmp, I have updated the version of soundmanager2. This versions main addition is the ability to use flash 9 (instead of the current flash 8). Unfortunately when using flash 9, the ID3 Tag information doesn’t show so is not enabled by default at the moment.

In anticipation of flash 9 working, I added multiShot support. MultiShot is where you can overlay the same sound effect on top of itself, ie with a gunshot you can set 3 shots off in a row without having to wait for the previous shot to finish. This will be useful for short sound effects but for music etc, I will leave the default that pressing the play again will stop the sound. I have implemented it however there is still another bug when using flash 9 apart form the missing id3 tags mentioned earlier. When you have sounds overlayed on top of each other, stopAll (pressing space) only stops the first of the overlayed sounds (so it doesn’t actually stop all)

Another feature I added this afternoon was the properties window. To access the properties window, hold down CTRL and click on a button. This will display a window including information about the sound clip. There is a bug where sometimes not all the information is shown. This appears to happen when the sound has been stopped. So if a song has not been played since the last refresh or if it is currently playing, it shows all the information. Not too sure how I am going to fix this, but I’ll find a way.

Also whilst creating the properties window I noticed a bug whereby the keyboard would become unresponsive. This is to do with the way the keyboard is disabled whilst ctrl is being pressed. To fix, just tap ctrl again. I’ll try to find a proper fix at some point.

EDIT – Fixed simply add
onfocus=”mpc.disableKeys = false;”
to the <body> tag in the index.html file

All my changes have been uploaded to launchpad and can be downloaded from the trunk:
bzr branch lp:impamp

ImpAmp on the eeePC

So I am sitting at an athletics event using my eeePC in the sun. The Mat finished screen makes life much easier to see than with the glossy screen Kaylee had.

I decided to try ImpAmp out using the default xandros operating system and it works great (as expected) the eeePC comes with firefox and flash installed and whilst the usual flash instalation error was seen, it was quickly fixed.

using the small screen is fine, the width is automaticaly adjusted and the hight fits the screen perfecaly when using full screen.

onKeydown without activating firefox quick search

Whilst working on ImpAmp, I was attempting to catch when the user typed ‘ or / into the window without activating the firefox quick search. After hunting around on the web, I found lots of places telling me how to deactivate it permanently which is not what I want. Normally I find it very useful, just not when running ImpAmp. The solution that I found involved typing into a text-box. The quick search is disabled when typing in a form yet onkeydown still accepts the input. So I created a form at the bottom of my page:

<form action=”javascript:void(0);” method=”get” id=”hiddenForm” >

  <p><input type=”text” name=”in” value=”" id=”theBox” /></p>

</form>

I had tried to make the box hidden but then the box couldn’t gain focus and failed to work completely. Insted, I applied some css so the user wouldn’t notice it. this throws the form throwing it of the screen.

#hiddenForm {

 position:absolute;

 left:-999px;

 top:-999px;

}

So this method worked nicely until the input box loses focus. To ensure the box retains focus, add a function called by onkeyup which refocuses on the input box. I was also worried that the box might fill up, so I added another command that will empty the box.

document.onkeyup = function keyPress(event) {

    document.getElementById(‘theBox’).focus();

    document.getElementById(‘theBox’).value=”;

}