| Hi List,
I recently was building and getting into the Python opcodes but for
some reason I keep getting the following error. I don't always get it,
just sometimes.
Fatal Python error: PyThreadState_Get: no current thread
Csound tidy up: Abort trap
inactive allocs returned to freespace
end of score. overall amps: 0.0 0.0
overall samples out of range: 0 0
0 errors in performance
What does this mean ? Attached is the .CSD file that I was using
sr = 44100
kr = 441
ksmps = 100
nchnls = 2
gifn1 ftgen 0, 0, 16384, 10, 1
pyruni {{
from random import random, choice
class GetNumberFromPool:
def __init__(self, e, begin=0, end=100, step=1):
self.pool = [i ** e for i in range(begin, end, step)
def __call__(self, n, p):
#substitute an old number with the number ?
if random() < p:
i = choice(range(len(pool)))
pool[i] = n
# return a random number from the pool
return choice(pool)
get_number_from_pool1 = GetNumberFromPool(1.3)
get_number_from_pool2 = GetNumberFromPool(1.5, 50, 250, 2)
}}
/*--- ---*/
instr 1
k1 oscil 1, 3, 1
k3 oscil 1, 2.5, 1
k2 pycall1 "get_number_from_pool1", k1, 0.5
k4 pycall1 "get_number_from_pool2", k3, 0.5
printk 0.25, k2
printk 0.25, k4
endin
/*--- ---*/
i1 0 10
s
i1 0 10
e
-David |