sc3.base.builtins module

SC_InlineUnaryOp.h, SC_InlineBinaryOp.h

class scbuiltin

Bases: object

static unop(func)
static binop(func)
static narop(func)
rand(x)
rand2(x)
linrand(x)
bilinrand(x)
sum3rand(x)
coin(x)
rrand(a, b)
exprand(a, b)
xrand(a, b)
xrand2(a, b)
as_int(x)
as_float(x)
zapgremlins(x)
log2(x)
log10(x)
log(x)
exp(x)
sin(x)
cos(x)
tan(x)
asin(x)
acos(x)
atan(x)
sinh(x)
cosh(x)
tanh(x)
midicps(x)
cpsmidi(x)
midiratio(x)
ratiomidi(x)
octcps(x)
cpsoct(x)
ampdb(x)
dbamp(x)
squared(x)
cubed(x)
sqrt(x)
hanwindow(x)
welwindow(x)
triwindow(x)
bitriwindow(x)
rectwindow(x)
scurve(x)
scurve0(x)
ramp(x)
sign(x)
distort(x)
distortneg(x)
softclip(x)
even(x)
odd(x)
taylorsin(x)
ceil(x)
floor(x)
reciprocal(x)
bitnot(x)
frac(x)
lg3interp(x, *args)
calcfeedback(a, b)
wrap1(x)
fold1(x)
graycode(x)
degrad(x)
raddeg(x)
next_power_of_two(x)
next_near_power(a, b)
previous_near_power(a, b)
mod(a, b)
wrap(x, *args)
fold(x, *args)
pow(a, b)
div(a, b)
min(a, b)
max(a, b)
round(a, b)
roundup(a, b)
trunc(a, b)
atan2(a, b)
clip(x, *args)
hypot(a, b)
hypotx(a, b)
gcd(a, b)
lcm(a, b)
urshift(a, b)
thresh(a, b)
clip2(a, b)
wrap2(a, b)
fold2(a, b)
excess(a, b)
first_arg(a, b)
scaleneg(a, b)
amclip(a, b)
ring1(a, b)
ring2(a, b)
ring3(a, b)
ring4(a, b)
difsqr(a, b)
sumsqr(a, b)
sqrsum(a, b)
sqrdif(a, b)
absdif(a, b)
blend(x, *args)
snap(x, *args)
softround(x, *args)
linlin(x, *args)
linexp(x, *args)
explin(x, *args)
expexp(x, *args)
lincurve(x, *args)
curvelin(x, *args)
bilin(x, *args)
biexp(x, *args)
moddif(x, *args)
lcurve(x, *args)
gauss(x, *args)
gauss_curve(x, *args)
normalize(lst, min=0.0, max=1.0)
normsum(lst)
shuffle(lst, random=None)

Shuffle a list in place and return None.

This function is a wrapper of random.shuffle which takes routines’ random state into account.

scramble(lst, random=None)

Return a new shuffled list from lst.

This function uses random.shuffle internally and takes routines’ random state into account.

blend_at(lst, index)
resamp0(lst, new_size)
resamp1(lst, new_size)
index_of_greater_than(lst, val, start=0)
index_in_between(lst, val)
as_random_table(lst, size=None)
table_rand(lst)
choice(lst)
choices(lst, weights=None, *, cum_weights=None, k=1)
uid()

Library wise counter used to get unique ids for server replies.

counter(stop)

Possibly infinite counter, range replacement for patterns.