Music Lab Documentation

Create Function

Category:Functions

Functions are blocks that represent a set of blocks to be played, in order to group together parts of a song. Functions can be used to represent a section of a song, like the chorus or verse, or a specific instrument's part in a song.

Once this code is added to the workspace, the new function is accessible in the "Functions" section of the toolbox, where it can be used anywhere in the project to play sounds as a group.

Parameters

NameTypeRequired?Description
name

The name of the function to create.

Tips

The effect block only works in functions so that you can choose which sounds you want effects on. Make sure you make a function before you use the effect block!

Found a bug in the documentation? Let us know at support@code.org.