> For the complete documentation index, see [llms.txt](https://vypxl.gitbook.io/scar/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://vypxl.gitbook.io/scar/builtin-features/music.md).

# Music

The `Scar::Music` module manages music playback. It uses a stack structure, that way you may push a new music, then pop it off again and resume the old music where it was stopped. It works together with [Assets](/scar/builtin-features/assets.md).

```ruby
# Play an indexed music asset
Music.play "music1"

Music.current? # Returns currently playing music if any
# Music.current also exists

Music.play "music2"
Music.play "music3"

Music.pop # Stop current music and remove it from the stack
Music.pop_continue # Same as above, but continue with the music now on top of the stack

```
