Sound And Music FAQ

This is a FAQ about loading, playing, and looping sound and music in Brutus2D.

Sound Formats

What kind of sound formats are supported by Brutus2D?

Brutus2D supports these sound formats :

  • .mid
  • .wav
  • .ogg

Does Brutus2D support .mp3

No, Brutus2D does not support the .mp3 format. It may in the future, but there are no plans at this time for .mp3 support.

Playing Sounds and Music

How do I use sound and music in Brutus2D

If you are using the free version of Brutus2D, you can use the Sound object to play .wav sound effects and the Music object to play .mid music files.

Additionally, you are using the registered version, you can use the SFX object to create midi sound effects on the fly.

How do I load a sound or music file?

In both cases, you must declare a variable to hold the sound or music file index (what Brutus2D uses to reference sound and music files).

Dim sndOrMus

Then, you load the sound file using sound.LoadWav or music.LoadMidi :

' if loading a wav
sndOrMus = sound.LoadWav("sound.wav")

' if loading a midi
sndOrMus = music.LoadMidi("music.midi")
page tags: faq music sound
page_revision: 1, last_edited: 1214599520|%e %b %Y, %H:%M %Z (%O ago)