A device is proposed with which ions may be selected on account of their oscillating frequency in a static ``potential well'' whereby the ions pass several times across the same rf field tuned to the oscillation, thus gaining energy on each passage. No magnetic fields are used. As the initial velocity of the ions plays only a secondary role for the selection, the energy spread in the ion source is allowed to be much greater than with most types of mass spectrometers. Likewise, no high mechanical precision is required. The resolving power may be varied by electrical means. ``Harmonic masses'' (``ghost images'') are easily eliminated.