Commit 901f6468 authored by Vladimir Malenovsky's avatar Vladimir Malenovsky
Browse files

change LUFS to LKFS

parent dc3a06ca
Loading
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -253,7 +253,7 @@ def generate_ismN_scene(
            level = -26

        logger.info(
            f"-- Encoding {source_file} at position(s) {source_azi},{source_ele} at {level} LUFS with shift of {source_shift_in_seconds} seconds"
            f"-- Encoding {source_file} at position(s) {source_azi},{source_ele} at {level} LKFS with shift of {source_shift_in_seconds} seconds"
        )

        # read source file
@@ -431,7 +431,7 @@ def generate_ismN_scene(

    # adjust the loudness of the output signal
    if "loudness" in cfg.__dict__:
        logger.info(f"-- Rescaling to target loudness: {cfg.loudness} LUFS")
        logger.info(f"-- Rescaling to target loudness: {cfg.loudness} LKFS")
        y.audio, _ = loudness_norm(y, cfg.loudness, loudness_format="BINAURAL")

    # apply fade-in and fade-out
+2 −2
Original line number Diff line number Diff line
@@ -248,7 +248,7 @@ def generate_OMASA_scene(
            level = -26

        logger.info(
            f"-- Encoding {source_file} at position(s) {source_azi},{source_ele} at {level} LUFS with shift of {source_shift_in_seconds} seconds"
            f"-- Encoding {source_file} at position(s) {source_azi},{source_ele} at {level} LKFS with shift of {source_shift_in_seconds} seconds"
        )

        # get the number of channels from the .wav file header
@@ -471,7 +471,7 @@ def generate_OMASA_scene(

    # adjust the loudness of the output signal
    if "loudness" in cfg.__dict__:
        logger.info(f"-- Rescaling to target loudness: {cfg.loudness} LUFS")
        logger.info(f"-- Rescaling to target loudness: {cfg.loudness} LKFS")
        y.audio, _ = loudness_norm(y, cfg.loudness, loudness_format="BINAURAL")

    # apply fade-in and fade-out
+2 −2
Original line number Diff line number Diff line
@@ -239,7 +239,7 @@ def generate_OSBA_scene(
            level = -26

        logger.info(
            f"-- Encoding {source_file} at position(s) {source_azi},{source_ele} at {level} LUFS with shift of {source_shift_in_seconds} seconds"
            f"-- Encoding {source_file} at position(s) {source_azi},{source_ele} at {level} LKFS with shift of {source_shift_in_seconds} seconds"
        )

        # get the number of channels from the .wav file header
@@ -449,7 +449,7 @@ def generate_OSBA_scene(

    # adjust the loudness of the output signal
    if "loudness" in cfg.__dict__:
        logger.info(f"-- Rescaling to target loudness: {cfg.loudness} LUFS")
        logger.info(f"-- Rescaling to target loudness: {cfg.loudness} LKFS")
        y.audio, _ = loudness_norm(y, cfg.loudness, loudness_format="BINAURAL")

    # apply fade-in and fade-out
+4 −4
Original line number Diff line number Diff line
@@ -242,7 +242,7 @@ def generate_sba_scene(
            level = -26

        logger.info(
            f"-- Convolving {source_file} with {IR_file} at {level} LUFS with shift of {source_shift_in_seconds} seconds"
            f"-- Convolving {source_file} with {IR_file} at {level} LKFS with shift of {source_shift_in_seconds} seconds"
        )

        # read source file
@@ -356,7 +356,7 @@ def generate_sba_scene(

    # adjust the loudness of the output signal
    if "loudness" in cfg.__dict__:
        logger.info(f"-- Rescaling to target loudness: {cfg.loudness} LUFS")
        logger.info(f"-- Rescaling to target loudness: {cfg.loudness} LKFS")
        y.audio, _ = loudness_norm(y, cfg.loudness, loudness_format="BINAURAL")

    # add background noise in FOA/HOA2/HOA3 format
@@ -393,7 +393,7 @@ def generate_sba_scene(
        # adjust the loudness of the background noise signal
        if "background_level" in scene.keys():
            logger.info(
                f"-- Rescaling background noise to target loudness: {scene['background_level']} LUFS"
                f"-- Rescaling background noise to target loudness: {scene['background_level']} LKFS"
            )

            # check if [] are used in the background level
@@ -406,7 +406,7 @@ def generate_sba_scene(
                scene["background_level"] = float(scene["background_level"])
        else:
            logger.warning(
                "-- Warning: No target loudness for background noise specified, using default value of -26 LUFS"
                "-- Warning: No target loudness for background noise specified, using default value of -26 LKFS"
            )
            scene["background_level"] = -26
        background.audio, _ = loudness_norm(background, scene['background_level'], loudness_format="STEREO")
+4 −4
Original line number Diff line number Diff line
@@ -248,7 +248,7 @@ def generate_stereo_scene(
            level = -26

        logger.info(
            f"-- Convolving {source_file} with {IR_file} at {level} LUFS with shift of {source_shift_in_seconds} seconds"
            f"-- Convolving {source_file} with {IR_file} at {level} LKFS with shift of {source_shift_in_seconds} seconds"
        )

        # read source file
@@ -357,7 +357,7 @@ def generate_stereo_scene(

    # adjust the loudness of the output signal
    if "loudness" in cfg.__dict__:
        logger.info(f"-- Rescaling to target loudness: {cfg.loudness} LUFS")
        logger.info(f"-- Rescaling to target loudness: {cfg.loudness} LKFS")
        y.audio, _ = loudness_norm(y, cfg.loudness, loudness_format="STEREO")

    # add background noise in STEREO format
@@ -394,7 +394,7 @@ def generate_stereo_scene(
        # adjust the loudness of the background noise signal
        if "background_level" in scene.keys():
            logger.info(
                f"-- Rescaling background noise to target loudness: {scene['background_level']} LUFS"
                f"-- Rescaling background noise to target loudness: {scene['background_level']} LKFS"
            )

            # check if [] are used in the background level
@@ -407,7 +407,7 @@ def generate_stereo_scene(
                scene["background_level"] = float(scene["background_level"])
        else:
            logger.warning(
                "-- Warning: No target loudness for background noise specified, using default value of -26 LUFS"
                "-- Warning: No target loudness for background noise specified, using default value of -26 LKFS"
            )
            scene["background_level"] = -26
        background.audio, _ = loudness_norm(background, scene['background_level'], loudness_format="STEREO")