This month I started working on the start of a unit generator system for pippi.
On Sunday I got graph connections working! Here’s some spaghetti thrown at the wall, just a hodge podge of some sine oscs wired up to modulate each other.
Occurs to me I should always include an amp param for ugens, so I don’t have to add a special VCA ugen every time I’d like to modulate the amplitude of something.
from unittest import TestCase
from pippi import dsp, fx, ugens
class TestUgens(TestCase):
def test_ugen_sine(self):
graph = ugens.Graph()
graph.add_node('s0b', 'sine', freq=0.1)
graph.add_node('s0a', 'sine', freq=0.1)
graph.add_node('s0', 'sine', freq=100)
graph.add_node('s1', 'sine')
graph.add_node('s2', 'sine')
graph.connect('s0b.output', 's0a.freq', 0.1, 200)
graph.connect('s0a.output', 's0.freq', 100, 300)
graph.connect('s0.output', 's1.freq', 0.1, 1)
graph.connect('s0.output', 'main.output', mult=0.1)
graph.connect('s1.output', 's2.freq', 60, 100)
graph.connect('s2.output', 'main.output', mult=0.2)
graph.connect('s2.freq', 's0b.freq', 0.15, 0.5, 60, 100)
out = graph.render(10)
out = fx.norm(out, 1).taper(0.1)
out.write('tests/renders/ugens_sine.wav')