@@ -12,32 +12,32 @@ public class SpectrogramGenerator
1212 /// <summary>
1313 /// Number of pixel columns (FFT samples) in the spectrogram image
1414 /// </summary>
15- public int Width { get { return ffts . Count ; } }
15+ public int Width { get => FFTs . Count ; }
1616
1717 /// <summary>
1818 /// Number of pixel rows (frequency bins) in the spectrogram image
1919 /// </summary>
20- public int Height { get { return settings . Height ; } }
20+ public int Height { get => Settings . Height ; }
2121
2222 /// <summary>
2323 /// Number of samples to use for each FFT (must be a power of 2)
2424 /// </summary>
25- public int FftSize { get { return settings . FftSize ; } }
25+ public int FftSize { get => Settings . FftSize ; }
2626
2727 /// <summary>
2828 /// Vertical resolution (frequency bin size depends on FftSize and SampleRate)
2929 /// </summary>
30- public double HzPerPx { get { return settings . HzPerPixel ; } }
30+ public double HzPerPx { get => Settings . HzPerPixel ; }
3131
3232 /// <summary>
3333 /// Horizontal resolution (seconds per pixel depends on StepSize)
3434 /// </summary>
35- public double SecPerPx { get { return settings . StepLengthSec ; } }
35+ public double SecPerPx { get => Settings . StepLengthSec ; }
3636
3737 /// <summary>
3838 /// Number of FFTs that remain to be processed for data which has been added but not yet analuyzed
3939 /// </summary>
40- public int FftsToProcess { get { return ( newAudio . Count - settings . FftSize ) / settings . StepSize ; } }
40+ public int FftsToProcess { get => ( UnprocessedData . Count - Settings . FftSize ) / Settings . StepSize ; }
4141
4242 /// <summary>
4343 /// Total number of FFT steps processed
@@ -47,28 +47,28 @@ public class SpectrogramGenerator
4747 /// <summary>
4848 /// Index of the pixel column which will be populated next. Location of vertical line for wrap-around displays.
4949 /// </summary>
50- public int NextColumnIndex { get { return ( FftsProcessed + rollOffset ) % Width ; } }
50+ public int NextColumnIndex { get => ( FftsProcessed + rollOffset ) % Width ; }
5151
5252 /// <summary>
5353 /// This value is added to displayed frequency axis tick labels
5454 /// </summary>
55- public int OffsetHz { get { return settings . OffsetHz ; } set { settings . OffsetHz = value ; } }
55+ public int OffsetHz { get => Settings . OffsetHz ; set { Settings . OffsetHz = value ; } }
5656
5757 /// <summary>
5858 /// Number of samples per second
5959 /// </summary>
60- public int SampleRate { get { return settings . SampleRate ; } }
60+ public int SampleRate { get => Settings . SampleRate ; }
6161
6262 /// <summary>
6363 /// Number of samples to step forward after each FFT is processed.
6464 /// This value controls the horizontal resolution of the spectrogram.
6565 /// </summary>
66- public int StepSize { get { return settings . StepSize ; } }
66+ public int StepSize { get => Settings . StepSize ; }
6767
6868 /// <summary>
6969 /// The spectrogram is trimmed to cut-off frequencies below this value.
7070 /// </summary>
71- public double FreqMax { get { return settings . FreqMax ; } }
71+ public double FreqMax { get => Settings . FreqMax ; }
7272
7373 /// <summary>
7474 /// The spectrogram is trimmed to cut-off frequencies above this value.
0 commit comments