A method is provided to determine pacing parameters for an implantable medical device (IMD) and collects heart sounds during the cardiac cycles. The method comprises changing a value for a pacing parameter between the cardiac cycles and analyzing a characteristic of interest from the heart sounds. The method comprises setting a desired value for the pacing parameter based on the characteristic of interest from the heart sounds. The system comprises inputs configured to be coupled to at least one lead having electrodes to sense intrinsic events and to deliver pacing pulses over cardiac cycles. The system has a sensor for collecting heart sounds during cardiac cycles and controller to control delivery of pacing pulses based on pacing parameters. The controller changes a value for at least one of the pacing parameters between the cardiac cycles and provides an analysis module to analyze a characteristic of interest from the heart sounds.