Skip to content
This repository was archived by the owner on Jun 22, 2022. It is now read-only.

For Advanced Coders

TechStreet edited this page May 27, 2021 · 5 revisions

Technical Information for Advanced Coders

Oh, you want to try more advanced stuff? Here, look at this information!

songData in Music Data Function

In the last chest of a Music Data Function, you will see a list variable called songData. Here's the meaning of the values in that list variable!
[NOT USED] means that the value is not used in Song Player. Use them if you need.

  1. Song Title - [NOT USED] The song title you can edit in Note Block Studio. If the title is not set, it will be the file name of the nbs. (without extension)
  2. Song Author - [NOT USED] Song author you can edit in Note Block Studio. If the author is not set, it will say N/A instead.
  3. Song Tempo - The song tempo you can see in Note Block Studio. Before playing the song, this value will be stored into tempo local variable. (You can edit it even while the song is playing! :O)
  4. Song Length - (The song length is snapped to the measure) Total song ticks of the song. You can check song tick at the footer bar in the Note Block Studio. In CodeUtilities Song Player, you have to add 1 to the value shown in Note Block Studio.
  5. Layer Data - [NOT USED] The data of each layer in nbs.
    Format: =<layer volume>,<layer panning>
  6. Song Data Version - [NOT USED] When the important part in Song Data gets changed, this version string will change. Use it if you want to separate Song Players for each Song Data version, use this value to detect its version!
    Version format: "v<A>-nbs<B>" <A>: Song Data format version | <B>: Supported Note Block Studio file version. (Current: v4-nbs4)
  7. Loop Start Tick - [NOT USED] The song tick of where the loop should start. Note that looping is not implemented in default Song Player, but you can use this if you want a proper loop!
  8. Loop Count - [NOT USED] How many times the song should loop. 0 means infinite loop.
Clone this wiki locally