Beep8 logo

Music Documentation

Music Documentation Source Code

Beep8 features generative music using ZzFx. You can generate music, or you can create your own.

The music generation is still experimental and the music created is not as good as I would like, so if you use it be prepared for your music to change (hopefully for the better).

If you have experience with generating music I would love to get some help with this. You can check the code on the Beep8 GitHub.

Music Methods

beep8.Music.addSong(name)

Add a custom zzfxM song.

You can compose your own songs using the zzfxM format and the zzfxM song tracker.

You should use the addSong function to add the song to the music library, and then use the play and stop functions as you would with a generated song.

Parameters

  • name (string): The name of the custom song.

beep8.Music.generate(name, type)

Generate a song.

Parameters

  • name (string): The name of the song.
  • type (string): The type of song to generate.

beep8.Music.play(name)

Play a song. If the song is already playing, it will not be played again. You can only play one song at a time. If another song is already playing it will be stopped.

Parameters

  • name (string): The name of the song to play.

Returns

  • (AudioBufferSourceNode): The AudioBufferSourceNode that is playing the song.

beep8.Music.playing(name)

Check if a song is currently playing.

Parameters

  • name (string): The name of the song to check.

Returns

  • (boolean): True if the song is playing, false otherwise.

beep8.Music.stop(name)

Stop a song. If the name is not provided, all songs will be stopped.

Parameters

  • name (string): The name of the song to stop.

More Beep8 Docs

Actors Documentation

Async Documentation

Core Functions

Input Documentation

App Intro Documentation

Joystick Documentation

Menu Documentation

Music Documentation

Passcodes Documentation

Public API

Random Numbers Documentation

SFX Documentation

Tilemap Documentation

Utilities Documentation