Skip to main content

Posts about work (old posts, page 2)

MEWER 0.3

The third public test of MEWER is online. This displays the metronome in javascript. There's still some slight drifting with the tempo, but nothing anywhere close to flash. Try it here: MEWER 0.3.

I've also made it a bit harder, although it still doesn't check to see if you've passed the first exercise before giving you the second one. That'll happen in the next major version... as long as the timing works better for people in this version.

Flash timing code is fail

Yesterday's test was a great success -- in that the test discovered a huge flaw in the program. Or rather, it found a huge flaw in the platform: the Timer object in Flash is horribly inaccurate.

I'm not a complete idiot -- I did some initial tests with flash before spending ten hours writing that public test. Specifically, I ensured that the clap-detection functionality was accurate enough. It wasn't perfect (my physical metronome varied by 5 ms... although to be fair to flash, it's possible that the metronome itself was varying), but it was good enough.

However, I didn't test that flash could make a light blink to within 5 ms. In retrospect, I should have. But it never occurred to me that it would be a problem.

(and yes, it took almost all my willpower to avoid using "flash" as a verb in the previous paragraph)

You can test it for yourself on your own computer: Metronome test

On my system, a modest dual-2.0 Ghz macbook running OSX 10.4.11, half the time I get a maximum delay of about 40ms, and half the time it spikes up to over 200ms. That's totally unacceptable for a metronome -- especially when I'm going to be grading students on their clapping ability. The whole point of this program, and my Master's thesis in general, is that computers can provide objective, accurate, and above all, trust-worth grading. If students can't trust that the computer grades are accurate (at least to 5%), the program will be a pathetic toy rather than an educational aid. And we have more than enough pathetic toys masquerading as educational tools (or "edutainment").

Note that the above test is only timing the Timer class. I'm not doing anything else here -- adding other stuff (like listening to claps + key presses, drawing flashing lights, etc) can only make it worse.

So what now? I can think of one last thing to try: display the metronome as an animated gif on the web page. Haxe can pass information ("remoting") to other programs. So the flash game will tell a javascript program to display an animated gif (or svg/mng, if Internet Exporer has finally caught up 1999/2001) on the HTML page.

Yeah, that's quite a bit of duct tape, even for me. But what's the alternative? Abandon 90% of potential MEAWS users by ignoring Windows? Spending a week setting up a development environment on windows so that I can compile it? Neither of those options are particularly appealing. :(

Anyway, thank you to everybody who tried the past version. I'll hopefully have this duct-tape flash+javascript+gif stuff ready for testing within 24 hours.

MEWER

The rhythm game looks like it'll work in flash. It's tentatively called MEWER, although I haven't figured out what this will be an acronym for.

Right now I'd like to check that it works on a wide range of computers. I, of course, don't have a wide range of computers myself, so I therefore turn to the internets for help. If you wouldn't mind spending two minutes, please test the rhythm test.

Just go there, enable microphone and clap, or disable microphone and hit the space bar. It only has 2 exercises at the moment, and it doesn't even check that you passed the first exercise before giving you the second, but that's plenty for me to know whether it's worth programming the rest of it.

Score: I'm a cellist, so I consistently get above 95%. If you're a singer, you're probably lucky to get above 50%. :P Other instruments will fall somewhere in between those. (singers: go ahead and try to prove me wrong by posting your scores on my blog. It will be good practice for when I put the real exercises on MEWER. These two exercises are from levels 1 and 3 out of 10.)

Update: MEWER for flash 7.