Source Academy Modules
    Preparing search index...

    Function play_wave

    • 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

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