### Author Topic: Help Synchronising  (Read 94 times)

#### Mrwhy

• Hero Member
•     • Posts: 2908
• My Dad called me Mr Why when I was 5.
•  ##### Help Synchronising
« on: March 21, 2013, 11:06:19 AM »
Here is a prog that shows you a waveform while you hear it.

We get "complaints" (e.g. fron dear Oldos who helps everyone so much) that on his computer the sound is not in synchronism with the part of the wave being shown

Please one of you skilled people, show us how the user can "Slide" the waveform so it DOES HAVE any synch he wants to the sound being heard.

On my computer it is almost perfect (within 1/4 second, say)
But how nice it would be to have a little arrow sliding along to show you EXACTLY the current "point of sound" as currently issuing from the headphones or speaker.

Many thanks

Code: [Select]
`SCREEN 12, 0, 1, 0 WINDOW (-1, -.5)-(-.5, .5) t = 85 DO     DO         LOCATE 1, 1: PRINT "t= "; t         FOR tt = t - 1 TO -.5 + t STEP .0001             x = .3 * ATN(SIN(tt)) * SIN(1000 / SQR(tt) * SIN(7 * (.5 - .5 * SIN(SQR(70 * tt))) * SIN((SQR(70 * tt)))) * (COS(tt * tt)) * SIN(SQR(tt)))             PSET (tt - t, x)         NEXT tt         PCOPY 1, 0         FOR tt = t - 1 TO -.5 + t STEP .0001             x = .3 * ATN(SIN(tt)) * SIN(1000 / SQR(tt) * SIN(7 * (.5 - .5 * SIN(SQR(70 * tt))) * SIN((SQR(70 * tt)))) * (COS(tt * tt)) * SIN(SQR(tt)))              PSET (tt - t, x), 0         NEXT tt           'Enter any real-time sound-control (waveform changes) you like here.         'There will be a delay of half a second before they take effect      LOOP WHILE _SNDRAWLEN > .5      DO WHILE _SNDRAWLEN <= .5         v = .3 * ATN(SIN(t)) * SIN(1000 / SQR(t) * SIN(7 * (.5 - .5 * SIN(SQR(70 * t))) * SIN((SQR(70 * t)))) * (COS(t * t)) * SIN(SQR(t)))         _SNDRAW v         t = t + 1 / _SNDRATE     LOOP   LOOP `