melody-features

User guide

  • Installation
    • Requirements
    • Install from PyPI
    • Install from source
    • Development install
    • Verify the Python package
    • Installing IDyOM
      • What the installer sets up
      • Run the installer
      • Verify
  • Quick start
    • Batch feature extraction
    • Long format
    • Individual features
    • Next steps
  • Usage
    • Loading melodies
      • Single MIDI file
      • Lower-level import (dict, not Melody)
      • Directory of MIDI files
      • Constructing a Melody without a file
    • Bundled corpora
    • Calling individual features
    • Batch extraction with get_all_features
    • Wide vs long output
      • Wide format (default)
      • Long format
    • Configuration
      • FANTASTIC settings
      • IDyOM viewpoints
      • Multiple IDyOM runs
      • Minimal single-run example
      • Skipping IDyOM
    • Key estimation
    • Selective feature extraction
    • FANTASTIC workflow
    • MUST tokenization
    • Feature families and types
    • Putting it together
    • Legacy: JSON melody files
  • Feature catalogue
    • Sources
    • Feature types
    • Programmatic metadata
  • Corpora
    • Essen Folksong Collection
    • Pearce (2018) reference corpus
    • Custom reference corpora
    • Precomputing FANTASTIC corpus statistics
  • IDyOM
    • Default runs inside get_all_features
      • Wide-format column names
    • Standalone run_idyom
    • Key estimation and IDyOM
  • Melsim
    • Important notes
    • Requirements and setup
    • Main entry point: get_similarity_from_midi
      • Compare two files
      • Pairwise corpus (or directory)
      • Worked example in the repo
    • Similarity measures
    • Transformations
    • Legacy: arrays instead of MIDI paths
    • API reference
    • See also
  • Contour representations
    • Classes
    • Example: step contour
  • Contributing
    • Adding a new feature
    • Feature decorators
    • Docstrings
    • Tests and docs builds
  • License

API reference

  • API reference
    • Package
      • Batch extraction
      • Configuration
      • Corpora helpers
    • Feature definitions
      • Absolute pitch
      • Pitch class
      • Pitch interval
      • Contour
      • Timing
      • Inter-onset interval
      • Tonality
      • Metre
      • Expectation
      • Complexity
      • Lexical diversity
      • Corpus
    • Feature Groups
      • get_pitch_features()
      • get_pitch_class_features()
      • temperley_likelihood()
      • get_complexity_features()
      • get_complexity_feature_bundle()
      • get_interval_features()
      • get_timing_features()
      • get_inter_onset_interval_features()
      • get_rhythm_features()
      • collect_rhythm_for_pipeline()
      • get_expectation_features()
      • get_metre_features()
      • get_fantastic_features()
      • get_jsymbolic_features()
      • get_must_features()
      • get_midi_toolbox_features()
      • get_idyom_features()
      • get_simile_features()
      • get_novel_features()
    • Corpus
      • compute_corpus_ngrams()
      • save_corpus_stats()
      • load_corpus_stats()
      • load_melody()
      • load_midi_melody()
      • load_melodies_from_directory()
      • make_corpus_stats()
      • make_corpus_stats_from_json()
      • get_corpus_path()
      • get_corpus_files()
      • list_available_corpora()
    • Tokenizers and n-grams
      • Melody tokenizer
      • N-gram counter
    • I/O
      • import_midi()
      • load_midi()
      • list_midi_files()
      • import_midi_from_directory()
      • extract_time_signatures_from_midi()
      • extract_tempo_from_midi()
      • extract_tempo_changes_from_midi()
      • extract_key_signatures_from_midi()
    • Pipeline
      • process_melody()
    • Reshape
      • to_long_format()
    • Feature metadata
      • FeatureRow
      • snake_to_title()
      • capitalize_ioi()
      • normalize_feature_text()
      • fix_possessive_feature_names()
      • extract_sections_from_docstring()
      • determine_type_from_return_annotation()
      • collect_feature_rows()
      • to_dataframe()
      • build_table()
      • count_features()
      • get_feature_metadata()
    • Core
      • Melody
      • Helpers
    • Contour
      • StepContour
      • InterpolationContour
      • PolynomialContour
      • HuronContour
      • get_huron_contour()
      • polynomial_contour_coefficients()
    • IDyOM
      • is_idyom_installed()
      • install_idyom()
      • run_idyom()
      • VALID_VIEWPOINTS
    • Melsim
      • install_dependencies()
      • check_r_packages_installed()
      • get_similarity_from_midi()
      • get_similarity()
      • load_midi_file()
      • BUILTIN_SIMILARITY_MEASURES
melody-features
  • Overview: module code

All modules for which code is available

  • melody_features.contour.huron_contour
  • melody_features.contour.interpolation_contour
  • melody_features.contour.polynomial_contour
  • melody_features.contour.step_contour
  • melody_features.core.representations
  • melody_features.corpus
  • melody_features.feature_definitions.absolute_pitch
  • melody_features.feature_definitions.complexity
  • melody_features.feature_definitions.contour
  • melody_features.feature_definitions.corpus
  • melody_features.feature_definitions.expectation
  • melody_features.feature_definitions.inter_onset_interval
  • melody_features.feature_definitions.lexical_diversity
  • melody_features.feature_definitions.metre
  • melody_features.feature_definitions.pitch_class
  • melody_features.feature_definitions.pitch_interval
  • melody_features.feature_definitions.timing
  • melody_features.feature_definitions.tonality
  • melody_features.feature_metadata
  • melody_features.feature_registry
  • melody_features.features
  • melody_features.idyom.config
  • melody_features.idyom.interface
  • melody_features.io.midi
  • melody_features.melody_tokenizer
  • melody_features.melsim_wrapper.melsim
  • melody_features.ngram_counter
  • melody_features.pipeline.config
  • melody_features.pipeline.processing
  • melody_features.reshape

© Copyright 2026, David Whyatt, Peter Harrison.

Built with Sphinx using a theme provided by Read the Docs.