Imagine that your computer is a DJ on a turntable and randomly changes direction and speed during playback. This is the first (but not the last) version of this effect.
misto = 44100 * 5 '5 seconds after music start playing start effect
mistoE = misto + 88200 'effect ends 2 seconds after effect start
rychlost = 88200
file$ = "a.mp3"
Print "Opening sound file "; file$
L = _MemSound(f, 1)
R = _MemSound(f, 2)
Print "Creating standard array" i = i + 1
Done& = Done& + 2
i = i - 2
Dim snd2
(3 * UBound(snd
)) As SND
'this time i do not calculate array size - because this demo use random output lenght zacatek = misto
konec = mistoE
psi2
= _Pi(1) / (zacatek
- konec
)
copy = 0
Print "Creating pseudo mix" If original
> misto
And original
< mistoE
Then k2 = k2 + psi2
copy = ocopy + newi
original
= original
+ Abs(Sin(k2
)) ocopy = copy
copy = copy + 1
original
= Int(original
+ 1)
If original
> mistoE
+ 44100 Then 'pause between two mix hits (44100 = 1 sec) misto
= original
+ 44100 * Rnd 'effect start in samples (44100 x time) mistoE
= misto
+ 44100 * Rnd + 500 'effect end in samples zacatek = misto
konec = mistoE
psi2
= _Pi(1) / (zacatek
- konec
)
snd2(original).L = snd(copy).L
snd2(original).R = snd(copy).R
_SndRaw snd2
(test
).L
/ 32768, snd2
(test
).R
/ 32768