From 9493eefaa39cef69ed0bc9d89ee7f77f85d1240b Mon Sep 17 00:00:00 2001 From: j Date: Fri, 12 Jan 2024 11:50:17 +0100 Subject: [PATCH] adjust volume levels MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - CF (-1.5 db) - Melody (Ban's vocals) (+ 1 db) - Soon Kim_Short Reverb ( Saxophone track ) (- 0.5 db) - Soon Kim “noise” (+0.5 db) --- render.py | 7 ++++--- sax.py | 23 ++++++++++++++++++++--- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/render.py b/render.py index 952f23c..cf3b45b 100644 --- a/render.py +++ b/render.py @@ -141,7 +141,7 @@ def compose(clips, target=150, base=1024, voice_over=None): elif 'Ashley' in voc['src']: a, b = '3.75', '-5.25' elif 'Melody' in voc['src']: - a, b = '3.25', '-5.75' + a, b = '4.25', '-4.75' voc['filter'] = {'volume': a} scene['audio-center']['A1'].append(voc) vo_low = vo.copy() @@ -284,15 +284,16 @@ def compose(clips, target=150, base=1024, voice_over=None): 'filter': {'volume': '+0.2'}, }) # TBD: Foley + cf_volume = '-5.5' scene['audio-front']['A2'].append({ 'duration': clip['duration'], 'src': foley, - 'filter': {'volume': '-4'}, + 'filter': {'volume': cf_volume}, }) scene['audio-rear']['A2'].append({ 'duration': clip['duration'], 'src': foley, - 'filter': {'volume': '-4'}, + 'filter': {'volume': cf_volume}, }) used.append(clip) print("scene duration %0.3f (target: %0.3f, vo_min: %0.3f)" % (length, target, vo_min)) diff --git a/sax.py b/sax.py index 538e175..3009ea6 100644 --- a/sax.py +++ b/sax.py @@ -8,7 +8,6 @@ def generate_sax_mix(root): root = os.path.abspath(".") -project = KDEnliveProject(root) long_wav = "Soon_Kim_Long_Reverb_Only2.wav" nois_wav = "Soon_Kim_Noise.wav" @@ -28,6 +27,14 @@ i.files.all()[0].data.path ''' +reverb = { + "src": reverb_wav, + "duration": 3600.0, + "filter": { + "volume": "0.5" + }, +} + long = { "src": long_wav, "duration": 3600.0, @@ -39,20 +46,30 @@ noise = { "src": nois_wav, "duration": 3600.0, "filter": { - "volume": "4.25" + "volume": "4.75" }, } +project = KDEnliveProject(root) project.append_clip('A1', long) project.append_clip('A2', noise) path = os.path.join(root, "sax-mix.kdenlive") with open(path, 'w') as fd: fd.write(project.to_xml()) +project = KDEnliveProject(root) +project.append_clip('A1', reverb) +path = os.path.join(root, "sax-reverb-mix.kdenlive") +with open(path, 'w') as fd: + fd.write(project.to_xml()) + cmds = [] cmds.append([ "melt", "sax-mix.kdenlive", '-quiet', '-consumer', 'avformat:sax-mix.wav' ]) +cmds.append([ + "melt", "sax-reverb-mix.kdenlive", '-quiet', '-consumer', 'avformat:sax-reverb-mix.wav' +]) cmds.append([ "ffmpeg", "-y", "-nostats", "-loglevel", "error", @@ -60,7 +77,7 @@ cmds.append([ ]) for src, out1, out2 in ( - (reverb_wav, "fl.wav", "fr.wav"), + ('sax-reverb-mix.wav', "fl.wav", "fr.wav"), ("sax-mix.wav", "bl.wav", "br.wav"), ): cmds.append([