Questions tagged [sine-wave]

29 questions
10
votes
8 answers

drawing sine wave in canvas

I am trying to draw a simple sine wave in a canvas but i am not getting it right. this is my desired output as in the picture. What I have got so far is http://jsfiddle.net/RaoBurugula/gmhg61s6/4/ HTML
BRDroid
  • 2,522
  • 4
  • 32
  • 81
8
votes
2 answers

Animate sine wave, fixed start and end points

I have a sine wave in my canvas that is animated, swaying left and right. What I am trying to achieve is that the start and end points stay fixed. How to achieve that? Here is the Code Pen function start() { var canvas =…
kontenurban
  • 997
  • 3
  • 16
  • 40
5
votes
1 answer

How to associate days (1 to 365.25) to radians in perl?

I have number of days from 1 to 180 days, decreasing and increasing dates from the date $epoch='2020-05-11'. The full period = 365.25 days, an amplitude, a frequency and a phase will be added later in the end to create a sine wave. This is not the…
Peri
  • 81
  • 2
4
votes
1 answer

Why does this code produce a very noisy sine wave?

I'm trying to write a very simple sound synth in Java. I'm using the javax.sound.sampled package. The code below works, but the sine wave is very noisy and sounds like there's some kind of quiet warm noise played alongside the wave. try { …
abababab
  • 53
  • 5
4
votes
2 answers

How to create sinwave animation while Recording/Playing audio in Android app ?

It is easy to create in iOS application. Any one tell me the easy way to create the Sinwave animation while record and play the audio. I was tried soo many ways but I couldn't. Is there any third party frameworks for that? Can any one help me out…
Surezz
  • 481
  • 3
  • 10
3
votes
2 answers

Plot FFT as a set of sine waves in python?

I saw someone do this in a presentation but I'm having a hard time reproducing what he was able to do. Here's a slide from his presentation: Pretty cool. He decomposed a dataset using FFT, then plotted the appropriate sine waves that the FFT…
Legit Stack
  • 1,998
  • 3
  • 24
  • 43
3
votes
3 answers

Science of Chords

I've been doing research on trying to understand the way sounds and sine waves work, particularly with chords. So far, my understanding is as follows: b(t) = sin(Api(t)) is the base note of the chord at frequency A. T(t) = sin(5/4piA(t)) is the…
2
votes
1 answer

Problem when graphing sine waves in python

I've written the following program using python in order to graph multiple sine waves of different frequencies, as well as display the points of intersection between them; import numpy as np import matplotlib.pyplot as…
user13215247
2
votes
1 answer

How to convert sine wave form in to audio?

I have raw data: x-values y-values x being the time domain. Sample rate is 8000 Hz. I have plotted them in a sine wave, but can't seem to find any way to convert that into audio form. Can someone guide through this process?
Saif Ali
  • 389
  • 5
  • 21
2
votes
1 answer

How to fill the shape, made up of GL_LINE_LOOP

I'm trying to make do water simulation. But I'm restricted to use 2D, So i started with just making the boundary of the sea by using sine wave, through Gl_Line_loop. but I'm just unable to fill it. I have tried changing it to the Gl_polygon mode but…
shahtaj khalid
  • 456
  • 6
  • 20
2
votes
2 answers

issue when generating sine wave for more than 1 second

I have searched almost SO & few forums, but unable to figure out. I have not coded this from scratch. I got the code and I am trying to modify as per my requirement. So firstly credits to original coder. I am ref this…
vk41286
  • 103
  • 1
  • 9
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
  • 5
0
votes
0 answers

Gnuradio: SineWave generator python block choppy audio out

for testing something I am trying to develop my own SineWave generator using python block in gnuradio the block is here """ Embedded Python Blocks: Each time this file is saved, GRC will instantiate the first class it finds to get ports and…
Hojzerice
  • 5
  • 2
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 Sharvit
  • 333
  • 2
  • 10
1
2