def test_holophonor_play():
    h1 = noise.Holophonor()
    h1.next_notes([("1:1", 1, 0.2), ("2:1", 0.5, 0.8)])
    hwave = h1.play()
    wave1 = noise.StutterNote(65, 0.2, 1).play()
    wave2 = noise.StutterNote(130, 0.8, 0.5).play()
    np.testing.assert_allclose(hwave[:len(wave1) - 10],
                               wave1[:-10],
                               atol=0.0001)
    np.testing.assert_allclose(hwave[-len(wave2) + 10:],
                               wave2[10:],
                               atol=0.0001)
def test_holophonor_get_duration():
    h1 = noise.Holophonor()
    h1.next_notes([("1:1", 1, 0.2), ("3:1", 1, 0.8)])
    assert abs(h1.get_duration() - 1) < 0.0001