Liking cljdoc? Tell your friends :D

noon.lib.melody

Utilities to deal with melodic development

Utilities to deal with melodic development
raw docstring

$linclj

($lin & xs)

'mapcat for score, works only on lines.

'mapcat for score, works only on lines.
raw docstring

$lin*clj

($lin* xs)

'mapcat for score, works only on lines.

'mapcat for score, works only on lines.
raw docstring

connectclj

(connect & connection-sizes)

Tries to connect subsequent notes using one of the given connection-sizes. Intermediate step notes are selected in priority on the lowest harmonic layer.

Tries to connect subsequent notes using one of the given connection-sizes.
Intermediate step notes are selected in priority on the lowest harmonic layer.
raw docstring

connect-repetitionsclj

Join successive pitch repetitions for each :track/:channel/:voice subscore.

Join successive pitch repetitions for each :track/:channel/:voice subscore.
raw docstring

contourclj

(contour cmd)
(contour cmd {:as _opts :keys [pick nth layer extent delta]})

changing the melodic contour of a score.

forms: (contour :mirror <options>) : mirror the contour of the score. (contour :rotation <options>) : rotate the contour of the score. (contour :similar <options>) : get a different score with the same contour.

<options> a map that may contain some of those keys:

:layer : (all commands, default to lowest common layer) The harmonic layer on which the contour transformation is performed

:pick|:nth : (:rotation and :similar commands, default to :random) A 'member-pick (see `member function) to select one particular outcome.

:extent : (:similar command only) A vector of min and max amount of deformation that we want to apply to the score.

:delta : (:similar command only) The amount of shrinking or growing we want to apply to the score.

changing the melodic contour of a score.

forms:
(contour :mirror <options>) : mirror the contour of the score.
(contour :rotation <options>) : rotate the contour of the score.
(contour :similar <options>) : get a different score with the same contour.

<options>
a map that may contain some of those keys:

:layer : (all commands, default to lowest common layer)
    The harmonic layer on which the contour transformation is performed

:pick|:nth : (:rotation and :similar commands, default to :random)
    A 'member-pick (see `member function) to select one particular outcome.

:extent : (:similar command only)
    A vector of min and max amount of deformation that we want to apply to the score.

:delta : (:similar command only)
    The amount of shrinking or growing we want to apply to the score.
raw docstring

contour-changeclj

(contour-change layer f)

gen-lineclj

(gen-line opts)

Generate a tuple by generating a contour, producing lines from it and picking one. options are:

  • :layer, the harmonic layer the contour is based on (default to :diatonic)
  • :contour, a vector [contour-length contour-height].
  • :grow, a vector [min-grow max-grow] that is used to grow the generated contour.
  • :pick, a member-pick argument used to pick one line from generated ones. (default :rand)
Generate a tuple by generating a contour, producing lines from it and picking one.
options are:
- :layer, the harmonic layer the contour is based on (default to :diatonic)
- :contour, a vector [contour-length contour-height].
- :grow, a vector [min-grow max-grow] that is used to grow the generated contour.
- :pick, a member-pick argument used to pick one line from generated ones. (default :rand)
raw docstring

gen-tupclj

(gen-tup {:as options :keys [layer]})
(gen-tup layer length delta & {:as options})

Generate a tup on the specified harmonic layer using noon.lib.melody/step-seqs.

Generate a tup on the specified harmonic layer using `noon.lib.melody/step-seqs`.
raw docstring

layer-kw->position-keyclj

(layer-kw->position-key layer-kw)

layer-splitclj

(layer-split layer s)

Partition a score by position and harmonic layer index. returns a seq of maps with keys :position :layer-idx :score

Partition a score by position and harmonic layer index.
returns a seq of maps with keys :position :layer-idx :score
raw docstring

legatoclj

Fill melodic holes by extending each note to the start position of the following one in. It operates on each :track/channel/voice sub scores.

Fill melodic holes by extending each note to the start position of the following one in.
It operates on each :track/channel/voice sub scores.
raw docstring

lineclj

(line connect step done? finish)

Create a melodic line.

  1. 'connect is called on the current score, to produce another one that will be fed into 'step
  2. 'step is called on the result of 'connect, and the result is concatenated with the original score.
  3. if 'done? called with this new score is true, feed it to 'finish and return.
  4. else go to step 1.
Create a melodic line.
1. 'connect is called on the current score, to produce another one that will be fed into 'step
2. 'step is called on the result of 'connect, and the result is concatenated with the original score.
3. if 'done? called with this new score is true, feed it to 'finish and return.
4. else go to step 1.
raw docstring

line?clj

Returns the given score if it is a 1 voice line with no holes or superpositions.

Returns the given score if it is a 1 voice line with no holes or superpositions.
raw docstring

permutationclj

(permutation)
(permutation x)
(permutation pick {:as options :keys [layer layers]})

Build an update that permutes notes of the received score.

Build an update that permutes notes of the received score.
raw docstring

rotationclj

(rotation)
(rotation x)
(rotation pick {:as options :keys [layer layers]})

Build an update that rotates notes of the received score.

Build an update that rotates notes of the received score.
raw docstring

score-lowest-layerclj

(score-lowest-layer s)

return the lowest harmonic layer of a score. (:c < :d < :s < :t)

return the lowest harmonic layer of a score.
(:c < :d < :s < :t)
raw docstring

simple-connectionclj

(simple-connection sizes)

A simple connection function that leverage noon.harmony/simplest-connection

A simple connection function that leverage `noon.harmony/simplest-connection`
raw docstring

simple-lineclj

(simple-line length step)

A simple way to create a line of given 'length using the given 'step

A simple way to create a line of given 'length using the given 'step
raw docstring

simple-tuplineclj

(simple-tupline len step)

tuped version of noon.lib.melody/simple-line

tuped version of `noon.lib.melody/simple-line`
raw docstring

sorted-layer-splitsclj

(sorted-layer-splits layer s)

sorted-position-splitsclj

(sorted-position-splits s)

step-seqsclj

(step-seqs {:keys [delta length bounds steps step-range]
            :or {delta 0 step-range [-3 3]}})

Return a collection of step sequences according to given options. A step sequence is a vector of integers like [-1 2 1 -3]

  • :delta is the overall step of the resulting sequences. e.g a step sequence [1 2 1] have a delta of 4.
  • :length is the number of steps the resulting sequences will count.
  • :bounds specifies the allowed range for sequence's intermediates values it is a vector of the form [minimal-intermediate-value maximum-intermediate-value]
  • :steps specifies available steps
  • :step-range is an alternative to :steps it specifies the minimal and maximal steps via a vector [min-step max-step] all intermediate values are allowed. e.g :step-range [-2 2] is equivalent to :steps [-2 -1 1 2] (zero step is excluded).
Return a collection of step sequences according to given options.
A step sequence is a vector of integers like [-1 2 1 -3]
- :delta is the overall step of the resulting sequences.
  e.g a step sequence [1 2 1] have a delta of 4.
- :length is the number of steps the resulting sequences will count.
- :bounds specifies the allowed range for sequence's intermediates values
  it is a vector of the form [minimal-intermediate-value maximum-intermediate-value]
- :steps specifies available steps
- :step-range is an alternative to :steps
  it specifies the minimal and maximal steps via a vector [min-step max-step]
  all intermediate values are allowed.
  e.g :step-range [-2 2] is equivalent to :steps [-2 -1 1 2] (zero step is excluded).
raw docstring

stupclj

(stup layer steps)

build a tup of steps on the specified layer form: (stup layer steps) layer: :c | :d | :s | :t steps: a sequence of ints.

build a tup of steps on the specified layer
form: (stup layer steps)
  layer: :c | :d | :s | :t
  steps: a sequence of ints.
raw docstring

stup>clj

(stup> layer steps)

build a tup of successive steps on the specified layer form: (stup layer steps) layer: :c | :d | :s | :t steps: a sequence of ints.

build a tup of successive steps on the specified layer
form: (stup layer steps)
  layer: :c | :d | :s | :t
  steps: a sequence of ints.
raw docstring

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

× close