added sampling.py for consistent calculation of the number of samples. Changed amplitude_modulated_tone in waves.py to use these functions and implemented a simpler calculation in waves.t()