Control of time dependences of waveforms is important for the application of optical signals in the nonclassical state that are recorded in various quantum-memory devices. Matching of waveforms at the signal detectors is needed for measurements using optical mixing (homodyne detection), detection of entangled states, etc. Earlier results for cavity quantum memory on an ensemble of cold atoms show that the waveform of the strong control field can be changed in such a way that the profile of optical signal recorded and readout from a collective atomic spin is convenient for measurements. In the course of recording, the control field provides the suppression of the reflection loss of the input signal related to the destructive interference of the signal and local field at the coupling mirror (impedance matching). Using an example of memory reading, we show that impedance matching provides additional possibilities for variations in the control field and allows efficient generation of output quantum signals with predetermined waveforms convenient for experimental measurements.