public void Load(string fileName, int fftLength, ShortTimeFourierTransform stft) { this.ShortTimeFourierTransform = stft; Stop(); CloseFile(); EnsureDeviceCreated(); OpenFile(fileName, fftLength); }
public STFTSampleProvider(ISampleProvider source, ShortTimeFourierTransform shortTimeFourierTransform, int fftLength = 1024) { if (!IsPowerOfTwo(fftLength)) { throw new ArgumentException("FFT Length must be a power of two"); } this.ShortTimeFourierTransform = shortTimeFourierTransform; this.source = source; }
public void DisplaySpectrogram(string filePath) { // analyser = new ShortTimeFourierTransform(filePath, double.Parse(fResolutionTxt.Text), double.Parse(timeStepTxt.Text)); analyser = new ShortTimeFourierTransform(filePath, int.Parse(fftSizeTxt.Text), double.Parse(timeStepTxt.Text)); spectrogram = new RainbowSpectrogram(analyser, int.Parse(textBox1.Text)); analyser.Ended += OnEnded; OriginalBitmap = spectrogram.Generate(); pictureBox1.Image = (Bitmap)OriginalBitmap.Bitmap.Clone(); }
public RainbowSpectrogram(ShortTimeFourierTransform stft, int maxFrequency, double significantAmplitude = 80) : base(stft, maxFrequency) { this.SignificantAmplitude = significantAmplitude; }
public Spectrogram(ShortTimeFourierTransform stft, int maxFrequency) { this.MaxFrequency = maxFrequency; this.Analyser = stft; this.TimedAnalyse = new List <SampleAnalysis[]>(); }
public LinearSpectrogram(ShortTimeFourierTransform stft, int maxFrequency) : base(stft, maxFrequency) { this.Colors = GetDefaultColors(); }