theHarmonicAlgorithm-3.0.0: Real-time harmonic progression generation for TidalCycles live performance
Safe HaskellSafe-Inferred
LanguageHaskell2010

Harmonic.Interface.Tidal.Utils

Description

Shorthand utilities used across live-coding scripts: octave transposition via oct, and time rotation operators pullBy/pushBy that wrap TidalCycles' early/late operators.

Synopsis

Transposition

oct :: Int -> Pattern ValueMap Source #

Transpose by whole octaves. oct 1 is up an octave, oct (-1) down.

Add onto a pattern:

, cello T (0,1) k vl grid Bass |+ oct (-1)

Time rotation

pullBy :: Time -> Pattern a -> Pattern a Source #

Rotate a pattern earlier (pullBy) or later (pushBy) in time. Function forms of the TidalCycles <~ and ~> operators, so they compose in a modifier chain rather than needing parentheses.

, pushBy (1/8) $ harp T (0,1) k vl flow Alto

pushBy :: Time -> Pattern a -> Pattern a Source #

Rotate a pattern later in time. See pullBy.

Humanisation

humanise :: Double -> Pattern ValueMap Source #

Random per-event velocity jitter, for a less mechanical feel. The argument scales the spread: humanise 1 varies amp by up to ±0.09.

Onset repair

onset :: Pattern a -> Pattern a Source #

Ensure every event is an onset by aligning whole start with part start, but only at cycle boundaries. Prevents TidalCycles' onset detection from filtering events in cat constructions where inner patterns have period > 1 cycle, without causing MIDI flood from sub-cycle queries.

Note-length constants

hemidemisemiquaver :: Time Source #

Note-length constants, as fractions of a cycle: 1/64, 1/32, 1/16, 1/8, 1/4 and 1/2 respectively. Useful as arguments to pullBy and pushBy, where a named length reads better than a bare fraction.

demisemiquaver :: Time Source #

Note-length constants, as fractions of a cycle: 1/64, 1/32, 1/16, 1/8, 1/4 and 1/2 respectively. Useful as arguments to pullBy and pushBy, where a named length reads better than a bare fraction.

semiquaver :: Time Source #

Note-length constants, as fractions of a cycle: 1/64, 1/32, 1/16, 1/8, 1/4 and 1/2 respectively. Useful as arguments to pullBy and pushBy, where a named length reads better than a bare fraction.

quaver :: Time Source #

Note-length constants, as fractions of a cycle: 1/64, 1/32, 1/16, 1/8, 1/4 and 1/2 respectively. Useful as arguments to pullBy and pushBy, where a named length reads better than a bare fraction.

crotchet :: Time Source #

Note-length constants, as fractions of a cycle: 1/64, 1/32, 1/16, 1/8, 1/4 and 1/2 respectively. Useful as arguments to pullBy and pushBy, where a named length reads better than a bare fraction.

minim :: Time Source #

Note-length constants, as fractions of a cycle: 1/64, 1/32, 1/16, 1/8, 1/4 and 1/2 respectively. Useful as arguments to pullBy and pushBy, where a named length reads better than a bare fraction.