temporal-csound-0.4.3.1: library to make electronic music, brings together temporal-music-notation and csound-expression packages

Safe HaskellNone
LanguageHaskell98

Csound.Patch

Contents

Description

Ready to use instruments.

An instrument takes in a note (N which is shortcut for CsdNote Unit or Dr which is shortcut for CsdDrum Unit) and procuces a signal. We can use instruments with functions notes and drums.

import Csound 
import Csound.Patch(stringPad)

-- | Plays C-major chord.
main = dac $ mul 0.2 $ smallHall $ mix $ notes stringPad $	
	 str 0.5 $ mel [c, e, g, str 4 $ har [c, e, g, high c], rest 4]

Let's explain the functions:

-- dac -- sends signal to speakers
-- 
-- mul -- scales the signal
-- 
-- smallHall -- adds a reverb
--
-- mix -- mixes several tracks to a single signal
--
-- notes -- applies an instrument to the notes
--
-- stringPad -- predefined instrument
-- 
-- str -- stretch the notes in time domain
--
-- mel, har -- sequential and parallel composition of the notes
--
-- c, e, g -- notes in western notation (a, b, c, d, ...), a is 440 Hz 
--
-- high -- an octave higher
--
-- rest -- pause for a given amount of time

Synopsis

Pads

tibetan :: D -> N -> Sig Source

Parameter is time of fade out in seconds.

Mystic

Lead

Tech

Plucked

Strike

Bells

Drums

crash :: D -> Dr -> SE Sig Source

Recommended values for frequency parameter cpspch(13.03) - cpspch(13.10)