A cardiac muscle excitation waveform detector comprising: a waveform acquisition section configured to acquire, in a preset waveform analysis period, a waveform from an intracardiac electrocardiogram measured in middle of occurrence of atrial fibrillation; a waveform detection condition setting section configured to set conditions for detecting a waveform of cardiac muscle excitation, which shows occurrence of excitation in cardiac muscle, from among waveforms that are acquired by the waveform acquisition section in the waveform analysis period; and an excitation waveform detection section configured to detect a waveform of cardiac muscle excitation from the waveforms belonging to the waveform analysis period on the basis of the conditions set by the waveform detection condition setting section, wherein the waveform detection condition setting section includes a candidate waveform detection condition setting section configured to set conditions based on a contour of a waveform in order to detect candidates for the waveform of cardiac muscle excitation, characterized by a search period setting section configured to set a search period for searching for a waveform of cardiac muscle excitation from among the candidate waveforms detected according to the conditions based on the contour of the waveform, the search period being set after a candidate waveform is detected; and a detection exclusion period setting section configured to set a preset period subsequent to detection as a detection exclusion period during which the candidate waveforms are not detected as a waveform of cardiac muscle excitation when the waveform of cardiac muscle excitation is detected from the candidate waveforms, wherein the search period setting section sets the search period so as to become shorter than the detection exclusion period. a waveform acquisition section configured to acquire, in a preset waveform analysis period, a waveform from an intracardiac electrocardiogram measured in middle of occurrence of atrial fibrillation; a waveform detection condition setting section configured to set conditions for detecting a waveform of cardiac muscle excitation, which shows occurrence of excitation in cardiac muscle, from among waveforms that are acquired by the waveform acquisition section in the waveform analysis period; and an excitation waveform detection section configured to detect a waveform of cardiac muscle excitation from the waveforms belonging to the waveform analysis period on the basis of the conditions set by the waveform detection condition setting section, wherein the waveform detection condition setting section includes a candidate waveform detection condition setting section configured to set conditions based on a contour of a waveform in order to detect candidates for the waveform of cardiac muscle excitation, characterized by a search period setting section configured to set a search period for searching for a waveform of cardiac muscle excitation from among the candidate waveforms detected according to the conditions based on the contour of the waveform, the search period being set after a candidate waveform is detected; and a detection exclusion period setting section configured to set a preset period subsequent to detection as a detection exclusion period during which the candidate waveforms are not detected as a waveform of cardiac muscle excitation when the waveform of cardiac muscle excitation is detected from the candidate waveforms, a candidate waveform detection condition setting section configured to set conditions based on a contour of a waveform in order to detect candidates for the waveform of cardiac muscle excitation, characterized by a search period setting section configured to set a search period for searching for a waveform of cardiac muscle excitation from among the candidate waveforms detected according to the conditions based on the contour of the waveform, the search period being set after a candidate waveform is detected; and a detection exclusion period setting section configured to set a preset period subsequent to detection as a detection exclusion period during which the candidate waveforms are not detected as a waveform of cardiac muscle excitation when the waveform of cardiac muscle excitation is detected from the candidate waveforms, wherein the search period setting section sets the search period so as to become shorter than the detection exclusion period.