Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
235 lines (203 sloc) 4.19 KB
<CsoundSynthesizer>
<CsInstruments>
sr = 44100
kr = 44100
ksmps = 1
nchnls = 1
0dbfs = 1.0
instr 1
idur = p3 ; Duration
iamp = p4 ; Amplitude
ipch = cpspch(p5) ; Pitch
kenv line iamp, idur, 0 ; Line envelope
a1 vco2 kenv, ipch, 12, 0.5 ; Triangle wave
out a1
endin
</CsInstruments>
<CsScore bin="python pysco.py">
# Invention No. 1 (excerpt) by J.S. Bach
score('t 0 210')
with cue(0):
score('''
i 1 0.5 0.5 0.5 8.00
i 1 + . . 8.02
i 1 + . . 8.04
i 1 + . . 8.05
i 1 + . . 8.02
i 1 + . . 8.04
i 1 + . . 8.00
''')
with cue(4):
score('''
i 1 0 1 0.5 8.07
i 1 + . . 9.00
i 1 + 0.25 . 8.11
i 1 + 0.25 . 8.09
i 1 + 0.5 . 8.11
i 1 + . . 9.00
i 1 0.5 0.5 0.5 7.00
i 1 + . . 7.02
i 1 + . . 7.04
i 1 + . . 7.05
i 1 + . . 7.02
i 1 + . . 7.04
i 1 + . . 7.00
''')
with cue(8):
score('''
i 1 0 0.5 0.5 9.02
i 1 + . . 8.07
i 1 + . . 8.09
i 1 + . . 8.11
i 1 + . . 9.00
i 1 + . . 8.09
i 1 + . . 8.11
i 1 + . . 8.07
i 1 0 1 0.5 7.07
i 1 + . 0.5 6.07
''')
with cue(12):
score('''
i 1 0 1 0.5 9.02
i 1 + . . 9.07
i 1 + 0.25 . 9.05
i 1 + 0.25 . 9.04
i 1 + 0.5 . 9.05
i 1 + . . 9.07
i 1 0.5 0.5 0.5 7.07
i 1 + . . 7.09
i 1 + . . 7.11
i 1 + . . 8.00
i 1 + . . 7.09
i 1 + . . 7.11
i 1 + . . 7.07
''')
with cue(16):
score('''
i 1 0 0.5 0.5 9.04
i 1 + . . 9.09
i 1 + . . 9.07
i 1 + . . 9.05
i 1 + . . 9.04
i 1 + . . 9.07
i 1 + . . 9.05
i 1 + . . 9.09
i 1 0 1 0.5 8.00
i 1 + . . 7.11
i 1 + . . 8.00
i 1 + . . 8.02
''')
with cue(20):
score('''
i 1 0 0.5 0.5 9.07
i 1 + . . 9.05
i 1 + . . 9.04
i 1 + . . 9.02
i 1 + . . 9.00
i 1 + . . 9.04
i 1 + . . 9.02
i 1 + . . 9.05
i 1 0 1 0.5 8.04
i 1 + . . 7.07
i 1 + . . 7.09
i 1 + . . 7.11
''')
with cue(24):
score('''
i 1 0 0.5 0.5 9.04
i 1 + . . 9.02
i 1 + . . 9.00
i 1 + . . 8.11
i 1 + . . 8.09
i 1 + . . 9.00
i 1 + . . 8.11
i 1 + . . 9.02
i 1 0 1 0.5 8.00
i 1 + . . 7.04
i 1 + . . 7.06
i 1 + . . 7.07
''')
with cue(28):
score('''
i 1 0 0.5 0.5 9.00
i 1 + . . 8.11
i 1 + . . 8.09
i 1 + . . 8.07
i 1 + . . 8.06
i 1 + . . 8.09
i 1 + . . 8.07
i 1 + . . 8.11
i 1 0 0.5 0.5 7.09
i 1 1 . . 7.11
i 1 2 2.5 . 8.00
''')
with cue(32):
score('''
i 1 0 1 0.5 8.09
i 1 + . . 8.02
i 1 + 0.25 . 9.00
i 1 + 0.25 . 8.11
i 1 + 1 . 9.00
i 1 + 0.5 . 9.02
i 1 0.5 0.5 0.5 7.02
i 1 + . . 7.04
i 1 + . . 7.06
i 1 + . . 7.07
i 1 + . . 7.04
i 1 + . . 7.06
i 1 + . . 7.02
''')
with cue(36):
score('''
i 1 0 0.5 0.5 8.11
i 1 + . . 8.09
i 1 + . . 8.07
i 1 + . . 8.06
i 1 + . . 8.04
i 1 + . . 8.07
i 1 + . . 8.06
i 1 + . . 8.09
i 1 0 1 0.5 7.07
i 1 + . . 6.11
i 1 + . . 7.00
i 1 + . . 7.02
''')
with cue(40):
score('''
i 1 0 0.5 0.5 8.07
i 1 + . . 8.11
i 1 + . . 8.09
i 1 + . . 9.00
i 1 + . . 8.11
i 1 + . . 9.02
i 1 + . . 9.00
i 1 + . . 9.04
i 1 0 1 0.5 7.04
i 1 + . . 7.06
i 1 + . . 7.07
i 1 + . . 7.04
''')
with cue(44):
score('''
i 1 0 0.5 0.5 9.02
i 1 + 0.25 . 8.11
i 1 + . . 9.00
i 1 + 0.5 . 9.02
i 1 + . . 9.07
i 1 + 0.25 . 8.11
i 1 + . . 9.00
i 1 + 0.5 . 8.11
i 1 + . . 8.09
i 1 + . . 8.07
i 1 0 1.5 0.5 7.11
i 1 + 0.5 . 8.00
i 1 + 1 . 8.02
i 1 + . . 7.02
''')
with cue(48):
score('''
i 1 0 1 0.5 8.07
i 1 0 1 0.5 7.07
''')
</CsScore>
</CsoundSynthesizer>