The EG or Envelope Generator is a rather belittled hardware envelope generator inside the Sound Chip. It has been belittled because it is only capable of providing very simple Envelopes for one or more channels. Since only one generator exists multiple Channel harmony is very limited when attempting to use the EG for controlling the Volume. AYT (Like most other AY trackers) use it as a separate Sound Generator because it is able to repeat a waveform periods in the range on 31 or less can generate audible tones up to around C-3. The major advantage of this scheme is that the EG can then generate Sawtooth and Triangle type waveforms. The disadvantage is that it cannot vary the volume.
Some very dynamic sounds can also be achieved by mixing the EG with a chip sound. Using a chipsound note very close to the frequency of the EG pitch will create harmonics. Using chipsound Notes far out of the range of the EG pitch will produce distortion effects in the Chipsound. Matching the EG Pitch with a note below octave 4 with a higher chipsound pitch whose note is the same will create further dynamic sounds.
A Track may be set to a Sound Source that uses the EG as its Pitch Channel Resource such as SS ID’s 06 thru 12. An EG Track will have control over the physical EG Channel for its Pitch and a mix of EG Channel Flags for its Volume as defined in the SS.
When a pattern is assigned to an EG Track the values within the pattern will correspond with the EG Period(or Pitch) between 00 and 60.
Any Volume greater than zero will enable the EG Flag and volume 0 will disable it. As with normal Chipsound tracks any Effect can be applied to the EG Pattern Note entry.
SFX pitch will alter the EG Period and SFX Note Offset may also be used to alter the EG pitch more dramatically. SFX Volume will act on the single EG Flag as in the Pattern Note entry.
Because the EG output overrides the Volume setting it is not neccesary to use another track to control volume.
However The SFX associated to the EG Pattern Entry should control the EG Wave. If Triangle waves are used the effective note will be half the frequency of a Sawtooth waveform.
An EG track can be used for many different sounds including Bass effects, Drums and percussion instruments.
Volume should be controlled with the INC VOLUME BY and DEC VOLUME BY steps in te SFX. the EG Flag steps are not recommended.
An example SFX would attempt a drum..
00 SET EG WAVE SAWTOOTH
01 SKIP LOOP ON COUNT OVER
02 SET COUNT TO 10
03 INC PITCH BY 14
04 DELAY 01
05 LOOP TO ROW 03
06 DEC VOLUME BY 15
Note that the pitch is immediately changed before the delay. This means the transition begins immediately.
This is based on a Pattern Note value of 04 and a Pattern entry Volume of 15.