def __init__(self, act, colour=(-1, -1, -1), vert=True): """constructor act: activity object colour: bg colour RGB tuple (R,G, B) vert: True for vertical topmost arrangement, horiz. otherwise.""" locale.setlocale(locale.LC_NUMERIC, 'C') self.csound = csnd.Csound() self.perf = csnd.CsoundPerformanceThread(self.csound) BasicGUI.__init__(self, act, colour, vert) self.ready = True self.on = False self.paused = False self.name = "0" self.arglist = None self.replay = False self.stopcb = True
import csnd import CsoundVST from OpenGL.GL import * from OpenGL.GLUT import * from OpenGL.GLU import * import sys cs = csnd.Csound() csound.setOrchestra(''' sr=44100 ksmps=100 nchnls=2 instr 1 k1 randomi 20,400,1 a1 oscil 10000,k1,1 a2 oscil a1,100,1 outs a2,a2 endin ''') csound.setScore(''' f1 0 8192 10 1 i1 0 16 e ''') csound.setCommand( 'csound -h -d -r 44100 -k 441 -m128 -b4096 -B100 -odac8 test.orc test.sco')
import sys import csnd help(csnd) help(csnd.Csound) help(csnd.CsoundFile) help(csnd.CppSound) csound = csnd.Csound() csound.Compile('-o', 'dac', '../examples/trapped.csd') while not csound.PerformBuffer(): pass csound.Reset()