Below are the two different methods of generating time to create an audio sine wave. While framerate is being used as steps in one method, the inverse of sampling rate is being used as steps in the other method. Where is the difference?
Method 1
# Create a sound
framerate = 44100
time = np.linspace(0,5,framerate*5) #Multiplying framerate
signal = np.sin(2*np.pi*220*time) + np.sin(2*np.pi*224*time)
----------------------------------
Method 2
#Simulation parameters
srate = 500 #Sampling Rate in Hz
time = np.arange(0.0, 2.0, 1.0/srate) #Dividing Sampling rate
#Sine Wave Parameters
freq = 3 #Frequency in Hz
ampl = 2 #Amplitude in a.u.
phas = np.pi/3 #Phase in Radians
#Generate the Sine Wave
sine_wave = ampl*np.sin(2*np.pi*freq*time + phas )