---
################################################
# General configuration
################################################
### Name of test; default = YYYYMMDD_HH.MM.SS_listening_test
# name: test SBA
### Date; default = YYYYMMDD_HH.MM.SS
# date: 2023.06.30
### git commit SHA; default = git rev-parse HEAD
# git_sha: abc123

### Whether to use multiprocessing; default = true
# multiprocessing: false
### Deletion of temporary directories containing 
### intermediate processing files, bitstreams etc.; default = false
# delete_tmp: true
### Master seed for random processes like bitstream error pattern generation; default = 0
# master_seed: 5

### Any relative paths will be interpreted relative to the working directory the script is called from!
### Usage of absolute paths is recommended.
### Do not use file names with dots "." in them! This is not supported, use "_" instead
### For Windows user: please use double back slash '\\' in paths and add '.exe' to executable definitions
### REQUIRED: Input path or file
input_path: "input"
### REQUIRED: Output path or file
output_path: "output"
### Metadata path or file(s)
### If input format is ISM{1-4} a path for the metadata files can be specified;
### default = null (for ISM search for item_name.{wav, raw, pcm}.{0-3}.csv in input folder, otherise ignored)
# metadata_path:
    ### Path can be set for all items with the 'all_items' key (automatic search for item_name.{wav, raw, pcm}.{0-3}.csv within this folder)
    # all_items: ".../metadata_folder"
    ### Path can be set for all items individually with 'item{1-4}' keys
    ### 'item{1-4}' keys can also be renamed to the input file names including extension {wav, raw, pcm}
    ### Either list individual files for all objects or name folder for automatic search for one item
    # item1:
        # - ".../meta_all_obj"
    # item2:
        # - ".../meta_obj1.csv"
        # - ".../meta_ob2.csv"
    # noise.wav:
        # - ".../metadata_folder_for_noise_item"

### Select only a subset of items
### searches for the specified substring in found filenames; default = null
# input_select:
#  - "48kHz"

################################################
### Input configuration
################################################
input:
    ### REQUIRED: Input format
    fmt: "HOA3"
    ### Input sampling rate in Hz needed for headerless audio files; default = 48000
    # fs: 32000

################################################
### Pre-processing on individual items
################################################
### Pre-processing step performed prior to core processing for all conditions
### If not defined, preprocessing step is skipped
preprocessing:
    ### Target format used in rendering from input format; default = null (no rendering)
    # fmt: "7_1_4"
    ### Flag for application of 50Hz high-pass filter; default = false
    hp50: true
    ### Target sampling rate in Hz for resampling; default = null (no resampling)
    # fs: 16000
    ### Target loudness in LKFS; default = null (no loudness change applied)
    loudness: -26
    ### Spatial audio format in which loudness is adjusted (only used if preprocessing loudness is not null);
    ### default = null (uses preprocessing fmt if possible)
    loudness_fmt: "BINAURAL"
    ### Pre-/post-trim individual signal(s) (ms) (negative values pad silence); default = 0
    # trim:
        # - 50
        # - -50
    ### Flag for using noise (amplitude +-4) instead of silence for padding; default = false (silence)
    # pad_noise: true
    ### Value for application of delay (ms) (negative values advance); default = 0
    # delay: 20
    ### Length of window used at start/end of signal (ms); default = 0
    window: 100
    
################################################
### Pre-processing on whole signal(s)
################################################
preprocessing_2:
    ### Options for processing of the concatenated item (concatenate_input: true) or
    ### the individual items (concatenate_input: false) after previous pre-processing step
    ### Horizontally concatenate input items into one long file; default = false
    concatenate_input: true
    ### Specify the concatenation order in a list of strings. If not specified, the concatenation order would be
    ### as per the filesystem on the users' device
    ### Should only be used if concatenate_input = true
    ### Specify the filename with extension.
    ### For example, concatenation_order: ["file3.wav", "file1.wav", "file4.wav", "file2.wav"]
    # concatenation_order: []
    ### Specify preamble duration in ms; default = 0
    preamble: 10000
    ### Flag wheter to use noise (amplitude +-4) for the preamble or silence; default = false (silence)
    # preamble_noise: true
    ### Additive background noise
    # background_noise:
        ### REQUIRED: SNR for background noise in dB
        # snr: 10
        ### REQUIRED: Path to background noise, must have same format and sampling rate as input signal(s)
        # background_noise_path: ".../noise.wav"
        ### Seed for delay offest; default = 0
        # seed_delay: 10

    
################################################
### Configuration for conditions under test
################################################
### List of conditions to generate
### Name of the key will be used as output directory name
###     conditions must specify the "type" key which may be one of the following options:
###     ref        generate the reference condition
###     lp3k5      generate a low-pass anchor with cut-off frequency 3.5 kHz
###     lp7k       generate a low-pass anchor with cut-off frequency 7 kHz
###     mnru       generate MNRU condition
###     esdru      generate ESDRU condition
###     mono_dmx   generate mono downmix condition
###     evs        generate an EVS coded condition (see below examples for additional required keys) (currently uses IVAS EVS mode)
###     ivas       generate an IVAS coded condition (see below examples for additional required keys)
conditions_to_generate:
  ### Reference and anchor conditions ##########################
  c01:
      ### REQUIRED: type of condition
      type: ref
      ### optional low-pass cut-off frequency in Hz; default = null
      # out_fc: 22500
            
  ### EVS condition ################################
  c02:
      ### REQUIRED: type of condition
      type: evs
      ### REQUIRED: Bitrates to use for coding
      ### For EVS mono, this may be a per-channel bitrate configuration (must match input/preprocessing format!)
      ### the last value will be repeated if too few are specified
      bitrates:
          - 13200
          # - [13200, 13200, 8000, 13200, 9600]
      cod:
          ### Path to encoder binary; default search for IVAS_cod in bin folder (primary) and PATH (secondary)
          bin: EVS_cod
          ### Encoder input sampling rate in Hz (resampling performed in case of mismatch); default = null (no resampling)
          # fs: 32000
      dec:
          ### Path to encoder binary; default search for IVAS_dec in bin folder (primary) and PATH (secondary)
          bin: EVS_dec
          ### Decoder output sampling rate; default = null (same as input)
          # fs: 48000

  c03:
      ### REQUIRED: type of condition
      type: ivas
      ### REQUIRED: Bitrates to use for coding
      ### For EVS mono, this may be a per-channel bitrate configuration (must match input/preprocessing format!)
      ### the last value will be repeated if too few are specified
      bitrates:
          - 48000
          # - [13200, 13200, 8000, 13200, 9600]
      cod:
          ### Path to encoder binary; default search for IVAS_cod in bin folder (primary) and PATH (secondary)
          bin: IVAS_cod
          ### Encoder input sampling rate in Hz (resampling performed in case of mismatch); default = null (no resampling)
          # fs: 32000
      dec:
          ### Path to encoder binary; default search for IVAS_dec in bin folder (primary) and PATH (secondary)
          bin: IVAS_dec
          ### Decoder output sampling rate; default = null (same as input)
          # fs: 48000


################################################
### Post-processing
################################################
### Post-processing step performed after core processing for all conditions
### Post-processing is required and can not be omitted
postprocessing:
    ### REQUIRED: Target format for output
    fmt: "BINAURAL"
    ### REQUIRED: Target sampling rate in Hz for resampling
    fs: 48000
    ### Low-pass cut-off frequency in Hz; default = null (no filtering)
    # lp_cutoff: 24000
    ### Target loudness in LKFS; default = null (no loudness change applied)
    # loudness: -26
    ### Spatial audio format in which loudness is adjusted (only used if preprocessing loudness is not null);
    ### default = null (uses postprocessing fmt if possible)
    # loudness_fmt: null
    ### Name of custom binaural dataset (without prefix or suffix);
    ### default = null (ORANGE53(_Dolby) for BINAURAL, IISofficialMPEG222UC for BINAURAL_ROOM)
    # bin_dataset: SADIE
    ### Render LFE to binaural output with the specified gain (only valid for channel-based input); default = null
    # bin_lfe_gain: 1
    ### Flag whether output should be limited to avoid clipping (can alter target loudness); default = true
    # limit: false
    ### Head-tracking trajectory file for binaural output; default = null
    # trajectory: "path/to/file"
