More on BEEP
Well, today I had a few minutes, and so I went of in search of a more complete solution.
As you may remember, one of the issues was that the beep control sequence, was only understood by devc-con when it was running QNX4 Terminal emulation mode, which is not the default.
I was telling this to my colleague, Peterv, and he said – well just emit the code to switch to QNX emulation and back.
Well, it was one of those ‘Duh’ moments. :-)
Of course, the fun part was figuring out the codes to emit. I couldn’t find a decent doc of the QNX4 Terminal Emulator codes, and the ANSI code to switch to QNX4 was a private vendor extension.
After a bit of mucking around though, I figured it out…
The Dark Majik
And yeah shall chant…
#!/bin/sh # switch to QNX4 emulation printf "%c[?+q" 0x1b # set beep tick count = 1, frequency divider to 1 printf "%cs%c%c%c" 0x1b 33 33 32 # switch back to ANSI emulation printf "%c?1+q" 0x1b
Now, make sure you put this output to /dev/con1, because that is the device that actually talks to the PC beep port. Photon pterm terminals do understand these codes, but they just send a bell character to /dev/con1!
Enjoy a beepless world, my friends.
BTW – you can muck around with the parameters. You might find you like a beep but just a bit shorter – each tick is 50ms.