How to change the harmonics of a sinwave

In summary: I am using 44100 Hz for my sampling rate. I am not recirculating the buffer and I generating new values during run time.I tried this: buffer[n] = Amplitude * Math.Sin(Math.PI * Frequency * n1 / 44100D) + ((Amplitude / 2) * Math.Sin(Math.PI * (Frequency* 3) * n1 / 44100D)) + ((Amplitude / 2) * Math.Sin(Math.PI * (Frequency * 2) * n1 / 44100D)))when I play it there is no beats, but the sound still sound boring.Also I did an FFT and
  • #36
/sophiecentaur i was just looking at how hanning workes. Beside a pluck have more than one frequency in it. And it looked like it work, right ?
 
Engineering news on Phys.org
  • #38
Baluncore said:
I believe this thread displays a good example of the Dunning-Krugger effect.
http://en.wikipedia.org/wiki/Dunning–Kruger_effect

Dude, that is not cool. I never said, I was stilled or good at DSP. I have always said I am new to this. I have said that in all my threads. I do not believe that I know more that I really do.
I am just trying to learn.
 
  • #39
Ok the hanning window function seems to be working well.

however I do have two questions :

1) When I play the sine wave like sin(445) : there are two Frequencies but when I just put the values in an array and just went the array to the fft there are only one Frequency?
is it because when I am playing the sine wave, I am using two channels ?
so the two Frequencies i would get would be 445Hz and 445 * 2 = 890 Hz

2) are window functions used in cell phone communication? because it really seems like you would lose information . but I do know that cell phones have DSP chips. does anyone know how that works ?
 
  • #40
btb4198 said:
Dude, that is not cool. I never said, I was stilled or good at DSP. I have always said I am new to this. I have said that in all my threads. I do not believe that I know more that I really do.
I am just trying to learn.
That was a bit harsh, of him, I admit, but his point is well made. You seem to want to "learn" this without involving theory and graft. There are no simple answers once you are in the realms of convolutions and transforms. There is little point in numerical 'suck it and see' with this business and that approach is too specific to yield anything useful.
 
  • #41
Sophiecentaur,
When I play the sine wave like sin(445) : there are two Frequencies but when I just put the values in an array and just went the array to the fft there are only one Frequency?
is it because when I am playing the sine wave, I am using two channels ?
so the two Frequencies i would get would be 445Hz and 445 * 2 = 890 Hz
This is the only things that seem like it would make sense right?
does that sound right to you?
 
  • #42
btb4198 said:
Sophiecentaur,
When I play the sine wave like sin(445) : there are two Frequencies but when I just put the values in an array and just went the array to the fft there are only one Frequency?
is it because when I am playing the sine wave, I am using two channels ?
so the two Frequencies i would get would be 445Hz and 445 * 2 = 890 Hz
This is the only things that seem like it would make sense right?
does that sound right to you?
I'm sorry, I really don't know what you mean here. Do you?
 
  • #43
sophiecentaur said:
I'm sorry, I really don't know what you mean here. Do you?

ok never mind... while testing i learned amplitude vs frequency is important. before I had the amplitude too high.
so I think I got it now...
Thanks for everyone who help me!
 

Similar threads

Replies
18
Views
2K
  • Programming and Computer Science
Replies
21
Views
1K
Replies
15
Views
2K
  • Electrical Engineering
Replies
4
Views
950
  • Electrical Engineering
Replies
15
Views
4K
Replies
5
Views
3K
  • Electrical Engineering
Replies
15
Views
3K
  • Introductory Physics Homework Help
Replies
3
Views
398
Replies
5
Views
1K
Replies
2
Views
1K
Back
Top