示例#1
0
def test_stereo_subs():
    mains = ['L', 'R', 'C', 'SL', 'SR']
    input_channels = mains + ['SW']
    output_channels = input_channels + ['RL', 'RR']
    matrix = Matrix({
        'L': 2,
        'R': 2,
        'C': 2,
        'SW': 1,
        'SL': 2,
        'SR': 2
    }, output_channels)
    for c in ['L', 'C', 'SW', 'SL']:
        matrix.enable(c, 0, 'SW')
    for c in ['R', 'C', 'SW', 'SR']:
        matrix.enable(c, 0, 'RR')
    for c in ['L', 'R', 'C', 'SL', 'SR']:
        matrix.enable(c, 1, c)
    xo_filters = [XOFilter('SW', 0, [low_pass(2, 80, 'SW')])
                  ] + [XOFilter(c, 1, [high_pass(2, 80, c)]) for c in mains]
    crf = calculate_compound_routing_filter(matrix,
                                            xo_filters=xo_filters,
                                            lfe_channel_idx=5)
    crf.id = 1
    for i, f in enumerate(crf.filters):
        f.id = i + 2
    graph = FilterGraph(0, input_channels + SHORT_USER_CHANNELS,
                        output_channels + SHORT_USER_CHANNELS, [crf])
    signals_by_channel = graph.simulate()
    assert signals_by_channel
    gz = graph.render()
    assert gz
示例#2
0
def five_one_in_seven() -> Matrix:
    return Matrix({
        'L': 2,
        'R': 2,
        'C': 2,
        'SW': 1,
        'SL': 2,
        'SR': 2
    }, ['L', 'R', 'C', 'SW', 'SL', 'SR', 'RL', 'RR'])
示例#3
0
def stereo_subs() -> Matrix:
    return Matrix({
        'L': 2,
        'R': 2,
        'C': 2,
        'SW': 1,
        'SL': 2,
        'SR': 2
    }, ['L', 'R', 'C', 'SW', 'SL', 'SR', 'RL', 'RR'])
示例#4
0
def five_one() -> Matrix:
    return Matrix({
        'L': 2,
        'R': 2,
        'C': 2,
        'SW': 1,
        'SL': 2,
        'SR': 2
    }, ['L', 'R', 'C', 'SW', 'SL', 'SR'])
示例#5
0
def multi_bm() -> Matrix:
    return Matrix(
        {
            'L': 4,
            'R': 4,
            'C': 4,
            'SW': 1,
            'SL': 2,
            'SR': 2,
            'RL': 2,
            'RR': 2
        }, [
            'L', 'R', 'C', 'SW', 'SL', 'SR', 'RL', 'RR', 'C9', 'C10', 'C11',
            'C12', 'C13', 'C14', 'C15', 'C16'
        ])
示例#6
0
def two_in_four() -> Matrix:
    return Matrix({'L': 2, 'R': 2}, ['L', 'R', 'C', 'SW'])
示例#7
0
def two_in_eight() -> Matrix:
    return Matrix({
        'L': 4,
        'R': 4
    }, ['L', 'R', 'C', 'SW', 'SL', 'SR', 'RL', 'RR'])
示例#8
0
def stereo() -> Matrix:
    return Matrix({'L': 1, 'R': 1}, ['L', 'R'])