Altered calibration coefficient generation to provide more gain on signals

This commit is contained in:
2019-01-18 08:05:07 +00:00
parent 740baaf793
commit 41f1348484
3 changed files with 95 additions and 14 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ def main():
for key in vals.keys():
v.append(vals[key])
v = np.array(v)
v = v/v.max()
v = v/(v.max()*2)
v[np.isnan(v)] = 0.0
out = {}
for key, val in zip(vals.keys(), v):
+93 -12
View File
@@ -5,10 +5,10 @@
"major" : 6,
"minor" : 1,
"revision" : 10,
"architecture" : "x86"
"architecture" : "x64"
}
,
"rect" : [ 0.0, 44.0, 1920.0, 990.0 ],
"rect" : [ 0.0, 44.0, 1366.0, 678.0 ],
"bglocked" : 0,
"openinpresentation" : 0,
"default_fontsize" : 12.0,
@@ -28,6 +28,88 @@
"digest" : "",
"tags" : "",
"boxes" : [ {
"box" : {
"fontname" : "Arial",
"fontsize" : 12.0,
"frgb" : 0.0,
"id" : "obj-20",
"linecount" : 2,
"maxclass" : "comment",
"numinlets" : 1,
"numoutlets" : 0,
"patching_rect" : [ 1127.0, 559.0, 150.0, 33.0 ],
"text" : "RME Fireface Output:\n+4dB"
}
}
, {
"box" : {
"fontname" : "Arial",
"fontsize" : 12.0,
"frgb" : 0.0,
"id" : "obj-25",
"maxclass" : "comment",
"numinlets" : 1,
"numoutlets" : 0,
"patching_rect" : [ 205.5, 240.0, 150.0, 20.0 ],
"text" : "72 dB SPL / 70db HL"
}
}
, {
"box" : {
"fontname" : "Arial",
"fontsize" : 12.0,
"frgb" : 0.0,
"id" : "obj-24",
"maxclass" : "comment",
"numinlets" : 1,
"numoutlets" : 0,
"patching_rect" : [ 920.0, 215.0, 49.0, 20.0 ],
"text" : "60dBA"
}
}
, {
"box" : {
"fontname" : "Arial",
"fontsize" : 12.0,
"frgb" : 0.0,
"id" : "obj-23",
"maxclass" : "comment",
"numinlets" : 1,
"numoutlets" : 0,
"patching_rect" : [ 663.0, 215.0, 49.0, 20.0 ],
"text" : "60dBA"
}
}
, {
"box" : {
"fontname" : "Arial",
"fontsize" : 12.0,
"frgb" : 0.0,
"id" : "obj-21",
"maxclass" : "comment",
"numinlets" : 1,
"numoutlets" : 0,
"patching_rect" : [ 119.0, 516.0, 113.0, 20.0 ],
"text" : "Write values to file"
}
}
, {
"box" : {
"id" : "obj-19",
"maxclass" : "button",
"numinlets" : 1,
"numoutlets" : 1,
"outlettype" : [ "bang" ],
"patching_rect" : [ 99.0, 516.0, 20.0, 20.0 ]
}
}
, {
"box" : {
"fontname" : "Arial",
"fontsize" : 12.0,
@@ -1060,6 +1142,15 @@
"source" : [ "obj-16", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-103", 0 ],
"disabled" : 0,
"hidden" : 0,
"source" : [ "obj-19", 0 ]
}
}
, {
"patchline" : {
@@ -1670,16 +1761,6 @@
"source" : [ "obj-90", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-103", 0 ],
"disabled" : 0,
"hidden" : 0,
"midpoints" : [ 520.75, 159.0, 342.0, 159.0, 342.0, 451.0, 108.5, 451.0 ],
"source" : [ "obj-91", 0 ]
}
}
, {
"patchline" : {
+1 -1
View File
@@ -123,7 +123,7 @@ def block_mix_wavs(wavpath_a, wavpath_b, out_wavpath, a_gain=1., b_gain=1., bloc
block_size = wav_a.frames()-i
x1 = wav_a.read_frames(block_size)
x2 = wav_b.read_frames(block_size)
x1 *= a_gain
x1[:, :2] *= a_gain
x2 *= b_gain
if x1.shape[1] == 3:
y = np.zeros(x1.shape)