Skip to main content
The edits one call of editSong collects; they apply together, as one change.

Methods

addEvent()

Adds a note, note modifier or phrase to a track from authoredTracks or addTrack. It’s refused, with the reason, when it means nothing on the track’s instrument or the format can’t write it. A .mid track holds every difficulty, so scope says which one, or instrument; an event the format stores once for the instrument, such as star power, is added for the instrument whichever difficulty asks. A .mid note’s velocity defaults to 100 and its channel to 0.

Parameters

Returns

void

addTempo()

Adds a tempo marker to the [SyncTrack] section or the conductor track, rounded as setTempo rounds.

Parameters

Returns

void

addTextEvent()

Adds a text event, such as a practice section, to the [Events] section or the events track.

Parameters

Returns

void

addTimeSignature()

Adds a time signature to the [SyncTrack] section or the conductor track.

Parameters

Returns

void

addTrack()

Adds a track for an instrument and difficulty, and returns it, so addEvent can fill it in the same batch.
  • In a .chart file, it’s an empty section, such as [ExpertSingle], at the end of the file. An empty section of that name that Clone Hero reads is returned instead.
  • In a .mid file, a track holds every difficulty: a new one, such as PART GUITAR, goes after the last track. When the instrument has a track, that one is returned. Either way, the returned track’s difficulty is the one asked for, so addEvent adds to that difficulty.
Throws a RangeError when Clone Hero already reads events for that instrument and difficulty.

Parameters

Returns

AuthoredTrack

remove()

Removes an authored element.

Parameters

Returns

void

setLength()

Changes an authored event’s length.

Parameters

Returns

void

setMetadata()

Sets a song.ini value, as song.ini’s text (a time in milliseconds, a difficulty as a whole number), or removes it with null. A song without song.ini gets one, holding the .chart [Song] values Clone Hero read, so only the edited value reads differently. A value song.ini can’t hold as written, such as one with a line break, is refused.

Parameters

Returns

void

setTempo()

Changes a tempo marker’s tempo. It’s rounded to what the format holds: thousandths of a BPM in .chart, whole microseconds per beat in .mid.

Parameters

Returns

void

setText()

Changes a text event’s text.

Parameters

Returns

void

setTick()

Moves an authored element, keeping its length.

Parameters

Returns

void

setTimeSignature()

Changes a time signature. The denominator is a power of two.

Parameters

Returns

void