Debian Codegraph @

src/Scripts/Tutorial/03_Csound_Interaction.py

raw symbols SCIP
1 # 03_Csound_Interaction.py
2
3 import time # to get the sleep function
4 q.loadDocument("basic.csd")
5 q.play()
6
7 time.sleep(1) # wait one second (while csd is running
8 q.stop() # Then stop the running csd
9 # The csd stops, even though it should have lasted 10 seconds.
10
11 # Now we open and move to this document
12 q.loadDocument("03_Csound_Interaction.py")
13 # Then we wait a bit
14 time.sleep(1)
15
16 # And now we play a document which is open on another tab
17 doc = q.getDocument("basic.csd")
18 q.play(doc)
19 time.sleep(0.2)
20 q.stop(doc)
21