Exemplo n.º 1
0
 public void Load(string fileName, int fftLength, ShortTimeFourierTransform stft)
 {
     this.ShortTimeFourierTransform = stft;
     Stop();
     CloseFile();
     EnsureDeviceCreated();
     OpenFile(fileName, fftLength);
 }
Exemplo n.º 2
0
 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;
 }
Exemplo n.º 3
0
 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();
 }
Exemplo n.º 4
0
 public RainbowSpectrogram(ShortTimeFourierTransform stft, int maxFrequency, double significantAmplitude = 80) : base(stft, maxFrequency)
 {
     this.SignificantAmplitude = significantAmplitude;
 }
Exemplo n.º 5
0
 public Spectrogram(ShortTimeFourierTransform stft, int maxFrequency)
 {
     this.MaxFrequency = maxFrequency;
     this.Analyser     = stft;
     this.TimedAnalyse = new List <SampleAnalysis[]>();
 }
Exemplo n.º 6
0
 public LinearSpectrogram(ShortTimeFourierTransform stft, int maxFrequency) : base(stft, maxFrequency)
 {
     this.Colors = GetDefaultColors();
 }