コード例 #1
0
def test_midi_to_hz_float():
    expected = 440.0
    assert toymir.midi_to_hz(69) == expected
コード例 #2
0
def test_midi_to_hz_array():
    expected = [261.6255653, 329.62755691, 440.0]
    assert np.allclose(toymir.midi_to_hz([60, 64, 69]), expected)