Squat, SquatE - ZX Spectrum beeper music engines
Original Squat 06'17, SquatE 09'20 by Shiru


A four channel engine with non-interrupting sampled drums, inspired and 
highly influenced by Squeeker and various related utz's developments. 

Original Squat version features:

- 4 channels of tone, each channel has its own duty cycle
- Noise mode for the last tone channel
- Noise percussion, 9 pitches of noise at 4 volumes, interrupts tone
  channels
- 7 non-interrupting sampled drums played at ~10 KHz


SquatE is an updated version of the engine. It features much higher 
sample quality, achieved by using interleaving mixing technique in the 
Music Box fashion, as well as reading two samples per one iteration of 
the tone loop, so while tone channels update at ~8400 Hz, sample channel 
gets updated at ~16.8 KHz, and they're not getting masked by the tone 
channels anymore. Strategic timings applied to even out tone and sample 
volumes. This helped to make samples sound much clearer, now suitable 
for high-frequency instruments such as hats, and for tonal instruments, 
to some extent. New mixing scheme affected the way tone channels sounds, 
too. 

Changes done:

- 15 non-interrupting sampled drums played at ~17 KHz, can be very
  lengthy
- Improved speed range


SquatE does not obsolete the older Squat, they have different sound, 
functioning more like two flavors of the same thing - gritty loud sound 
in Squat vs clean, but thinner one, in SquatE. Other than the sound 
flavor and difference in speed and sampled drums playback, they're much 
compatible and interchangeable. 



Sp T1 d T2 d T3 d T4 dN Pr D (DD)
.. .... .... .... ..... .. .  ..
   |  | |  | |  | |   |
   +ch1 +ch2 +ch3 +ch4+
   
Sp    : Speed, 2..99 in Squat, 1..63 in SquatE

T1-T4 : Tone channels, they has uniform capabilities, but different duty 
        cycle (perceived volume). T4 also has an extra 'noise' mode,
		where different notes produce various kinds of metallic and
		noisy sounds. 
     Tn : Note, C-0..B-9
      d : Detune, 1..9
      N : Noise mode, 1 to enable, only works for one note
	  
   Pr : Noise percussion, consist of two digits.
         First digit is noise pitch, 1..9 (1 highest, 9 lowest).
         Second digit is volume, 1..4 (1 quiet, 4 loud)
		 
 D,DD : Sample drum number, 1..7 in Squat, 1..15 in SquatE
