def test(stop_at, input_a, input_b1, input_b2, input_c, expected, is_infinite): pattern = ChainPattern( EventPattern(a=input_a, b=input_b1), EventPattern(b=input_b2), EventPattern(c=input_c), ) run_pattern_test(pattern, expected, is_infinite, stop_at)
def test(stop_at, input_a, input_b1, input_b2, input_c, expected, is_infinite): pattern = UpdatePattern(EventPattern(a=input_a, b=input_b1), b=input_b2, c=input_c) run_pattern_test(pattern, expected, is_infinite, stop_at)
GroupPattern, NodeFreeEvent, NoteEvent, NullEvent, SequencePattern, ) from supriya.patterns.testutils import MockUUID as M from supriya.patterns.testutils import run_pattern_test @pytest.mark.parametrize( "stop_at, inner_pattern, release_time, expected, is_infinite", [ ( None, EventPattern(a=SequencePattern([1, 2])), 0.0, [ CompositeEvent([GroupAllocateEvent(M("A"), delta=0.0)]), NoteEvent(M("B"), a=1, target_node=M("A")), NoteEvent(M("C"), a=2, target_node=M("A")), CompositeEvent([NodeFreeEvent(M("A"), delta=0.0)]), ], False, ), ( None, EventPattern(a=SequencePattern([1, 2])), 0.25, [ CompositeEvent([GroupAllocateEvent(M("A"), delta=0.0)]),
BusPattern, EventPattern, GroupPattern, MonoEventPattern, ParallelPattern, SequencePattern, ) from supriya.providers import BusGroupProxy, GroupProxy, Provider, SynthProxy @pytest.mark.parametrize( "pattern, until, expected", [ ( SequencePattern([ EventPattern(frequency=SequencePattern([440, 550, 660])), MonoEventPattern(frequency=SequencePattern([440, 550, 660])), ]), None, lambda provider: [ call.at(0.0), call.add_synth( add_action=AddAction.ADD_TO_HEAD, synthdef=None, target_node=None, frequency=440, ), call.at(2.0), call.add_synth( add_action=AddAction.ADD_TO_HEAD, synthdef=None,
def test(stop_at, input_a, input_b, expected, is_infinite): pattern = EventPattern(a=input_a, b=input_b) run_pattern_test(pattern, expected, is_infinite, stop_at)
NoteEvent, NullEvent, ParallelPattern, SequencePattern, ) from supriya.patterns.testutils import MockUUID as M from supriya.patterns.testutils import run_pattern_test @pytest.mark.parametrize( "stop_at, patterns, expected, is_infinite", [ ( None, [ EventPattern(frequency=SequencePattern([440, 550, 660])), EventPattern(frequency=SequencePattern([777, 888, 999])), ], [ CompositeEvent( [ NoteEvent(M("A"), delta=0.0, frequency=440), NoteEvent(M("B"), delta=0.0, frequency=777), ], delta=1.0, ), CompositeEvent( [ NoteEvent(M("C"), delta=0.0, frequency=550), NoteEvent(M("D"), delta=0.0, frequency=888), ],