@@ -12,32 +12,32 @@ public class SpectrogramGenerator
12
12
/// <summary>
13
13
/// Number of pixel columns (FFT samples) in the spectrogram image
14
14
/// </summary>
15
- public int Width { get { return ffts . Count ; } }
15
+ public int Width { get => FFTs . Count ; }
16
16
17
17
/// <summary>
18
18
/// Number of pixel rows (frequency bins) in the spectrogram image
19
19
/// </summary>
20
- public int Height { get { return settings . Height ; } }
20
+ public int Height { get => Settings . Height ; }
21
21
22
22
/// <summary>
23
23
/// Number of samples to use for each FFT (must be a power of 2)
24
24
/// </summary>
25
- public int FftSize { get { return settings . FftSize ; } }
25
+ public int FftSize { get => Settings . FftSize ; }
26
26
27
27
/// <summary>
28
28
/// Vertical resolution (frequency bin size depends on FftSize and SampleRate)
29
29
/// </summary>
30
- public double HzPerPx { get { return settings . HzPerPixel ; } }
30
+ public double HzPerPx { get => Settings . HzPerPixel ; }
31
31
32
32
/// <summary>
33
33
/// Horizontal resolution (seconds per pixel depends on StepSize)
34
34
/// </summary>
35
- public double SecPerPx { get { return settings . StepLengthSec ; } }
35
+ public double SecPerPx { get => Settings . StepLengthSec ; }
36
36
37
37
/// <summary>
38
38
/// Number of FFTs that remain to be processed for data which has been added but not yet analuyzed
39
39
/// </summary>
40
- public int FftsToProcess { get { return ( newAudio . Count - settings . FftSize ) / settings . StepSize ; } }
40
+ public int FftsToProcess { get => ( UnprocessedData . Count - Settings . FftSize ) / Settings . StepSize ; }
41
41
42
42
/// <summary>
43
43
/// Total number of FFT steps processed
@@ -47,28 +47,28 @@ public class SpectrogramGenerator
47
47
/// <summary>
48
48
/// Index of the pixel column which will be populated next. Location of vertical line for wrap-around displays.
49
49
/// </summary>
50
- public int NextColumnIndex { get { return ( FftsProcessed + rollOffset ) % Width ; } }
50
+ public int NextColumnIndex { get => ( FftsProcessed + rollOffset ) % Width ; }
51
51
52
52
/// <summary>
53
53
/// This value is added to displayed frequency axis tick labels
54
54
/// </summary>
55
- public int OffsetHz { get { return settings . OffsetHz ; } set { settings . OffsetHz = value ; } }
55
+ public int OffsetHz { get => Settings . OffsetHz ; set { Settings . OffsetHz = value ; } }
56
56
57
57
/// <summary>
58
58
/// Number of samples per second
59
59
/// </summary>
60
- public int SampleRate { get { return settings . SampleRate ; } }
60
+ public int SampleRate { get => Settings . SampleRate ; }
61
61
62
62
/// <summary>
63
63
/// Number of samples to step forward after each FFT is processed.
64
64
/// This value controls the horizontal resolution of the spectrogram.
65
65
/// </summary>
66
- public int StepSize { get { return settings . StepSize ; } }
66
+ public int StepSize { get => Settings . StepSize ; }
67
67
68
68
/// <summary>
69
69
/// The spectrogram is trimmed to cut-off frequencies below this value.
70
70
/// </summary>
71
- public double FreqMax { get { return settings . FreqMax ; } }
71
+ public double FreqMax { get => Settings . FreqMax ; }
72
72
73
73
/// <summary>
74
74
/// The spectrogram is trimmed to cut-off frequencies above this value.
0 commit comments