Spectrogram expects a TSpectrumAnalyzer or descendant to be connected to its Input property. Each time the Pull method is called on component, the connected components are recalcuated and new spectrum is added to the list of spectrums within the component. There are various support routines avialable to help manage that data. Typical usage scenarios are like this (assuming single channel file):
SignalRead.FileName := YourFile;
SignalRead.OpenFile;
SignalRead.RecordTimePosition := StartingTime;
SpectrumAnalyzer.Input := SignalRead;
Spectrogram.Input := SpectrumAnalyzer;
Spectrogram.PullUntilEnd;//process entire file
Spectrogram.SpectralTimeOffset := StartingTime;
Spectrogram.SpectralSamplingFrequency := 1/SignalRead.FramesPerSecond;
Alternative:
SignalRead.FileName := YourFile;
SignalRead.OpenFile;
SignalRead.RecordTimePosition := StartingTime;
SpectrumAnalyzer.Input := SignalRead;
SpectrumAnalyzer.Peaks.TraceMethod := ptAmpltHarmonics;
Spectrogram.TraceOnly := true;
Spectrogram.Input := SpectrumAnalyzer;
Spectrogram.PullUntilEnd;//process entire file
Spectrogram.Trace.EndTrace;
Spectrogram.Trace.SpectralTimeOffset := StartingTime;
Spectrogram.Trace.SpectralSamplingFrequency := 1/SignalRead.FramesPerSecond;
// Spectrogram.Trace[i].Freq //TVec contains gathered data
// Spectrogram.Trace[i].Amplt //TVec contains gathered data