#2 Generating Sound - Sine Waves

preview_player
Показать описание
In this lesson we look at how to generate and play sound waves using c++ and SFML.

Рекомендации по теме
Комментарии
Автор

Thank you! This is the simplest tutorial on how to generate sound from any formula you want I've met so far

goodne
Автор

Doesn’t Implicit conversion to a short variable just drop information off the end without rounding? Wouldn’t it be more accurate to use a rounding function instead?

LrCloud
Автор

Thanks for this video!, this is what I have been searching for a long time. I assume that your time variable is referenced on seconds, due to the Variable "freq" being in Hz (Cycles/second), right?, or is it just the current Sample?

Also excuse my lack of knowledge, but what does the  ticks per cycle exactly represents?, might it be how many oscillations fit in one Hz?

I'm trying to port this to an Embedded Device, and need to understand this fully. Thanks!

checheromo
Автор

How to play it longer than one sec? Isn’t your sinewave a periodic function which should oscillate forever?

Limpuls
Автор

If amplitude must be 16 bit integer, is not it incorrect to use "short amplitude " rather than "unsigned short" ?

because you will be getting only half amplitude of highest possible

habi
Автор

Is it just me or is the sound is to the left???

tekra