Karya, built on 2020-11-26T21:03:17 (patch 23b5be2d53a9e8e7d6136cda5aae2849abe5cded)
Safe HaskellNone

Synth.Sampler.Patch.Lib.Util

Description

General utilities for sampler patches.

Synopsis

preprocess

nextsBy :: Eq key => (a -> key) -> [a] -> [(a, [a])] Source #

nexts :: [a] -> [(a, [a])] Source #

convert

pitch

findPitchRatio :: Map Pitch.NoteNumber a -> Pitch.NoteNumber -> (a, Y) Source #

Find a value (presumably a FileName) and pitch ratio for a simple patch with a static NoteNumber mapping.

articulation

dynamic

dynamic Source #

Arguments

:: (Bounded dyn, Enum dyn) 
=> (dyn -> (Int, Int)) 
-> Y

Min dyn. This is for normalized samples, where 0 gets this dyn.

-> Note.Note 
-> (dyn, Y) 

Get patch-specific dyn category, and note dynamic.

dynamicScale :: (Bounded dyn, Enum dyn) => (dyn -> (Int, Int)) -> Note.Note -> (dyn, Y) Source #

findDynamic :: (Bounded dyn, Enum dyn) => (dyn -> (Int, Int)) -> Y -> (dyn, Y) Source #

Convert to (Dynamic, DistanceFromPrevDynamic)

pickDynamicVariation :: Double -> [a] -> Double -> Double -> a Source #

Pick from a list of dynamic variations.

pickVariation :: [a] -> Double -> a Source #

envelope

asr :: Y -> RealTime.RealTime -> Note.Note -> Signal.Signal Source #

Simple attack-sustain-release envelope.

thru

util

enumAll :: (Enum a, Bounded a) => [a] Source #

findBelow :: Ord k => (a -> k) -> k -> [a] -> a Source #

showtLower :: Show a => a -> Text Source #