csound-expression-5.0.1: library to make electronic music

Safe HaskellNone
LanguageHaskell98

Csound.Air.Padsynth

Contents

Description

Padsynth algorithm. See the details at:

csound docs: http://csound.github.io/docs/manual/GENpadsynth.html

original description: http://www.paulnasca.com/algorithms-created-by-me

more detailed description: http://zynaddsubfx.sourceforge.net/doc/PADsynth/PADsynth.htm

An example:

harms = [ 
    1, 0.7600046992, 0.6199994683, 0.9399998784, 0.4400023818, 0.0600003302, 
    0.8499968648, 0.0899999291, 0.8199964762, 0.3199984133, 
    0.9400014281, 0.3000001907, 0.120003365, 0.1799997687, 0.5200006366]

spec = defPadsynthSpec 42.2 harms

main = dac $ mul 0.4 $ mixAt 0.35 largeHall2 $ mixAt 0.45 (echo 0.25 0.75) $ 
            midi $ onMsg $ mul (fades 0.5 0.7) . padsynthOsc2 spec

Synopsis

Generic padsynth oscillators

padsynthOsc :: PadsynthSpec -> Sig -> SE Sig Source

Padsynth oscillator.

padsynthOsc spec frequency

It makes it easy to create padsynth sound waves (see Tab.padsynth). It creates a padsynth table and reads it with poscil at the right speed.

padsynthOsc2 :: PadsynthSpec -> Sig -> SE Sig2 Source

Stereo padsynth oscillatro. It creates two padsynth ftables for left and right channels.

Simple padsynth oscillators

bwOscBy :: [Double] -> Double -> Sig -> SE Sig Source

Creates padsynth oscillator with given harmonics.

bwOscBy harmonics bandwidth frequency

bwOddOscBy :: [Double] -> Double -> Sig -> SE Sig Source

Creates padsynth oscillator with given odd harmonics.

bwOddOscBy harmonics bandwidth frequency

bwOscBy2 :: [Double] -> Double -> Sig -> SE Sig2 Source

Stereo version of bwOscBy.

bwOddOscBy2 :: [Double] -> Double -> Sig -> SE Sig2 Source

Stereo version of bwOddOscBy.

bwOsc :: Double -> Sig -> SE Sig Source

Pure sine wave with padsynth wave table:

bwOsc bandwidth frequency

bwTri :: Double -> Sig -> SE Sig Source

Triangle wave with padsynth wave table:

bwTri bandwidth frequency

bwSqr :: Double -> Sig -> SE Sig Source

Square wave with padsynth wave table:

bwSqr bandwidth frequency

bwSaw :: Double -> Sig -> SE Sig Source

Saw-tooth wave with padsynth wave table:

bwSaw bandwidth frequency

bwOsc2 :: Double -> Sig -> SE Sig2 Source

Stereo version of bwOsc.

bwTri2 :: Double -> Sig -> SE Sig2 Source

Stereo version of bwTri.

bwSqr2 :: Double -> Sig -> SE Sig2 Source

Stereo version of bwSqr.

bwSaw2 :: Double -> Sig -> SE Sig2 Source

Stereo version of bwSaw.

Layered padsynth

padsynthOscMultiCps :: [(Double, PadsynthSpec)] -> D -> SE Sig Source

It uses several padsynth tables. Each table is responsible for specific interval of frequencies. The list of pairs specifies the threshhold value and padsynth specification. The padsynth table is active for all frequencies that lie below the given threshold.

padsynthOscMultiCps thresholdSpecPairs frequency = ...

padsynthOscMultiCps2 :: [(Double, PadsynthSpec)] -> D -> SE Sig2 Source

Stereo version of padsynthOscMultiCps.

padsynthOscMultiVol :: [(Double, PadsynthSpec)] -> (D, Sig) -> SE Sig Source

It behaves just like padsynthOscMultiCps but it spreads the padsynth tables among amplitude values. So the last input argument is a pair of amplitude and frequency:

padsynthOscMultiVol thresholdSpecPairs (amplitude, frequency) = ...

padsynthOscMultiVol2 :: [(Double, PadsynthSpec)] -> (D, Sig) -> SE Sig2 Source

Stereo version of padsynthOscMultiVol.

padsynthOscMultiVolCps :: [((Double, Double), PadsynthSpec)] -> (D, D) -> SE Sig Source

TODO (undefined function)

With this function we can create square zones in the domain of (amplitude, frequency). We can assign a separate padsynth table for each zone. The list of pairs contains a pair of two threshold values (amplitude, frequency) and dedicated padsynth specification.

padsynthOscMultiVolCps thresholdSpecPairs (amplitude, frequency) = ...

padsynthOscMultiVolCps2 :: [((Double, Double), PadsynthSpec)] -> (D, D) -> SE Sig2 Source

TODO (undefined function)

Stereo version of padsynthOscMultiVolCps.