Пример #1
0
 def scoreEvent(self, eventType, pvals, absp2mode = 0):
     """Send a score event to csound"""
     n = len(pvals)
     if csnd.csoundGetSizeOfMYFLT() == 8:
         pfields = csnd.doubleArray(n)
     else:
         pfields = csnd.floatArray(n)
     for i in xrange(n):
         pfields[i] = pvals[i]
     self.pt.ScoreEvent(absp2mode, eventType, n, pfields)
Пример #2
0
 def scoreEvent(self, eventType, pvals, absp2mode=0):
     """Send a score event to csound"""
     n = len(pvals)
     if csnd.csoundGetSizeOfMYFLT() == 8:
         pfields = csnd.doubleArray(n)
     else:
         pfields = csnd.floatArray(n)
     for i in xrange(n):
         pfields[i] = pvals[i]
     self.pt.ScoreEvent(absp2mode, eventType, n, pfields)
Пример #3
0
 def note(self, pvals, absp2mode = 0):
     """Send a score note to a csound instrument"""
     n = len(pvals)
     if csnd.csoundGetSizeOfMYFLT() == 8:
         pfields = csnd.doubleArray(n)
     else:
         pfields = csnd.floatArray(n)
     for i in xrange(n):
         pfields[i] = pvals[i]
     return self.pt.ScoreEvent(absp2mode, 'i', n, pfields)
Пример #4
0
 def note(self, pvals, absp2mode=0):
     """Send a score note to a csound instrument"""
     n = len(pvals)
     if csnd.csoundGetSizeOfMYFLT() == 8:
         pfields = csnd.doubleArray(n)
     else:
         pfields = csnd.floatArray(n)
     for i in xrange(n):
         pfields[i] = pvals[i]
     return self.pt.ScoreEvent(absp2mode, 'i', n, pfields)