Skip to content
cheese edited this page Sep 6, 2021 · 18 revisions

music

music [track=-1] [frame=-1] [row=-1] [loop=true] [sustain=false] [tempo=-1] [speed=-1]

...or to stop the music:

music

Parameters

  • track : the id of the track to play from (0..7)
  • frame : the index of the frame to play from (0..15)
  • row : the index of the row to play from (0..63)
  • loop : loop music (true) or play it once (false)
  • sustain : sustain notes after the end of each frame or stop them (true/false)
  • tempo : play track with the provided tempo, added in version 0.90
  • speed : play track with the provided speed, added in version 0.90

Description

This function starts playing a track created in the Music Editor.

The music function needs to be called outside of the tic() function. If you would like to call the music function inside of the tic function you can try the following.

music_started=false
function TIC()
    if not music_started then        
        music(0)
        music_started=true
    end
end
Clone this wiki locally