Skip to content

nigeLab_sounds

Max-Home-Tower edited this page Jul 1, 2020 · 1 revision

+sounds

Different alert notifications instead of annoying Matlab beeps.

Functions

The only function in this package is nigeLab.sounds.play(). If no argument is given, it plays the alert sound by default. The first optional input is the name of a .mat file in ~/+sounds/ that you would like to "play." The second optional input is a speed factor that can be greater or less than one and which speeds up (if > 1) or slows down (if < 1) the frequency of the sound that is played back. This can be used to create variants of the same noise that might correspond to different events.

Sounds

File Structure

Each .mat file in ~/+sounds/ should contain two variables:

  • fs : Sample frequency of the recorded sound clip
  • sfx : [1 x nSamples] single precision sound data

Current Options

  • 'alert' : Kind of like a nuclear siren going off. For errors.
  • 'bell' : Supposed to be a pleasant bell-ringing sound. For job completion.
  • 'camera' : "Camera shutter" sound, for snapping still-frames from a video, for example.
  • 'pop' : Bubble-popping noise, which is associated with links produced by nigeLab.utils.getNigeLink().

Clone this wiki locally