music21.alpha.analysis.search¶
Functions¶
- music21.alpha.analysis.search.findConsecutiveScale(source, targetScale, degreesRequired=5, stepSize=1, comparisonAttribute='name', repeatsAllowed=True, restsAllowed=False)[source]¶
Given a pitch source and a concrete scale, return references to all elements found that represent consecutive scale segments in one direction.
The
targetScaleis a concrete scale instance.The
degreesRequiredspecifies 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
stepSizedetermines what scale step size is examinedThe
comparisonAttributeis 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
repeatsAllowedis True, repeated Pitches will be counted as part of the consecutive segment.If
restsAllowedis True, rests will not interrupt a consecutive segment.