To stay in the scale you're playing, sometimes you have to bend notes different amounts. For instance in Cmaj, you want to bend a C up 2 but down 1 semitone. D should be 2 semis up and down, while E should bend down to D but up to F. Moselle makes things like this possible with just two lines of code.
The entire program is visible in the video. Its just an oscillator, no envelope or filter, with the bend being set to something more complicated than a simple "2".
Note the sound is recorded directly from Moselle: no hardware or external processing was used.