File: python1.csd

package info (click to toggle)
csound-plugins 1.0.2~dfsg1-5
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 1,960 kB
  • sloc: cpp: 16,586; ansic: 7,522; python: 458; sh: 94; makefile: 25
file content (37 lines) | stat: -rw-r--r-- 432 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<CsoundSynthesizer>
<CsOptions>
  -odac
</CsOptions>
<CsInstruments>

sr=44100
ksmps=128
nchnls=2

pyinit ;Start python interpreter

pyruni {{
a = 2
b = 3
print("a + b = " + str(a+b))
}} ;Execute a python script on the header

instr 1
pyruni {{a = 6
b = 5
print("a + b = " + str(a+b))}} 
endin


instr 2
pyruni {{print("a + b = " + str(a+b))}}
endin


</CsInstruments>
<CsScore>

i 1 0 0.1
i 2 1 0.1
</CsScore>
</CsoundSynthesizer>