On the first floor of a two story house in Longmont, Colorado, we collected background radiation data with a GQ GMC-320 Plus geiger counter.
We acquired the data on a laptop by connecting the GMC-320 Plus to it via USB then running on the command line:
./serialgmc320log /dev/ttyUSB1 > d20250104.dat
Links to the software that we wrote for this project can be found at the bottom of the page.
The data acquisition took about a day and a half, which produced 124921 lines, one line per second. This amounts to 34.7 hours of data.
Count per second statistics were produced using an awk script:
awk -f gmc320.awk d20250104.dat
The results are:
pattern | count | probability |
---|---|---|
0 | 82999 | 0.664412 |
1 | 34345 | 0.274934 |
2 | 6667 | 0.053370 |
3 | 818 | 0.006548 |
4 | 83 | 0.000664 |
5 | 9 | 0.000072 |
6 | 0 | 0.000000 |
The sum of the counts in the table is 124921, which matches the number of data points in the file, so there are no anomalies. The average clicks per second is 0.4043.
Clicks/second bigram (patterns of length 2) counts were generated with command:
./bigram 6 d20250104.dat
Resulting in:
0 | 1 | 2 | 3 | 4 | 5 | |
---|---|---|---|---|---|---|
0 | 55071 | 22890 | 4436 | 536 | 59 | 7 |
1 | 22863 | 9382 | 1842 | 234 | 22 | 2 |
2 | 4450 | 1830 | 345 | 40 | 2 | 0 |
3 | 551 | 220 | 39 | 7 | 0 | 0 |
4 | 58 | 19 | 5 | 1 | 0 | 0 |
5 | 5 | 4 | 0 | 0 | 0 | 0 |
Converting clicks/sec to clicks/min with command:
awk -f cpm.awk d20250104.dat > d20250104cpm.dat
Results in a data file containing 2082 points whose values range
from 11 to 43.
We wanted to create music from this data, so we subtract 11 from
every data point to take the range down from [11...43], to [0...32].
This was done with another awk script, run with command:
awk -f sub11.awk d20250104cpm.dat > d20250104sub11.dat
The resulting file containing data in the range 0 to 32 was then
used to map the almost 3 dozen integers to 3 consecutive octaves
of the 12 chords in the circle of major triads. This was done with command:
awk -f int2triads.awk d20250104mod13.dat > d20250104triads.dat
where the essence of the awk script int2triads.awk consists of
the following mapping:
Integer | Triad (abc notation) |
---|---|
0 | [_BG_E] |
1 | [FD_B] |
2 | [CAF] |
3 | [GEC] |
4 | [DBG] |
5 | [A^FD] |
6 | [E^CA] |
7 | [B^GE] |
8 | [^F^DB] |
9 | [^C^A^F] |
10 | [_AF_D] |
11 | [_EC_A] |
12 | [_bg_e] |
13 | [fd_b] |
14 | [caf] |
15 | [gec] |
16 | [dbg] |
17 | [a^fd] |
18 | [e^ca] |
19 | [b^ge] |
20 | [^f^db] |
21 | [^c^a^f] |
22 | [_af_d] |
23 | [_ec_a] |
24 | [_b'g'_e'] |
25 | [f'd'_b'] |
26 | [c'a'f'] |
27 | [g'e'c'] |
28 | [d'b'g'] |
29 | [a'^f'd'] |
30 | [e'^c'a'] |
31 | [b'^g'e'] |
32 | [^f'^d'b'] |
33 | [^c'^a'^f'] |
34 | [_a'f'_d'] |
35 | [_e'c'_a'] |
We extended the table to 35 for reference, since that includes 3 full octaves of the 12 chord circle.
Now to play this as a midi file we just need to add a header to the file d20250104triads.dat to create the complete abc file. The header will consist of:
X: 1
T: Geiger Music
C: Original work: Geiger counter clicks/minute
M: 4/4
K: none
Q: 180
L: 1/4
%%MIDI program 0
which we'll save in file header.abc, then concatenate
the two files like this (Linux command):
cat header.abc d20250104triads.dat > geiger01.abc
Now we create the midi file from the abc file like this:
abc2midi geiger01.abc -o geiger01.mid
The abc2midi program can be gotten
here.
Playing the midi file with command:
timidity geiger01.mid
It's play time is 11.62 mins, or 11 mins, 37 secs.
To summarize, the process after generating the clicks/min file, is:
awk -f sub11.awk d20250104cpm.dat > d20250104sub11.dat
awk -f int2triads.awk d20250104sub11.dat > d20250104triads.dat
cat header.abc d20250104triads.dat > geiger01.abc
abc2midi geiger01.abc -o geiger01.mid;timidity geiger01.mid
To accompany the audio, we created a video of a circle whose diameter varies based on the original 0 to 32 range of integers in the clicks per minute data that was downshifted by 11, where the higher octave chords correspond to larger diameter circles. The circle is centered on a monochrome background.
In order to combine the video with audio, we converted the midi file to mp3 with the command:
timidity geiger01.mid -Ow -o - | ffmpeg -i - -acodec libmp3lame -ab 64k geiger01.mp3
We can play the mp3 file with command:
ffplay geiger01.mp3
The output of ffplay says that the mp3 is has a duration of 11 min,
36.03 sec. The video (via ffprobe command) length is 11 min, 34.00
sec. This indicates that the mp3 is 2 seconds longer than the
video. This may be a problem, as the audio could be out of synch with the video.
Combining the video with audio:
ffmpeg -y -i temp.mp4 -i geiger01.mp3 -c:v copy -map 0:v -map 1:a geiger01.mp4
Playing the video with command:
ffplay geiger01.mp4
It turns out there is no out-of-synch problem with the video and audio. Apparently just the duration calculation by ffplay or ffprobe was inaccurate.
The video can be viewed on YouTube below.
You can also view this video at archive.org.
For more on generating music with software, see our books: Creating Melodies, and Creating Rhythms.
Last updated:
Copyright 2025 by Exstrom Laboratories LLC
Exstrom Labs Home