Skip to content

Commit 9f8161d

Browse files
committed
implementing the reverb plugin window
1 parent 34f9215 commit 9f8161d

File tree

2 files changed

+100
-1
lines changed

2 files changed

+100
-1
lines changed

src/contents/ui/Common.js

+9-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function isEmpty(v) {
1313
return v === null;
1414
default:
1515
return false;
16-
}
16+
}
1717
}
1818

1919
function equalArrays(a, b) {
@@ -39,6 +39,14 @@ function regExpEscape(str) {
3939
return str.replace(/[\\/^$*+?.()|[\]{}\-]/g, '\\$&');
4040
}
4141

42+
function linearTodb(value) {
43+
if (value >= minimumLinearLevel) {
44+
return 20.0 * Math.log10(value);
45+
}
46+
47+
return minimumDecibelLevel;
48+
}
49+
4250
function printObjectProperties(obj) {
4351
for (var prop in obj) {
4452
print(prop += " (" + typeof (obj[prop]) + ") = " + obj[prop]);

src/contents/ui/Reverb.qml

+91
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,89 @@ Kirigami.ScrollablePage {
218218

219219
}
220220

221+
Kirigami.MenuDialog {
222+
id: presetsDialog
223+
224+
title: i18n("Reverberation Presets")
225+
actions: [
226+
Kirigami.Action {
227+
icon.name: "bookmarks-symbolic"
228+
text: i18n("Ambience")
229+
onTriggered: {
230+
pluginDB.decayTime = 1.10354;
231+
pluginDB.hfDamp = 2182.58;
232+
pluginDB.roomSize = 4;
233+
pluginDB.diffusion = 0.69;
234+
pluginDB.amount = Common.linearTodb(0.291183);
235+
pluginDB.dry = Common.linearTodb(1);
236+
pluginDB.predelay = 6.5;
237+
pluginDB.bassCut = 514.079;
238+
pluginDB.trebleCut = 4064.15;
239+
}
240+
},
241+
Kirigami.Action {
242+
icon.name: "bookmarks-symbolic"
243+
text: i18n("Empty Walls")
244+
onTriggered: {
245+
pluginDB.decayTime = 0.505687;
246+
pluginDB.hfDamp = 3971.64;
247+
pluginDB.roomSize = 4;
248+
pluginDB.diffusion = 0.17;
249+
pluginDB.amount = Common.linearTodb(0.198884);
250+
pluginDB.dry = Common.linearTodb(1);
251+
pluginDB.predelay = 13;
252+
pluginDB.bassCut = 240.453;
253+
pluginDB.trebleCut = 3303.47;
254+
}
255+
},
256+
Kirigami.Action {
257+
icon.name: "bookmarks-symbolic"
258+
text: i18n("Room")
259+
onTriggered: {
260+
pluginDB.decayTime = 0.445945;
261+
pluginDB.hfDamp = 5508.46;
262+
pluginDB.roomSize = 4;
263+
pluginDB.diffusion = 0.54;
264+
pluginDB.amount = Common.linearTodb(0.469761);
265+
pluginDB.dry = Common.linearTodb(1);
266+
pluginDB.predelay = 25;
267+
pluginDB.bassCut = 257.65;
268+
pluginDB.trebleCut = 20000;
269+
}
270+
},
271+
Kirigami.Action {
272+
icon.name: "bookmarks-symbolic"
273+
text: i18n("Large Empty Hall")
274+
onTriggered: {
275+
pluginBackend.reset();
276+
pluginDB.decayTime = 2.00689;
277+
pluginDB.hfDamp = 20000;
278+
pluginDB.amount = Common.linearTodb(0.366022);
279+
}
280+
},
281+
Kirigami.Action {
282+
icon.name: "bookmarks-symbolic"
283+
text: i18n("Disco")
284+
onTriggered: {
285+
pluginBackend.reset();
286+
pluginDB.decayTime = 1;
287+
pluginDB.hfDamp = 3396.49;
288+
pluginDB.amount = Common.linearTodb(0.269807);
289+
}
290+
},
291+
Kirigami.Action {
292+
icon.name: "bookmarks-symbolic"
293+
text: i18n("Large Occupied Hall")
294+
onTriggered: {
295+
pluginBackend.reset();
296+
pluginDB.decayTime = 1;
297+
pluginDB.hfDamp = 3396.49;
298+
pluginDB.amount = Common.linearTodb(0.269807);
299+
}
300+
}
301+
]
302+
}
303+
221304
header: EeInputOutputGain {
222305
id: inputOutputLevels
223306

@@ -241,6 +324,14 @@ Kirigami.ScrollablePage {
241324
position: Controls.ToolBar.Footer
242325
flat: true
243326
actions: [
327+
Kirigami.Action {
328+
text: i18n("Presets")
329+
icon.name: "bookmarks-symbolic"
330+
enabled: DB.Manager.main.showNativePluginUi
331+
onTriggered: {
332+
presetsDialog.open();
333+
}
334+
},
244335
Kirigami.Action {
245336
text: i18n("Show Native Window")
246337
icon.name: "window-duplicate-symbolic"

0 commit comments

Comments
 (0)