コード例 #1
0
# -*- coding: utf-8 -*-
from surge.materials.segment_ii.durations import stage_durations
from surge.tools.bezzie.BezierCurve import BezierCurve
from surge.tools.bezzie.Path import Path
from surge.tools.bezzie.RandomInterpolater import RandomInterpolater
import abjad

pressure = [
    Path(BezierCurve((0, 1), (stage_durations[0], 1))),
    Path(BezierCurve((0, 1), (stage_durations[1], 1))),
    Path(BezierCurve((0, 1), (stage_durations[2], 1))), None,
    Path(BezierCurve((0, 0), (stage_durations[4], 1))),
    Path(BezierCurve((0, 0), (stage_durations[5], 1))), None
]

random_interpolater = RandomInterpolater(seed=hash('bass'))

pressure[4].set_interpolater(random_interpolater)
pressure[5].set_interpolater(random_interpolater)
コード例 #2
0
 def setUp(self):
     b0 = BezierCurve((0, 0), (50, 100), (100, 0))
     b1 = BezierCurve((100, 0), (150, -100), (200, 0))
     self.p = Path(b0, b1)