Thursday, February 27, 2014

Csound Tutorials






sr = 44100
ksmps = 10
nchnls = 2
0dbfs = 1

giSine ftgen 0, 0, 8192, 10, 2

instr 1

; setup:
iamp = p4 * 0.3
ifreq = cpspch(p5)
idetune = 0.7
index = 3

; envelopes:
kindexenv linseg index, 0.05, (index*05), (p3-0.05), 0
kampenv linseg 0, 0.01, iamp, (p3-0.01), 0

; tone generators:
aout foscil kampenv, ifreq-idetune, 1, 1, kindexenv, giSine
aout2 foscil kampenv, ifreq+idetune, 1, 1, kindexenv, giSine

; output:
outs aout, aout2
endin




; set tempo:
t 0 120

i1 00.00 0.5 0.7 9.04
i1 00.50 0.5 0.5 9.02
i1 01.00 0.5 0.6 9.04
i1 01.50 0.5 0.4 9.02
i1 02.00 1.0 0.7 9.04
i1 03.00 1.0 0.5 9.02
i1 04.00 0.3 0.7 9.00
i1 04.33 0.3 0.5 9.02
i1 04.67 0.3 0.4 8.11
i1 05.00 0.3 0.6 9.00
i1 05.33 0.3 0.5 9.02
i1 05.67 0.3 0.4 8.11
i1 06.00 1.0 0.5 9.00
i1 07.00 1.0 0.6 9.02
i1 08.00 0.7 0.6 9.04
i1 08.67 0.7 0.5 9.05
i1 09.33 0.7 0.3 9.03
i1 10.00 0.7 0.6 9.04
i1 10.67 0.7 0.5 9.05
i1 11.33 1.7 0.7 9.04

i1 00 2.0 0.3 7.00
i1 00 2.0 0.3 7.07
i1 02 2.0 0.3 7.05
i1 02 2.0 0.3 7.09
i1 04 2.0 0.3 7.04
i1 04 2.0 0.3 7.07
i1 06 2.0 0.3 7.05
i1 06 2.0 0.3 7.09
i1 08 2.0 0.3 7.02
i1 08 2.0 0.3 7.05
i1 08 2.0 0.3 7.09
i1 10 1.3 0.3 7.07
i1 10 1.3 0.3 7.11
i1 11.33 1.7 0.3 7.00
i1 11.33 1.7 0.3 7.07




No comments: