Example of processing configuration fileΒΆ

The following code shows the available configuration and all the default values. Remember that you can always add your own variables and you will find them in the DataProcessor object!

# Log file path and logging levels for the console (console_log_level) and
# the log file (file_log_level)
log:
  log_file: ./musif.log
  file_log_level: DEBUG
  console_log_level: ERROR

# Flag to determine whether to delete rows associated to files containing errors (whose
# FileNames must be contained in a './errors.csv' file) or not
delete_failed_files: False

# Flag to determine whether delete rows associated to files that do not have harmonic
# annotations (and
# hence, no harmonic analysis) or not
delete_files_without_harmony: False

# Flag to determine if keys, keys modulatory and degrees columns should be grouped per type
# For instance, about the keys:
# * V and v are merged into the D and d groups (dominant), and Dom = D + d
# * IV, II, and VI are merged into the SD group (subdominant)
# * iv and ii are merged into the sd group (subdominant), and SubD = SD + sd
# * I and i are merged into the T group (tonic)
# * III and vi are merged into the rel group (relative)
#
# The degrees are grouped into Asc (#), Desc (b), Dasc (x), Ddesc (bb), Nat and
# Nonat columns, separately for _Count and _Per features (and their _relative
# variants), for every scope prefix that carries degree columns.
grouped_analysis: False

# Flag to determine if Intrumentation column should be disgregated in several columns
# (Presence_of_*) having a value of 1 if instrument is present, 0 otherwise.
# see also `delete_presence` option
separate_instrumentation_column: False

# Instruments exempted from `instruments_to_delete` below
# Matching is case-sensitive
instruments_to_keep: []
  # Possible values are from abbreviations from musif.musicxml.constants.SOUND_TO_ABBREVIATION
  # Note that if an abbreviation is not available, the full instrument name is used
  # Example:
  # - vnI
  # - bs
 
# Specify the instuments whose features will be deleted
# i.e. 
# * features containing 'Part' + <inst> will be deleted
# * features containing <inst> + '_' will be deleted
# Matching is case-sensitive
instruments_to_delete: []
  # Possible values are from abbreviations from musif.musicxml.constants.SOUND_TO_ABBREVIATION
  # Note that if an abbreviation is not available, the full instrument name is used
  # First letter is always capitalized
  # Example:
  # - Ob
  # - Cor
  # - Bn
  # - Va
  # - Eh
  # - Tbn
  # - TbI
  # - Timp
  # - Tr
  # - TrI
  # - BsI
  # - BsII
  # - VeI
  # - VeII
  # - CI
  # - CiII
  # - CiI

# Rows having more than this percentage of NaN will be deleted
# value null (or None) means "keep all" columns/rows
max_nan_rows: null

# Columns having more than this percentage of NaN will be deleted (applied after
# `max_nan_rows`)
# value null (or None) means "keep all" columns/rows
max_nan_columns: null

# Master switch for the NaN-based column deletion above
delete_columns_with_nans: True

# Delete every Sound*_ column (except Sound*Voice*) plus FamilyInstrumentation and
# FamilyScoring. Off by default: these are stock features.
delete_sound_columns: False

# Delete the Sound<X>_ columns of every sound performed by exactly one part in
# the whole DataFrame: they equal the Part<X>_ columns by construction. The
# per-part means and part counts (NotesMean, SoundingMeasuresMean,
# NumberOfParts, NumberOfFilteredParts) are kept. Off by default.
delete_duplicated_sound_columns: False

# Columns containing these substrings may have their empty cells replaced with
# 0, where an empty cell stands for "no such event". The replacement is made
# only where 0 is the measured value:
#   - in the columns that count events or give their proportion (_Count, _Per,
#     and the chord, numeral, key and addition columns of the harmonic
#     analysis); a statistic (mean, deviation, ratio...) is never replaced;
#   - for the scores in which the part, sound or family has notes, and, for
#     the Harmony_ and _relative columns, in which the analysis is available.
# The cells of a part that is not in a score stay empty. The replacement runs
# before the NaN thresholds above, so max_nan_columns measures how often there
# was nothing to measure: it deletes the parts that few scores have, not the
# events that seldom happen.
# Matching is case-insensitive
replace_nans: []
  # Example of values (but any substring can be used):
  # - Interval
  # - Degree
  # - Harmony

# Columns ending with any of these strings will be deleted
# Matching is case-sensitive
columns_endswith: []
  # example of values (but any other suffix can be used)
  # - _HighestNote
  # - _LowestNote
  # - _Notes
  # - _SoundingMeasures
  # - _Syllables
  # - _NumberOfFilteredParts
  # - NumberOfParts
  # - _NotesMean
  # - Librettist
  # - _LargestIntervalAsc
  # - _LargestIntervalAll
  # - _LargestIntervalDesc
  # - _NotesMean
  # - 'Semitones_Sum'    
  # - _MeanInterval'

# Columns starting with any of these strings will be deleted
# Matching is case-sensitive
columns_startswith: []
  # example of values (but any other prefix can be used)
  # - FamilyWw
  # - FamilyBr
  # - FamilyGen
  # - FamilyGen
  # - FamilyPerc
  # - EndOfThemeA
  # - NumberOfBeats
  # - SoundVoice_Dyn

# Columns containing any of these strings will be deleted
# Matching is case-sensitive
columns_contain: []
  # example of values (but any other substring can be used)
  # - _Count
  # - _SoundingMeasuresMean
  # - _SmallestSemitones
  # - _SmallestAbsolute
  # - _SmallestInterval
  # - Bn
  # - VnII
  # - VnIII
  # - VnIV
  # - Vc
  # - Cl
  # - Tpt
  # - Hn
  # - Fl

# Columns exactly matching any of these strings will be deleted
# Matching is case-sensitive
columns_match: []
  # example of values (but any column can be used)
  # - Presence_of_vn
  # - Presence_of_bs
  # - Presence_of_vc
  # - Presence_of_va