cscore icon indicating copy to clipboard operation
cscore copied to clipboard

Is it possible to plot an linespectrum chart without actually having BasicSpectrum Provider?

Open c1Koriginal opened this issue 3 years ago • 6 comments

Using the code from Closed Issue #273 I can get fft data from all samples in a file. I do calculate an average then, since I need to have an average rate of all frequencies used(debatable, but let's assume I need).

The question is how do I actually plot that data on the graph? It seems like I can't get rid of spectrumProvider(WinformsVisualization:L163 no matter how hard I try).

I also tried playing with GenerateLineSpectrum by passing to it my averageFftBuffer(and forcing all other methods to pass it down until it should be used), having no luck at all.

I've been stuck on this for a while already, so it will be great if you managed to help me:)

c1Koriginal avatar Mar 18 '21 19:03 c1Koriginal

I had something like that: wanted a different program to plot the data. I copied the LineSpectrum and SpectrumBase classes in my namespace with a different name, added the imports and then rewrote the pieces I wanted. I even combined the 2 classes in 1 new class based on the SpectrumBase's base-class. In the end the only interesting thing is the bitmap that is to be displayed. You can probably simplify the classes much, as you might not need to be so general as Cscore needs to be! If you have the data ready, then CreateSpectrumLineInternal will plot them. You might want to download my Player project to have the working example: http://digilander.libero.it/ambusy/PlayerSimple.zip. You will have to copy the address manually, Github does not allow direct links, I'm sorry for that

Ambusy avatar Mar 22 '21 18:03 Ambusy