Besqueut:-
Outstanding work on the VB program. I've ran the exe loads of times now, and I can say confidently that set as it was when you sent it to me, it is 100% accurate at determining the vertical distance to the first pixel of target colour. I played it an animation of overtone analyzer's screen which I made in photoshop. Set to run at 30fps, the exe missed a lot of notes (each was set to be on screen for only 1 frame, ie .033 seconds.) But this is faster than the fastest 'grace notes' that I can play anyway. Resetting the frame rate to 20 fps produced a correct reading every time, no missed notes. It does lag behind by an average of about 0.1 seconds though (0.07 to 0.16 seconds.)
If it was possible to halve the lag to an average of about 0.04 seconds (ish) then , assuming there was minimal lag in the serial connection, picaxe code, and the lighting of the LED's (unlikely I know; but the leds seem to be instantaneous, so that's something.) it would be more than satisfactory ( a lot more). Even if not, it would be perfectly useable, but maybe would take a bit more getting used to when trying to play fast.
What are the chances of there being next to no lag in the serial connection and picaxe code? I dont know what to expect from it.
In order to take the load off the little picaxe, it would probably be good to quantise the '1st pixel of target colour' data into its 53 notes in VB rather than in the picaxe?
Can the exe as it is be made twice as fast? I think from what I can see in looking at form1 in notepad, it takes a screenshot of the whole screen, not just the 'slice?' Could the timer object be set for a shorter duration? (assuming there is one, as I said Visual Studio wouldnt open it. I couldnt get it to open in visual studio to look at the rest of it.
No problem if not, it works 99% straight out of the box.
The other thing it does is warn of an unhandled exception (arithmetic operation resulting in overflow); I attached it if its any help. It seems to carry on working while the dialogue box asking 'do you want to quit' (or something) is still on screen. If I opt to carry on, it works fine too, but the exception happens again shortly after. It happens regardless of whether there is any of the target colour on screen, btw.
Overall, very happy with it. Thanks!