During mechanical ventilation, lung function and gas exchange in structurally heterogeneous lungs may be improved when volume oscillations at the airway opening are applied at multiple frequencies simultaneously, a technique referred to as multifrequency oscillatory ventilation (MFOV). This is in contrast to conventional high-frequency oscillatory ventilation (HFOV), for which oscillatory volumes are applied at a single frequency. In the present study, as a means of fully realizing the potential of MFOV, we designed and tested a computer-controlled hybrid oscillatory ventilator capable of generating the flows, tidal volumes, and airway pressures required for MFOV, HFOV, conventional mechanical ventilation (CMV), as well as oscillometric measurements of respiratory impedance. The device employs an iterative spectral feedback controller to generate a wide range of oscillatory waveforms. The performance of the device meets that of commercial mechanical ventilators in volume-controlled mode. Oscillatory modes of ventilation also meet design specifications in a mechanical test lung, over frequencies from 4 to 20 Hz and mean airway pressure from 5 to 30 cmH2O. In proof-of-concept experiments, the oscillatory ventilator maintained adequate gas exchange in a porcine model of acute lung injury, using combinations of conventional and oscillatory ventilation modalities. In summary, our novel device is capable of generating a wide range of conventional and oscillatory ventilation waveforms with potential to enhance gas exchange, while simultaneously providing less injurious ventilation.