import array
import math


def sine_wave(sample_frequency: float, pitch: float):
    """Generate a single sine wav cycle at the given sampling frequency and pitch."""
    length = int(sample_frequency / pitch)
    b = array.array("H", [0] * length)
    for i in range(length):
        b[i] = int(math.sin(math.pi * 2 * i / length) * ((2**15) - 1) + 2**15)
    return b