The conventional narrowband active noise control (NANC) based on waveform synthesis inherently requires accurate prior modeling of the secondary path and the availability of an appropriate synchronization signal. However, when the actual secondary path and noise frequency change, resulting in incorrect estimation of the secondary path and synchronization signal, this method is inadequate for noise attenuation because it is incapable of adapting to these changes. In this paper, we transform the design of a NANC into a single-objective optimization problem on the basis of the waveform synthesis method, aiming to minimize residual noise. Subsequently, we improve the real-coded genetic algorithm (RGA) to effectively develop a novel RGA-based waveform synthesis NANC algorithm (RGA-WSNANC) that optimizes the frequencies and parameters related to amplitude and phase for adaptive noise attenuation. This algorithm eliminates the need for pre-modeling the secondary path and acquiring the synchronization signal, thereby mitigating the adverse effects caused by variations in noise source frequency and secondary path. Furthermore, we design an improved adaptive RGA-WSNANC (ARGA-WSNANC) algorithm to enhance adaptability to environmental changes by incorporating environmental detection operators and a restart mechanism. Through exhaustive simulation experiments, the proposed algorithms demonstrate their effectiveness in overcoming the detrimental effects caused by environmental changes, achieving adaptive attenuation of both single-tone and multi-tone noise.