Get a copy of "Digital Signal Processing in Communications Systems" by Frerking. Should be available used.
To generate an SSB signal, you need oscillators and modulating signal(s) that are in quadrature (90 degrees out of phase, four signals). The oscillator can be generated by a sin and cos pair as in your example but there are better ways to do it with less overhead that also doesn't exceed the floating point of the DSP. I would look up how to generate the oscillators without sin/cos function.
One way to generate the modulating signal, you take a real signal, from say a microphone, and using a delay (equal to the length of the Hilbert transform) and a Hilbert transform (two paths) generate the I/Q signal for the modulator. These two signals are what you refer to as I_ENV and Q_ENV. Then depending on how those 4 signals are summed, you get either LSB or USB. This is all at baseband. You need to mix them up to the frequency you want to transmit or use a baseband real oscillator. This is somewhat a broad explanation but if you get Frerking, he lays all this out perfectly. Some PC DSP systems generate the internal oscillator at 12k (using a 48k sample rate) or even higher these days depending on the DAC. This then becomes your IF offset against your real RF oscillator. Though SSB can be generated at baseband directly (no 12k internal IF), you can't generate FM without the IF offset ( at least I was never able to because of the DC component, maybe if the DC was filtered out?). Once you have those 4 quadrature signals, you can do lsb, usb, dsb, AM, FM, phase, etc depending on how they are algebraically combined. There is also an IFFT version that filters and does the Hilbert at the same time. It might be the more modern way to do it.
That is the sum total of my memory of the subject. I realized the AGC code for the SCHARC processors described in Frerking that was later borrowed and used in a number of SDRs. I know of a few that used my FM code too but that was 20yrs ago.
Jerry