Liking cljdoc? Tell your friends :D

score.sieves

"...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:

  • Xenakis and Rahn. "Sieves". Perspectives of New Music, Vol. 28, No. 1 (Winter, 1990), pp. 58-78.
  • Xenakis. "Formalized Music". pp. 268-288.
"...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.
 
raw docstring

analyze-sieveclj

(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:

  • :analysis - vector of sieve vectors containing [modulus index points-covered].
  • :sieve - Union sieve of analysis vectors
  • :period - period of the sieve
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
sourceraw docstring

gen-sieveclj

(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.
sourceraw docstring

Iclj

(I & sieves)

Create new sieve that is the intersection of sieves

Create new sieve that is the intersection of sieves
sourceraw docstring

Intersectionclj

source

Sievecljprotocol

Protocol for Sieves

Protocol for Sieves

element?clj

(element? s n)

Determines if number n is an element of this Sieve

Determines if number n is an element of this Sieve

normalizeclj

(normalize s)

Reduces Sieves in [mod index] form to its normalized form

Reduces Sieves in [mod index] form to its normalized form

periodclj

(period s)

Returns the period of the Sieve.

Returns the period of the Sieve.

reduce-sieveclj

(reduce-sieve s)

Reduces the Sieve to its simplest form

Reduces the Sieve to its simplest form
sourceraw docstring

simplifiedclj

(simplified sieve)

Returns simplified (normalized and reduce) version of sieve

Returns simplified (normalized and reduce) version of sieve
sourceraw docstring

Uclj

(U & sieves)

Create new sieve that is the union of sieves

Create new sieve that is the union of sieves
sourceraw docstring

Unionclj

source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close