build, transform, play and write midi scores
build, transform, play and write midi scores
(! expression)
Takes a non deterministic expression
resulting in a score update.Returns a score update that wraps the expression
so that it is evaluated each time the update is called.
Takes a non deterministic `expression` resulting in a score update.Returns a score update that wraps the `expression` so that it is evaluated each time the update is called.
($by event->group update)
Splits the score according to the return of event->group
applied to each event.apply update
on each subscore and merge all the results together.Before being updated, each subscore is repositioned to zero, and shifted back to its original position after.
Splits the score according to the return of `event->group` applied to each event.apply `update` on each subscore and merge all the results together.Before being updated, each subscore is repositioned to zero, and shifted back to its original position after.
(->16bits-natural x)
MIDI sometimes deals with 16 bits values, this function coerce its input to this range.
MIDI sometimes deals with 16 bits values, this function coerce its input to this range.
(->4bits-natural x)
MIDI sometimes deals with natural between 0 and 16, this function coerce its input to this range.
MIDI sometimes deals with natural between 0 and 16, this function coerce its input to this range.
(->7bits-natural x)
MIDI often deals with natural between 0 and 127, this function coerce its input to this range.
MIDI often deals with natural between 0 and 127, this function coerce its input to this range.
(->event-matcher x)
turn x
into an event-matcher.
an event-matcher is a function from event to boolean.
If x
is an event-update, the result of applying it to the received event should be
equal to the received event in order for it to indicate a match.
In other cases x
is passed as second argument to noon.utils.maps/match
:
Check if the map m
is matching with x
.
x
can either be
- a function that,when applied to m
can return a deeply truthy map indicating a match,
- another map from which each subvalues will be match against corresponding subvalues of m
subvalues of x
can be regular values that will be check for equality
or functions that will be applyed to corresponding subvalues of m
in order to determine
if the match is successful or not.
turn `x` into an event-matcher. an event-matcher is a function from event to boolean. If `x` is an event-update, the result of applying it to the received event should be equal to the received event in order for it to indicate a match. In other cases `x` is passed as second argument to `noon.utils.maps/match`: Check if the map `m` is matching with `x`. `x` can either be - a function that,when applied to `m` can return a deeply truthy map indicating a match, - another map from which each subvalues will be match against corresponding subvalues of `m` subvalues of `x` can be regular values that will be check for equality or functions that will be applyed to corresponding subvalues of `m` in order to determine if the match is successful or not.
(->int x)
Turn x
into an integer, rounding it if needed, returning 0 if not a number.
Turn `x` into an integer, rounding it if needed, returning 0 if not a number.
(->score-checker x)
Convert x
to a score-checker if possible.
A score-checker is a score-update that can return the score unchanged or nil indicating failure.
Convert `x` to a score-checker if possible. A score-checker is a score-update that can return the score unchanged or nil indicating failure.
(->score-checker! x)
Strict version of noon.score/->score-checker
Strict version of `noon.score/->score-checker`
(->score-update x)
Turn 'x into a score-update if possible.
Turn 'x into a score-update if possible.
(->score-update! x)
Strict version of noon.score/->score-update
, it throws if x
is not convertible.
Strict version of `noon.score/->score-update`, it throws if `x` is not convertible.
(?keep f xs)
like clojure.core/map
, but if f
returns nil for one element, the whole form returns nil.
like `clojure.core/map`, but if `f` returns nil for one element, the whole form returns nil.
(?reduce f init xs)
like clojure.core/reduce
but short-circuits (returns nil) on first falsy result
like `clojure.core/reduce` but short-circuits (returns nil) on first falsy result
(adjust x)
Time stretching/shifting operation syntax sugar over noon.score/fit-score
.
Time stretching/shifting operation syntax sugar over `noon.score/fit-score`.
(any-that test & updates)
Tries updates
in random order until one passes test
.
Tries `updates` in random order until one passes `test`.
(any-that* test updates)
Tries updates
in random order until one passes test
.
Tries `updates` in random order until one passes `test`.
(append & updates)
Like 'lin but insert the current score before.
Like 'lin but insert the current score before.
(append* updates)
Like 'lin but insert the current score before.
Like 'lin but insert the current score before.
(between x y)
Build an update that keeps only events that are positioned between x and y positions.
Build an update that keeps only events that are positioned between x and y positions.
(c-position & xs__11752__auto__)
Build an harmonic event-update using noon.harmony/c-position The resulting transformation will be used to update the :pitch value of the received event.
noon.harmony/c-position
arglists:
doc:
Build a chromatic position update. takes 0 or 1 arguments: c: chromatic layer offset.
Build an harmonic event-update using noon.harmony/c-position The resulting transformation will be used to update the :pitch value of the received event. noon.harmony/c-position arglists: doc: Build a chromatic position update. takes 0 or 1 arguments: c: chromatic layer offset.
(c-shift & xs__11752__auto__)
Build an harmonic event-update using noon.harmony/c-shift The resulting transformation will be used to update the :pitch value of the received event.
noon.harmony/c-shift
arglists:
doc:
Builds a chromatic shift update. see noon.harmony/layer-shift
documentation.
Build an harmonic event-update using noon.harmony/c-shift The resulting transformation will be used to update the :pitch value of the received event. noon.harmony/c-shift arglists: doc: Builds a chromatic shift update. see `noon.harmony/layer-shift` documentation.
(c-step & xs__11752__auto__)
Build an harmonic event-update using noon.harmony/c-step The resulting transformation will be used to update the :pitch value of the received event.
noon.harmony/c-step
arglists:
([n])
doc:
Build a chromatic step update, which adds n
to the given context's position's chromatic layer offset.
Build an harmonic event-update using noon.harmony/c-step The resulting transformation will be used to update the :pitch value of the received event. noon.harmony/c-step arglists: ([n]) doc: Build a chromatic step update, which adds `n` to the given context's position's chromatic layer offset.
(chain & updates)
Compose several updates together linearly.
Compose several updates together linearly.
(chain* updates)
Compose several updates together linearly.
Compose several updates together linearly.
(chain-event-updates event-updates)
Chain several event-updates
one after another.
Chain several `event-updates` one after another.
(chan x)
Builds a :velocity event-update based on x
.
Builds a :velocity event-update based on `x`.
(chans & updates)
Apply updates
in parallel on subsequent midi channels.
Apply `updates` in parallel on subsequent midi channels.
(chans* updates)
Apply updates
in parallel on subsequent midi channels.
Apply `updates` in parallel on subsequent midi channels.
(chunk-score score by)
Chunk score
using the by
function,return a sorted (accordingly to by
) sequence of subscores.
Chunk `score` using the `by` function,return a sorted (accordingly to `by`) sequence of subscores.
(concat-score a b)
Concat 2 scores temporally.
Concat 2 scores temporally.
(concat-scores xs)
Concat several scores temporally.
Concat several scores temporally.
(connect-by by f)
Build an update that use f
to join successive score's chunks.
noon.score/chunk-score
accordingly to by
, resulting in a list of scores.f
to each one producing a new score.Build an update that use `f` to join successive score's chunks. - Chunks the score with `noon.score/chunk-score` accordingly to `by`, resulting in a list of scores. - Iterates this sorted list by pair, applying `f` to each one producing a new score. - all those scores are merged together.
Updates the :pitch value of the received event using noon.harmony/d-ceil
doc:
Build an update that bring received context to the closest diatonic position above.
Updates the :pitch value of the received event using noon.harmony/d-ceil doc: Build an update that bring received context to the closest diatonic position above.
Updates the :pitch value of the received event using noon.harmony/d-floor
doc:
Build an update that bring received context to the closest diatonic position below.
Updates the :pitch value of the received event using noon.harmony/d-floor doc: Build an update that bring received context to the closest diatonic position below.
(d-position & xs__11752__auto__)
Build an harmonic event-update using noon.harmony/d-position The resulting transformation will be used to update the :pitch value of the received event.
noon.harmony/d-position
arglists:
doc:
Build a diatonic position update. takes 0 to 2 arguments: d: diatonic layer offset. c: chromatic layer offset.
Build an harmonic event-update using noon.harmony/d-position The resulting transformation will be used to update the :pitch value of the received event. noon.harmony/d-position arglists: doc: Build a diatonic position update. takes 0 to 2 arguments: d: diatonic layer offset. c: chromatic layer offset.
Updates the :pitch value of the received event using noon.harmony/d-round
doc:
Build an update that bring received context to the closest diatonic position.
Updates the :pitch value of the received event using noon.harmony/d-round doc: Build an update that bring received context to the closest diatonic position.
(d-shift & xs__11752__auto__)
Build an harmonic event-update using noon.harmony/d-shift The resulting transformation will be used to update the :pitch value of the received event.
noon.harmony/d-shift
arglists:
doc:
Builds a diatonic shift update. see noon.harmony/layer-shift
documentation.
Build an harmonic event-update using noon.harmony/d-shift The resulting transformation will be used to update the :pitch value of the received event. noon.harmony/d-shift arglists: doc: Builds a diatonic shift update. see `noon.harmony/layer-shift` documentation.
(d-step & xs__11752__auto__)
Build an harmonic event-update using noon.harmony/d-step The resulting transformation will be used to update the :pitch value of the received event.
noon.harmony/d-step
arglists:
([n])
doc:
Build a diatonic step update which operates as follow:
- Trim chromatic layer offset after feeding
as much as possible to the diatonic layer offset
- Adds n
to diatonic offset.
Build an harmonic event-update using noon.harmony/d-step The resulting transformation will be used to update the :pitch value of the received event. noon.harmony/d-step arglists: ([n]) doc: Build a diatonic step update which operates as follow: - Trim chromatic layer offset after feeding as much as possible to the diatonic layer offset - Adds `n` to diatonic offset.
(dedup-tempo-messages score)
NOT USED YET, TO VERIFY
NOT USED YET, TO VERIFY
(dedupe-patches-and-control-changes score)
Remove redondant :patch and :cc event entries from score
Remove redondant :patch and :cc event entries from `score`
(degree & xs__11752__auto__)
Build an harmonic event-update using noon.harmony/degree The resulting transformation will be used to update the :pitch value of the received event.
noon.harmony/degree
arglists:
([n])
doc:
Build an update that go to degree n
(potentially negative) of the received context preserving its position.
Build an harmonic event-update using noon.harmony/degree The resulting transformation will be used to update the :pitch value of the received event. noon.harmony/degree arglists: ([n]) doc: Build an update that go to degree `n` (potentially negative) of the received context preserving its position.
(dup n-times)
Duplicate the received score n-times
and concat the duplicates.
Duplicate the received score `n-times` and concat the duplicates.
(dupt n-times)
Duplicate received score n-times
and tup the duplicates.
Duplicate received score `n-times` and tup the duplicates.
(dur x)
Builds a :duration event-update based on x
.
Builds a :duration event-update based on `x`.
(each & updates)
Apply an update to each events of a score.
Apply an update to each events of a score.
(each* updates)
Apply an update to each events of a score.
Apply an update to each events of a score.
(efn arg & body)
just a tagged lambda that represents an event update function
just a tagged lambda that represents an event update function
(event-scale dimension x)
Restrains and scale one event dimension
to the given bounds over the whole score.
Restrains and scale one event `dimension` to the given bounds over the whole score.
(fill resolution update)
Fill the score using a tup
of update
of size (score-duration / resolution
)resolution
should be an exact multiple of received score's duration.
Fill the score using a `tup` of `update` of size (score-duration / `resolution`)`resolution` should be an exact multiple of received score's duration.
(fill> resolution update)
Fill the score using an accumulative tup>
of update
of size (score-duration / resolution
)resolution
should be an exact multiple of received score's duration.
Fill the score using an accumulative `tup>` of `update` of size (score-duration / `resolution`)`resolution` should be an exact multiple of received score's duration.
(fit & updates)
Wraps the given transformation 'x, stretching its output to the input score duration. In other words, turn any transformation into another one that do not change the duration of its input score.
Wraps the given transformation 'x, stretching its output to the input score duration. In other words, turn any transformation into another one that do not change the duration of its input score.
(fit* updates)
Wraps the given transformation 'x, stretching its output to the input score duration. In other words, turn any transformation into another one that do not change the duration of its input score.
Wraps the given transformation 'x, stretching its output to the input score duration. In other words, turn any transformation into another one that do not change the duration of its input score.
(fit-score score {:keys [duration position]})
Fit a score into a note scaling and shifting it to match the position and length of the given note.
Fit a score into a note scaling and shifting it to match the position and length of the given note.
(fork-with branch-idx->update & branch-updates)
Like noon.score/par
but let you the opportunity to do something on the score based on the index of the branch before applying corresponding update.
Like `noon.score/par` but let you the opportunity to do something on the score based on the index of the branch before applying corresponding update.
(fork-with* branch-idx->update branch-updates)
Like noon.score/par
but let you the opportunity to do something on the score based on the index of the branch before applying corresponding update.
Like `noon.score/par` but let you the opportunity to do something on the score based on the index of the branch before applying corresponding update.
(from x)
Build an update that removes the elements anterior to the given position from the received score.
Build an update that removes the elements anterior to the given position from the received score.
(fst & updates)
Tries given updates
in order until the first success (non empty score).
Tries given `updates` in order until the first success (non empty score).
(fst* updates)
Tries given updates
in order until the first success (non empty score).
Tries given `updates` in order until the first success (non empty score).
(fst-that test & updates)
Tries given updates
in order until one passes test
.
Tries given `updates` in order until one passes `test`.
(fst-that* test updates)
Tries given updates
in order until one passes test
.
Tries given `updates` in order until one passes `test`.
(humanize & {:keys [max-step bounds]})
Build a function that humanize a midi value (int between 0 and 127). Options are:
noon.score/midi-val
argument (natural, rational,float or :min and :max keywords)Build a function that humanize a midi value (int between 0 and 127). Options are: - :max-step is the maximum step that can occur in either directions. its value can be: - a natural number, which represent the maximum step value in either direction - a rational or float, which indicates the size of maximun step relatively to the allowed value range (see :bounds option). - nil, indicating that any step can be made within specified :bounds (default to the whole midi value range 0-127) - :bounds is a vector of the form [min-value max-value] that constrain input and output of the created update. the two value it contains can be any valid `noon.score/midi-val` argument (natural, rational,float or :min and :max keywords)
(in-place u)
Turn the given update u
into an update that reposition received score to position zero before applying u
to it. The resulting score is then adjusted to its initial duration and shifted to its original position. This is useful when you need to scan update a score. It is similar to what the noon.score/each
function is doing.
Turn the given update `u` into an update that reposition received score to position zero before applying `u` to it. The resulting score is then adjusted to its initial duration and shifted to its original position. This is useful when you need to scan update a score. It is similar to what the `noon.score/each` function is doing.
(inversion & xs__11752__auto__)
Build an harmonic event-update using noon.harmony/inversion The resulting transformation will be used to update the :pitch value of the received event.
noon.harmony/inversion
arglists:
([n])
doc:
Build an update that go to inversion n
(potentially negative) of the received context preserving its position.
Build an harmonic event-update using noon.harmony/inversion The resulting transformation will be used to update the :pitch value of the received event. noon.harmony/inversion arglists: ([n]) doc: Build an update that go to inversion `n` (potentially negative) of the received context preserving its position.
(k & updates)
Act like 'mk, ignoring current score.
Act like 'mk, ignoring current score.
(k* updates)
Act like 'mk, ignoring current score.
Act like 'mk, ignoring current score.
(layer-shift & xs__11752__auto__)
Build an harmonic event-update using noon.harmony/layer-shift The resulting transformation will be used to update the :pitch value of the received event.
noon.harmony/layer-shift
arglists:
([l])
doc:
Build a shift update constructor for layer l
.
Unlike step updates, shift updates are not trimming context's position before updating it.
If the layer offset we are trying to shift is not present in the context's position, the shift has no effect.
Unless the forced
optional argument is given.
Build an harmonic event-update using noon.harmony/layer-shift The resulting transformation will be used to update the :pitch value of the received event. noon.harmony/layer-shift arglists: ([l]) doc: Build a shift update constructor for layer `l`. Unlike step updates, shift updates are not trimming context's position before updating it. If the layer offset we are trying to shift is not present in the context's position, the shift has no effect. Unless the `forced` optional argument is given.
(layer-step & xs__11752__auto__)
Build an harmonic event-update using noon.harmony/layer-step The resulting transformation will be used to update the :pitch value of the received event.
noon.harmony/layer-step
arglists:
([layer n])
doc:
Build a step update according to layer
and offset n
.
Please refer to t-step
, s-step
, d-step
and c-step
documentation.
Build an harmonic event-update using noon.harmony/layer-step The resulting transformation will be used to update the :pitch value of the received event. noon.harmony/layer-step arglists: ([layer n]) doc: Build a step update according to `layer` and offset `n`. Please refer to `t-step`, `s-step`, `d-step` and `c-step` documentation.
(lin & updates)
Apply each update
to the received score and concatenate the results.
Apply each `update` to the received score and concatenate the results.
(lin* updates)
Apply each update
to the received score and concatenate the results.
Apply each `update` to the received score and concatenate the results.
(map-event-update score event-update)
Apply event-update
to each event of score
. if event-update
returns nil for an event, it is removed from the resulting score.
Apply `event-update` to each event of `score`. if `event-update` returns nil for an event, it is removed from the resulting score.
(map-score-update score score-update)
map score-update
over score
.
score
will be converted to a single event scorescore-update
.map `score-update` over `score`. - each event of `score` will be converted to a single event score - this single event score will be repositioned to zero and updated using `score-update`. - all resulting scores will be concatenated into one.
(max-by f)
Build an update that returns a one element score,
applying f
to each event and selecting the event for which f
returns the greatest value.
Build an update that returns a one element score, applying `f` to each event and selecting the event for which `f` returns the greatest value.
Return a one event score, holding the highest pitch of the received score.
Return a one event score, holding the highest pitch of the received score.
(maybe & updates)
Like noon.score/one-of
, return an update that choose randomly one of the given updates
, but can also do nothing.
Like `noon.score/one-of`, return an update that choose randomly one of the given `updates`, but can also do nothing.
(maybe* updates)
Like noon.score/one-of
, return an update that choose randomly one of the given updates
, but can also do nothing.
Like `noon.score/one-of`, return an update that choose randomly one of the given `updates`, but can also do nothing.
(merge-scores scores)
Merge several scores together.
Merge several scores together.
(midi-val x)
Build a midi value (int between 0 and 127) from x
.
x
can be either:
Build a midi value (int between 0 and 127) from `x`. `x` can be either: - an integer, that will be constrained to 0-127 range. - a float or a rational, that will be scaled to the 0-127 range. - :min or :max keywords that will map to 0 and 127 respectively.
(min-by f)
Build an update that returns a one element score,
applying f
to each event and selecting the event for which f
returns the lowest value.
Build an update that returns a one element score, applying `f` to each event and selecting the event for which `f` returns the lowest value.
Return a one event score, holding the lowest pitch of the received score.
Return a one event score, holding the lowest pitch of the received score.
(mirror pitch)
Mirrors all pitches around pitch
.
Mirrors all pitches around `pitch`.
(mixlin & updates)
A lin that mix its elements.
A lin that mix its elements.
(mixlin* updates)
A lin that mix its elements.
A lin that mix its elements.
(mixtup & updates)
A tup that mix its elements.
A tup that mix its elements.
(mixtup* updates)
A tup that mix its elements.
A tup that mix its elements.
(mk* updates)
Feed score0 into given updates.
Feed score0 into given updates.
(nlin n update)
Creates a lin of size n
using update
.
Creates a lin of size `n` using `update`.
(nlin> n update)
Creates a noon.score/lin>
of size n
using update
.
Creates a `noon.score/lin>` of size `n` using `update`.
(normalise-event x)
Puts time related dimensions of a note into their identity values. Useful in many time streching transformations
Puts time related dimensions of a note into their identity values. Useful in many time streching transformations
(normalise-score score)
Normalise score to {:position 0 :duration 1}
Normalise score to {:position 0 :duration 1}
(ntup n update)
Creates a tup of size n
using update
.
Creates a tup of size `n` using `update`.
(ntup> n update)
Creates a noon.score/tup>
of size n
using update
.
Creates a `noon.score/tup>` of size `n` using `update`.
(numerify-pitches score)
Replace the pitch entry value of each event by its MIDI pitch value (7bits natural).
Replace the pitch entry value of each event by its MIDI pitch value (7bits natural).
(one-of & updates)
Returns an update that choose randomly one of the given updates
before applying it.
Returns an update that choose randomly one of the given `updates` before applying it.
(one-of* updates)
Returns an update that choose randomly one of the given updates
before applying it.
Returns an update that choose randomly one of the given `updates` before applying it.
(only-between beg end f)
Use f
to update the subscore delimited by beg
and end
positions. Leave other events unchanged.
Use `f` to update the subscore delimited by `beg` and `end` positions. Leave other events unchanged.
(origin & xs__11752__auto__)
Build an harmonic event-update using noon.harmony/origin The resulting transformation will be used to update the :pitch value of the received event.
noon.harmony/origin
arglists:
([x])
doc:
Build an update that resets the :origin
of the received context to x
.
x
can be either:
- a pitch object {:d _ :c _}
- a pitch interpretable keyword, symbol or string (e.g C0, F#-2 , Gx2)
Build an harmonic event-update using noon.harmony/origin The resulting transformation will be used to update the :pitch value of the received event. noon.harmony/origin arglists: ([x]) doc: Build an update that resets the `:origin` of the received context to `x`. `x` can be either: - a pitch object {:d _ :c _} - a pitch interpretable keyword, symbol or string (e.g C0, F#-2 , Gx2)
(par & updates)
Apply several update on a score merging the results.
Apply several update on a score merging the results.
(par* updates)
Apply several update on a score merging the results.
Apply several update on a score merging the results.
(partial-update score event-matcher update)
Use event-matcher
to match some events of score
, apply update
to the resulting subscore,
then merge unselected events into the updated subscore.
see noon.score/->event-matcher
for exact semantics of event matching.
Use `event-matcher` to match some events of `score`, apply `update` to the resulting subscore, then merge unselected events into the updated subscore. see `noon.score/->event-matcher` for exact semantics of event matching.
(parts & xs)
Apply updates to subscores: (parts sel1 upd1 sel2 upd2 ...)
Apply updates to subscores: (parts sel1 upd1 sel2 upd2 ...)
(parts* xs)
Apply updates to subscores: (parts sel1 upd1 sel2 upd2 ...)
Apply updates to subscores: (parts sel1 upd1 sel2 upd2 ...)
(pitch-value-bounds x)
Return a vector of min and max chromatic pitch values of the given score.
Return a vector of min and max chromatic pitch values of the given score.
(position & xs__11752__auto__)
Build an harmonic event-update using noon.harmony/position The resulting transformation will be used to update the :pitch value of the received event.
noon.harmony/position
arglists:
([& [t s d c]])
doc:
Build a position update. takes 0 to four arguments: t: tonic layer offset. s: structural layer offset. d: diatonic layer offset. c: chromatic layer offset.
Build an harmonic event-update using noon.harmony/position The resulting transformation will be used to update the :pitch value of the received event. noon.harmony/position arglists: ([& [t s d c]]) doc: Build a position update. takes 0 to four arguments: t: tonic layer offset. s: structural layer offset. d: diatonic layer offset. c: chromatic layer offset.
(probs m)
Takes a map of type {update number} where each key is an update and each value is its probability of occurence.
Takes a map of type {update number} where each key is an update and each value is its probability of occurence.
(qshow score)
Raw scores are hard to parse for a human, this is intended to help a bit.
Raw scores are hard to parse for a human, this is intended to help a bit.
(rebase & fs)
Applies the given transformations while preserving pitch.
Applies the given transformations while preserving pitch.
(redegree & xs__11752__auto__)
Build an harmonic event-update using noon.harmony/redegree The resulting transformation will be used to update the :pitch value of the received event.
noon.harmony/redegree
arglists:
doc:
Build an update that changes the degree of the received context, without changing its pitch. see noon.harmony/degree
.
Build an harmonic event-update using noon.harmony/redegree The resulting transformation will be used to update the :pitch value of the received event. noon.harmony/redegree arglists: doc: Build an update that changes the degree of the received context, without changing its pitch. see `noon.harmony/degree`.
(reorigin & xs__11752__auto__)
Build an harmonic event-update using noon.harmony/reorigin The resulting transformation will be used to update the :pitch value of the received event.
noon.harmony/reorigin
arglists:
doc:
Build an update that change the origin of the received context without changing its pitch. see noon.harmony/scale
Build an harmonic event-update using noon.harmony/reorigin The resulting transformation will be used to update the :pitch value of the received event. noon.harmony/reorigin arglists: doc: Build an update that change the origin of the received context without changing its pitch. see `noon.harmony/scale`
(rep n-times update)
(rep n-times update skip-first)
Iterates the given update
n-times
over the input score and concat the results.
Iterates the given `update` `n-times` over the input score and concat the results.
(repeat-while test update)
(repeat-while test update after)
Iterate the given update
while test
is passing.
Iterate the given `update` while `test` is passing.
(repitch & xs__11752__auto__)
Build an harmonic event-update using noon.harmony/repitch The resulting transformation will be used to update the :pitch value of the received event.
noon.harmony/repitch
arglists:
([x])
doc:
Build an update that repositions the received context based on the given pitch x
Build an harmonic event-update using noon.harmony/repitch The resulting transformation will be used to update the :pitch value of the received event. noon.harmony/repitch arglists: ([x]) doc: Build an update that repositions the received context based on the given pitch `x`
(reroot & xs__11752__auto__)
Build an harmonic event-update using noon.harmony/reroot The resulting transformation will be used to update the :pitch value of the received event.
noon.harmony/reroot
arglists:
doc:
Build an update that changes the root of the received context, without changing its pitch. see noon.harmony/root
.
Build an harmonic event-update using noon.harmony/reroot The resulting transformation will be used to update the :pitch value of the received event. noon.harmony/reroot arglists: doc: Build an update that changes the root of the received context, without changing its pitch. see `noon.harmony/root`.
(rescale & xs__11752__auto__)
Build an harmonic event-update using noon.harmony/rescale The resulting transformation will be used to update the :pitch value of the received event.
noon.harmony/rescale
arglists:
doc:
Build an update that change the scale of the received context without changing its pitch. see noon.harmony/scale
Build an harmonic event-update using noon.harmony/rescale The resulting transformation will be used to update the :pitch value of the received event. noon.harmony/rescale arglists: doc: Build an update that change the scale of the received context without changing its pitch. see `noon.harmony/scale`
(restructure & xs__11752__auto__)
Build an harmonic event-update using noon.harmony/restructure The resulting transformation will be used to update the :pitch value of the received event.
noon.harmony/restructure
arglists:
doc:
Build an update that change the structure of the received context without changing its pitch. see noon.harmony/scale
Build an harmonic event-update using noon.harmony/restructure The resulting transformation will be used to update the :pitch value of the received event. noon.harmony/restructure arglists: doc: Build an update that change the structure of the received context without changing its pitch. see `noon.harmony/scale`
(reverse-score score)
Reverse score temporally.
Reverse score temporally.
(root & xs__11752__auto__)
Build an harmonic event-update using noon.harmony/root The resulting transformation will be used to update the :pitch value of the received event.
noon.harmony/root
arglists:
([pitch-class])
doc:
Build an update that given a pitch class (name or map), resets the :origin of the received context to the closest (to current origin) corresponding pitch.
Build an harmonic event-update using noon.harmony/root The resulting transformation will be used to update the :pitch value of the received event. noon.harmony/root arglists: ([pitch-class]) doc: Build an update that given a pitch class (name or map), resets the :origin of the received context to the closest (to current origin) corresponding pitch.
(rup n-times update)
(rup n-times update skip-first)
Iterates the given update
n-times
over the input score and tup the results.
Iterates the given `update` `n-times` over the input score and tup the results.
Updates the :pitch value of the received event using noon.harmony/s+
doc:
melodic superior diatonic passing note
Updates the :pitch value of the received event using noon.harmony/s+ doc: melodic superior diatonic passing note
Updates the :pitch value of the received event using noon.harmony/s-
doc:
melodic inferior diatonic passing note
Updates the :pitch value of the received event using noon.harmony/s- doc: melodic inferior diatonic passing note
Updates the :pitch value of the received event using noon.harmony/s-ceil
doc:
Build an update that bring received context to the closest structural position above.
Updates the :pitch value of the received event using noon.harmony/s-ceil doc: Build an update that bring received context to the closest structural position above.
Updates the :pitch value of the received event using noon.harmony/s-floor
doc:
Build an update that bring received context to the closest structural position below.
Updates the :pitch value of the received event using noon.harmony/s-floor doc: Build an update that bring received context to the closest structural position below.
(s-position & xs__11752__auto__)
Build an harmonic event-update using noon.harmony/s-position The resulting transformation will be used to update the :pitch value of the received event.
noon.harmony/s-position
arglists:
doc:
Build a structural position update. takes 0 to 3 arguments: s: structural layer offset. d: diatonic layer offset. c: chromatic layer offset.
Build an harmonic event-update using noon.harmony/s-position The resulting transformation will be used to update the :pitch value of the received event. noon.harmony/s-position arglists: doc: Build a structural position update. takes 0 to 3 arguments: s: structural layer offset. d: diatonic layer offset. c: chromatic layer offset.
Updates the :pitch value of the received event using noon.harmony/s-round
doc:
Build an update that bring received context to the closest structural position.
Updates the :pitch value of the received event using noon.harmony/s-round doc: Build an update that bring received context to the closest structural position.
(s-shift & xs__11752__auto__)
Build an harmonic event-update using noon.harmony/s-shift The resulting transformation will be used to update the :pitch value of the received event.
noon.harmony/s-shift
arglists:
doc:
Builds a structural shift update. see noon.harmony/layer-shift
documentation.
Build an harmonic event-update using noon.harmony/s-shift The resulting transformation will be used to update the :pitch value of the received event. noon.harmony/s-shift arglists: doc: Builds a structural shift update. see `noon.harmony/layer-shift` documentation.
(s-step & xs__11752__auto__)
Build an harmonic event-update using noon.harmony/s-step The resulting transformation will be used to update the :pitch value of the received event.
noon.harmony/s-step
arglists:
([n])
doc:
Build a structural step update which operates as follow:
- Trim diatonic and chromatic layer offsets after feeding
as much as possible to the structural layer offset
- Adds n
to structural offset.
Build an harmonic event-update using noon.harmony/s-step The resulting transformation will be used to update the :pitch value of the received event. noon.harmony/s-step arglists: ([n]) doc: Build a structural step update which operates as follow: - Trim diatonic and chromatic layer offsets after feeding as much as possible to the structural layer offset - Adds `n` to structural offset.
(scale & xs__11752__auto__)
Build an harmonic event-update using noon.harmony/scale The resulting transformation will be used to update the :pitch value of the received event.
noon.harmony/scale
arglists:
([x])
doc:
Build an update that resets the :scale
of the received context to x
.
x
can be either:
- a known scale keyword, symbol or string (e.g :dorian, 'melodic-minor, "hungarian" ...)
refer to noon.constants/modes
for complete list.
- a mode vector like [0 2 3 5 7 9 10] (for :dorian)
Build an harmonic event-update using noon.harmony/scale The resulting transformation will be used to update the :pitch value of the received event. noon.harmony/scale arglists: ([x]) doc: Build an update that resets the `:scale` of the received context to `x`. `x` can be either: - a known scale keyword, symbol or string (e.g :dorian, 'melodic-minor, "hungarian" ...) refer to `noon.constants/modes` for complete list. - a mode vector like [0 2 3 5 7 9 10] (for :dorian)
(scale-score score ratio)
Scale score timing by given ratio.
Scale score timing by given ratio.
(scan size f)
(scan size step f)
(scan by size step f)
Chunk the score using the by
function. Chunks are partitioned by size
and stepped by step
. f
is applied to each chunks partition and should return a single score. Resulting scores are merged together.
Chunk the score using the `by` function. Chunks are partitioned by `size` and stepped by `step`. `f` is applied to each chunks partition and should return a single score. Resulting scores are merged together.
(scan> size f)
(scan> size step f)
Accumulative scan. Use f
to accumulatively update time slices of given size
of the score, stepping by step
.
Accumulative scan. Use `f` to accumulatively update time slices of given `size` of the score, stepping by `step`.
(score x)
Build a score from x
.
x
can be either:
Build a score from `x`. `x` can be either: - a set of event maps. - a single event map. - nil (empty score) - a generator that will be realized and fed into this function again.
(score-bounds score k)
Based on a given note dimension k, returns the min and max notes of a score.
Based on a given note dimension k, returns the min and max notes of a score.
(score-origin score)
Get the position of the first event of a score.
Get the position of the first event of a score.
(score-track-count score)
How many tracks has this score ?
How many tracks has this score ?
(sfn arg & body)
Just a tagged lambda that represents a score update function.
Just a tagged lambda that represents a score update function.
(shift-score score offset)
Shift all position by the given offset.
Shift all position by the given offset.
(show score)
(show path score)
Look at a score using hierarchical grouping.
Look at a score using hierarchical grouping.
(shrink event-check)
Shrink a score using event-check
on each events to determine if it is kept or not.
Shrink a score using `event-check` on each events to determine if it is kept or not.
(shuflin & updates)
A lin that shuffles its elements everytime it is used.
A lin that shuffles its elements everytime it is used.
(shuflin* updates)
A lin that shuffles its elements everytime it is used.
A lin that shuffles its elements everytime it is used.
(shuftup & updates)
A tup that shuffles its elements everytime it is used.
A tup that shuffles its elements everytime it is used.
(shuftup* updates)
A tup that shuffles its elements everytime it is used.
A tup that shuffles its elements everytime it is used.
(sort-score score)
(sort-score f score)
(sort-score f comp score)
Sort score
events.
arity 1: by :position.
arity 2: by f
arity 3: by f
using comp
as compare fn.
Sort `score` events. arity 1: by :position. arity 2: by `f` arity 3: by `f` using `comp` as compare fn.
(start-from x)
Build an update that shifts the score to the given position, removing all anterior events.
Build an update that shifts the score to the given position, removing all anterior events.
Shifting the score to last position erasing all anterior events.
Shifting the score to last position erasing all anterior events.
(start-from-nth-last nth)
Shifting the score to nth
last position erasing all anterior events.
Shifting the score to `nth` last position erasing all anterior events.
(structure & xs__11752__auto__)
Build an harmonic event-update using noon.harmony/structure The resulting transformation will be used to update the :pitch value of the received event.
noon.harmony/structure
arglists:
([x])
doc:
Build an update that resets the :structure
of the received context to x
.
x
can be either:
- a known structure keyword, symbol or string (e.g :triad, 'tetrad, "sus4" ...)
refer to noon.constants/structures
for complete list.
- a structure vector like [0 2 4 6] (for :tetrad)
Build an harmonic event-update using noon.harmony/structure The resulting transformation will be used to update the :pitch value of the received event. noon.harmony/structure arglists: ([x]) doc: Build an update that resets the `:structure` of the received context to `x`. `x` can be either: - a known structure keyword, symbol or string (e.g :triad, 'tetrad, "sus4" ...) refer to `noon.constants/structures` for complete list. - a structure vector like [0 2 4 6] (for :tetrad)
(superpose & updates)
Like 'par but keep the current score.
Like 'par but keep the current score.
(superpose* updates)
Like 'par but keep the current score.
Like 'par but keep the current score.
(superpose> & updates)
Accumulative 'superpose.
Accumulative 'superpose.
(superpose>* updates)
Accumulative 'superpose.
Accumulative 'superpose.
Updates the :pitch value of the received event using noon.harmony/t-ceil
doc:
Build an update that bring received context to the closest tonic position above.
Updates the :pitch value of the received event using noon.harmony/t-ceil doc: Build an update that bring received context to the closest tonic position above.
Updates the :pitch value of the received event using noon.harmony/t-floor
doc:
Build an update that bring received context to the closest tonic position below.
Updates the :pitch value of the received event using noon.harmony/t-floor doc: Build an update that bring received context to the closest tonic position below.
Updates the :pitch value of the received event using noon.harmony/t-round
doc:
Build an update that bring received context to the closest tonic position.
Updates the :pitch value of the received event using noon.harmony/t-round doc: Build an update that bring received context to the closest tonic position.
(t-shift & xs__11752__auto__)
Build an harmonic event-update using noon.harmony/t-shift The resulting transformation will be used to update the :pitch value of the received event.
noon.harmony/t-shift
arglists:
doc:
Builds a tonic shift update. see noon.harmony/layer-shift
documentation.
Build an harmonic event-update using noon.harmony/t-shift The resulting transformation will be used to update the :pitch value of the received event. noon.harmony/t-shift arglists: doc: Builds a tonic shift update. see `noon.harmony/layer-shift` documentation.
(t-step & xs__11752__auto__)
Build an harmonic event-update using noon.harmony/t-step The resulting transformation will be used to update the :pitch value of the received event.
noon.harmony/t-step
arglists:
([n])
doc:
Build a tonic step update which operates as follow:
- Trim structural, diatonic and chromatic layer offsets after feeding
as much as possible to the tonic layer offset
- Adds n
to tonic offset.
Build an harmonic event-update using noon.harmony/t-step The resulting transformation will be used to update the :pitch value of the received event. noon.harmony/t-step arglists: ([n]) doc: Build a tonic step update which operates as follow: - Trim structural, diatonic and chromatic layer offsets after feeding as much as possible to the tonic layer offset - Adds `n` to tonic offset.
(tracks & updates)
Apply updates
in parallel on subsequent midi tracks.
Apply `updates` in parallel on subsequent midi tracks.
(tracks* updates)
Apply updates
in parallel on subsequent midi tracks.
Apply `updates` in parallel on subsequent midi tracks.
(transpose f)
Transpose the pitch origin of all events by the given update.
Transpose the pitch origin of all events by the given update.
(trim beg end)
Build and update that removes everything before beg
and after end
from the received score. (triming overlapping durations).
Build and update that removes everything before `beg` and after `end` from the received score. (triming overlapping durations).
(trim-score score beg end)
Removes everything before beg
and after end
from score
.
(triming overlapping durations).
Removes everything before `beg` and after `end` from `score`. (triming overlapping durations).
(try-until test update & {:keys [max] :or {max 100}})
Given an undeterministic update
, tries it on the score until the result of it passes test
Given an undeterministic `update`, tries it on the score until the result of it passes `test`
(tup & updates)
Like 'lin but preserve the length of the input score
Like 'lin but preserve the length of the input score
(tup* updates)
Like 'lin but preserve the length of the input score
Like 'lin but preserve the length of the input score
(until x)
Build an update that removes the elements posterior to the given position from the received score.
Build an update that removes the elements posterior to the given position from the received score.
(update-score score update)
Updates score
with update
.
Updates `score` with `update`.
(vel x)
Builds a :velocity event-update based on x
.
Builds a :velocity event-update based on `x`.
(vel+ n)
Builds an event update that adds n
to :velocity value
Builds an event update that adds `n` to :velocity value
(vel- n)
Builds an event update that substract n
to :velocity value
Builds an event update that substract `n` to :velocity value
(vel-humanize max-step & [bounds])
Build an event update that humanize the :velocity value.
please refer to the noon.score/humanize
doc.
Build an event update that humanize the :velocity value. please refer to the `noon.score/humanize` doc.
(voices & updates)
Apply updates
in parallel on subsequent voices.
Apply `updates` in parallel on subsequent voices.
(voices* updates)
Apply updates
in parallel on subsequent voices.
Apply `updates` in parallel on subsequent voices.
(voices> & updates)
Like noon.score/par>
but keep track of voice number.
Like `noon.score/par>` but keep track of voice number.
(voices>* updates)
Like noon.score/par>
but keep track of voice number.
Like `noon.score/par>` but keep track of voice number.
Returns the empty score regardless of input.
Returns the empty score regardless of input.
(within-bounds? event-fn min max)
Build a check update (one that can return nil or the score unchanged) succeed if event-fn
applied to each event is between min
and max
.
Build a check update (one that can return nil or the score unchanged) succeed if `event-fn` applied to each event is between `min` and `max`.
Returns the score unchanged if every pitch within it are in the 0-127 MIDI range.
Returns the score unchanged if every pitch within it are in the 0-127 MIDI range.
(within-pitch-bounds? min max)
Build a check update (one that can return nil or the score unchanged)Succeed if all pitches are between min
and max
.min
and max
should be 'pitchable' (pitch map | pitch keyword | int).
Build a check update (one that can return nil or the score unchanged)Succeed if all pitches are between `min` and `max`.`min` and `max` should be 'pitchable' (pitch map | pitch keyword | int).
(within-time-bounds? start end)
Build a check update (one that can return nil or the score unchanged) Succeed if all its events are between start
and end
.
Build a check update (one that can return nil or the score unchanged) Succeed if all its events are between `start` and `end`.
(wrap-event->score-fn f)
Build a score-update from an event -> score function.
Build a score-update from an event -> score function.
(zip zip-fn update)
Zips the current score with the result of updating it with update
.the zipping is done by :position with zip-fn
that takes two scores and produce one.All the scores returned by zip-fn
are merged into a final one which is returned.
Zips the current score with the result of updating it with `update`.the zipping is done by :position with `zip-fn` that takes two scores and produce one.All the scores returned by `zip-fn` are merged into a final one which is returned.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close