An interesting idea. If you use expanding gases to drive a magentic piston through some coils you will generate electricity with potentially good efficiency. However the voltage and frequency will vary widely even from one end of a stroke to another as energy is absorbed from the piston. Most external systems expect standardized voltage and frequency. With modern electronics it is possible to provide this.
The problem is similar to wind turbines. There is an optimum rotary speed for coupling to various wind velocities, producing different genrator shaft speeds. Mike Carrell

