Welcome, guest | Sign In | My Account | Store | Cart

Do you remember the Bomb-Out icon(s) that appeared on some computers' SW and HW many years ago...

Well this is a matching sound to go with it and can be used as a critical error sound.

It sounds like a bomb being dropped from an aeroplane and is purely a shell sript only.

It is set up to run SOund eXchange, SOX, but just by editing the code "/dev/dsp" can be used instead.

Read the code for more informastion.

Enjoy...

Bazza...

Bash, 48 lines
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash --posix
#
# Generate a fun bomb-out sound using SOX and /dev/dsp...
# $VER: bomb.sh_Version_1.00.00_(C)2013_B.Walker_G0LCU.
#
# This is now Public Domain and ypu may do with as you please...
#
# Tested on a Macbook Pro 13" OSX 10.7.5, using SOX.
# Tested on Debian Linux 6.0.x, using /dev/dsp
# Tesetd on PCLinuxOS 2009, using /dev/dsp.
m=0
n=0
waveform="\\xA0\\xA0\\xA0\\x60\\x60\\x60"
# Initialise the waveform.raw file length to zero.
> /tmp/waveform.raw
# Generate the high start sound.
for m in $( seq 0 1 50 )
do
	printf "$waveform" >> /tmp/waveform.raw
done
# Now build up the waveform by adding the correct byte values at the end first then the beginning last.
for n in $( seq 0 1 15 )
do
	# Add the correct byte at the end, append the file, looping a few times...
	waveform="$waveform\\x60"
	for m in $( seq 0 1 10 )
	do
		printf "$waveform" >> /tmp/waveform.raw
	done
	# Now add the correct byte at the beginning, append the file, looping a few times...
	waveform="\\xA0$waveform"
	for m in $( seq 0 1 5 )
	do
		printf "$waveform" >> /tmp/waveform.raw
	done
done
# Now generate a crude explosion...
dd if=/dev/urandom of=/tmp/explosion.raw bs=8000 count=1
# Append to the waveform.raw file...
cat /tmp/explosion.raw >> /tmp/waveform.raw
# Now play back a single run of the raw data using SOX.
# IMPORTANT! Change the path to suit your SOX path...
/Users/barrywalker/Downloads/sox-14.4.0/play -b 8 -r 8000 -e unsigned-integer /tmp/waveform.raw
# A version for /dev/dsp too.
# cat /tmp/waveform.raw > /dev/dsp
#
# DEMO bomb.sh end.
# Enjoy finding simple solutions to often very difficult problems...

This is a FUN error sound only using nothing but bash shell scripting...

Enjoy...

Bazza, G0LCU.

2 comments

hadi moussavi 6 years, 3 months ago  # | flag

Sorry I am a beginner , I run this but no sound. Am i suppose to run this within another program?

thanks

Hadi

Barry Walker (author) 6 years, 3 months ago  # | flag

Hi Hadi...

1) SOund eXchange must be installed for this to work UNLESS your machine has the device /dev/dsp as part of its audio... 2) Once SOX is installed the full path in the code needs to be changed to your installation path. 3) If you have /dev/dsp then comment out line 43 AND uncomment line 45. 4) Give the file a name, example - bombout.sh 4) Ensure you change the access permissions of this shell file and manually run from the default terminal program of your *NIX based machine and the directory where this file exists as:-

Your Prompt> bombout.sh<RETURN>

Where <RETURN> is the return key and it will give a fun error sound...