Пример #1
0
 def score_event(self, eventType, pvals, absp2mode=0):
     """Send a score event to csound"""
     if self._client_addr:
         print("Not supported for client interface. Use send_score()")
         return
     if not use_ctypes:
         print("score_event() not available without ctypes.")
     n = len(pvals)
     if self._myfltsize == 8:
         pfields = csnd6.doubleArray(n)
     else:
         pfields = csnd6.floatArray(n)
     for i in xrange(n):
         pfields[i] = pvals[i]
     self._cs.ScoreEvent(absp2mode, eventType, n, pfields)
Пример #2
0
 def score_event(self, eventType, pvals, absp2mode=0):
     """Send a score event to csound"""
     if self._client_addr:
         print("Not supported for client interface. Use send_score()")
         return
     if not use_ctypes:
         print("score_event() not available without ctypes.")
     n = len(pvals)
     if self._myfltsize == 8:
         pfields = csnd6.doubleArray(n)
     else:
         pfields = csnd6.floatArray(n)
     for i in xrange(n):
         pfields[i] = pvals[i]
     self._cs.ScoreEvent(absp2mode, eventType, n, pfields)
Пример #3
0
        disp.draw(sig, time_interval * cs.GetSr())

    def __init__(self, data):
        self.data = data


# create & compile instance
cs = csnd6.Csound()
cs.Compile("am.csd")

# create the thread object
perf = csnd6.CsoundPerformanceThread(cs)

# display object
master = Tk()
disp = display.Oscilloscope(master, window_size, perf.Stop, "green", "black")

# samples array
chn = csnd6.floatArray(cs.GetKsmps())
dat = (cs, disp, chn)
tes = Disp(dat)

# set the callback
perf.SetProcessCallback(tes.callb, None)

# play
perf.Play()

# run the display
disp.mainloop()
Пример #4
0
      self.data = data


# create & compile instance
cs = csnd6.Csound()
cs.Compile("am.csd")

# create the thread object
perf = csnd6.CsoundPerformanceThread(cs)

# display object
master = Tk()
disp = display.Oscilloscope(master, window_size, perf.Stop, "green", "black")

# samples array
chn = csnd6.floatArray(cs.GetKsmps())
dat = (cs,disp,chn)
tes = Disp(dat)

# set the callback
perf.SetProcessCallback(tes.callb, None)

# play
perf.Play()

# run the display
disp.mainloop()