uos show spectrum / FFT

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
jur
Reply | Threaded
Open this post in threaded view
|

uos show spectrum / FFT

jur
Hi,

I would like to produce a simple (real time) graph of the spectrum of a sound that i record with uos.
I am using an Raspberry 3 (Raspbian Jessie sept 2017) and a usb sound card. All examples work perfect.

I cant find a way to assess the freq data during recording.

Any help is appreciated,

regards Jur

Reply | Threaded
Open this post in threaded view
|

Re: uos show spectrum / FFT

fredvs
Administrator
This post was updated on .
Hello Jur.

For this you should use some filters.

function uos_InputAddFilter(PlayerIndex: cint32; InputIndex: cint32; LowFrequency: cint32;
  HighFrequency: cint32; Gain: cfloat; TypeFilter: cint32;
  AlsoBuf: boolean; Proc: TProc): cint32 ;
  // PlayerIndex : Index of a existing Player
  // InputIndex : InputIndex of a existing Input
  // LowFrequency : Lowest frequency of filter
  // HighFrequency : Highest frequency of filter
  // Gain : gain to apply to filter
  // TypeFilter: Type of filter : default = -1 = fBandSelect (fBandAll = 0, fBandSelect = 1, fBandReject = 2
  // fBandPass = 3, fHighPass = 4, fLowPass = 5)
  // AlsoBuf : The filter alter buffer aswell ( otherwise, only result is filled in fft.data )
  // LoopProc : External procedure to execute after DSP done
  //  result : index of DSPIn in array  -1 = error

IMHO, you may apply a filter fBandSelect for each frequency you want to mesure and see the level resulting.
And set AlsoBuf to false so the sound will not be affected but filled in fft.data ---> use the result in fft.data.

Maybe try filterplayer demos to give you some ideas.

Fre;D


 
Reply | Threaded
Open this post in threaded view
|

Re: uos show spectrum / FFT

fredvs
Administrator
This post was updated on .
In reply to this post by jur
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: uos show spectrum / FFT

fredvs
Administrator
This post was updated on .
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: uos show spectrum / FFT

fredvs
Administrator
Hello.

In last commit was added ConsoleSpectrum demo.
It shows how to do a spectrum from band-filters and how to use InputFiltersGetLevel.



Fre;D