Signal processing apparatus, comprising: an input for receiving an input signal; a reference signal generator for generating a reference signal, the generator including a waveform generating circuit for generating a waveform whose frequency varies nonperiodically or periodically, and a frequency spectrum distribution shaping circuit configured and adapted for shaping the frequency spectrum distribution of the generated waveform so that there is a reduced spectrum component part in at least one band, the frequency spectrum distribution shaping circuit configured to modulate a pseudo random noise sequence onto a clock signal to obtain a randomly varying reference signal; and a pulse-width modulator coupled to the input and reference signal generator, the modulator being configured and adapted for spreading the spectrum of the input signal and generating a PWM output signal having a reduced spectrum component part in the at least one band by PWM-modulating the reference signal based on the input signal received at the input terminal; wherein the waveform generating circuit comprises a clock generator for generating a clock signal, and a PN code generator coupled to receive the clock signal generated by said clock generator and configured and adapted to generate a PN code signal based thereon; and characterized in that said frequency spectrum distribution shaping circuit comprises a logic circuit comprising an exclusive OR gate coupled to receive the clock signal and the PN code signal, and to combine the clock signal and PN code signal to generate the reference signal based on the result of that combination; and wherein said waveform generating circuit includes a frequency divider that is adapted to divide the frequency of the clock signal generated by said clock generator before the frequency divided clock signal is received by said PN code generator. an input for receiving an input signal; a reference signal generator for generating a reference signal, the generator including a waveform generating circuit for generating a waveform whose frequency varies nonperiodically or periodically, and a frequency spectrum distribution shaping circuit configured and adapted for shaping the frequency spectrum distribution of the generated waveform so that there is a reduced spectrum component part in at least one band, the frequency spectrum distribution shaping circuit configured to modulate a pseudo random noise sequence onto a clock signal to obtain a randomly varying reference signal; and a pulse-width modulator coupled to the input and reference signal generator, the modulator being configured and adapted for spreading the spectrum of the input signal and generating a PWM output signal having a reduced spectrum component part in the at least one band by PWM-modulating the reference signal based on the input signal received at the input terminal; wherein the waveform generating circuit comprises a clock generator for generating a clock signal, and a PN code generator coupled to receive the clock signal generated by said clock generator and configured and adapted to generate a PN code signal based thereon; and characterized in that said frequency spectrum distribution shaping circuit comprises a logic circuit comprising an exclusive OR gate coupled to receive the clock signal and the PN code signal, and to combine the clock signal and PN code signal to generate the reference signal based on the result of that combination; and wherein said waveform generating circuit includes a frequency divider that is adapted to divide the frequency of the clock signal generated by said clock generator before the frequency divided clock signal is received by said PN code generator. <EOS>