14.11.2011, 07:02 PM
viel schlimmer als die ffts scheint mir im Übrigen der Rauschgenerator zu sein - der sorgt bei mir für 25% CPU-Last!!!
edit:
also das:
Private rnd As New System.Random
Private Sub pinkNoise_gen()
Dim i As Int32
Dim b0, b1, b2, white, tmp As Double
For i = 0 To 131071
white = 100 * rnd.Next(-10, 10)
b0 = 0.99765 * b0 + white * 0.099046
b1 = 0.963 * b1 + white * 0.2965164
b2 = 0.57 * b2 + white * 1.0526913
tmp = b0 + b1 + b2 + white * 0.1848
pinkNoise(2 * i) = CShort(tmp) 'lch
pinkNoise((2 * i) + 1) = CShort(tmp) 'rch
Next
End Sub
edit:
also das:
Private rnd As New System.Random
Private Sub pinkNoise_gen()
Dim i As Int32
Dim b0, b1, b2, white, tmp As Double
For i = 0 To 131071
white = 100 * rnd.Next(-10, 10)
b0 = 0.99765 * b0 + white * 0.099046
b1 = 0.963 * b1 + white * 0.2965164
b2 = 0.57 * b2 + white * 1.0526913
tmp = b0 + b1 + b2 + white * 0.1848
pinkNoise(2 * i) = CShort(tmp) 'lch
pinkNoise((2 * i) + 1) = CShort(tmp) 'rch
Next
End Sub
Pffffffffft. "Da entwich das Vakuum" - Heinrich Physik, 1857.