Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
238 lines (205 sloc) 4.28 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
def measure(t):
return cue((t - 1) * 4.0)
score('t 0 210')
with measure(1):
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 measure(2):
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 measure(3):
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 measure(4):
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 measure(5):
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 measure(6):
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 measure(7):
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 measure(8):
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 measure(9):
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 measure(10):
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 measure(11):
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 measure(12):
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 measure(13):
score('''
i 1 0 1 0.5 8.07
i 1 0 1 0.5 7.07
''')
</CsScore>
</CsoundSynthesizer>