Parses StepMania chart files for user-added external songs.
[heading: "Description"]ExternalSMParser handles .SM and .SSC chart files for user-added songs from external storage. It processes file structures, creates blob URLs for assets, and converts chart data to the game's format.
[heading: "Key Responsibilities"] [list] * Parse external .SM and .SSC files * Handle file system access for external songs * Create blob URLs for song assets * Process complex .SSC chart format * Convert timing and note data [/list] [heading: "Methods"] [table header] [ Method | Parameters | Description ] [ parseSM | (files, smContent) | Parses .SM files with file map ] [ parseSSC | (files, sscContent) | Parses .SSC files with file map ] [ convertSSCNotes | (noteData, bpmChanges, stops) | Converts SSC note format ] [ getLastBpm | (bpmChanges, time, valueType) | Finds relevant BPM for time ] [ beatToSec | (bpmChanges, stops, beat) | Converts beat time to seconds ] [/table] [heading: "Properties"] [table header] [ Property | Type | Description ] [ files | Object | Map of available files for song ] [/table] [heading: "File Processing"]ExternalSMParser works with a file map containing all files in a song directory:
[table header] [ File Type | Purpose ] [ .sm / .ssc | Chart data files ] [ .mp3 / .ogg / .wav | Audio files ] [ .png / .jpg | Image assets ] [ .mp4 / .avi | Video backgrounds ] [ .lrc | Lyrics files ] [/table] [heading: "SSC Format Support"]ExternalSMParser supports the extended .SSC format features:
[list] * Multiple chart sections per file * Extended metadata tags * Complex timing data * Advanced note types * Chart-specific properties [/list] [heading: "URL Handling"]For external songs, the parser creates blob URLs or uses platform-specific URLs:
[table header] [ Platform | URL Type ] [ Web | Blob URLs ] [ Cordova | cdvfile:// URLs ] [ NW.js | file:// URLs ] [/table] [footer: "© Retora 2025"]