synthesizer-0.0.3: Audio signal processing coded in HaskellSource codeContentsIndex
Synthesizer.Inference.Func.Cut
Portabilityrequires multi-parameter type classes
Stabilityprovisional
Maintainersynthesizer@henning-thielemann.de
Contents
dissection
glueing
Description
Synopsis
takeUntilPause :: (C t, C t', C t t', C y', C y yv, C y y') => y' -> t' -> T t t' y y' yv -> T t t' y y' yv
concat :: (Eq t', C y', C y', C y yv, C y y') => [T t t' y y' yv] -> T t t' y y' yv
concatVolume :: (Eq t', C y', C y', C y yv, C y y') => [T t t' y y' yv] -> T t t' y y' yv
append :: (Eq t', C y', C y', C y y', C y yv) => T t t' y y' yv -> T t t' y y' yv -> T t t' y y' yv
zip :: (Eq t', C y', C y', C y y', C y v0, C y v1) => T t t' y y' v0 -> T t t' y y' v1 -> T t t' y y' (v0, v1)
arrange :: (RealFrac t, C t, Eq t', C t, C t', C t t', Ord y', C y', C y y', C y yv) => t' -> T t (T t t' y y' yv) -> T t t' y y' yv
arrangeVolume :: (RealFrac t, C t, Eq t', C t, C t', C t t', C y', C y y', C y yv) => t' -> T t (T t t' y y' yv) -> T t t' y y' yv
dissection
takeUntilPause :: (C t, C t', C t t', C y', C y yv, C y y') => y' -> t' -> T t t' y y' yv -> T t t' y y' yvSource
glueing
concat :: (Eq t', C y', C y', C y yv, C y y') => [T t t' y y' yv] -> T t t' y y' yvSource
Similar to foldr1 append but more efficient and accurate, because it reduces the number of amplifications. Does not work for infinite lists, because in this case a maximum amplitude cannot be computed.
concatVolume :: (Eq t', C y', C y', C y yv, C y y') => [T t t' y y' yv] -> T t t' y y' yvSource

Like concat but it expects a fixed output amplitude. This way it can also handle infinitely many inputs if one input or the output has a fixed sample rate.

concatVolume is one reason for the complicated handling of sampling rates by lists of Maybes.

The problem of finding an apropriate sampling rate is that we must have an order of processing parallel signal processors which guarantees termination if termination is possible. Say mix (concat infinitelist0) (concat infinitelist1). Either infinite list can have signal with fixed sample rate or not. There is no way to determine this a priori. The only safe way is to process them in parallel. That's why we must have a [Maybe t'] instead of Maybe t'. Also [t'] is not enough, because e.g. a concatenation of infinitely many sounds with undetermined sampling rate would have an empty list representing the sampling rate, but computing the empty list needs infinite time.

append :: (Eq t', C y', C y', C y y', C y yv) => T t t' y y' yv -> T t t' y y' yv -> T t t' y y' yvSource
zip :: (Eq t', C y', C y', C y y', C y v0, C y v1) => T t t' y y' v0 -> T t t' y y' v1 -> T t t' y y' (v0, v1)Source
arrangeSource
:: (RealFrac t, C t, Eq t', C t, C t', C t t', Ord y', C y', C y y', C y yv)
=> t'
-> T t (T t t' y y' yv)A list of pairs: (relative start time, signal part), The start time is relative to the start time of the previous event.
-> T t t' y y' yvThe mixed signal.
Given a list of signals with time stamps, mix them into one signal as they occur in time. Ideally for composing music. Infinite schedules are not supported, because no maximum amplitude can be computed.
arrangeVolumeSource
:: (RealFrac t, C t, Eq t', C t, C t', C t t', C y', C y y', C y yv)
=> t'
-> T t (T t t' y y' yv)A list of pairs: (relative start time, signal part), The start time is relative to the start time of the previous event.
-> T t t' y y' yvThe mixed signal.
Produced by Haddock version 2.3.0