Hol-Rock Smeg-thesiser - Jim Waterman


Do you like 90s UK sitcom Red Dwarf?*

Do you like music theory?

Do you really, really like music theory?

I mean the real obscure kind, that you probably have never heard of?

Do you like ZX Spectrums?

Do you like Crap games?

Do you like Crap games that aren't really games at all?

If, and I do mean only IF the answer to all the above questions is YES - then OH BOY I have the game for you!

Climb into to Spacebug, change the alert bulb to puce and buckle up smeg heads! We are going to music school, Jim Waterman style.

The review part 1

At last a loading screen - and it is truly lovely. Jim gets a gooleplex of points for this,

And here we have the non-game itself. This single screen of mind bending, musical madness. 

Pause for learning

I forgot to ask before, do you like icebergs? I bloody well hope so, because it is a prerequisite of this part of the review. 

Before I can tell you any more about this game you MUST watch this, otherwise anything I say is truly hopeless!

This is so hard to explain, and Jim has been somewhat meticulous, there is now only one thing for it...

In Jim's own words

"I've devised a system to totally revolutionise music. I've decimalised it. Instead of the octave, it's a decatave. And I've invented two new notes, H and J. Now it goes... do-re-mi-fa-so-la-wo-bo-ti-do... do-ti-bo-wo-la-so-fa-mi-re-do. Hol-Rock: it'll be a whole new sound. All the instruments will be extra-big to incorporate my two new notes. Triangles will have four sides, piano keyboards the length of zebra crossings... of course, women will have to be banned from playing the cello."

- Holly (original male version), from Red Dwarf S2E1, "Kryten"


** No, not a musical note.

This program *can* run on 128K models, but *must* be used in 48 BASIC as it uses UDGs T and U that will show up on the screen as SPECTRUM and PLAY in 128 BASIC, wrecking the screen layout. Even then, the pitch of the notes will be slightly different due to the timing difference on these machines.

The code itself *could* fit into the space available on a 16K Spectrum, but I've deliberately put it in the uncontended upper banks of the 48K model so that, again, there are no potential timing troubles.

Also, the keyboard layout from the rubber-key Spectrum has been used, as it's the only one that has ten unique keys along each entire row. Users of any other model will just have to deal with SYMBOL SHIFT and the space bar being wrongly-placed for this purpose.

Basic Music Theory

This program wasn't originally anything to do with Red Dwarf. Instead, I'd been watching David Bennett's "Music Theory Iceberg" video, which starts at tier 1 with regular clefs, 4/4 time and major scales, and ends at tier 7 with bizarre tunings, the audio version of optical illusions, and something I'd genuinely never heard of before: XENHARMONIC MUSIC.


To cut a *very* long story short: music is mathematics. The regular notes we know in Western music arise from simple ratios between frequencies: an octave is 2:1, a perfect fifth (A to E) is 3:2, a perfect fourth (A to D) is 4:3 and so on. The octave is so called because of the eight notes that make up a major scale, with seven uniquely-named notes then the first of these repeated at twice the frequency of the tonic to complete the scale.

(The full table of interval ratios is in tier 6 of the Iceberg  - but the major and minor sixth are the wrong way round! I checked by generating sine waves in Audacity.)

However, maintaining these perfect frequency ratios for one interval and then tuning all these relative to one fundamental frequency will make the same interval at other points in the scale sound out of tune. David Bennett explains it further in another video - but to keep the story short, if A and E are tuned perfectly at 3:2, then the perfect fifth from B to F# is 2.8444:2, a 5.2% error that even the dodgiest of ears will notice.

The solution to this is 12-tone equal temperament (12-TET) in which the octave is still in a ratio of 2:1 but the 12 intervals are divided into equal ratios, so that N semitones above the tonic is 2^(N/12) times the frequency of the tonic. The most "out of tune" interval is the tritone (A to D#/Eb), which is only 1.015% sharp of its true frequency ratio (7:5). The vast majority of ears won't notice this difference. The perfect fourth and fifth are only 0.113% away from where they should be.

Thus, we have the piano keyboard we're all familiar with, which I've annotated with 12-TET frequencies for the octave immediately following middle C:

     277.18  311.13   370.00  415.30  466.16 
         │      │          │     │     │
         │      │          │     │     │
   │   │ C#│  │ D#│  │   │ F#│ │ G#│ │ A#│   │   │
   │   │ Db│  │ Eb│  │   │ Gb│ │ Ab│ │ Bb│   │   │  etc.
   │   └───┘  └───┘  │   └───┘ └───┘ └───┘   │   └──
   │     │     │     │     │     │     │     │     │
   │  C  │  D  │  E  │  F  │  G  │  A  │  B  │  C  │
      │     │     │     │     │     │     │     │
 261.63     │     │     │     │     │     │     523.25
       293.66     |     │     │     │     493.88
     329.63     │     │     440.00  
                    349.23   392.00

As an extra treat, there is a BONUS folder provided with this package, in which can be found an early WIP version of this program that displays and sounds like a regular keyboard; it made sense to get that working first, knowing what "proper music" sounds like. From there on, that program could then be easily adapted to make...


Microtonal music is the expansion of the standard notes to include intervals between the twelve we already have, thus between C and C# there is a C-half-sharp (C‡, i.e. a sharp sign with only one vertical line), and between C# and D there is a C-sharp-and-a-half (which is supposed be a sharp sign with three vertical lines but the best I can do in text format is C#‡). Reading the intervals "backwards", between D and Db is D-half-flat (Dd, where the lower case d is supposed to be a backwards flat symbol; this is the same note as C#‡) and between Db and C is D-flat-and-a-half (Ddb, the same note as C‡). While there are also regular ratios between a tonic and any of the microtonal intervals, there is still the same problem with perfect tuning as there is in regular music, so 24-TET is employed to bash the 24 intervals of the microtonal scale into an acceptable compromise.

Despite this, microtonal music still sounds like a discordant mess to 99.999% of us. I have found that people who say they appreciate microtonal music dress and act in a way that screams "I'm better than you" - think silk neck scarves, short cut trousers, curly moustaches, and more concentrated smugness than an Oscar acceptance speech. Microtonal music is to regular music as a ridiculously over-hopped IPA is to a regular session ale (and costs three times as much). Imagine my shock.

But in case microtonal music still isn't hipster enough, there is the aforementioned XENHARMONIC MUSIC. This is any division of the octave into any number of intervals other than twelve, of which 24-interval microtonal music is just one of an infinite range.

The joke about Hol-Rock was probably to demonstrate to a live audience that Norman Lovett isn't exactly Pavarotti, as he crudely mangled the two new notes into what was about half a major scale and half an aural car crash. The concept of xenharmonic music allows us to "correct" Norm's wonky voice into *actual* Hol-Rock with the two new notes.

The most satisfactory approach I could find to this was to put H and J where we'd expect - i.e. between G and A - and then arrange the black keys, with no black key between B and C, such that they make two distinct groups and thus the note of every white key can be instantly and easily identified. The result was groups of three and four black keys, instead of two and three. There is no black key between B and C, and now it is F and G that are the other pair with no black key between them - so now, we have a new key for E#/Fb which are no longer the same as F and E respectively - but we have lost F#/Gb and thus F#=G and Gb=F. For those who prefer the continental style (as "sung" by Holly in the episode itself), "la" is now H, "wo" is J and "bo" is A. That, and the fact that German already uses H as the symbol for what we call B (and their B is our Bb), should cause more continental confusion that being forced to drive on the other side of the road with speeds in different units. Because Brexit Means Brexit, innit.

A further consequence of this arrangement is that the "decatave", as Holly called it, is now divided into SIXTEEN intervals instead of twelve. This is exactly the solution that a computer working in binary (with hexadecimal as a shorthand) should come up with, whether with an IQ of 6000 or considerably less than that after three million years drifting through deep space.

Keeping the A above middle C tuned to 440 Hz, here is our new HOL-ROCK keyboard, as wide as a zebra crossing, with corresponding frequencies:

            285.30                 386.38   421.35
     261.63    │   311.13   354.31     │     │     459.48
         │     │    │            │     │     │     │
         │     │    │            │     │     │     │
   │   │ C#│ │ D#│ │ E#│   │   │ G#│ │ H#│ │ J#│ │ A#│   │   │
   │   │ Db│ │ Eb│ │ Fb│   │   │ Hb│ │ Jb│ │ Ab│ │ Bb│   │   │  etc.
   │   └───┘ └───┘ └───┘   │   └───┘ └───┘ └───┘ └───┘   │   └──
   │     │     │     │     │     │     │     │     │     │     │
   │  C  │  D  │  E  │  F  │  G  │  H  │  J  │  A  │  B  │  C  │
      │     │     │     │     │     │     │     │     │     │
 250.53     │     │     │     │     │     │     │     │     501.07
       273.21     |     │     │     │     │     │     479.82
     297.94     │     │     │     │     440.00  
                   324.90     │     │     403.48
                          339.29   370.00

Because of the ratio 16:12, every fourth note above A in Hol-Rock is the same pitch as every third note above A in regular music. Hence, HR-C# has the same pitch as regular C, HR-E# has the same pitch as regular D#, HR-H has the same pitch as regular F#, and of course both As are equivalent.

The ZX Spectrum is entirely capable of generating all these new frequencies. All that is required is to load the appropriate values into HL and DE, then CALL 949 and sound comes out. While it isn't quite an infinite continuum, there are 65,536 different values of HL (which specifies the pitch) and only 88 notes on a standard (i.e. non-Hol-Rock) piano keyboard, which gives us more than enough leeway to hit the new frequencies with imperceptibly small differences. It's even possible in BASIC, though the pitch in every BEEP command would need to be given with a non-integer value.

I have found that the frequencies required some adjustment from the official equations used to generate the HL and DE values:

HL = 437500/(freq-30.125)

DE = freq*seconds

Some of this discrepancy is caused by each note on the keyboard being played for a fixed length of time (0.05 seconds) followed by a short gap while the rest of the code to look for a keypress is executed - I found that the higher "decatave" was consistently around 91% of the frequency it should be, while the lower "decatave" dropped to around 87% of the correct frequency moving towards the lowest pitch, and with the gap ever widening. I have attempted to correct these by sending the sound into Christian Zeitnitz's Soundcard Scope. This isn't perfectly accurate - some of the peaks on the scope aren't exactly centralised, but I've done what I can as accurately as I can to get a good compromise. And also, very few emulators have absolutely perfect timing; I'm using Spin, because of its built-in assembler that made the program very, very much easier to test continuously than it would otherwise have been.

What I have made is as close to perfect as the combination of Spin, Soundcard Scope, a LibreOffice spreadsheet and my ears can manage. Because we should all strive for excellence, right?

Scales and the like

Try playing a scale. Instead of the standard T-T-S-T-T-T-S sequence to make a major scale (where T is a tone and S is a semitone), the layout of the keyboard means the Hol-Rock equivalent is T-T-T-S-T-T-T-T-S. And now, rather than the circle of fifths (see Iceberg tier 2), the equivalent is a circle of sixths; to add a sharp to the key signature, move up nine semitones, and to add a flat, move down nine semitones.

C major (blank):    C-D-E-F-G-H-J-A-B-C

H major (1 sharp):   H-J-A-B-C-D-E-F-G#-H

D major (2 sharps):  D-E-F-G#-H-J-A-B-C#-D

J major (3 sharps):  J-A-B-C#-D-E-F-G#-H#-J

E major (4 sharps):  E-F-G#-H#-J-A-B-C#-D#-E

A major (5 sharps):  A-B-C#-D#-E-F-G#-H#-J#-A

F major (6 sharps):  F-G#-H#-J#-A-B-C#-D#-E#-F

B major (7 sharps):  B-C#-D#-E#-F-G#-H#-J#-A#-B

G# major (8 sharps): G#-H#-J#-A#-B-C#-D#-E#-F#-G#

- enharmonic to Hb major; first appearance of a sharp on a white key (F#)

C# major (9 sharps): C#-D#-E#-F#-G#-H#-J#-A#-B#-C#

- enharmonic to Db major; nobody in their right mind would ever use this key

G major (1 flat):    G-H-J-A-Bb-C-D-E-F-G

Bb major (2 flats):  Bb-C-D-E-Fb-G-H-J-A-Bb

Fb major (3 flats):  Fb-G-H-J-Ab-Bb-C-D-E-Fb

Ab major (4 flats):  Ab-Bb-C-D-Eb-Fb-G-H-J-Ab

Eb major (5 flats):  Eb-Fb-G-H-Jb-Ab-Bb-C-D-Eb

Jb major (6 flats):  Jb-Ab-Bb-C-Db-Eb-Fb-G-H-Jb

Db major (7 flats):  Db-Eb-Fb-G-Hb-Jb-Ab-Bb-C-Db

Hb major (8 flats):  Hb-Jb-Ab-Bb-Cb-Db-Eb-Fb-G-Hb

- enharmonic to G# major; first appearance of a flat on a white key (Cb)

Cb major (9 flats):  Cb-Db-Eb-Fb-Gb-Hb-Jb-Ab-Bb-Cb

One final bum note

All the above is all very well, BUT...

Crossing from Red Dwarf to The Hitchhiker's Guide To The Galaxy for a moment, Douglas Adams wrote a comment in the script for the radio series, where the Sirius Cybernetics robots are "singing" the corporate song, "Share And Enjoy", a diminished fifth below the actual pitch of the tune. I think it will also adequately describe the results of this program for anyone who isn't completely tone deaf.

"It will sound more ghastly than you could possibly imagine".

My Review Part two

Wowsers. exquisite attention to detail. I came here to play a crap game and instead, accidentally did a music degree. And that's great! Another million points for making me learn. 

And at least a thousand points more for making the Red Dwarf link. That show is from my own personal Spectrum heyday.

Also, while this is literally a weird piano on a screen, it is written in machine code and is very polished. 10 points extra for that.

Final thoughts

I enjoyed reading, watching, and experimenting with Hol-Rock. I am interested in music theory, love Red Dwarf and have a ZX Spectrum. Its well worth a look.


This is not a game.

And, moreover, Jim went over my secret word count for this competition and is disqualified. Sorry Jim, "dem's the brakes".

Now lets sing along with me.... Its cold outside, there's no kind of atmosphere... 

Try it here

*the only acceptable answer is that you think seasons 1-2 are amazing, season 3-5 were great, 6 was bearable, 7 unbearable and unfunny, and you haven't watched it since.