This is like the old "Oscillator Sync" but with a twist. The traditional Oscillator Sync outputs the slave oscillator continuously. Here, we only output it for a portion of the master's cycle, then we output zero until the master resets.
A second twist is that we use yet another oscillator to time a given number of the slave waveforms to output before silencing it.
The video uses three MIDI general purpose controllers. General1 controls the frequency of the slave. (It doesn't track the keyboard.) General2 controls how many repeats of the waveform. General3 selects whether the slave is triangle, square, or sawtooth.
Note the sound is recorded directly from Moselle: no hardware or external processing was used.