SRL Archive - Bugs

Beep Boop, WriteLn is a robot


Gu3st...

2014-03-07 07:28:47

// Step 1: Turn on your speakers, remember not to put the volume on 100%
// Step 2: Run this script
begin
writeLn(chr(7));
end.

Expected result: Your speakers will beep

Flight

2014-03-07 07:44:11

T-minus 2 days; Day1: learn to play sounds with string-writing command.

Gu3st...

2014-03-07 07:56:38

I guess this isn't really a bug after all, but still a pretty weird thing :p

Brandon

2014-03-07 09:22:21

http://www.asciitable.com/

0x07 is equivalent to "bell" aka system beep.

Pakyakkistan

2014-03-07 13:19:01

This is awesome! Having fun with this now, thanks for sharing your discovery! Might use it as an implement in detecting chat box text and use a system bell instead of having to use another sound(this just seems so much easier)

Foundry

2014-03-07 13:40:55

var
i: Integer;

begin
for i to 1000 do
begin
writeLn(chr(7));
case random(i) of
20: continue;
30: i := 0;
end;
wait(randomrange(random(150) + i, random(300) + i));
end;
end.

I made music :) Sort of hurts my ears though.

rj

2014-03-07 15:04:26

Am I the only one that can't hear it?

Sk1nyNerd

2014-03-07 15:48:13

From: Zyt3x
// Step 1: Turn on your speakers, remember to put the volume on 100%
// Step 2: Run this script
begin
writeLn(chr(7));
end.

Expected result: Your speakers will beep



From: Officer Barbrady
Am I the only one that can't hear it?


^^ :P

bg5

2014-03-09 12:07:23

Yea, I use it in my scripts when something goes wrong :P
writeln(#7); 

Sadly 'beep' is standarized so you can't modulate frequency to play different tones.

Coh3n

2014-03-09 12:54:00

From: bg5
Yea, I use it in my scripts when something goes wrong :P
writeln(#7); 

Sadly 'beep' is standarized so you can't modulate frequency to play different tones.
You can use PlaySound to play whatever .wav file you want. I usually just take sounds from C:/Windows/Media/.

bg5

2014-03-09 13:50:21

From: Coh3n
You can use PlaySound to play whatever .wav file you want. I usually just take sounds from C:/Windows/Media/.


I know, but playing melody on buzzer is quite fun:p