To get a voltage proportional to amplitude without filtering (which would have time-constant-vs-ripple issues), you could feed the input into both a zero-crossing detector (comparator) and into an op-amp integrator. When the comparator output goes low, it fires a one-shot that samples the integrator. This is just a CMOS switch (CD4016 section) that is closed briefly to charge a cap, whose voltage is monitored by an op-amp buffer. When the one-shot is done, the integrator cap is shorted by another
4016 section for the rest of the half-cycle.The result if all this is that the buffer output will have a voltage proportional to the integrated amplitude of half the incoming wave. It will hold at that value until completion of the same half-cycle of the following wave cycle, and then it will step crisply to the new voltage.
If you had a fixed-frequency input, then you could just use this voltage to set the duration of a one-shot. But it sounds like what you really want is to control the duty cycle of the output for varying input frequencies (PWM). This would probably be best done with some sort of dual-slope approach, the details of which I haven't worked out yet.
Best regards,
Bob Masta DAQARTA v4.51 Data AcQuisition And Real-Time Analysis