A gas detector comprising: - an electrical measurement circuit, said electrical measurement circuit comprising: - an electromechanical resonator; - a feedback electrical branch, having an input which is connected to a detection terminal of the resonator for receiving a response signal from said resonator, and an output which is connected to an excitation terminal of the resonator for applying an excitation force (F x) to said resonator, so that the resonator and the feedback electrical branch form at least a part of an oscillator operating at a resonant frequency (fr); - a frequency measurement device connected to the oscillator so as to measure the resonant frequency (f r); and - a measurement branch, having an input connected to the output of the feedback electrical branch, and a modulation output adapted for transmitting a modulation signal to an external device, depending on an excitation signal which exists at the output of the feedback electrical branch, so that when the external device is adapted for applying an additional excitation force (F pa) to the resonator, in addition to the excitation force (F x) applied by the feedback electrical branch, then an offset of the resonant frequency (f r), which is measured by the frequency measurement device and which results from the additional excitation force, constitutes a measurement of a parameter of the external device, the gas detector further comprising: - a tunable laser constituting the external device with the modulation output of the measurement branch connected to a modulation input of the tunable laser, and where said tunable laser is oriented so that a gas which would have an absorption line corresponding to a wavelength of the tunable laser and which would receive a radiation beam originating from said tunable laser, produces an acoustic wave and said acoustic wave produces the additional excitation force (F pa) onto the resonator, so that the parameter which is measured by the offset of the resonant frequency (f r) is a concentration of the gas which has an absorption line at the wavelength of the tunable laser, the gas detector being characterized in that the measurement branch of the electrical measurement circuit comprises an adjustable phase shifter which is arranged between the input and the modulation output of said measurement branch, so that a phase shift of the additional excitation force (F pa) which is applied by the external device to the resonator is tunable, in order that said additional excitation force is in phase quadrature relative to the excitation force (F x) which is applied by the feedback electrical branch. - an electrical measurement circuit, said electrical measurement circuit comprising: - an electromechanical resonator; - a feedback electrical branch, having an input which is connected to a detection terminal of the resonator for receiving a response signal from said resonator, and an output which is connected to an excitation terminal of the resonator for applying an excitation force (F x) to said resonator, so that the resonator and the feedback electrical branch form at least a part of an oscillator operating at a resonant frequency (fr); - a frequency measurement device connected to the oscillator so as to measure the resonant frequency (f r); and - a measurement branch, having an input connected to the output of the feedback electrical branch, and a modulation output adapted for transmitting a modulation signal to an external device, depending on an excitation signal which exists at the output of the feedback electrical branch, - an electromechanical resonator; - a feedback electrical branch, having an input which is connected to a detection terminal of the resonator for receiving a response signal from said resonator, and an output which is connected to an excitation terminal of the resonator for applying an excitation force (F x) to said resonator, so that the resonator and the feedback electrical branch form at least a part of an oscillator operating at a resonant frequency (fr); - a frequency measurement device connected to the oscillator so as to measure the resonant frequency (f r); and - a measurement branch, having an input connected to the output of the feedback electrical branch, and a modulation output adapted for transmitting a modulation signal to an external device, depending on an excitation signal which exists at the output of the feedback electrical branch, - a tunable laser constituting the external device with the modulation output of the measurement branch connected to a modulation input of the tunable laser, and where said tunable laser is oriented so that a gas which would have an absorption line corresponding to a wavelength of the tunable laser and which would receive a radiation beam originating from said tunable laser, produces an acoustic wave and said acoustic wave produces the additional excitation force (F pa) onto the resonator,