"...sieve theory is the study of the internal symmetries of a series of points
either constructed intuitively, given by observation, or invented completely
from moduli of repetition." - Xenakis, Formalized Music, pp. 276
Sieve functions based on work by Iannis Xenakis. Sieves are represented as
a 2-vector of [modulo index]. U and I are used to create Union and
Intersection Sieves. Sieves may also be nil, though are factored out when a
Sieve is simplified, and generates no sequence when gen-sieve is called.
* C Code from "Sieves" article below.
* Haskell Music Theory (https://hackage.haskell.org/package/hmt-0.15)
* athenaCL (http://www.flexatone.org/athena.html)
* Music21 (http://web.mit.edu/music21/)
* Xenakis and Rahn. "Sieves". Perspectives of New Music, Vol. 28, No. 1
(Winter, 1990), pp. 58-78.
* Xenakis. "Formalized Music". pp. 268-288.
(->Intersection l r)
Positional factory function for class score.sieves.Intersection.
(->Union l r)
Positional factory function for class score.sieves.Union.
Analyzes the formula of the sieve for a given sequence pts of number
values. Sequence pts should be finite.
Returns a map containing:
* :analysis - vector of sieve vectors containing [modulus index
* :sieve - Union sieve of analysis vectors
* :period - period of the sieve
(gen-sieve n sieve)
Generate sequence using sieve. Can optionally provide number n of elements
(I & sieves)
Create new sieve that is the intersection of sieves
Factory function for class score.sieves.Intersection, taking a map of keywords to field values.
Factory function for class score.sieves.Union, taking a map of keywords to field values.
(element? s n)
Determines if number n is an element of this Sieve
Reduces Sieves in [mod index] form to its normalized form
Returns the period of the Sieve.
Reduces the Sieve to its simplest form
Returns simplified (normalized and reduce) version of sieve
(U & sieves)
Create new sieve that is the union of sieves