PSG Envelopes

Por PingPong

Prophet (3680)

Imagen del PingPong

09-03-2021, 00:19

Hi, all i've a question about the env gen.
Suppose that there is a channel whose volume is set up to say, at level 12.
Now, suppose i set the envelope for this channel. Also suppose i've setup a sawtooth env.
After setting the env what is the amplitude level?
a) it drops from 12 to 0 then increase to max
b) it increase from 12 to max then drop and recyle from 0

How does the psg affects (if they do) situations (a) or (b)?

Also, setting the env for more than one channel does some kind of restart in the amplitude modulation cycle?

Login sesión o register para postear comentarios

Por Grauw

Ascended (9762)

Imagen del Grauw

09-03-2021, 01:11

The maximum envelope generator volume can not be controlled, it always goes to 15. The volume bits are ignored when you set the envelope enable bit.

The envelope shape register bits determine whether it starts from the top or the bottom. Setting this register also triggers the envelope. The bit in the volume register only selects whether it controls the volume, it does not trigger it, there’s only one envelope generator with one counter after all.

Personally, I think the EG is mostly useful for use at audio rates to produce tones. The envelope patterns it supports are a bit limited at normal LFO rates. You can implement more flexible ADSR envelopes by controlling the volume manually on a 60 Hz interrupt (in assembly at least).

Por PingPong

Prophet (3680)

Imagen del PingPong

09-03-2021, 01:41

thx, clear and demotivating explanation.
having three env gen and the ability to interact with volume controls would have made psg more appealing, i know there is a psg improvement with three env gens, and other useful features,

Por Grauw

Ascended (9762)

Imagen del Grauw

09-03-2021, 02:31

What can I say, the AY-3-8910 is a primitive sound chip developed in 1978 for a specific price point. Sound chips were in their infancy. Competitors like the SN76489 (1980) don’t even have one at all. At least it gives us access to different waveforms, even though that was not its original intent.

Any envelope generator is in principle not super useful since the CPU can implement its own volume control at LFO rates, which will always be more flexible than what the hardware provides. So you don’t need them. Except on the OPLL, since the CPU does not have access to the modulator level. And on the PSG, because it can modulate into audio frequencies.

Por PingPong

Prophet (3680)

Imagen del PingPong

09-03-2021, 08:18

your point is an interesting point. Basically you say "You do not need env gen because CPU can do the same in a more flexible way with little power".
Another chip that have some kind of "automated" volume control is the C64's SID with it's ADSR. Do you think basically the same for ADSR?

Por Sandy Brand

Master (228)

Imagen del Sandy Brand

09-03-2021, 10:28

I think there are tricks you can pull off to sort of 'control' the volume level.

For example, with a sawtooth shape, start the generator with a 'short' envelope period and then half-way through the period just change the envelope period to something much longer and 'drag it out' so to say.

But yeah, it is not super useful.

Por Grauw

Ascended (9762)

Imagen del Grauw

09-03-2021, 10:57

PingPong wrote:

Another chip that have some kind of "automated" volume control is the C64's SID with it's ADSR. Do you think basically the same for ADSR?

Yes, although ADSR is more useful for modeling instruments, there are more complex patterns possible with the CPU, and I would say any serious tracker will let you to specify those precisely with “instrument macros” or whatever they are called.

The primary benefit of envelope generators is to reduce the load on the CPU, to fire-and-forget sounds. However for 3-channel sound chips that benefit is imo not much. (As opposed to FM chips which have many operators and require I/O waits.)

Por sd_snatcher

Prophet (3443)

Imagen del sd_snatcher

10-03-2021, 14:46

Grauw wrote:

At least it gives us access to different waveforms, even though that was not its original intent.

Are you aware that you can use the envelope generator to generate different waveforms on the PSG, right? Wink

It wasn't also meant for that, but if the DCSG is going to be considered capable of generating different waveforms, then the PSG also is.

Por Grauw

Ascended (9762)

Imagen del Grauw

10-03-2021, 18:53

Yes, in that sentence “it” was referring to the PSG EG Smile. I mention it in my prior post.