Navigation

  • index
  • modules |
  • next |
  • previous |
  • music21 »
  • Module Reference »

Previous topic

music21.abcFormat.translate

Next topic

music21.alpha.chant

Table Of Contents

  • music21.alpha.analysis.search
    • Functions

Table Of Contents

  • About Music21
  • User’s Guide
  • Module Reference
  • Installation
  • Tutorials
  • Developer Reference

Quick search

Enter search terms or a module, class or function name.

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, the 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 »
© Copyright 2006-2015, Michael Scott Cuthbert and cuthbertLab. Last updated on Nov 04, 2015. Created using Sphinx 1.3.1.