Navigation

  • index
  • modules |
  • next |
  • previous |
  • music21 »
  • Module Reference »
  • music21.alpha.analysis.search

Previous topic

music21.alpha.analysis.ornamentRecognizer

Next topic

music21.analysis.correlate

Table of Contents

  • music21.alpha.analysis.search
    • Functions
      • findConsecutiveScale()

Table of Contents

  • About music21
  • User’s Guide
  • Module Reference
  • Installation
  • Developer Reference
  • Documentation and tests in progress

Quick search

This Page

  • Show Source

music21.alpha.analysis.search¶

Functions¶

music21.alpha.analysis.search.findConsecutiveScale(source, targetScale, degreesRequired=5, stepSize=1, comparisonAttribute='name', repeatsAllowed=True, restsAllowed=False)¶

Given a pitch source and a concrete scale, return references to all elements found that represent consecutive scale segments in one direction.

The targetScale is a concrete scale instance.

The degreesRequired specifies how many consecutive scale degrees are required for grouping. Note that if more are found, they will continue to be gathered until a break is found.

The stepSize determines what scale step size is examined

The comparisonAttribute is the Pitch class attribute used for all pitch comparisons; this can be used to force enharmonic comparison (‘name’), pitch space comparison (‘nameWithOctave’) or permit pitch class matching (‘pitchClass’).

If repeatsAllowed is True, repeated Pitches will be counted as part of the consecutive segment.

If restsAllowed is True, rests will not interrupt a consecutive segment.

Navigation

  • index
  • modules |
  • next |
  • previous |
  • music21 »
  • Module Reference »
  • music21.alpha.analysis.search
© Copyright 2006-2023 Michael Scott Asato Cuthbert. Last updated on Dec 21, 2023.