forked from swharden/Spectrogram
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDisplaySettings.cs
More file actions
51 lines (42 loc) · 1.56 KB
/
DisplaySettings.cs
File metadata and controls
51 lines (42 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Text;
namespace Spectrogram.Settings
{
public class DisplaySettings
{
// The Spectrograph library does two things:
// 1) convert a signal to a FFT List
// 2) convert a FFT list to a Bitmap
// This class stores settings that control how the Bitmap looks (#2)
public double fftResolution;
public double freqLow;
public double freqHigh;
public int pixelLower { get { return (int)(freqLow / fftResolution); } }
public int pixelUpper { get { return (int)(freqHigh / fftResolution); } }
public int height { get { return pixelUpper - pixelLower; } }
public int width;
public float brightness = 1;
public bool decibels;
public Colormap colormap = Colormap.viridis;
public int? highlightColumn = null;
public bool showTicks = false;
public double tickSpacingSec = 1;
public double tickSpacingHz = 100;
public bool renderNeeded;
public double lastRenderMsec;
public int tickSize = 5;
public Font tickFont = new Font(FontFamily.GenericMonospace, (float)8);
public StringFormat sfTicksRight = new StringFormat()
{
LineAlignment = StringAlignment.Center,
Alignment = StringAlignment.Far
};
public StringFormat sfTicksLower = new StringFormat()
{
LineAlignment = StringAlignment.Far,
Alignment = StringAlignment.Center
};
}
}