Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Piano - a simple keyboard prog
#3
(02-22-2026, 12:25 AM)NakedApe Wrote: That's cool, Phil, and fun to noodle around with. I like the way you handle color and centering text in the program.

I tried re-writing your main loop. It adds a _LIMIT to slow things down.

Code: (Select All)
Do
    While _MouseInput: Wend
    MX = _MouseX: MY = _MouseY: MB = _MouseButton(1)
    DisplayTune
    If MB _AndAlso Not oldMB Then DealWithMouse '  using the Steve trick to limit the mouse click to one input
    oldMB = MB
    _Limit 30
    _Display
    If _KeyDown(27) Then System '  esc to exit
Loop

Yes, thanks NakedApe. That's a nice way to limit mouse clicks.  Didn't see that one from Steve; it's neat.  I've never used _AndAlso, I must have a play around with that.
Of all the places on Earth, and all the planets in the Universe, I'd rather live here (Perth, Western Australia.) Big Grin
Please visit my Website at: http://oldendayskids.blogspot.com/
Reply


Messages In This Thread
Piano - a simple keyboard prog - by PhilOfPerth - 02-21-2026, 11:30 PM
RE: Piano - a simple keyboard prog - by NakedApe - 02-22-2026, 12:25 AM
RE: Piano - a simple keyboard prog - by PhilOfPerth - 02-22-2026, 04:09 AM
RE: Piano - a simple keyboard prog - by bplus - 02-22-2026, 05:50 PM
RE: Piano - a simple keyboard prog - by Petr - 02-22-2026, 06:07 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)