The timer interval is not a floating point value, it is in an integer. Fractional seconds aren’t allowed. In other words, you can’t make a timer fire off more than once per second.
If I make the interval any decimal fraction, e.g. .5, the code races through, making a low-pitched buzz.
I believe this is being rounded down to zero, so it is firing off over and over again as fast as it can. This is what causes the buzz.
.005*60
which I reasoned should give me about 3 beeps per minute
I’m not sure what your reasoning is – that evaluates to 0.3, or about 3 times per second. I’m not sure why that didn’t also give you a buzzing sound.
Even if fractional seconds were allowed, this feature would not really be very good for a metronome. It’s not designed to repeat precisely at a particular time for a musical application. If Panorama is busy doing something else when it’s time for the timer to fire, the timer won’t fire. So a 10 second timer could turn into 11, 12, or even 100 seconds.
The purpose of the timer feature is to allow background tasks to run periodically. For example, the Server Administration window uses a timer to periodically update the display of the server status. For that sort of application, it doesn’t really matter if timing is exact. And if a background task is running more than once per second, is it really a background task?
An application like a metronome is what’s called a “real time” task. There’s an entire speciality of programming devoted to that, which is used for video, audio, music, etc. Panorama is not designed for that sort of real time task.
You might be able to use the looping feature of the playsound statement to create a metronome. You would need a recording of one beat of a metronome which you could play over and over again. However, I’m not sure if the looping feature would be accurate enough for this application, but it could be worth a try.