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)]), NoteEvent(M("B"), a=1, target_node=M("A")), NoteEvent(M("C"), a=2, target_node=M("A")), CompositeEvent(
from supriya.patterns import EventPattern, NoteEvent, SequencePattern, UpdatePattern from supriya.patterns.testutils import MockUUID as M from supriya.patterns.testutils import run_pattern_test @pytest.mark.parametrize( "stop_at, input_a, input_b1, input_b2, input_c, expected, is_infinite", [ ( None, SequencePattern([1, 2, 3]), SequencePattern([4, 5]), SequencePattern([7, 8, 9]), SequencePattern([10, 11]), [ NoteEvent(M("A"), a=1, b=7, c=10), NoteEvent(M("B"), a=2, b=8, c=11) ], False, ), ( None, SequencePattern([1, 2, 3], None), SequencePattern([4, 5], None), SequencePattern([7, 8, 9]), SequencePattern([10, 11]), [ NoteEvent(M("A"), a=1, b=7, c=10), NoteEvent(M("B"), a=2, b=8, c=11) ], False,
@pytest.mark.parametrize( "stop_at, inner_pattern, synthdef, release_time, kwargs, expected, is_infinite", [ ( None, EventPattern(a=SequencePattern([1, 2])), synthdef, 0.0, {}, [ CompositeEvent( [ SynthAllocateEvent( M("A"), add_action=AddAction.ADD_TO_TAIL, synthdef=synthdef ) ] ), NoteEvent(M("B"), a=1), NoteEvent(M("C"), a=2), CompositeEvent([NodeFreeEvent(M("A"))]), ], False, ), ( None, EventPattern(a=SequencePattern([1, 2])), synthdef, 0.5, {"mix": 0.25},
import pytest from supriya.patterns import MonoEventPattern, NoteEvent, SequencePattern from supriya.patterns.testutils import MockUUID as M from supriya.patterns.testutils import run_pattern_test @pytest.mark.parametrize( "stop_at, input_a, input_b, expected, is_infinite", [ ( None, SequencePattern([1, 2, 3], None), SequencePattern([4, 5], None), [ NoteEvent(M("A"), a=1, b=4), NoteEvent(M("A"), a=2, b=5), NoteEvent(M("A"), a=3, b=4), NoteEvent(M("A"), a=1, b=5), NoteEvent(M("A"), a=2, b=4), NoteEvent(M("A"), a=3, b=5), ], True, ), ( None, SequencePattern([1, 2, 3], None), SequencePattern([4, 5], 1), [NoteEvent(M("A"), a=1, b=4), NoteEvent(M("A"), a=2, b=5)], False,
from supriya.patterns.testutils import run_pattern_test @pytest.mark.parametrize( "stop_at, inner_pattern, calculation_rate, channel_count, release_time, expected, is_infinite", [ ( None, EventPattern(a=SequencePattern([1, 2])), "audio", 2, 0.0, [ CompositeEvent([ BusAllocateEvent( M("A"), calculation_rate=CalculationRate.AUDIO, channel_count=2, ), GroupAllocateEvent(M("B")), SynthAllocateEvent( M("C"), add_action=AddAction.ADD_AFTER, amplitude=1.0, fade_time=0.0, in_=M("A"), synthdef=synthdefs.system_link_audio_2, target_node=M("B"), ), ]), NoteEvent(M("D"), a=1, out=M("A"), target_node=M("B")),
import pytest from supriya.patterns import EventPattern, NoteEvent, SequencePattern from supriya.patterns.testutils import MockUUID as M from supriya.patterns.testutils import run_pattern_test @pytest.mark.parametrize( "stop_at, input_a, input_b, expected, is_infinite", [ ( None, SequencePattern([1, 2, 3], None), SequencePattern([4, 5], None), [ NoteEvent(M("A"), a=1, b=4), NoteEvent(M("B"), a=2, b=5), NoteEvent(M("C"), a=3, b=4), NoteEvent(M("D"), a=1, b=5), NoteEvent(M("E"), a=2, b=4), NoteEvent(M("F"), a=3, b=5), ], True, ), ( None, SequencePattern([1, 2, 3], None), SequencePattern([4, 5], 1), [NoteEvent(M("A"), a=1, b=4), NoteEvent(M("B"), a=2, b=5)], False,
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), ], delta=1.0, ), CompositeEvent( [ NoteEvent(M("E"), delta=0.0, frequency=660), NoteEvent(M("F"), delta=0.0, frequency=999),