Loading ivas_processing_scripts/audiotools/convert/scenebased.py +4 −4 Original line number Diff line number Diff line Loading @@ -79,9 +79,7 @@ def convert_scenebased( # SBA -> MASA # NOTE: only allowed for 1st order ambisonics ("FOA" + "PLANARFOA") elif isinstance(out, audio.MetadataAssistedSpatialAudio) and sba.name.endswith( "FOA" ): elif isinstance(out, audio.MetadataAssistedSpatialAudio) and (sba.name.endswith("FOA") or sba.name == "HOA2"): render_sba_to_masa(sba, out) else: Loading Loading @@ -196,8 +194,10 @@ def render_sba_to_masa( sba_in: audio.SceneBasedAudio, masa_out: audio.MetadataAssistedSpatialAudio, ) -> None: # two dir only possible from HOA2, which is not yet implemented as conversion num_dirs = 1 if sba_in.name == "HOA2": num_dirs = 2 num_tcs = masa_out.audio.shape[1] md_out_path = masa_out.metadata_file Loading ivas_processing_scripts/audiotools/wrappers/masaAnalyzer.py +3 −0 Original line number Diff line number Diff line Loading @@ -77,6 +77,9 @@ def masaAnalyzer( if sba.name not in ["PLANARFOA", "FOA", "HOA2"]: raise ValueError(f"Only FOA or HOA2 suported, but {sba.name} was given.") if num_dirs == 2 and sba.name != "HOA2": raise ValueError(f"2-dir MASA needs HOA2, but {sba.name} was given.") cmd = [ str(binary), "-mono" if num_tcs == 1 else "-stereo", Loading Loading
ivas_processing_scripts/audiotools/convert/scenebased.py +4 −4 Original line number Diff line number Diff line Loading @@ -79,9 +79,7 @@ def convert_scenebased( # SBA -> MASA # NOTE: only allowed for 1st order ambisonics ("FOA" + "PLANARFOA") elif isinstance(out, audio.MetadataAssistedSpatialAudio) and sba.name.endswith( "FOA" ): elif isinstance(out, audio.MetadataAssistedSpatialAudio) and (sba.name.endswith("FOA") or sba.name == "HOA2"): render_sba_to_masa(sba, out) else: Loading Loading @@ -196,8 +194,10 @@ def render_sba_to_masa( sba_in: audio.SceneBasedAudio, masa_out: audio.MetadataAssistedSpatialAudio, ) -> None: # two dir only possible from HOA2, which is not yet implemented as conversion num_dirs = 1 if sba_in.name == "HOA2": num_dirs = 2 num_tcs = masa_out.audio.shape[1] md_out_path = masa_out.metadata_file Loading
ivas_processing_scripts/audiotools/wrappers/masaAnalyzer.py +3 −0 Original line number Diff line number Diff line Loading @@ -77,6 +77,9 @@ def masaAnalyzer( if sba.name not in ["PLANARFOA", "FOA", "HOA2"]: raise ValueError(f"Only FOA or HOA2 suported, but {sba.name} was given.") if num_dirs == 2 and sba.name != "HOA2": raise ValueError(f"2-dir MASA needs HOA2, but {sba.name} was given.") cmd = [ str(binary), "-mono" if num_tcs == 1 else "-stereo", Loading