Safe Haskell | None |
---|
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
- stringPad :: N -> Sig
- phasingSynth :: N -> Sig
- pulseWidthPad :: N -> Sig
- melodica :: N -> SE Sig
- tibetan :: D -> N -> Sig
- sparkles :: N -> SE Sig
- xanaduHarp :: N -> SE Sig
- delaySaw :: N -> Sig
- pulseWidth :: N -> Sig
- toneWheel :: N -> Sig
- okComp :: CsdDrum OkCompParam -> SE Sig
- newtype OkCompParam = OkCompParam {
- unOkCompParam :: D
- fmMod :: N -> Sig
- delayedStringLong :: N -> Sig
- delayedStringShort :: N -> Sig
- plucked :: N -> Sig
- xanadu1 :: N -> SE Sig
- xanadu2 :: N -> SE Sig
- guitar :: N -> Sig
- harpsichord :: N -> Sig
- harpsichordHarp :: N -> Sig
- plainString :: N -> Sig
- plainStringHarp :: N -> Sig
- noisyMarimba :: N -> SE Sig
- dahina :: N -> Sig
- banyan :: N -> Sig
- xylophone :: N -> Sig
- spinelSphere :: N -> Sig
- aluminumBar :: N -> Sig
- vibraphone1 :: N -> Sig
- vibraphone2 :: N -> Sig
- wineGlass :: N -> Sig
- xing :: N -> Sig
- amBell :: N -> Sig
- fmTubularBell :: N -> Sig
- tubularBell :: N -> Sig
- albertClockBellBelfast :: N -> Sig
- dumb :: Dr -> SE Sig
- dumbBass :: Dr -> SE Sig
- pluckSnare :: Dr -> Sig
- knockSweep :: Dr -> SE Sig
- metalBoink :: Dr -> Sig
- snare :: Dr -> SE Sig
- openHihat :: Dr -> SE Sig
- closedHihat :: Dr -> SE Sig
- bassDrum :: D -> Dr -> Sig
- crash :: D -> Dr -> SE Sig
- handClap :: D -> Dr -> SE Sig
- bambooDr :: Dr -> Sig
- guiroDr :: Dr -> Sig
- tambourineDr :: Dr -> Sig
- cabasaDr :: Dr -> Sig
- crunchDr :: Dr -> Sig
- sleighbellsDr :: Dr -> Sig
- sekereDr :: Dr -> Sig
- sandpaperDr :: Dr -> Sig
Pads
phasingSynth :: N -> SigSource
pulseWidthPad :: N -> SigSource
Mystic
xanaduHarp :: N -> SE SigSource
Lead
pulseWidth :: N -> SigSource
Tech
newtype OkCompParam Source
Plucked
delayedStringLong :: N -> SigSource
delayedStringShort :: N -> SigSource
harpsichord :: N -> SigSource
harpsichordHarp :: N -> SigSource
plainString :: N -> SigSource
plainStringHarp :: N -> SigSource
Strike
noisyMarimba :: N -> SE SigSource
spinelSphere :: N -> SigSource
aluminumBar :: N -> SigSource
vibraphone1 :: N -> SigSource
vibraphone2 :: N -> SigSource
Bells
fmTubularBell :: N -> SigSource
tubularBell :: N -> SigSource
albertClockBellBelfast :: N -> SigSource
Drums
pluckSnare :: Dr -> SigSource
knockSweep :: Dr -> SE SigSource
metalBoink :: Dr -> SigSource
closedHihat :: Dr -> SE SigSource
crash :: D -> Dr -> SE SigSource
Recommended values for frequency parameter cpspch(13.03) - cpspch(13.10)
tambourineDr :: Dr -> SigSource
sleighbellsDr :: Dr -> SigSource
sandpaperDr :: Dr -> SigSource