Finished with Simon. Please check it out

Finished with Simon. Please check it out
0

#1

My simon page is at:

 https://marcnshapiro.github.io/simon/index.html

Please take a look at it.

I started out using the Web Audio API, but had problems with it. My Android tablet just would not behave at all, using either Chrome, or Firefox. I would get one beep of sound, then it would go silent. Or I would get sound when the computer was playing the sequence, but not when I was repeating it. At first it seemed that Chrome was giving me similar problems on the desktop, but then it started to behave. I finally gave up on the Web API and used Audacity to create mp3 files each with a single frequency tone. The tablet was still silent.

I finally determined that Android handles taps like mouse clicks just fine. Mousedown and mouseup seem to be problematic. As near as I can tell the mousedown was not firing until I raised my finger, so the mouseup is fired immediately afterwards, which is a problem if you are trying to play a tone during the mouse press. I finally found ‘touchstart’ and ‘touchend’, so I added touchstart to the mousedown callback and that helped a lot. It works on the tablet as long as I don’t try to make the tone too long (maybe the mousedown is finally firing), but use a short, deliberate press. At one point it seemed to me that the callback was firing twice, once for the mousedown and once for the touchstart. I don’t think I ever solved that one, so that could be the cause of the finickiness of the tablet for this game. It works just fine with all of my other projects.

Anyway, I hope I haven’t bored anyone too much, but maybe my experiece can help someone else having similar problems.

I found a good site with information on the Simon games, including the actual frequencies used, as well as the intended frequencies. I used the intended frequencies, which are the four primary bugle notes. The site can be found at:

 http://www.waitingforfriday.com/index.php/Reverse_engineering_an_MB_Electronic_Simon_game

I hope this helps someone.