netwire-4.0.1: Flexible wire arrows for FRP

Copyright(c) 2012 Ertugrul Soeylemez
LicenseBSD3
MaintainerErtugrul Soeylemez <es@ertes.de>
Safe HaskellNone
LanguageHaskell2010

Control.Wire.Prefab.Noise

Contents

Description

Various noise generators.

Synopsis

Pure random noise

noise Source

Arguments

:: (Random b, RandomGen g) 
=> g

Initial random number generator.

-> Wire e m a b 

Pure noise generator.

noiseR Source

Arguments

:: (Random b, RandomGen g) 
=> g

Initial random number generator.

-> Wire e m (b, b) b 

Pure ranged noise generator.

  • Depends: current instant.

wackelkontakt Source

Arguments

:: (Monoid e, RandomGen g) 
=> Double

Occurrence probability.

-> g

Initial random number generator.

-> Event e m a 

Event: Occurs randomly with the given probability.

  • Inhibits: wackelkontaktM p inhibits with probability 1 - p.

Effectful random noise

noiseM :: (MonadRandom m, Random b) => Wire e m a b Source

Noise generator.

noiseRM :: (MonadRandom m, Random b) => Wire e m (b, b) b Source

Ranged noise generator.

  • Depends: current instant.

wackelkontaktM Source

Arguments

:: (MonadRandom m, Monoid e) 
=> Double

Occurrence probability.

-> Event e m a 

Event: Occurs randomly with the given probability.

  • Inhibits: wackelkontaktM p inhibits with probability 1 - p.