Everything working with sample scaling, save sawtooth.c, which I am clearly too tired to do properly