* Loads the given alphaTex string. * @param tex The alphaTex string. * @param settings The settings to use for parsing. * @returns The parsed {@see Score}.
(tex: string, settings?: Settings)
| 22 | * @returns The parsed {@see Score}. |
| 23 | */ |
| 24 | public static loadAlphaTex(tex: string, settings?: Settings): Score { |
| 25 | const parser = new AlphaTexImporter(); |
| 26 | parser.logErrors = true; |
| 27 | parser.initFromString(tex, settings ?? new Settings()); |
| 28 | return parser.readScore(); |
| 29 | } |
| 30 | |
| 31 | /** |
| 32 | * Loads a score asynchronously from the given datasource |