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

Harmonic.Interface.Tidal.Groove

Description

Provides subKick (sub-bass with CC64 sustain pedal) and fund (fundamental bass note extraction) for rhythm-section integration with harmonically-generated progressions.

subKick tracks the harmony: it reads the fundamental of whichever bar the form is currently on, so the sub follows a modulation without being rewritten. In a launcher it is an ordinary block:

subk f k d = p "subk" $ f
  $ subKick k "1 ~ ~ 1" |* vel d

The note is held by a CC64 sustain pedal rather than by note length, so the sub rings between onsets instead of retriggering — see subKick for why the sustain value and the pedal are paired.

Synopsis

Documentation

fund :: Progression -> [[Int]] Source #

Extract harmonic roots regardless of inversion. Always returns the fundamental root note from CadenceState.

subKick Source #

Arguments

:: Pattern Double

Dynamics pattern (> 0 = sub active)

-> IK

Performance context (kinetics + chord selection)

-> (Progression -> [[Int]])

Voice strategy (fund or bass)

-> (Time, String, String, String)

Kick placement pattern string

-> Pattern ValueMap 

Groove interface using patterned chord selection with kinetics gating.

CC64 sustain mechanism with chord selection from IK. Sub on/off patterns and kick pattern are bar-relative: "[1]/2" = one onset every 2 bars, "1*4" = 4 kicks per bar.

Chord selection uses innerJoin — we WANT new note-ons when the chord changes (unlike melodic instruments where sustain across boundaries is desirable).

The progression is read from kProg via innerJoin. Sub is gated at (0.1, 1) and kick at (0.2, 1) via ki.

noteoff :: Time -> Pattern Bool -> Pattern Bool Source #

Truncate each gate onset's note length to at most 1/n of a bar (bar = 4 cycles), else extend it to the next onset. Only True onsets sound; a truncated tail is a rest; onsets are not moved. Pair with # legato 1 on sustaining instruments to hear the length. Precondition: n > 0.

Bar patterns are written "/4" (1 cycle = 1 beat, 1 bar = 4 cycles), so e.g. noteoff 4 caps each hit at a quarter note (1 cycle):

noteoff 4 "[[1 0 0 0] [0 0 0 0] [1 0 0 0] [1 0 0 0]]\/4"  ==  "[1 0 1 1]\/4"