| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
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
- parseComposersWithOrder :: Text -> [(Text, Double)]
- makePortmanteau :: Text -> Maybe Text
- extractByPosition :: Int -> Int -> Text -> Double -> Text
- takeFromBeginning :: Text -> Double -> Text
- takeFromEnd :: Text -> Double -> Text
- takeFromMiddle :: Text -> Double -> Text
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.