Questions tagged [sine-wave]

43 questions
1
vote
1 answer

How to generate a sine wave in python?

To generate a csv file where each column is a data of sine wave of frequency 1 Hz, 2 Hz, 3Hz, 4Hz, 5Hz, 6Hz and 7 Hz. The amplitude is one volt. There should be 100 points in one cycle and thus 700 points in seven waves.
Uday
  • 57
  • 12
1
vote
0 answers

Python - How to convert circular or elliptical orbit data into a sine wave?

I have a personal project I'd like to achieve as one of my first complete python projects/learning/experience. The project is to make an application that will accept some input (or just change hard-coded input) for a time scale, and convert…
1
vote
1 answer

Find start point (time) of each cycle in a sine wave

I am tying to achieve sine wave gradually changing from 8Hz to 2Hz over 5 seconds: This waveform was produced in Cool Edit. I gave it a start frequency of 8Hz, an end frequency of 2Hz and a duration of 5 seconds. The sine wave gradually changes…
pJay
  • 27
  • 8
1
vote
3 answers

Finding frequency of a sine wave array

I am trying to find a way to calculate the frequency of sine wave which is presented in array form, based on indexes by taking differences of indexes. Known to me is the time it takes between two adjacent indexes so I could just multiply this time…
user1397215
  • 321
  • 1
  • 6
  • 18
0
votes
0 answers

Fitting a sinusidal function to points that are skewed

I'm trying to find a simple formula for an almost sinusoidal wave. If you look at the picture, there is a sinusoidal wave in green that hits all my data points on the top, as I want. However, they don't go through the bottom data points, as is…
0
votes
0 answers

What is the error in this python pygame script?

An error occured in the code below. The error happened in the function Sinewave and the line sine_wave = pygame.sndarray.make_sound(SineWave(frequency,16000,2)) Sinewave function: def SineWave(freq=1000, volume=16000, length=1): num_steps = length…
0
votes
2 answers

Trying to play multiple frequencies in python sounddevice blow horrific speaker sounds and an error message saying "alsa underrun occurred"

I tried different ways to play sine waves in sounddevice, and they worked fine, until I tried to overlay multiple frequencies at once. I also get loud scratching noises in my speaker whenever there are no frequencies to play. I've simplified my code…
0
votes
0 answers

python code to generate a sine wave with diffferent points and different frequencies

The requirement is to generate a sine wave with frequencies ranging from 1 Hz to 10 Hz. The conditions are The amplitude is one volt for all sine wave frequencies The 1 Hz signal must be sampled into 100 wave points. Similarly 2 Hz signal must be…
Uday
  • 57
  • 12
0
votes
1 answer

How to generate mixed frequency sinewave using STM32F4 DAC?

I am using STM32F4 Discovery board. I have generated a 10Hz sine wave using DAC Channel1. As per STM's Application note, the sine wave generation should be done as follows: And it can be used to produce desired frequency using following…
Vishwesh GM
  • 35
  • 1
  • 12
0
votes
1 answer

Variations in matplotlib and audacity for plotting multichannel wav files

I was trying to plot time vs amplitude for all the channels of a wav file, using the code below. However I see that the matplotlib is plotting a non-existent sine wav on one of my channels. Audacity seems to be plotting the right thing, what am I…
b-ak
  • 141
  • 5
0
votes
0 answers

How to generate the random sinewave with noise?

I want to generate a sinewave with Gaussian noise and save the generated waveform data as a data set. in the next step, I want to find the frequency of the waveform. here is my code(but i don't know why the code isn't working)? import numpy as…
0
votes
0 answers

PWM sine wave using arduino and H bridge

I'm trying to provide a sinusoidal wave using PWM modulation. my circuit is comprised of the following: Arduino Uno H bridge - controls the direction (pins 4,5) and the PWM voltage (PWM pin 6) Solenoid motor - the sine output should be fed to the…
Hadar
  • 658
  • 4
  • 17
0
votes
1 answer

convert sine-waves package examples to react component

I'm trying to use sine-waves package sine-waves package , in react app, first thing I did is looking for examples, border wave particularly and start to convert it to react component and when I tried to start the app, it gives me this error : is…
fadi omar
  • 740
  • 5
  • 15
0
votes
1 answer

How to make sine wave using defined frequency on Linux Assembly

i tried to make a tone using sine wave form on NASM x86_32, which i already define the frequency like this: C: DW 4560 D: DW 4063 E: DW 3619 F: DW 3416 G: DW 3043 A: DW 2711 B: DW 2415 C.: DW 2280 I'm new on Linux assembly, i really appreciate all…
AFOEK
  • 37
  • 8
0
votes
0 answers

Fitting A sine wave without stretching it

I want to fit a sine wave without stretching it - that is I want its frequency and amplitude to remain relatively the same. So all the transformations I can make to the sine wave to fit it to my data are scaling it (increasing frequency and…
MetaStack
  • 3,266
  • 4
  • 30
  • 67