A giant atom with modulated transition frequency