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 Rhinorhino 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
Joined
Feb 28, 2007
Messages
1
Location
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.

Similar threads

Part and Inventory Search

Sponsor

Back
Top