Photoswitching-induced frequency-locked donor-acceptor fluorescence double modulations identify the target analyte in complex environments.