Velvet  - ZX Spectrum beeper music engine
by utz/irrlicht project 09'2019
1tracker version by Shiru 01'2022


Velvet is a PFM sound engine for the ZX Spectrum 48K beeper with support for
Crushed Additive Random Noise, a type of velvet noise first described by
Kurt James Werner.

It features 3 tone channels and a dedicated noise channel, all with volume
envelopes. Additionally, an interrupting, customizable kick drum is availble.
Synthesis runs at 14583 Hz (240 cycles per core loop).

For noise envelope, values of 8 and higher are recommended. Lower values may
be useful when the tone channels are busy, but when used on solo noise parts,
they will cause an unpleasent, cyclic sound. For tones, it is recommended to
stay in the range of 1..8, otherwise drop-outs may occur.


The columns are:

Sp T1 dEn T2 dEn T3 dEn Ne VSMPtLn
.. ...... ...... ...... .. .......
   |    | |    | |    | || |     |
   +-ch1+ +-ch2+ +-ch3+ ch4+-drum+
   
Sp : Speed, 1..32

T1,T2,T3 : Tone channels
  Tn : Note, C-0..B-7
   d : Detune, 1..9
  En : Volume envelope, 1..99
  
Ne : Noise channel
  Ne : Volume/pitch envelope, 1..99, triggers the noise
  
VSMPtLn : Kick drum channel
   V : Volume, 1..7 (lowest to loudest), triggers the drum
   S : Sweep, 1..8
   M : Decay mode, 1..4 (no decay, linear, linear x2, exponential)
  Pt : Pitch, 1..99, 32 is default
  Ln : Length, 1..99, in half speed steps
