Resonant controllers are widely used in power electronics to track sinusoidal references. According to the internal model principle (IMP), these controllers should embed the poles of the Laplace or Z transform of the reference for the closed-loop system to track the reference asymptotically. Thus, tracking a sinusoidal reference is difficult as the controller should adapt its structure to embed the poles of the sinusoidal reference with variable frequency, as those poles depend on that variable frequency. On the other hand, Generalized Predictive Control (GPC) is widespread in industry applications due to its fast response, robustness and capability to include constraints. Resonant controllers based on GPC, which satisfy IMP, have been developed. However, these controllers consider the sinusoidal frequency to be constant. This paper presents a new GPC-based resonant controller with an adaptive and simple control law to track references with variable frequencies. A PLL estimates the frequency of the reference. A multi-layer perceptron uses the estimated frequency to define the gain matrix required to calculate the GPC control action. The GPC control action and the estimated frequency define the control law, which satisfies IMP in steady-state conditions. The authors did not find in the literature the proposed mathematical development of an adaptive GPC resonant controller with a discrete-time augmented model whose control law satisfies IMP. Thus, the proposed approach is helpful to develop other adaptive predictive controllers. Experimental results show that the proposed controller can track sinusoidal references whose frequencies vary in time.