This article explains about Sound in Microsoft Small Basic programming language.  Small Basic has Sound object for sound features.

Sound Object

Sound Object has following three types of operations.

Operations for Preset Sound Effects

There are four preset sounds - bell ring, chime, chimes and click.  For each sound there are two types of operations.  One just sounds and does not wait the end of the sound.  The other sounds and waits the sound ends.

  • Sound.PlayBellRing()
  • Sound.PlayBellRingAndWait()
  • Sound.PlayChime()
  • Sound.PlayChimeAndWait()
  • Sound.PlayChimes()
  • Sound.PlayChimesAndWait()
  • Sound.PlayClick()
  • Sound.PlayClickAndWait()

Operations for Audio Files

These four operations are for to sound audio files.  Mp3, wav, and wma format audio files are supported. Other format depends on audio codecs installed user's computer.  You can create wma audio file with Sound Recorder which is an Windows Accessory.

  • Sound.Pause()
  • Sound.Play()
  • Sound.PlayAndWait()
  • Sound.Stop()

Operation for MML

This operation supports MML (Music Macro Language).  Details about MML are described here.

  • Sound.PlayMusic()


  • Preset Sound Test 0.11 PPJ287-0 - You can hear the preset sounds with this program.  Also you can confirm that Sound.PlayXXXAndWait() doesn't wait in remote environment (in with browser).

See Also

Other Resources

Other Languages