• Plays the given Wave using the computer’s sound device, for the duration given in seconds.

    Parameters

    • wave: Wave

      the wave function to play, starting at 0

    • duration: number

    Returns Sound

    the resulting Sound

    Example

    play_wave(t => math_sin(t * 3000), 5);