"...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.
Code Consulted:
Literature:
"...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. Code Consulted: * 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/) Literature: * Xenakis and Rahn. "Sieves". Perspectives of New Music, Vol. 28, No. 1 (Winter, 1990), pp. 58-78. * Xenakis. "Formalized Music". pp. 268-288.
(analyze-sieve pts)
Analyzes the formula of the sieve for a given sequence pts of number values. Sequence pts should be finite.
Returns a map containing:
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 points-covered]. * :sieve - Union sieve of analysis vectors * :period - period of the sieve
(gen-sieve sieve)
(gen-sieve n sieve)
Generate sequence using sieve. Can optionally provide number n of elements to produce.
Generate sequence using sieve. Can optionally provide number n of elements to produce.
(I & sieves)
Create new sieve that is the intersection of sieves
Create new sieve that is the intersection of sieves
Protocol for Sieves
Protocol for Sieves
(element? s n)
Determines if number n is an element of this Sieve
Determines if number n is an element of this Sieve
(normalize s)
Reduces Sieves in [mod index] form to its normalized form
Reduces Sieves in [mod index] form to its normalized form
(period s)
Returns the period of the Sieve.
Returns the period of the Sieve.
(reduce-sieve s)
Reduces the Sieve to its simplest form
Reduces the Sieve to its simplest form
(simplified sieve)
Returns simplified (normalized and reduce) version of sieve
Returns simplified (normalized and reduce) version of sieve
(U & sieves)
Create new sieve that is the union of sieves
Create new sieve that is the union of sieves
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close