Better Programming

Pub Details

Date

Pages

See all articles from Byte Power Sept 1986

This month we will talk about the envelope generator. To enable the generator you must put the value 16 to the channel’s amplitude (8,16;9,16;10,16).

Then you put values to the 11, 12 and 13 registers, to get the period and the envelope shape desired.

Now let’s see how it works.

10 SOUND 8,16; 0,100; 1,1; 7,62; 11,10; 12,10; 13,14

The Value 16 of the register 8 enables the envelope generator, register 0 and 1 are the fine and coarse tune, the register 7 enables the channel A, now register 11, 12 and 13, these ones need a little more explanations.

Register 11 is the fine tune envelope period. You can put values from 0 to 255. Let’s take a sound like ‘ouah ouah ouah’, the register 11 is the speed of that sound or if you like the duration of the cycle. (A CYCLE is one ‘ouah’!).

Register 12 works exactly the same way as register 11, but this one is for the coarse tune.

Register 13 is the Envelope. You can put values from 0 to 15. (See chapter SOUND AND MUSIC of your USER MANUAL for the envelope shapes.) To choose an envelope just add to 0: 1 for HOLD, 2 for ALTERNATE, 4 for ATTACK and 8 for CONTINUE.

I.E. a shape could be made up of 8 (so the note won’t shut off right away) plus 2 (the sound will rise and fall) plus 4 (the note will rise first then fall): for a total of 14. You would put that value to the register 13 and get a sound that would rise and fall continuously. (See the Envelope shapes in USER MANUAL).

Pretty simple isn’t it!

Oh! one thing I almost forgot to tell you, you may enable the envelope generator for any of the six channels (sound and noise), but you can create only one envelope for all six (if you are using, let’s say, all three sound channels, A, B and C simultaneously there will be only one envelope shape for all three). If you’re using two or three (or more) channels, you can if you want, enable just one or two so that one channel will be affected by the generator and the others won’t.

And another thing, if you want to control the ‘volume’ of an envelope shape, just add to the value of the registers 8, 9 and 10. (16 is maximum volume, 17 is softer, etc…up to 31) The best way of understanding the envelope generator is by using it and practicing it.

I recorded some examples right after the magazine. Try them and try to understand how they work. I put the sound effect I used in CONSTRUX, a game wich uses the sound of a chopper.

Well, that’s it for this month. I will be talking about the noise channels next month in CHAPTER 3 of the SOUND EFFECTS. See you next month!

By the way, if you have tips you would like to share with our subscribers, we’re all ears!

Send your tips to:

BYTE POWER program/reviews/articles/tips
1748 Meadowview Avenu
Pickering, Ontario, Canada L1V 3G

What’s coming up next month?

Charts…the name says it all!

Talking Clock…your TS2068 will tell time!

Air Defense…save the city from falling bombs!

Chapter 3 of the SOUND EFFECTS.

And MUCH, MUCH more!!!

Products

 

Downloadable Media

 

Image Gallery

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.

Scroll to Top