- Subscribe to RSS
- SoundFile 0.10.3.post1
- Wave 0.0.2
- Read and write WAV files using Python (wave)
- The Sound Archive
Read and write WAV files using Python (wave)
Get x values of the sine wave. Amplitude of the sine wave is sine of a variable like time. Plot a sine wave using time and amplitude obtained for the sine wave. Give a title for the sine wave plot. Give x axis label for the sine wave plot. Give y axis label for the sine wave plot. Display the sine wave. Toggle navigation Pythontic. Sine waves have the shape of sine curve. The X-axis of the sine curve represents the time. The Y-axis of the sine curve represents the amplitude of the sine wave. The amplitude of the sine wave at any point in Y is proportional to the sine of a variable. A cycle of sine wave is complete when the position of the sine wave starts from a position and comes to the same position after attaining its maximum and minimum amplitude during its course. The time taken to complete one cycle is called the period of the sine wave. The frequency of the sine wave is given by number of cycles per second. The distance covered by a cycle measures the wavelength of the sine wave. Examples of sine waves include the oscillations produced by the suspended weight on spring and the alternating current. NumPy has the sin function, which takes an array of values and provides the sine value for them. Using the numpy sin function and the matplotlib plot a sine wave can be drawn. Example: import numpy as np import matplotlib.