Contents
Plip Plop Beeper Engine
This engine provides a single sawtooth wave melody channel (channel 1), with support for flexible pitch-bending up or down at a customisable rate, and a single percussion channel.
For many fans of the Spectrum, this beeper engine was their first taste of a clever beeper routine, providing something other than the simple square-wave monophonic tones of the ROM beeper. Originally written by Jonathan "Joffa" Smith, this engine was used to stunning effect in Konami Pong by Martin Galway, and subsequently tweaked by fellow Ocean programmer Paulie Hughes (who kindly donated the source code for use in Beepola). This engine can also be heard in Cobra, Renegade 3, Athena and many other Ocean and Imagine games.
The player code is fairly sophisticated and has a number of complex scripting options designed to save space in the music data: FOR...NEXT loops, SUBroutines, GOTOs, and a TRANSPOSE command to alter the key of a section of music. Beepola's compiler only currently makes use of the simplest form of SUBroutines (with each pattern being represented in the music data as a subroutine). However, the complex commands have been left in the player code allowing beepola's asm output for this engine to be tweaked manually to reduce the size of tune data if necessary.
Pitch bend values can be entered in column two (titled "PBend"). The pitch with slide from the currently playing note to the note specified on the same row as the PBend value. Values in the range 1-99 bend downwards (1 being the slowest, with higher values faster). Values in the range 101-199 bend upwards (101 being the slowest, with higher values sliding faster).
The are some peculiarities with the percussion for this engine, brought about by the fact that the data format does not fit cleanly into Beepola's pattern-based model. In Beepola, it works like this:-
A pattern can contain no percussion at all and this will play fine, regardless of the pattern length.
If a pattern contains percussion, there can be no more than 255 frames (approx. 5 seconds) of melody-only or silence at the start of the pattern before the first drum. Otherwise "ghost" drum sounds will be heard before the real programmed drums begin.
There can be no more than 31 frames (a shade over half a second) of percussive silence between drums effects, otherwise "ghost" drum sounds will be inserted as padding.
In practice, any and all issues caused by the above can be fully worked around by splitting patterns where necessary to remain within the limits specified above.
A song may contain up to 127 unique patterns, and each pattern may contain up to 126 rows. The tempo and length of each pattern may be set individually.
The lowest valid note value is D#1 and the highest is D-5.