<p>To improve the ability of an envelope detected from an input signal to follow the input signal. Provided is a detector which acquires an output signal from an input signal containing a target signal and outputs the output signal. The detector includes: a comparator which compares the input signal to the output signal and outputs the obtained comparison result; and an envelope generator which weights a first value and a second value having a sign different from that of the first value in accordance with the comparison result, integrates the weighted first value and the weighted second value, and outputs the integrated value as the output signal. The envelope generator has a first gain generator which outputs the first value in accordance with the amplitude of the input signal.</p>