Questions tagged [sine-wave]
43 questions
0
votes
0 answers
Playing audio continuously in Python
Hello there,
I search for a way to play audio files in Python in real time and with as less code as possible. I tried to use a gstreamer-command to play a pre-recorded sinewave:
os.system('gst-play-1.0 sine_wave.mp3')
But this solution is trash, as…

Totemi1324
- 468
- 1
- 6
- 19
0
votes
1 answer
Resize sine wave horizontally and proportionally - js
I don't know the correct way to resize the sine wave horizontally and have the proportions scale down when you resize the window. It still needs to be at the same place vertically, it's only horizontal and proportional resizing i need now. The sine…

Nicolas
- 97
- 7
0
votes
0 answers
Generating a series of slightly random integers in a numpy array
I want to create composite audio test signals in a numpy array. I need the values to be integers rounded to the nearest whole number. Secondly I want to add random noise or dither.
You can see below the code I use currently. This should comprise…

Richard
- 144
- 1
- 8
0
votes
0 answers
Matlab optimization routines failing to fit simple sinusoidal data
I have some simple time vs position data that I am trying to fit using any of matlab's optimization functions. I've given an example of the data (shown in blue) and the sinusoidal fit I am getting when using lsqnonlin (shown in red). 1
I know my…

Rishi Singh
- 1
- 1
0
votes
1 answer
Android java: draw image of a sine waveform
How to draw an image (of any type, png, jpg, bmp etc) of a Sine wave knowing frequency with amplitude = 1?
Example:

Northumber
- 315
- 2
- 3
- 15
0
votes
3 answers
Is There a Triangle Wave Function?
in a for-loop with % to get a saw function, for example using a period of 5 printing 2 cycles would look like this:
for(auto i = 0; i < 5 * 2; ++i) cout << i % 5 << endl;
Results in:
0
1
2
3
4
0
1
2
3
4
I want a function returns…

Jonathan Mee
- 37,899
- 23
- 129
- 288
0
votes
1 answer
Generate sine wave using ADC
I have a adc module on my board. I create a sine wave on signal generator. And I give output of this generator to a adc pin. Finally I read value of this pin periodically. I try to create a sine wave on my software.
x = t,
y = Asin(wt),
A :…

zakjma
- 2,030
- 12
- 40
- 81
-1
votes
2 answers
Play a sine wave indefinitely - java
I'm trying to make a piece of code that can play a sine wave continually. I want to be able to play a frequency of a MIDI note. The MIDI library in java feels a bit sloppy (when I tell it to play there is a small delay between the press of the key…

LightningdeGolem
- 67
- 7
-1
votes
2 answers
Sine Wave Animation
This is the effect that I am trying to achieve: link
I have gotten the four waves and they are indeed animated, but I have gotten stuck on giving each of them a slightly different animation. At the current point, all curves move at the same speed,…

felixo
- 1,453
- 6
- 33
- 60
-1
votes
1 answer
How to draw vertical sinewave in Opengl
I have made a flowing water in Opengl and now wants it to convert in the form of waterfall. For water i used sine wave and for waterfall i want to convert those horizontal sine waves into vertical sine waves. i have tried swapping positions of x and…

shahtaj khalid
- 476
- 7
- 24
-2
votes
2 answers
Delay function in qml
I have created a sine wave.
I added timer in the code and i try to call the delay but i am not able to get it.
I try to call near ctx.lineto but no use.
i need to add a delay between 1 plotting to another plotting.
Pls help me to solve this…

sai vineeth
- 3
- 2
-2
votes
1 answer
Using C#, how to identify if it's a sine wave by reading a file containing time and sample values of a waveform taken from oscilloscope?
I have a text file containing time and sample values of a waveform taken from an oscilloscope.
How do i identify by reading the samples, that it is a sine wave?
Is there a way to identify if the waveform is clipped, has a constant amplitude…

ragnot
- 1
-2
votes
1 answer
How to combine two sine waves without cracks
I'm using Python, pyaudio and scipy and I would like to combine two sine waves (two tones) in a way that one tone is played after another (create melody). Let's assume that I have two arrays: tone1 and tone2.
tone1 contains data of sine wave with…

Shot
- 345
- 5
- 19