A heart-sounds gating device has been designed and tested which identifies, individually, both the first (S1) and second (S2) heart sound from their timing relationship, providing two trigger points through the cardiac cycle for synchronizing medical images. The new heart-sounds gate utilizes dynamically varying timing windows to anticipate the occurrence of S1 and S2. The heart-sounds gate has been initially applied to nuclear imaging of the cardiac bloodpool, but may be applied to any imaging modality requiring cardiac synchronization.