Skip to content

42x00/pychuck

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyChucK

Installation

pip install pychuck

Quickstart

# demo.py
from pychuck import *


# custom unit
class Noise(UGen):
    # generator
    def _tick(self, samples: int) -> np.ndarray:
        return np.random.uniform(-1, 1, samples)


# unit
n = Noise(gain=0.5)

# graph
n >> dac

# main loop
while True:
    # parameter
    n.gain = np.random.uniform(0, 1)
    # time
    200 * ms >> now
# pychuck --help
pychuck demo.py