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)
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)
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)
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)