Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Modelling Sine wave

Status
Not open for further replies.

Gdg2k5

Programmer
Feb 28, 2007
1
IT
Does any1 know how i would go about modelling a soundwave in qbasic... Thanx
 
Just what do you mean by model? the sin function will give you a value, what you do with it is up to you.

The answer is "42"
 
depending the screen mode/resolution.
A = (half of height of screen)
B = width of screen
for i=0, i < b
print a dot at (x,A-A*sin(x))

if it's too 'smushed' then multiply the x in the sin line a factor.

this is crappy old pseudocode, but i hope it helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top