Skip to content

Commit ccbf3ae

Browse files
committed
Add some opcode aliases
1 parent 1e0f1a4 commit ccbf3ae

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+643
-253
lines changed

docs/examples/maxk.csd

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<CsoundSynthesizer>
2+
<CsOptions>
3+
; Select audio/midi flags here according to platform
4+
-odac ;-Ma ;;;realtime audio out and midi in (on all inputs)
5+
;-iadc ;;;uncomment -iadc if RT audio input is needed too
6+
; For Non-realtime ouput leave only the line below:
7+
; -o max_k.wav -W ;;; for file output any platform
8+
</CsOptions>
9+
<CsInstruments>
10+
11+
; by Stefano Cucchi 2020
12+
13+
sr = 44100
14+
ksmps = 32
15+
nchnls = 2
16+
0dbfs = 1
17+
18+
instr 1
19+
Noise:a = noise(0.1, 0.1) ; generate some noise
20+
Random:a = randomi(400, 12000, 4) ; generate random numbers from 400 to 1200
21+
22+
trig:k = metro(3) ; trigger signal
23+
24+
Min:k = maxk(Random, trig, 3) ; minumum value
25+
Max:k = maxk(Random, trig, 2) ; maximum value
26+
27+
printk(0.2, Min)
28+
printk(0.2, Max)
29+
30+
noisehp:a = butterhp(Noise, Min) ; hipass filter at kmin frequency
31+
noiselp:a = butterlp(Noise, Max*0.5) ; lopass filter at kmin/2 frequency
32+
33+
comp:a = poscil(0.1, 440) ; comparator signal for consistent amplitude
34+
35+
noisehp = balance(noisehp, comp) ; adjusting the volume
36+
noiselp = balance(noiselp, comp) ; adjusting the volume
37+
38+
out(noisehp, noiselp)
39+
endin
40+
41+
</CsInstruments>
42+
<CsScore>
43+
44+
i1 0 10
45+
e
46+
</CsScore>
47+
</CsoundSynthesizer>

docs/examples/vadd_i.csd

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ ifn1 = p4
1717
ival = p5
1818
ielements = p6
1919
idstoffset = p7
20-
kval init 25
2120
vadd_i ifn1, ival, ielements, idstoffset
2221
endin
2322

docs/examples/vaddi.csd

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<CsoundSynthesizer>
2+
<CsOptions>
3+
; Select audio/midi flags here according to platform
4+
; Audio out Audio in
5+
-odac -iadc ;;;RT audio I/O
6+
; For Non-realtime ouput leave only the line below:
7+
; -o cigoto.wav -W ;;; for file output any platform
8+
</CsOptions>
9+
<CsInstruments>
10+
11+
sr = 44100
12+
ksmps = 128
13+
nchnls = 2
14+
15+
instr 1
16+
fn1:i = p4
17+
val:i = p5
18+
elements:i = p6
19+
dstoffset:i = p7
20+
vaddi(fn1, val, elements, dstoffset)
21+
endin
22+
23+
instr 2 ; Print table
24+
Table:i = p4
25+
size:i = ftlen(Table)
26+
Count:k = init(0)
27+
val:k = table(Count, Table)
28+
printk2(val)
29+
30+
if Count == size then
31+
turnoff()
32+
endif
33+
34+
Count += 1
35+
endin
36+
37+
</CsInstruments>
38+
39+
<CsScore>
40+
41+
f 1 0 16 -7 1 16 17
42+
43+
i2 0.0 0.2 1
44+
i1 0.4 0.01 1 2 3 4
45+
i2 0.8 0.2 1
46+
i1 1.0 0.01 1 0.5 5 -3
47+
i2 1.2 0.2 1
48+
i1 1.4 0.01 1 1.5 10 12
49+
i2 1.6 0.2 1
50+
e
51+
52+
</CsScore>
53+
54+
</CsoundSynthesizer>

docs/examples/vexp_i.csd

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ ifn1 = p4
1717
ival = p5
1818
ielements = p6
1919
idstoffset = p7
20-
kval init 25
2120
vexp_i ifn1, ival, ielements, idstoffset
2221
endin
2322

docs/examples/vexpi.csd

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<CsoundSynthesizer>
2+
<CsOptions>
3+
; Select audio/midi flags here according to platform
4+
; Audio out Audio in
5+
-odac -iadc ;;;RT audio I/O
6+
; For Non-realtime ouput leave only the line below:
7+
; -o cigoto.wav -W ;;; for file output any platform
8+
</CsOptions>
9+
<CsInstruments>
10+
11+
sr = 44100
12+
ksmps = 128
13+
nchnls = 2
14+
15+
instr 1
16+
fn1:i = p4
17+
val:i = p5
18+
elements:i = p6
19+
dstoffset:i = p7
20+
vexpi(fn1, val, elements, dstoffset)
21+
endin
22+
23+
instr 2 ; Print table
24+
Table:i = p4
25+
size:i = ftlen(Table)
26+
Count:k = init(0)
27+
val:k = table(Count, Table)
28+
printk2(val)
29+
30+
if Count == size then
31+
turnoff()
32+
endif
33+
34+
Count += 1
35+
endin
36+
37+
</CsInstruments>
38+
39+
<CsScore>
40+
41+
f 1 0 16 -7 1 16 17
42+
43+
i2 0.0 0.2 1
44+
i1 0.4 0.01 1 2 3 4
45+
i2 0.8 0.2 1
46+
i1 1.0 0.01 1 0.5 5 -3
47+
i2 1.2 0.2 1
48+
i1 1.4 0.01 1 1.5 10 12
49+
i2 1.6 0.2 1
50+
e
51+
52+
</CsScore>
53+
54+
</CsoundSynthesizer>

docs/examples/vmult_i.csd

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ ifn1 = p4
1717
ival = p5
1818
ielements = p6
1919
idstoffset = p7
20-
kval init 25
2120
vmult_i ifn1, ival, ielements, idstoffset
2221
endin
2322

docs/examples/vmulti.csd

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<CsoundSynthesizer>
2+
<CsOptions>
3+
; Select audio/midi flags here according to platform
4+
; Audio out Audio in
5+
-odac -iadc ;;;RT audio I/O
6+
; For Non-realtime ouput leave only the line below:
7+
; -o cigoto.wav -W ;;; for file output any platform
8+
</CsOptions>
9+
<CsInstruments>
10+
11+
sr = 44100
12+
ksmps = 128
13+
nchnls = 2
14+
15+
instr 1
16+
fn1:i = p4
17+
val:i = p5
18+
elements:i = p6
19+
dstoffset:i = p7
20+
vmulti(fn1, val, elements, dstoffset)
21+
endin
22+
23+
instr 2 ; Print table
24+
Table:i = p4
25+
size:i = ftlen(Table)
26+
Count:k = init(0)
27+
val:k = table(Count, Table)
28+
printk2(val)
29+
30+
if Count == size then
31+
turnoff()
32+
endif
33+
34+
Count += 1
35+
endin
36+
37+
</CsInstruments>
38+
39+
<CsScore>
40+
41+
f 1 0 16 -7 1 16 17
42+
43+
i2 0.0 0.2 1
44+
i1 0.4 0.01 1 2 3 4
45+
i2 0.8 0.2 1
46+
i1 1.0 0.01 1 0.5 5 -3
47+
i2 1.2 0.2 1
48+
i1 1.4 0.01 1 1.5 10 12
49+
i2 1.6 0.2 1
50+
e
51+
52+
</CsScore>
53+
54+
</CsoundSynthesizer>

docs/examples/vpow_i.csd

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ ifn1 = p4
1717
ival = p5
1818
ielements = p6
1919
idstoffset = p7
20-
kval init 25
2120
vpow_i ifn1, ival, ielements, idstoffset
2221
endin
2322

docs/examples/vpowi-2.csd

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<CsoundSynthesizer>
2+
<CsOptions>
3+
; Select audio/midi flags here according to platform
4+
-odac ;;;realtime audio out
5+
;-iadc ;;;uncomment -iadc if realtime audio input is needed too
6+
; For Non-realtime ouput leave only the line below:
7+
; -o vpowi-2.wav -W ;;; for file output any platform
8+
</CsOptions>
9+
<CsInstruments>
10+
11+
sr = 44100
12+
ksmps = 32
13+
nchnls = 2
14+
0dbfs = 1
15+
16+
fil@global:i = ftgen(1, 0, 0, 1, "fox.wav", 0, 0, 1)
17+
18+
instr 1
19+
val:i = p4 ;different distortion settings
20+
elements:i = p5
21+
dstoffset:i = p6 ;index offset
22+
vpowi(1, val, elements, dstoffset)
23+
sig:a = lposcil(1, 1, 0, 0, 1)
24+
out(sig, sig)
25+
endin
26+
</CsInstruments>
27+
<CsScore>
28+
29+
i1 0 2.7 0.5 70000 0 ; no offset
30+
i1 3 2.7 0.01 50000 70000 ; add another period of distortion,
31+
; starting at sample 70000
32+
33+
e
34+
</CsScore>
35+
</CsoundSynthesizer>

docs/examples/vpowi.csd

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<CsoundSynthesizer>
2+
<CsOptions>
3+
; Select audio/midi flags here according to platform
4+
; Audio out Audio in
5+
-odac -iadc ;;;RT audio I/O
6+
; For Non-realtime ouput leave only the line below:
7+
; -o cigoto.wav -W ;;; for file output any platform
8+
</CsOptions>
9+
<CsInstruments>
10+
11+
sr = 44100
12+
ksmps = 128
13+
nchnls = 2
14+
15+
instr 1
16+
fn1:i = p4
17+
val:i = p5
18+
elements:i = p6
19+
dstoffset:i = p7
20+
vpowi(fn1, val, elements, dstoffset)
21+
endin
22+
23+
instr 2 ; Print table
24+
Table:i = p4
25+
size:i = ftlen(Table)
26+
Count:k = init(0)
27+
val:k = table(Count, Table)
28+
printk2(val)
29+
30+
if Count == size then
31+
turnoff()
32+
endif
33+
34+
Count += 1
35+
endin
36+
37+
</CsInstruments>
38+
39+
<CsScore>
40+
41+
f 1 0 16 -7 1 16 17
42+
43+
i2 0.0 0.2 1
44+
i1 0.4 0.01 1 2 3 4
45+
i2 0.8 0.2 1
46+
i1 1.0 0.01 1 0.5 5 -3
47+
i2 1.2 0.2 1
48+
i1 1.4 0.01 1 1.5 10 12
49+
i2 1.6 0.2 1
50+
e
51+
52+
</CsScore>
53+
54+
</CsoundSynthesizer>

0 commit comments

Comments
 (0)