Music Documentation
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.
beep8.Music.generate([options])
Generates multi-track music in p1.js format. It creates a chord progression and then generates various parts (melody, chord, or drum). Optionally prepends tempo and hold information to the first part.
Parameters
- [options] (Object): Options for music generation.
Returns
- (string): The generated multi-track music string.
beep8.Music.isPlaying()
Checks if music is currently playing.
Returns
- (boolean): True if music is playing, otherwise false.
beep8.Music.play(song)
Plays a p1.js music string.
Parameters
- song (string): The music string to play.
beep8.Music.stop()
Stops the current music playback.