A lock-in amplifier was incorporated directly into the resistance and capacitance compensation circuitry of a patch clamp set-up, to allow exocytosis to be monitored in the whole-cell mode by measuring changes in cell membrane capacitance. The integration of these two systems enabled us to provide a novel operating mode, which we term the "track-in" mode, where the output signals from the lock-in amplifier are used to make compensating electronic adjustments of the resistance and capacitance control settings. The lock-in amplifier outputs remain near zero, and the control voltages generated by the feedback circuits provide linear and calibrated resistance and capacitance measurements. Results obtained from model cells and mouse inner hair cells show that this is achieved without loss of sensitivity or of significant time resolution compared with the conventional lock-in amplifier technique, whereas the sensitivity to switching phase errors is effectively eliminated. An automatic phase tracking system using a low-frequency dithering of the resistance control setting can nevertheless be used to preserve the correct switching phase if required. The track-in approach has considerable advantages over software implementations in terms of economy and convenience, since the resistance and capacitance signals can be recorded directly on any general-purpose data-acquisition system.