def tone(freq=440, sec=2, rate=44100, vol=0.99):
 samples = (sec * rate)
 time_steps = np.arange(0.0, 1.0, (1.0 / samples))
 scaling = (((2 * np.pi) * freq) * sec)
 return (np.sin((time_steps * scaling)) * vol)

def tone ( freq = 440 , sec = 2 , rate = 44100 , vol = 0.99 ) : samples = ( sec * rate ) time_steps = np . arange ( 0.0 , 1.0 , ( 1.0 / samples ) ) scaling = ( ( ( 2 * np . pi ) * freq ) * sec ) return ( np . sin ( ( time_steps * scaling ) ) * vol )
return a np .