csound-expression-5.0.1: library to make electronic music

Safe HaskellNone
LanguageHaskell98

Csound.Air.Fm

Contents

Description

Tools to build Fm synthesis graphs

Example

f a = fmOut1 $ do
	x1 <- fmOsc 1
	x2 <- fmOsc 2
	x1 `fmod` [(a, x2)]
	return x1

Synopsis

Fm graph

type Fm a = State St a Source

fmOsc' :: (Sig -> SE Sig) -> Sig -> Fm FmNode Source

Creates fm node with generic wave.

fmOsc' wave modFreq

fmOsc :: Sig -> Fm FmNode Source

Creates fm node with sine wave.

fmOsc modFreq

fmSig :: Sig -> Fm FmNode Source

Creates fm node with signal generator (it's independent from the main frequency).

fmod :: FmNode -> [(Sig, FmNode)] -> Fm () Source

fmOut :: Fm [(Sig, FmNode)] -> Sig -> SE [Sig] Source

Renders Fm synth to function.

fmOut1 :: Fm FmNode -> Sig -> SE Sig Source

Renders mono output.

fmOut2 :: Fm (FmNode, FmNode) -> Sig -> SE Sig2 Source

Renders stereo output.

Simplified Fm graph

data FmSpec Source

Constructors

FmSpec 

Fields

fmWave :: [Sig -> SE Sig]
 
fmCps :: [Sig]
 
fmInd :: [Sig]
 
fmOuts :: [Sig]
 

data FmGraph Source

Constructors

FmGraph 

Fields

fmGraph :: [(Int, [Int])]
 
fmGraphOuts :: [Int]
 

Specific graphs

Algorithms for DX7 fm synth

dx_1 :: FmGraph Source

	 	+--+
		6  |
		+--+
		5
		|
	2	4
	|	|
	1	3
	+---+

dx_2 :: FmGraph Source

         6 
         |
         5
   +--+  |
	2  |  4
	+--+  |
	1     3
   +-----+

dx_3 :: FmGraph Source

	    +--+
	3   6  |
	|   +--+
	2   5
	|	|
	1 	4
	+---+

dx_4 :: FmGraph Source

			+--+
		3	6  |
		|	|  |	
		2	5  |
		|	|  |
		1	4  |
		|	+--+
       +---+