0
0

I want to write my own Lowpass DSP for FMOD. I don’t understand
the C++ example – it’s very confusing… :(

I using PureBasic – here my Callback:
[code:1c2y3i7t]
Procedure.l Lowpass(ptOriginalbuffer.l, ptNewbuffer.l, Length.l, Param.l)

Protected Counter.l

Dim Values.l(Length)
CopyMemory(ptNewbuffer, @Values(), 4 * Length)

Resistor.l = 100 ;Ohm
;Frequency.l = 200 ;Hz
Capacitor.f = 3.61 * Pow(10, -6) ;F

For Counter = 0 To Length – 1

CutFrequency.f = 1 / (2 * 3.14 * Resistor * Capacitor)

;Debug Values(Counter)

If Values(Counter) < -2147483648 
  Values(Counter) = -2147483648 
ElseIf Values(Counter) > 2147483647
  Values(Counter) = 2147483647
EndIf  

Next Counter

ProcedureReturn @Values()

EndProcedure
[/code:1c2y3i7t]

I use the normal electrotechnical way. If I can now convert the
Values() (the buffers) to the frequency at each moment …. ๐Ÿ˜€

But … what can I do with the buffers? ๐Ÿ˜ณ

Can I split it – to get the frequency? If yes, I can do things
like:

[code:1c2y3i7t]
If Values_Frequency(Counter) > CutFrequency
Values_Frequency(Counter) = CutFrequency
EndIf
[/code:1c2y3i7t]

๐Ÿ˜€ 8)

I don’t understand the C++ – way :roll:

  • You must to post comments
Showing 0 results
Your Answer

Please first to submit.