Triangle fix

Fixes a bug in the triangle wave generator where the third quarter of the waveform was never generated and the output was zero, causing a buzzing and non-triangular sound.

To get there, I had to modernize the project a bit. I also fixed some deprecation warnings. If you don’t want those changes, the bug fix can be cherry-picked.