Abstract: A method and apparatus for controlling a resonant piston compressor of the type comprising an electrodynamic linear reciprocating motor adapted to be driven cyclically by an alternating current power source and having at least one piston coupled to and adapted to be driven within a selectively valved working cylinder by the linear reciprocating motor in synchronism with the frequency of the alternating current power source. Enclosed volumes of gas act as resilient gas springs coacting with the piston and with the linear reciprocating motor to form a mechanical resonant system having a resonant frequency substantially centered on the frequency of the alternating current power source. A midstroke porting arrangement is responsive to the position of the resonant piston for selectively communicating a gas spring control valve with said gas springs.