Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
gesellkammer committed Jul 10, 2024
1 parent 0513674 commit 8d0ed7d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
14 changes: 7 additions & 7 deletions csoundengine/instr.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ class Instr:
.. code-block:: python
from csoundengine import *
renderer = Renderer(sr=44100, nchnls=2)
session = OfflineSession(sr=44100, nchnls=2)
instrs = [
Instr('saw', r'''
Expand All @@ -187,19 +187,19 @@ class Instr:
]
for instr in instrs:
instr.register(renderer)
session.registerInstr(instr)
score = [('saw', 0, 2, 60),
('sine', 1.5, 4, 67),
('saw', 1.5, 4, 67.1)]
events = [renderer.sched(ev[0], delay=ev[1], dur=ev[2], pargs=ev[3:])
events = [session.sched(ev[0], delay=ev[1], dur=ev[2], pargs=ev[3:])
for ev in score]
# Offline events can be modified just like real-time events
renderer.automate(events[0], 'kmidi', pairs=[0, 60, 2, 59])
renderer.set(events[1], 3, 'kmidi', 67.2)
renderer.render("out.wav")
session.automate(events[0], 'kmidi', pairs=[0, 60, 2, 59])
session.set(events[1], 3, 'kmidi', 67.2)
session.render("out.wav")
"""

Expand Down
3 changes: 2 additions & 1 deletion test/test1.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
parser.add_argument('-o', '--outfile', default='test1.wav')
args = parser.parse_args()

r = ce.Renderer()
r = ce.OfflineSession()

r.defInstr("sin", r"""
imidi = p5
ifreq = mtof:i(imidi)
Expand Down

0 comments on commit 8d0ed7d

Please sign in to comment.