Example of extraction 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 ExtractConfiguration object!

# Directory containing MusicXML files to be analyzed. By default, the extension should
# be .xml, but you can change it via `musif.extract.constants.MUSIC21_FILE_EXTENSIONS`
# Note that MusicXML files supported are limited to Finale exported ones.
data_dir: null

# Directory where musif writes error_files.csv when a score fails to process.
output_dir: .

# Directory containing MuseScore files to be analyzed. By default, the extension should
# be .mscx, as set in `musif.musescore.constants.MUSESCORE_FILE_EXTENSION`.
# MuseScore files are only used when one of the following features is requested:
# [ harmony, scale_relative ]. In that case, only the harmonic annotations
# are read from the MuseScore files; `data_dir` must still point to the scores.
musescore_dir: null
  
# Directory to keep .pkl files if caching is enabled. null for disabling cache.
# See `Caching` page for more info
cache_dir: null
  
# If not null, musif will export MusicXML files to dataframes pickled in this directory.
# See `musif.cache.utils.store_score_df` for more info.
# They are useful for allowing interoperability with data science packages.
dfs_dir: null

# Analyse every score as it is played: its measures unfolded in the order that ms3 gives
# its MuseScore file (repeat signs, voltas, da capo and dal segno to Fine or Coda).
# Needs musescore_dir; the column RepeatsUnfolded says which scores could be unfolded.
expand_repeats: false

# Size of windows (in number of measures) when extracting features of the score in a.
# Each row of the resulting DataFrame will correspond to each window.
# If null, only one window is extracted, with the  size of the whole score.
# A `WindowId` column is always added, containing the number of the window in the score
# to which a row of the dataframe refers to.
# Note that the standard `Id` column referred to the MusicXML files is always present.
window_size: null

# Size of overlap (in measures) between consecutive windows. Considered only if
# `window_size` is not null. It must be smaller than window_size. Only complete
# windows are extracted: a tail shorter than one window is skipped, and a score
# shorter than one window yields no rows (a warning is logged).
overlap: 2

# Number of parallel processes to be used as defined by joblib: 
# 1 => no parallel. 2 => 2 processes. -1 => all available virtual cores. -2 => all
# available virtual cores except 1
parallel: 1

# 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

# Modules that are run once for every score. This distinction is important only when
# `window_size` > 1
# They are processed first and used by the other features so disabling them might result
# in errors when extracting features.
# Dependencies may be expressed in the `musif_dependencies` property of the feature, see
# for instance `musif.extract.features.density.__init__.py`
basic_modules: ['scoring']
# Other values: file_name_generic

# Modules to be extracting from scores. Order is important, so last ones will be
# processed last. Some of them might depends on others.
# For example, density model relies on the number of note, which is computed in core.
# Dependencies may be expressed in the `musif_dependencies` property of the feature, see
# for instance `musif.extract.features.density.__init__.py`
# To disable/enable a module, simply comment the line.
features: ['core']
  # Possible values:
  # - core
  # - ambitus
  # - melody
  # - tempo
  # - density
  # - texture
  # - harmony # require MuseScore files with harmonic annotations
  # - lyrics
  # - scale
  # - scale_relative # require MuseScore files with harmonic annotations
  # - key
  # - dynamics    
  # - rhythm
  # - music21

# The list of packages/modules where basic features are. See page `Custom Features` for
# more info
basic_modules_addresses: ["musif.extract.basic_modules"]

# The list of packages/modules where features are. See page `Custom Features` for
# more info
feature_modules_addresses: ["musif.extract.features"]

# List of hooks executed before of creating the read-only cache objects.
# See `Caching` page for more info
precache_hooks: []

# remove notes and objects referred to percussion instruments
# (musif stock features do not work with percussion instruments)
remove_unpitched_objects: true

# Filter to select only some parts to be processed for each score.
# An empty list (or null) extracts all parts. The special value `voice` expands
# to every singer abbreviation (sop, ten, alt, bar, bbar, bass).
parts_filter: []
  # Possible values; if none is selected, all parts are computed.
  # - vnI
  # - vnII
  # - obI
  # - obII
  # - va
  # - bs
  # - sop
  # - ten
  # - alt
  # - bar
  # - bass
  # - bbar

# Used to split the possible layers present depending on the instrument name
# Split parts whose music21 `instrumentSound` contains one of these keywords into
# one part per voice/layer (e.g. "Oboi" split into obI and obII). Matched against
# instrumentSound values such as `wind.reed.oboe` or `strings.cello`.
# List the instruments whose staff carries two players throughout (pairs of
# winds). A staff with an occasional divisi (a viola section, say) is better left
# whole: its second part would hold nothing but the divisi measures, and those
# measures are analysed anyway, as a second melodic line of the unsplit part.
split_keywords: []
  # Example values
  # - oboe
  # - horn
  # - brass
  # - wind
  # - viola
  # - cello