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

Harmonic.Framework.Builder.Portmanteau

Description

Generates blended composer display names by extracting weighted portions from beginning/middle/end of each composer name based on their position and weight in the blend string.

Synopsis

Documentation

parseComposersWithOrder :: Text -> [(Text, Double)] Source #

Parse composer string preserving input order Returns list of (name, normalized weight) tuples in order of appearance

makePortmanteau :: Text -> Maybe Text Source #

Generate portmanteau from composer string (preserving input order) Takes weighted portions from beginning/middle/end based on POSITION Returns Nothing for "*", empty input, or "none" (offline mode)

extractByPosition :: Int -> Int -> Text -> Double -> Text Source #

Extract characters from name based on position in list

takeFromBeginning :: Text -> Double -> Text Source #

Take a leading fragment of a name, sized by the composer's blend weight. Used for the first name in a blend. Always yields at least one character.

takeFromEnd :: Text -> Double -> Text Source #

Take a trailing fragment, sized by blend weight. Used for the last name in a blend, so the portmanteau ends on a real word ending.

takeFromMiddle :: Text -> Double -> Text Source #

Take a centred fragment, sized by blend weight. Used for names between the first and last in a blend. Ties favour earlier characters.