Is there a way to disable the bell sound? (in the IDE)

Hi,

I tried to google but the words that came to my mind “notification alarm”, “bell sound”, etc. all link to standard tutorials with an alarm clock in it or a bell that chimes but NOT what I want. ^^ So let’s try here (again). If I do something like this:

"Input Loop Test" by HtF

TestRoom is a room.

TestReply is a number that varies. TestReply is 0;

When play begins:
	say "Choose 1,2 or 0? ";
	let x be the response of the player;
	say "[x]";
	end the story.
	

To decide which number is the response of the player: (- (YesOrNoKey()) -).
 
Include (-
[ YesOrNoKey ch;
	do { ch = VM_KeyChar(); } until (ch == '1' or '2' or '0');
	return ch;
]; -).

or use “pause the game” provided by Emily Short, there is always this nasty sound as soon as you hit the key which reminds me of the “bell sound” (CTRL-G) on a terminal. Is there a way to disable that terribly annoying sound? I mean - it would be ok if the player hits the wrong key but that sound plays even when the correct key is being hit … ack!

What interpreter are you using?

Oh, drat! I should have been more specific - I mean the Inform 7 IDE itself. I use wingit and it’s completely silent there. But the IDE keeps making this ugly noise.

Edit: Edited the topic so the intention is clearer

I can’t help, I’m afraid — the Inform IDE has never beeped at me.

But I notice that your code shows up an Inform bug. If I RESTART after pressing one of the magic keys (say ‘1’), then I get the same prompt as before; but this time VM_KeyChar() does not prevent key-presses from showing up at the command line.

(I amended “return ch;” to “return ch - 48;” in your code to get the correct characters to print.)

I wonder whether this would this be a bug in VM_KeyChar(), or in the actual restart routine?

(I tried replacing “end the story” with a direct call to I6 @restart, but it threw up the same problem.)

I get these beeps when I run my soundtest in the Windows Inform 7 IDE, but not in the macOS IDE or in any other interpreter I’ve tried.

When running the AUTOTEST command, it beeps every time you advance the test by pressing any button other than Esc (key code -8, which cancels). It seems to have something to do with VM_KeyChar().

This is the routine which causes the beep:[ MyPause key; key = VM_KeyChar(); if ( key == -4 or -5 or -10 or -11 or -12 or -13 ) { HandleGlkEvent(); } if (key == -8) { print "^^Cancelled.^"; } return key; ];
EDIT: Cleaned up embarrassingly sloppy code sample.

It doesn’t happen in the MacOS IDE, Lectrote, or Gargoyle, so I say it’s a WinGlk bug.

Ah, I have a Mac in my studio for recording purposes … I guess I can try to test there. If the sound’s not playing there I could write/test on that via Xterm ^^

My guess is that the beeping has something to do with having a call to VM_KeyChar() immediately follow another call to VM_KeyChar(). But yes, likely a bug in the Windows IDE interpreter.