tried create sawtooth curve
I tried the old math y=constant *x line,but also added y=y mod maxaltitude before draw it
looks like sawtooth when drawed,but dont know how to make it correct to sound freqency you want?
...
calculate wavelength from hz
chop of in x direction when reached wavelength and start with y=startvalue
is this sawtooth looking right?
mov xpcurve,0
mov ypcurve,400+64
@@L2saw:
mov ebx,ypcurve
add ebx,-1
;and ebx,63
;mov edx,256
mov edx,0
add edx,ebx
mov ypcurve,edx
invoke drawtriangle,xpcurve,ypcurve,10,10
mov ecx,xpcurve
add ecx,1
mov xpcurve,ecx
;x= xcurve mod wavelength
xor edx,edx
mov eax,ecx
div wavelength
.IF edx==0
mov ebx,400+64;miny
mov ypcurve,ebx
.ENDIF
mov ecx,xpcurve
.IF ecx<1024
jmp @@L2saw
.ENDIF