synthesizer-core-0.4.0.4: Audio signal processing coded in Haskell: Low level part

Portabilityrequires multi-parameter type classes
Stabilityprovisional
Maintainersynthesizer@henning-thielemann.de

Synthesizer.Plain.ToneModulation

Contents

Description

Avoid importing this module. Better use functions from Synthesizer.Plain.Oscillator and Synthesizer.Basic.Wave

Input data is interpreted as samples of data on a cylinder in the following form:

 |*          |
 |   *       |
 |      *    |
 |         * |
 | *         |
 |    *      |
 |       *   |
 |          *|
 |  *        |
 |     *     |
 |        *  |
 -----------
 *
     *
         *
  *
      *
          *
   *
       *
           *
    *
        *
 -----------

We have to interpolate in the parallelograms.

Synopsis

general helpers

type Cell y = T (T y)Source

interpolateCell :: T a y -> T b y -> (a, b) -> Cell y -> ySource

array based shape variable wave

makePrototype :: C t => Margin -> Margin -> Int -> t -> T y -> Prototype t ySource

sampledToneCell :: C t => Prototype t y -> t -> T t -> ((t, t), Cell y)Source

lazy oscillator

oscillatorCells :: C t => Margin -> Margin -> Int -> t -> T y -> (t, T t) -> (T t, T t) -> T ((t, t), Cell y)Source

seekCell :: C t => Int -> t -> ((t, T t), Cell y) -> ((t, t), Cell y)Source

oscillatorSuffixes :: C t => Margin -> Margin -> Int -> t -> T y -> (t, T t) -> (T t, T t) -> T ((t, T t), Cell y)Source

dropFrac :: C i => i -> T a -> (Int, i, T a)Source

dropFrac' :: C i => i -> T a -> (Int, i, T a)Source

propDropFrac :: (C i, Eq a) => i -> T a -> BoolSource

dropRem :: Int -> T a -> (Int, T a)Source

dropRem' :: Int -> T a -> (Int, T a)Source

propDropRem :: Eq a => Int -> T a -> BoolSource

oscillatorCoords :: C t => Int -> t -> (t, T t) -> (T t, T t) -> T (Coords t)Source

integrateFractional :: C t => t -> (t, T t) -> (T t, T t) -> T (Skip t)Source

freqsToPhases :: C a => T a -> T a -> T (T a)Source

Convert a list of phase steps into a list of momentum phases phase is a number in the interval [0,1) freq contains the phase steps

limitRelativeShapes :: (C t, Ord t) => Margin -> Margin -> Int -> T y -> (t, T t) -> (t, T t)Source

limitMinRelativeValues :: (C a, Ord a) => a -> a -> T a -> (a, T a)Source

limitMaxRelativeValues :: (C a, Ord a) => a -> a -> T a -> (a, T a)Source

limitMaxRelativeValuesNonNeg :: (C a, Ord a) => a -> a -> T a -> (a, T a)Source

Avoids negative numbers and thus can be used with Chunky numbers.

safeSub :: (C a, Ord a) => a -> a -> (Bool, a)Source