Skip to content

Module pippi.wavetables

None

None

Variables

SEGMENT_RE

Functions

adsr

def adsr(
    length,
    attack,
    decay,
    sustain,
    release
)

fromfile

def fromfile(
    filename,
    length
)

polyseg

def polyseg(
    segments,
    length
)

Calculate total output segment length in frames & alloc outbuf

loop thru segments: - generate segment - write segment into outbuf

for each segment: - calc the true length of the individual segment based on segment length - scale the size of the tmp segment to match remainder after start/end filtering - produce a tmp array from the waveform type (using normal wavetable or window generator) - copy into outbuf

segment crossfading?

rebuild_wavetable

def rebuild_wavetable(
    data
)

seesaw

def seesaw(
    win,
    length,
    tip=0.5
)

to_stack

def to_stack(
    wavetables,
    wtsize=4096
)

to_wavetable

def to_wavetable(
    w,
    wtsize=0
)

to_window

def to_window(
    w,
    wtsize=0
)

wavetable

def wavetable(
    wavetable_type,
    length,
    data
)

Classes

Wavetable

class Wavetable(
    /,
    *args,
    **kwargs
)

Class variables

data
highvalue
length
lowvalue

Methods

avg

def avg(
    self
)

clip

def clip(
    self,
    minval=-1.0,
    maxval=1.0
)

convolve

def convolve(
    self,
    impulse,
    norm=True
)

crush

def crush(
    self,
    steps
)

crushed

def crushed(
    self,
    steps
)

cut

def cut(
    self,
    start,
    length
)

drink

def drink(
    self,
    width=0.1,
    minval=None,
    maxval=None
)

env

def env(
    self,
    window_type=None
)

graph

def graph(
    self,
    *args,
    **kwargs
)

harmonics

def harmonics(
    self,
    harmonics=None,
    weights=None
)

interp

def interp(
    self,
    pos,
    method=None
)

leftpad

def leftpad(
    self,
    value=None,
    length=-1,
    mult=-1.0
)

leftpadded

def leftpadded(
    self,
    value=None,
    length=-1,
    mult=-1.0
)

max

def max(
    self
)

normalize

def normalize(
    self,
    amount=1.0
)

pad

def pad(
    self,
    value=None,
    length=None,
    mult=None
)

padded

def padded(
    self,
    value=None,
    length=None,
    mult=None
)

rcut

def rcut(
    self,
    length
)

repeat

def repeat(
    self,
    reps=2
)

repeated

def repeated(
    self,
    reps=2
)

reverse

def reverse(
    self
)

reversed

def reversed(
    self
)

rightpad

def rightpad(
    self,
    value=None,
    length=-1,
    mult=-1.0
)

rightpadded

def rightpadded(
    self,
    value=None,
    length=-1,
    mult=-1.0
)

scale

def scale(
    self,
    fromlow=-1.0,
    fromhigh=1.0,
    tolow=0.0,
    tohigh=1.0,
    log=False
)

scaled

def scaled(
    self,
    fromlow=-1.0,
    fromhigh=1.0,
    tolow=0.0,
    tohigh=1.0,
    log=False
)

skew

def skew(
    self,
    tip
)

skewed

def skewed(
    self,
    tip
)

snap

def snap(
    self,
    mult=0.0,
    pattern=None
)

snapped

def snapped(
    self,
    mult=0.0,
    pattern=None
)

taper

def taper(
    self,
    length
)

toonsets

def toonsets(
    self,
    length=10.0
)

write

def write(
    self,
    path=None,
    samplerate=44100
)