-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSoundFFT.qml
97 lines (81 loc) · 2.76 KB
/
SoundFFT.qml
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
import QtQuick 2.5
import QtQuick.Controls 1.4
import QtQuick.Layouts 1.3
Item {
anchors.fill: parent
Column {
id: column1
anchors.fill: parent
Grid {
id: grid1
columnSpacing: 10
rows: 10
columns: 2
anchors.fill: parent
verticalItemAlignment: Grid.AlignVCenter
Label {
id: textFFTSize
text: qsTr("size of FFT")
transformOrigin: Item.Center
font.pixelSize: 12
}
TextField {
id: textFieldSamplerate
text: config.fftSize
placeholderText: qsTr("fftsize")
validator: IntValidator{bottom: 1; top: 19200000;}
Component.onCompleted: {
config.fftSize = Qt.binding(function() {return Number(parseFloat(text)) > 1 ? Number(parseFloat(text)) : Number(1)})
}
}
Label {
id: textFFTSize1
text: qsTr("windowing function")
font.pixelSize: 12
}
ComboBox {
id: comboBox1
width: 200
currentIndex: config.fftFunction
model: [ "Hamming window", "Hanning window", "Rectangle window" ]
Component.onCompleted: {
config.fftFunction = Qt.binding(function() { return currentIndex })
}
}
Label {
id: textFFTperSec
text: qsTr("FFT per second")
font.pixelSize: 12
}
TextField {
id: textFieldSamplerate1
text: config.fftPerSec
placeholderText: qsTr("fftPerSec")
validator: IntValidator {
bottom: 1
top: 100
}
Component.onCompleted: {
config.fftPerSec = Qt.binding(function() {return Number(parseInt(text)) > 1 ? Number(parseInt(text)) : Number(1)})
}
}
Label {
id: textFFTthreshold
text: qsTr("FFT filter threshold")
font.pixelSize: 12
}
TextField {
id: textFieldThreshold
text: config.fftThreshold
placeholderText: qsTr("fftPerSec")
validator: DoubleValidator {
bottom: 0
top: 1000000
}
Component.onCompleted: {
config.fftThreshold = Qt.binding(function() {return Number(parseFloat(text)) > 0 ? Number(parseFloat(text)) : Number(0.01)})
}
}
}
}
}