Function play

  • Play a sound effect.

    Parameters

    • type: SoundEffectType
    • Optional options: {
          freq?: number;
          note?: string;
          numberOfSounds?: number;
          pitch?: number;
          seed?: number;
          volume?: number;
      }
      • Optional freq?: number

        Frequency (Hz)

      • Optional note?: string

        Note string (e.g. "C4", "F#3", "Ab5")

      • Optional numberOfSounds?: number

        Number of simultaneous sounds (default = 2)

      • Optional pitch?: number

        MIDI note number

      • Optional seed?: number

        Random seed (default = 0)

      • Optional volume?: number

        Sound volume (default = 1)

    Returns void

Generated using TypeDoc