diff --git a/.gitignore b/.gitignore index c58a4831..ee365118 100644 --- a/.gitignore +++ b/.gitignore @@ -42,3 +42,7 @@ bin/ ### Mac OS ### .DS_Store /tiny-doc/src/docs/asciidoc/dependencies/ +/tiny-doc/src/docs/asciidoc/sample/game-example +/tiny-doc/src/docs/asciidoc/sample/sfx-editor + +.kotlin \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index 2304d430..0476299f 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,6 +1,8 @@ + + diff --git a/Makefile b/Makefile index 60424233..fb013225 100644 --- a/Makefile +++ b/Makefile @@ -19,6 +19,9 @@ install: docs: install ./gradlew tiny-web-editor:tinyWebEditor + tiny-cli docs --output tiny-doc/src/docs/asciidoc/dependencies/tiny-cli-commands.adoc tiny-cli export tiny-sample - unzip -o -d tiny-doc/src/docs/asciidoc/sample tiny-sample/tiny-export.zip + unzip -o -d tiny-doc/src/docs/asciidoc/sample/game-example tiny-sample/tiny-export.zip + tiny-cli export tiny-cli/src/main/resources/sfx + unzip -o -d tiny-doc/src/docs/asciidoc/sample/sfx-editor tiny-cli/src/main/resources/sfx/tiny-export.zip ./gradlew asciidoctor -Pversion=$(uuidgen) diff --git a/settings.gradle.kts b/settings.gradle.kts index c70322f9..bca41059 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -36,7 +36,6 @@ include("tiny-doc") include("tiny-doc-annotations") include("tiny-annotation-processors:tiny-api-to-asciidoc-generator") include("tiny-annotation-processors:tiny-asciidoctor-dsl") -include("tiny-annotation-processors:tiny-cli-to-asciidoc-generator") include("tiny-annotation-processors:tiny-lua-dsl") include("tiny-annotation-processors:tiny-lua-stub-generator") include("tiny-engine") diff --git a/tiny-annotation-processors/tiny-api-to-asciidoc-generator/src/jvmMain/kotlin/com/github/minigdx/tiny/doc/TinyToAsciidocKspProcessor.kt b/tiny-annotation-processors/tiny-api-to-asciidoc-generator/src/jvmMain/kotlin/com/github/minigdx/tiny/doc/TinyToAsciidocKspProcessor.kt index 0cf0fb27..ec17c41b 100644 --- a/tiny-annotation-processors/tiny-api-to-asciidoc-generator/src/jvmMain/kotlin/com/github/minigdx/tiny/doc/TinyToAsciidocKspProcessor.kt +++ b/tiny-annotation-processors/tiny-api-to-asciidoc-generator/src/jvmMain/kotlin/com/github/minigdx/tiny/doc/TinyToAsciidocKspProcessor.kt @@ -44,62 +44,68 @@ class TinyToAsciidocKspProcessor( val result = asciidoc { title = "Tiny API" - libs.forEach { lib -> - section(lib.name.ifBlank { "std" }, lib.description) { - lib.variables.filterNot { it.hidden }.forEach { variable -> - val prefix = - if (lib.name.isBlank()) { - variable.name - } else { - "${lib.name}.${variable.name}" - } - lib(prefix) { - paragraph(variable.description) - example( - prefix, - """ + libs.sortedBy { it.name } + .forEach { lib -> + section(lib.name.ifBlank { "std" }, lib.description) { + lib.variables + .sortedBy { it.name } + .filterNot { it.hidden } + .forEach { variable -> + val prefix = + if (lib.name.isBlank()) { + variable.name + } else { + "${lib.name}.${variable.name}" + } + lib(prefix) { + paragraph(variable.description) + example( + prefix, + """ function _update() gfx.cls() print($prefix, 10, 10) -- ${variable.description} end - """.trimIndent(), - ) - } - } - lib.functions.forEach { func -> - val prefix = - if (lib.name.isBlank()) { - func.name - } else { - "${lib.name}.${func.name}" - } - lib("$prefix()") { - paragraph(func.description) - - if (func.calls.isNotEmpty()) { - val result = func.calls.joinToString("\n") { call -> - "$prefix(${call.args.joinToString(", ") { it.name }}) -- ${call.description}" + """.trimIndent(), + ) } - code(result) } + lib.functions + .sortedBy { it.name } + .forEach { func -> + val prefix = + if (lib.name.isBlank()) { + func.name + } else { + "${lib.name}.${func.name}" + } + lib("$prefix()") { + paragraph(func.description) - val args = func.calls.flatMap { it.args } - .filter { it.description.isNotBlank() } - .sortedBy { it.name } + if (func.calls.isNotEmpty()) { + val result = func.calls.joinToString("\n") { call -> + "$prefix(${call.args.joinToString(", ") { it.name }}) -- ${call.description}" + } + code(result) + } - if (args.isNotEmpty()) { - tableArgs( - args.map { - it.name to it.description - }, - ) - } + val args = func.calls.flatMap { it.args } + .filter { it.description.isNotBlank() } + .sortedBy { it.name } + + if (args.isNotEmpty()) { + tableArgs( + args.map { + it.name to it.description + }, + ) + } - example(func.name, func.example, func.spritePath, func.levelPath) - } + example(func.name, func.example, func.spritePath, func.levelPath) + } + } } } - } }.generate() file.write(result.toByteArray()) diff --git a/tiny-annotation-processors/tiny-cli-to-asciidoc-generator/build.gradle.kts b/tiny-annotation-processors/tiny-cli-to-asciidoc-generator/build.gradle.kts deleted file mode 100644 index 45d68ade..00000000 --- a/tiny-annotation-processors/tiny-cli-to-asciidoc-generator/build.gradle.kts +++ /dev/null @@ -1,9 +0,0 @@ -plugins { - alias(libs.plugins.minigdx.mpp) -} - -dependencies { - jvmMainImplementation(libs.ksp.symbol.processing.api) - jvmMainImplementation(project(":tiny-doc-annotations")) - jvmMainImplementation(project(":tiny-annotation-processors:tiny-asciidoctor-dsl")) -} diff --git a/tiny-annotation-processors/tiny-cli-to-asciidoc-generator/src/jvmMain/kotlin/com/github/minigdx/tiny/doc/CliToAsciidocKspProcessor.kt b/tiny-annotation-processors/tiny-cli-to-asciidoc-generator/src/jvmMain/kotlin/com/github/minigdx/tiny/doc/CliToAsciidocKspProcessor.kt deleted file mode 100644 index e5756d08..00000000 --- a/tiny-annotation-processors/tiny-cli-to-asciidoc-generator/src/jvmMain/kotlin/com/github/minigdx/tiny/doc/CliToAsciidocKspProcessor.kt +++ /dev/null @@ -1,454 +0,0 @@ -package com.github.minigdx.tiny.doc - -import com.github.mingdx.tiny.doc.CliAnnotation -import com.google.devtools.ksp.KspExperimental -import com.google.devtools.ksp.getAnnotationsByType -import com.google.devtools.ksp.processing.Dependencies -import com.google.devtools.ksp.processing.Resolver -import com.google.devtools.ksp.processing.SymbolProcessor -import com.google.devtools.ksp.processing.SymbolProcessorEnvironment -import com.google.devtools.ksp.processing.SymbolProcessorProvider -import com.google.devtools.ksp.symbol.FileLocation -import com.google.devtools.ksp.symbol.KSAnnotated -import com.google.devtools.ksp.symbol.KSClassDeclaration -import com.google.devtools.ksp.symbol.KSFunctionDeclaration -import java.io.File - -class CliToAsciidocKspProcessor( - val env: SymbolProcessorEnvironment, -) : SymbolProcessor { - val logger = env.logger - - @OptIn(KspExperimental::class) - override fun process(resolver: Resolver): List { - // Skip last KSP round. Everything should be done in one round - resolver.getNewFiles().firstOrNull() ?: return emptyList() - - // Find all classes that extend CliktCommand - val cliktCommandClasses = resolver - .getAllFiles() - .flatMap { it.declarations } - .filterIsInstance() - .filter { classDecl -> - classDecl.superTypes.any { superType -> - superType.resolve().declaration.qualifiedName?.asString() == "com.github.ajalt.clikt.core.CliktCommand" - } - } - // Skip commands to be hidden - .filterNot { classDecl -> classDecl.getAnnotationsByType(CliAnnotation::class).any { it.hidden } } - .toList() - - if (cliktCommandClasses.isEmpty()) { - return emptyList() - } - - val sourceFiles = cliktCommandClasses - .mapNotNull { it.containingFile } - .toList() - .toTypedArray() - - val file = env.codeGenerator.createNewFile( - Dependencies(true, *sourceFiles), - "/", - "tiny-cli-commands", - "adoc", - ) - - val commands = cliktCommandClasses.map { classDecl -> - CliCommandDescriptor( - name = extractCommandName(classDecl), - className = classDecl.simpleName.asString(), - description = extractHelpDescription(classDecl), - arguments = extractArguments(classDecl), - options = extractOptions(classDecl), - ) - }.sortedBy { it.name } - - val result = asciidoc { - title = "Tiny CLI Commands" - - commands.forEach { command -> - section(command.name ?: command.className) { - lib { - paragraph(command.description ?: "No description available.") - - if (command.arguments.isNotEmpty()) { - paragraph("*Arguments:*") - tableArgs(command.arguments.map { it.name to (it.description ?: "No description") }) - } - - if (command.options.isNotEmpty()) { - paragraph("*Options:*") - tableArgs(command.options.map { "--${it.name}" to (it.description ?: "No description") }) - } - - // Generate usage example - val usage = buildString { - append("tiny-cli ${command.name ?: command.className.lowercase()}") - command.arguments.forEach { arg -> - append(" <${arg.name}>") - } - if (command.options.isNotEmpty()) { - append(" [options]") - } - } - - code("# Usage\n$usage", "bash") - } - } - } - }.generate() - - file.write(result.toByteArray()) - return emptyList() - } - - private fun extractCommandName(classDecl: KSClassDeclaration): String? { - // Use reflection to extract the command name from the CliktCommand constructor - // Look for the primary constructor and its arguments - val primaryConstructor = classDecl.primaryConstructor - - primaryConstructor?.let { constructor -> - // Look for the supertype call to CliktCommand - classDecl.superTypes.forEach { superType -> - val resolved = superType.resolve() - if (resolved.declaration.qualifiedName?.asString() == "com.github.ajalt.clikt.core.CliktCommand") { - // Try to find the name argument in the constructor call - superType.element?.typeArguments?.forEach { typeArg -> - // This approach might not work directly, let's try a different approach - } - } - } - } - - // For now, let's use a simpler approach by examining the class source - // and looking for constructor parameters in a more structured way - val classString = classDecl.toString() - - // Look for CliktCommand(name = "commandname") pattern - val namePattern = """CliktCommand\([^)]*name\s*=\s*"([^"]+)"""".toRegex() - val nameMatch = namePattern.find(classString) - if (nameMatch != null) { - return nameMatch.groupValues[1] - } - - // Fallback: derive from class name - val className = classDecl.simpleName.asString() - return if (className.endsWith("Command")) { - className.removeSuffix("Command").lowercase() - } else { - className.lowercase() - } - } - - private fun extractHelpDescription(classDecl: KSClassDeclaration): String? { - // Use reflection to find the help() method override in this class (not inherited) - val helpFunction = classDecl.declarations - .filterIsInstance() - .find { func -> - func.simpleName.asString() == "help" && - func.parentDeclaration == classDecl // Only methods declared in this class - } - - helpFunction?.let { func -> - // Get the source file location - val location = func.location - if (location is FileLocation) { - try { - val sourceFile = File(location.filePath) - if (sourceFile.exists()) { - val lines = sourceFile.readLines() - - // Get the line where the function is declared (KSP uses 1-based line numbers) - val functionLineIndex = location.lineNumber - 1 - - if (functionLineIndex >= 0 && functionLineIndex < lines.size) { - val functionLine = lines[functionLineIndex] - - // Look for patterns like: override fun help(context: Context) = "Some description" - val singleExpressionPattern = """fun\s+help\s*\([^)]*\)\s*=\s*"([^"]+)"""".toRegex() - val match = singleExpressionPattern.find(functionLine) - if (match != null) { - return match.groupValues[1] - } - - // Look for multi-line function declarations - // Check if the function continues on the next line - if (functionLine.contains("fun help") && !functionLine.contains("=")) { - // Look for the return statement in subsequent lines - for (i in (functionLineIndex + 1) until minOf(functionLineIndex + 10, lines.size)) { - val line = lines[i].trim() - - // Look for return "..." pattern - val returnPattern = """return\s+"([^"]+)"""".toRegex() - val returnMatch = returnPattern.find(line) - if (returnMatch != null) { - return returnMatch.groupValues[1] - } - - // Look for = "..." pattern - val assignmentPattern = """=\s+"([^"]+)"""".toRegex() - val assignmentMatch = assignmentPattern.find(line) - if (assignmentMatch != null) { - return assignmentMatch.groupValues[1] - } - - // Stop if we hit a closing brace (end of function) - if (line.contains("}")) { - break - } - } - } - } - } - } catch (e: Exception) { - logger.warn("Error reading source file for function ${func.simpleName.asString()}: ${e.message}") - } - } - } - - // Fallback: return null to indicate no description found - return null - } - - private fun extractArguments(classDecl: KSClassDeclaration): List { - val arguments = mutableListOf() - - // Use reflection to get all properties declared in this class (not inherited from CliktCommand) - val allProperties = classDecl.getAllProperties() - - allProperties - .filter { property -> - // Only include properties declared in the project classes, not from CliktCommand - property.parentDeclaration == classDecl - } - .forEach { property -> - val propertyName = property.simpleName.asString() - - // Read the property declaration from source code to capture chained method calls - val location = property.location - if (location is FileLocation) { - try { - val sourceFile = File(location.filePath) - if (sourceFile.exists()) { - val lines = sourceFile.readLines() - val propertyLineIndex = location.lineNumber - 1 - - if (propertyLineIndex >= 0 && propertyLineIndex < lines.size) { - // Read the complete property declaration including chained methods - val propertyDeclaration = readCompletePropertyDeclaration(lines, propertyLineIndex) - - if (propertyDeclaration.contains("by argument(")) { - // Extract help text from argument(help = "...") pattern - handle both single and multi-line strings - val helpPattern = - """argument\s*\(\s*help\s*=\s*"([^"]+(?:\s*\+\s*"[^"]*")*?)"""".toRegex() - val helpMatch = helpPattern.find(propertyDeclaration) - var helpText = helpMatch?.groupValues?.get(1) - - // Clean up multi-line help text by removing string concatenation artifacts - helpText = helpText?.replace("""\s*\+\s*""".toRegex(), " ")?.trim() - - // Extract default value from .default(...) pattern - improved to handle nested parentheses - val defaultValue = extractDefaultValue(propertyDeclaration) - - // Create enhanced description including default value if present - val enhancedDescription = if (defaultValue != null) { - "${helpText ?: "No description available"} (default: $defaultValue)" - } else { - helpText - } - - arguments.add(CliParameterDescriptor(propertyName, enhancedDescription)) - } - } - } - } catch (e: Exception) { - logger.warn("Error reading source file for property ${property.simpleName.asString()}: ${e.message}") - - // Fallback to the old method if source reading fails - val propertyString = property.toString() - if (propertyString.contains("argument(")) { - val helpPattern = """argument\([^)]*help\s*=\s*"([^"]+)"""".toRegex() - val helpMatch = helpPattern.find(propertyString) - val helpText = helpMatch?.groupValues?.get(1) - arguments.add(CliParameterDescriptor(propertyName, helpText)) - } - } - } - } - - return arguments - } - - private fun readCompletePropertyDeclaration( - lines: List, - startLineIndex: Int, - ): String { - val declaration = StringBuilder() - var currentLineIndex = startLineIndex - var foundByClause = false - - while (currentLineIndex < lines.size) { - val line = lines[currentLineIndex].trim() - - // If we're past the first line and hit a new property/method declaration, stop - if (currentLineIndex > startLineIndex && - ( - line.startsWith("val ") || line.startsWith("var ") || - line.startsWith("private val ") || line.startsWith("private var ") || - line.startsWith("override fun ") || line.startsWith("fun ") || - line.startsWith("class ") || line.startsWith("}") - ) - ) { - break - } - - declaration.append(line).append(" ") - - // Check if this line contains "by argument" or "by option" - if (line.contains("by argument") || line.contains("by option")) { - foundByClause = true - } - - currentLineIndex++ - - // After finding the "by" clause, continue reading lines that start with "." (chained methods) - // or are continuation lines (indented and not starting new declarations) - if (foundByClause) { - while (currentLineIndex < lines.size) { - val nextLine = lines[currentLineIndex].trim() - - // Stop if we hit a new property/method declaration - if (nextLine.startsWith("val ") || nextLine.startsWith("var ") || - nextLine.startsWith("private val ") || nextLine.startsWith("private var ") || - nextLine.startsWith("override fun ") || nextLine.startsWith("fun ") || - nextLine.startsWith("class ") || nextLine.startsWith("}") - ) { - break - } - - // Continue if the line starts with "." (chained method) or is empty - if (nextLine.startsWith(".") || nextLine.isEmpty()) { - declaration.append(nextLine).append(" ") - currentLineIndex++ - } else { - // Stop if it's not a chained method and not empty - break - } - } - break - } - } - - return declaration.toString().trim() - } - - private fun extractDefaultValue(propertyDeclaration: String): String? { - val defaultIndex = propertyDeclaration.indexOf(".default(") - if (defaultIndex == -1) return null - - val startIndex = defaultIndex + ".default(".length - var openParentheses = 1 - var currentIndex = startIndex - - while (currentIndex < propertyDeclaration.length && openParentheses > 0) { - when (propertyDeclaration[currentIndex]) { - '(' -> openParentheses++ - ')' -> openParentheses-- - } - currentIndex++ - } - - return if (openParentheses == 0) { - propertyDeclaration.substring(startIndex, currentIndex - 1).trim() - } else { - null - } - } - - private fun extractOptions(classDecl: KSClassDeclaration): List { - val options = mutableListOf() - - // Use reflection to get all properties declared in this class (not inherited from CliktCommand) - val allProperties = classDecl.getAllProperties() - - allProperties - .filter { property -> - // Only include properties declared in the project classes, not from CliktCommand - property.parentDeclaration == classDecl - } - .forEach { property -> - val propertyName = property.simpleName.asString() - - // Read the property declaration from source code to capture chained method calls - val location = property.location - if (location is FileLocation) { - try { - val sourceFile = File(location.filePath) - if (sourceFile.exists()) { - val lines = sourceFile.readLines() - val propertyLineIndex = location.lineNumber - 1 - - if (propertyLineIndex >= 0 && propertyLineIndex < lines.size) { - // Read the complete property declaration including chained methods - val propertyDeclaration = readCompletePropertyDeclaration(lines, propertyLineIndex) - - if (propertyDeclaration.contains("by option(")) { - // Extract help text from option(help = "...") pattern - handle both single and multi-line strings - val helpPattern = - """option\s*\([^)]*help\s*=\s*"([^"]+(?:\s*\+\s*"[^"]*")*?)"""".toRegex() - val helpMatch = helpPattern.find(propertyDeclaration) - var helpText = helpMatch?.groupValues?.get(1) - - // Clean up multi-line help text by removing string concatenation artifacts - helpText = helpText?.replace("""\s*\+\s*""".toRegex(), " ")?.trim() - - // Extract default value from .default(...) pattern - improved to handle nested parentheses - val defaultValue = extractDefaultValue(propertyDeclaration) - - // Create enhanced description including default value if present - val enhancedDescription = if (defaultValue != null) { - "${helpText ?: "No description available"} (default: $defaultValue)" - } else { - helpText - } - - options.add(CliParameterDescriptor(propertyName, enhancedDescription)) - } - } - } - } catch (e: Exception) { - logger.warn("Error reading source file for property ${property.simpleName.asString()}: ${e.message}") - - // Fallback to the old method if source reading fails - val propertyString = property.toString() - if (propertyString.contains("option(")) { - val helpPattern = """option\([^)]*help\s*=\s*"([^"]+)"""".toRegex() - val helpMatch = helpPattern.find(propertyString) - val helpText = helpMatch?.groupValues?.get(1) - options.add(CliParameterDescriptor(propertyName, helpText)) - } - } - } - } - - return options - } -} - -data class CliCommandDescriptor( - val name: String?, - val className: String, - val description: String?, - val arguments: List, - val options: List, -) - -data class CliParameterDescriptor( - val name: String, - val description: String?, -) - -class CliKspProcessorProvider : SymbolProcessorProvider { - override fun create(environment: SymbolProcessorEnvironment) = CliToAsciidocKspProcessor(environment) -} diff --git a/tiny-annotation-processors/tiny-cli-to-asciidoc-generator/src/jvmMain/resources/META-INF/services/com.google.devtools.ksp.processing.SymbolProcessorProvider b/tiny-annotation-processors/tiny-cli-to-asciidoc-generator/src/jvmMain/resources/META-INF/services/com.google.devtools.ksp.processing.SymbolProcessorProvider deleted file mode 100644 index d53fed0a..00000000 --- a/tiny-annotation-processors/tiny-cli-to-asciidoc-generator/src/jvmMain/resources/META-INF/services/com.google.devtools.ksp.processing.SymbolProcessorProvider +++ /dev/null @@ -1 +0,0 @@ -com.github.minigdx.tiny.doc.CliKspProcessorProvider diff --git a/tiny-cli/build.gradle.kts b/tiny-cli/build.gradle.kts index ca63b5ef..ed516420 100644 --- a/tiny-cli/build.gradle.kts +++ b/tiny-cli/build.gradle.kts @@ -3,7 +3,6 @@ plugins { alias(libs.plugins.minigdx.jvm) alias(libs.plugins.kotlin.serialization) - alias(libs.plugins.kotlin.ksp) application } @@ -46,10 +45,6 @@ dependencies { "Embed the JS engine in the CLI " + "so it can be included when the game is exported.", ) - - add("ksp", project(":tiny-annotation-processors:tiny-cli-to-asciidoc-generator")) { - because("KSP will generate the asciidoctor documentation of all Lua libs from Tiny.") - } } application { @@ -79,15 +74,3 @@ project.tasks.withType(JavaExec::class.java).configureEach { classpath(jar, runtimeClasspath, externalDependencies) } - -val tinyCliApiAsciidoctor = configurations.create("tinyCliApiAsciidoctor") { - isCanBeResolved = false - isCanBeConsumed = true -} - -artifacts { - // CLI as Asciidoctor. - add(tinyCliApiAsciidoctor.name, project.layout.buildDirectory.file("generated/ksp/main/resources/tiny-cli-commands.adoc")) { - builtBy("kspKotlin") - } -} diff --git a/tiny-cli/src/main/kotlin/com/github/minigdx/tiny/cli/command/CreateCommand.kt b/tiny-cli/src/main/kotlin/com/github/minigdx/tiny/cli/command/CreateCommand.kt index 04548ac5..9ddb7b41 100644 --- a/tiny-cli/src/main/kotlin/com/github/minigdx/tiny/cli/command/CreateCommand.kt +++ b/tiny-cli/src/main/kotlin/com/github/minigdx/tiny/cli/command/CreateCommand.kt @@ -15,13 +15,11 @@ import com.github.minigdx.tiny.cli.command.utils.ColorUtils import com.github.minigdx.tiny.cli.command.utils.ColorUtils.brightness import com.github.minigdx.tiny.cli.command.utils.PaletteImageGenerator import com.github.minigdx.tiny.cli.config.GameParameters -import com.github.minigdx.tiny.cli.config.GameParameters.Companion.JSON import com.github.minigdx.tiny.cli.config.GameParametersV1 import com.github.minigdx.tiny.cli.config.Size -import kotlinx.serialization.json.encodeToStream +import com.github.minigdx.tiny.platform.SoundData import org.intellij.lang.annotations.Language import java.io.File -import java.io.FileOutputStream import java.util.UUID @Language("Lua") @@ -109,15 +107,17 @@ ${ zoom = zoom, colors = GamePalette.ALL[palette - 1].colors.sortedBy { brightness(it) }, scripts = listOf(gameScript), + sound = "default-sound.sfx", hideMouseCursor = hideMouseCursor == "yes".lowercase(), ) as GameParameters if (!gameDirectory.exists()) gameDirectory.mkdirs() val configurationFile = gameDirectory.resolve("_tiny.json") - FileOutputStream(configurationFile).use { - JSON.encodeToStream(configuration, it) - } + configuration.write(configurationFile) + + val soundFile = gameDirectory.resolve("default-sound.sfx") + soundFile.writeText(SoundData.DEFAULT_SFX.music.serialize()) gameDirectory.resolve(gameScript).writeText(DEFAULT_GAME_SCRIPT) diff --git a/tiny-cli/src/main/kotlin/com/github/minigdx/tiny/cli/command/DocsCommand.kt b/tiny-cli/src/main/kotlin/com/github/minigdx/tiny/cli/command/DocsCommand.kt new file mode 100644 index 00000000..aa70194e --- /dev/null +++ b/tiny-cli/src/main/kotlin/com/github/minigdx/tiny/cli/command/DocsCommand.kt @@ -0,0 +1,85 @@ +package com.github.minigdx.tiny.cli.command + +import com.github.ajalt.clikt.core.CliktCommand +import com.github.ajalt.clikt.core.CliktError +import com.github.ajalt.clikt.core.Context +import com.github.ajalt.clikt.core.context +import com.github.ajalt.clikt.core.parse +import com.github.ajalt.clikt.parameters.options.default +import com.github.ajalt.clikt.parameters.options.option +import com.github.ajalt.clikt.parameters.types.file +import com.github.mingdx.tiny.doc.CliAnnotation +import com.github.minigdx.tiny.cli.command.utils.AsciidocHelpFormatter +import java.io.File + +/** + * Command to generate AsciiDoc documentation for all CLI commands. + * + * This command iterates through all registered Tiny CLI commands and generates + * comprehensive AsciiDoc documentation including arguments, options, defaults, + * and usage examples. + */ +@CliAnnotation(hidden = true) +class DocsCommand : CliktCommand(name = "docs") { + private val outputFile by option( + "--output", + "-o", + help = "Output file path for the generated AsciiDoc documentation", + ) + .file(mustExist = false, canBeDir = false, canBeFile = true) + .default(File("tiny-cli-commands.adoc")) + + override fun help(context: Context) = "Generate AsciiDoc documentation for all CLI commands" + + override fun run() { + echo("📚 Generating CLI documentation...") + + val documentation = buildString { + // Document header (level 2 since this will be included in main docs) + appendLine("== Tiny CLI Commands Reference") + appendLine() + appendLine("=== Commands") + appendLine() + + // Get all command classes to document + val commands = listOf( + CreateCommand(), + RunCommand(), + DebugCommand(), + AddCommand(), + ExportCommand(), + ServeCommand(), + PaletteCommand(), + SfxCommand(), + UpdateCommand(), + ResourcesCommand(), + ) + + // Generate documentation for each command + commands.forEach { command -> + try { + command.context { helpFormatter = { AsciidocHelpFormatter } } + command.parse(arrayOf("-h")) + } catch (e: CliktError) { + val asciidocHelp = command.getFormattedHelp(e) + appendLine(asciidocHelp) + // Use AsciidocHelpFormatter to convert help to AsciiDoc + appendLine() + } catch (e: Exception) { + echo("⚠️ Warning: Could not generate docs for ${command.commandName}: ${e.message}", err = true) + e.printStackTrace() + } + } + } + + // Write to output file + try { + outputFile.parentFile?.mkdirs() + outputFile.writeText(documentation) + echo("✅ Documentation generated successfully: ${outputFile.absolutePath}") + } catch (e: Exception) { + echo("❌ Error writing documentation file: ${e.message}", err = true) + throw e + } + } +} diff --git a/tiny-cli/src/main/kotlin/com/github/minigdx/tiny/cli/command/ExportCommand.kt b/tiny-cli/src/main/kotlin/com/github/minigdx/tiny/cli/command/ExportCommand.kt index 0e266b62..ea714614 100644 --- a/tiny-cli/src/main/kotlin/com/github/minigdx/tiny/cli/command/ExportCommand.kt +++ b/tiny-cli/src/main/kotlin/com/github/minigdx/tiny/cli/command/ExportCommand.kt @@ -13,6 +13,7 @@ import com.github.minigdx.tiny.cli.config.GameParameters import com.github.minigdx.tiny.cli.config.GameParameters.Companion.JSON import com.github.minigdx.tiny.cli.config.GameParametersV1 import com.github.minigdx.tiny.resources.ldtk.Ldtk +import kotlinx.serialization.ExperimentalSerializationApi import kotlinx.serialization.json.Json import kotlinx.serialization.json.decodeFromStream import java.io.File @@ -441,6 +442,7 @@ class ExportCommand : CliktCommand(name = "export") { } } +@OptIn(ExperimentalSerializationApi::class) class GameExporter { fun export( gameDirectory: File, @@ -495,7 +497,7 @@ class GameExporter { when (gameParameters) { is GameParametersV1 -> { - (gameParameters.scripts + gameParameters.libraries.map { "$it.lua" }) + (gameParameters.scripts) .filterNot { exportedFile.contains(it) } .forEach { name -> exportedGame.putNextEntry(ZipEntry(name)) @@ -513,7 +515,7 @@ class GameExporter { exportedFile += name } - gameParameters.sounds + listOfNotNull(gameParameters.sound) .filterNot { exportedFile.contains(it) } .forEach { name -> exportedGame.putNextEntry(ZipEntry(name)) @@ -560,7 +562,7 @@ class GameExporter { template = replaceList( template, - (gameParameters.scripts + gameParameters.libraries.map { "$it.lua" }), + gameParameters.scripts, "{GAME_SCRIPT}", "GAME_SCRIPT", ) @@ -571,7 +573,7 @@ class GameExporter { "GAME_SPRITESHEET", ) template = replaceList(template, gameParameters.levels, "{GAME_LEVEL}", "GAME_LEVEL") - template = replaceList(template, gameParameters.sounds, "{GAME_SOUND}", "GAME_SOUND") + template = replaceList(template, listOfNotNull(gameParameters.sound), "{GAME_SOUND}", "GAME_SOUND") template = template.replace("{GAME_COLORS}", gameParameters.colors.joinToString(",")) diff --git a/tiny-cli/src/main/kotlin/com/github/minigdx/tiny/cli/command/MainCommand.kt b/tiny-cli/src/main/kotlin/com/github/minigdx/tiny/cli/command/MainCommand.kt index a50f573e..edbdb29e 100644 --- a/tiny-cli/src/main/kotlin/com/github/minigdx/tiny/cli/command/MainCommand.kt +++ b/tiny-cli/src/main/kotlin/com/github/minigdx/tiny/cli/command/MainCommand.kt @@ -18,6 +18,7 @@ class MainCommand : CliktCommand() { SfxCommand(), UpdateCommand(), ResourcesCommand(), + DocsCommand(), ) } diff --git a/tiny-cli/src/main/kotlin/com/github/minigdx/tiny/cli/command/ResourcesCommand.kt b/tiny-cli/src/main/kotlin/com/github/minigdx/tiny/cli/command/ResourcesCommand.kt index 87f449c1..2afa59fe 100644 --- a/tiny-cli/src/main/kotlin/com/github/minigdx/tiny/cli/command/ResourcesCommand.kt +++ b/tiny-cli/src/main/kotlin/com/github/minigdx/tiny/cli/command/ResourcesCommand.kt @@ -119,9 +119,9 @@ class ResourcesCommand : CliktCommand(name = "resources") { parameters.copy(levels = updatedLevels) } "\uD83D\uDD08 sounds" -> { - val updatedSounds = parameters.sounds.toMutableList() + val updatedSounds = listOfNotNull(parameters.sound).toMutableList() updatedSounds.removeAt(indexInCategory) - parameters.copy(sounds = updatedSounds) + parameters.copy(sound = updatedSounds.firstOrNull()) } else -> throw IllegalStateException("Unknown category: $categoryName") } @@ -178,7 +178,7 @@ class ResourcesCommand : CliktCommand(name = "resources") { "\uD83D\uDCDD scripts" to gameParameters.scripts, "\uD83D\uDDBC\uFE0F spritesheets" to gameParameters.spritesheets, "\uD83D\uDDFA\uFE0F levels" to gameParameters.levels, - "\uD83D\uDD08 sounds" to gameParameters.sounds, + "\uD83D\uDD08 sound" to listOfNotNull(gameParameters.sound), ).filter { it.second.isNotEmpty() } .toMap() } diff --git a/tiny-cli/src/main/kotlin/com/github/minigdx/tiny/cli/command/SfxCommand.kt b/tiny-cli/src/main/kotlin/com/github/minigdx/tiny/cli/command/SfxCommand.kt index bd9c8f95..639300ec 100644 --- a/tiny-cli/src/main/kotlin/com/github/minigdx/tiny/cli/command/SfxCommand.kt +++ b/tiny-cli/src/main/kotlin/com/github/minigdx/tiny/cli/command/SfxCommand.kt @@ -3,7 +3,7 @@ package com.github.minigdx.tiny.cli.command import com.github.ajalt.clikt.core.Abort import com.github.ajalt.clikt.core.CliktCommand import com.github.ajalt.clikt.core.Context -import com.github.ajalt.clikt.parameters.arguments.argument +import com.github.ajalt.clikt.parameters.options.option import com.github.ajalt.clikt.parameters.types.file import com.github.minigdx.tiny.cli.config.GameParameters import com.github.minigdx.tiny.engine.GameEngine @@ -14,12 +14,11 @@ import com.github.minigdx.tiny.lua.errorLine import com.github.minigdx.tiny.platform.glfw.GlfwPlatform import com.github.minigdx.tiny.sound.Music import kotlinx.serialization.json.Json -import kotlinx.serialization.json.decodeFromStream import org.luaj.vm2.LuaError import java.io.File class SfxCommand : CliktCommand(name = "sfx") { - val filename by argument(help = "The sound file to create/edit").file( + val filename by option(help = "The sound file to create/edit").file( mustExist = false, canBeDir = false, canBeFile = true, @@ -53,30 +52,41 @@ class SfxCommand : CliktCommand(name = "sfx") { ) throw Abort() } - val commandParameters = GameParameters.JSON.decodeFromStream(configFile) + val commandParameters = GameParameters.read(configFile) - if (!filename.exists()) { - val json = Json.encodeToString(Music()) - filename.writeBytes(json.encodeToByteArray()) - } + val defaultFile = File("default-sound.sfx") val logger = StdOutLogger("tiny-cli") val vfs = CommonVirtualFileSystem() - val commandOptions = commandParameters.toGameOptions() - .copy(sounds = listOf(filename.name)) + // get the file passed as parameter + val sfxFileName = filename + // otherwise try the one from the game + ?: commandParameters.toGameOptions().sound?.let { File(it) } + // Let's create a file then. + ?: defaultFile val homeDirectory = findHomeDirectory(commandParameters) + val commandOptions = commandParameters.toGameOptions() + .copy(sound = sfxFileName.name) + + val platform = GlfwPlatform( + commandOptions, + logger, + vfs, + File("."), + homeDirectory, + jarResourcePrefix = "/sfx", + ) + + if (!sfxFileName.exists()) { + val json = Json.encodeToString(Music()) + platform.saveIntoHome(sfxFileName.name, json) + } + val gameEngine = GameEngine( gameOptions = commandOptions, - platform = GlfwPlatform( - commandOptions, - logger, - vfs, - File("."), - homeDirectory, - jarResourcePrefix = "/sfx", - ), + platform = platform, vfs = vfs, logger = logger, ) diff --git a/tiny-cli/src/main/kotlin/com/github/minigdx/tiny/cli/command/UpdateCommand.kt b/tiny-cli/src/main/kotlin/com/github/minigdx/tiny/cli/command/UpdateCommand.kt index 35508a8c..b6e63314 100644 --- a/tiny-cli/src/main/kotlin/com/github/minigdx/tiny/cli/command/UpdateCommand.kt +++ b/tiny-cli/src/main/kotlin/com/github/minigdx/tiny/cli/command/UpdateCommand.kt @@ -69,8 +69,7 @@ class UpdateCommand : CliktCommand(name = "update") { editableParameters.add(EditableParameter("scripts", params.scripts.joinToString(", "), false)) editableParameters.add(EditableParameter("spritesheets", params.spritesheets.joinToString(", "), false)) editableParameters.add(EditableParameter("levels", params.levels.joinToString(", "), false)) - editableParameters.add(EditableParameter("sounds", params.sounds.joinToString(", "), false)) - editableParameters.add(EditableParameter("libraries", params.libraries.joinToString(", "), false)) + editableParameters.add(EditableParameter("sounds", listOfNotNull(params.sound).joinToString(", "), false)) editableParameters.add(EditableParameter("hideMouseCursor", if (params.hideMouseCursor) "Yes" else "No", true)) } diff --git a/tiny-cli/src/main/kotlin/com/github/minigdx/tiny/cli/command/utils/AsciidocHelpFormatter.kt b/tiny-cli/src/main/kotlin/com/github/minigdx/tiny/cli/command/utils/AsciidocHelpFormatter.kt new file mode 100644 index 00000000..27327ff5 --- /dev/null +++ b/tiny-cli/src/main/kotlin/com/github/minigdx/tiny/cli/command/utils/AsciidocHelpFormatter.kt @@ -0,0 +1,100 @@ +package com.github.minigdx.tiny.cli.command.utils + +import com.github.ajalt.clikt.core.UsageError +import com.github.ajalt.clikt.output.HelpFormatter +import com.github.ajalt.clikt.output.HelpFormatter.ParameterHelp + +/** + * Utility object for converting CLI command help to AsciiDoc format. + * + * This converts standard Clikt help output to properly structured AsciiDoc + * documentation including command sections, usage examples, and parameter tables. + */ +object AsciidocHelpFormatter : HelpFormatter { + override fun formatHelp( + error: UsageError?, + prolog: String, + epilog: String, + parameters: List, + programName: String, + ): String { + val optionParameters = parameters.filterIsInstance() + val argumentParameters = parameters.filterIsInstance() + + return buildString { + appendSection3Title(programName) + appendEmptyLine() + appendLine(prolog) + appendEmptyLine() + appendUsageExample(programName, optionParameters, argumentParameters) + appendEmptyLine() + appendOptionsSection(optionParameters) + appendEmptyLine() + appendArgumentsSection(argumentParameters) + }.trim() + } + + private fun StringBuilder.appendSection3Title(title: String) { + appendLine("=== $title") + } + + private fun StringBuilder.appendEmptyLine() { + appendLine() + } + + private fun StringBuilder.appendUsageExample( + programName: String, + optionParameters: List, + argumentParameters: List, + ) { + val firstOption = optionParameters + .firstOrNull() + ?.names + ?.firstOrNull() + ?.let { "$it=" } + ?: "" + + val firstArgument = argumentParameters + .firstOrNull() + ?.name + ?.lowercase() + ?.let { "<$it>" } + ?: "" + + appendLine("[source]") + appendLine("----") + appendLine("tiny-cli $programName $firstOption $firstArgument".trim()) + appendLine("----") + } + + private fun StringBuilder.appendOptionsSection(options: List) { + if (options.isEmpty()) return + + appendLine("==== Options") + appendEmptyLine() + options.forEach { option -> + appendOptionDefinition(option) + } + } + + private fun StringBuilder.appendOptionDefinition(option: ParameterHelp.Option) { + val names = option.names.joinToString(", ") + appendLine("`$names=`::") + appendLine(option.help) + } + + private fun StringBuilder.appendOptionDefinition(argument: ParameterHelp.Argument) { + appendLine("`<${argument.name.lowercase()}>`::") + appendLine(argument.help) + } + + private fun StringBuilder.appendArgumentsSection(arguments: List) { + if (arguments.isEmpty()) return + + appendLine("==== Arguments") + appendEmptyLine() + arguments.forEach { argument -> + appendOptionDefinition(argument) + } + } +} diff --git a/tiny-cli/src/main/kotlin/com/github/minigdx/tiny/cli/config/GameParameters.kt b/tiny-cli/src/main/kotlin/com/github/minigdx/tiny/cli/config/GameParameters.kt index d692ce99..fb2eb936 100644 --- a/tiny-cli/src/main/kotlin/com/github/minigdx/tiny/cli/config/GameParameters.kt +++ b/tiny-cli/src/main/kotlin/com/github/minigdx/tiny/cli/config/GameParameters.kt @@ -1,6 +1,7 @@ package com.github.minigdx.tiny.cli.config import com.github.minigdx.tiny.engine.GameOptions +import kotlinx.serialization.ExperimentalSerializationApi import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable import kotlinx.serialization.json.Json @@ -10,7 +11,9 @@ import kotlinx.serialization.json.encodeToStream import java.io.File import java.io.FileInputStream import java.io.FileOutputStream +import java.io.InputStream +@OptIn(ExperimentalSerializationApi::class) @Serializable @JsonClassDiscriminator("version") sealed class GameParameters { @@ -19,6 +22,7 @@ sealed class GameParameters { abstract fun toGameOptions(): GameOptions + @OptIn(ExperimentalSerializationApi::class) fun write(output: File) { FileOutputStream(output).use { JSON.encodeToStream(this, it) @@ -40,19 +44,18 @@ sealed class GameParameters { */ abstract fun getAllScripts(): List - /** - * Add library. - */ - abstract fun addLibrary(lib: String): GameParameters - companion object { - val JSON = - Json { - ignoreUnknownKeys = true - } + val JSON = Json { + ignoreUnknownKeys = true + } + + @OptIn(ExperimentalSerializationApi::class) + fun read(inputStream: InputStream): GameParameters { + return JSON.decodeFromStream(inputStream) + } fun read(file: File): GameParameters { - return JSON.decodeFromStream(FileInputStream(file)) + return read(FileInputStream(file)) } } } @@ -89,16 +92,9 @@ data class GameParametersV1( */ val levels: List = emptyList(), /** - * List of MIDI sounds. - */ - val sounds: List = emptyList(), - /** - * Libraries configured. It will contain the name of the library and the version (optional). - * The file name still has to be computed from the name (ie: particules@commitHash -> particules.lua) - * - * The libraries will be added at the end of the scripts lists. + * List of sounds. */ - val libraries: List = emptyList(), + val sound: String? = null, /** * Is the default mouse cursor should be hidden? * If true, the mouse cursor will not be displayed. @@ -116,7 +112,7 @@ data class GameParametersV1( spriteSheets = spritesheets, gameLevels = levels, zoom = zoom, - sounds = sounds, + sound = sound, hideMouseCursor = hideMouseCursor, ) } @@ -131,10 +127,7 @@ data class GameParametersV1( } } - return scripts + - libraries.map { lib -> - extractName(lib) + ".lua" - } + return scripts } override fun addLevel(level: String): GameParameters { @@ -150,11 +143,7 @@ data class GameParametersV1( } override fun addSound(sound: String): GameParameters { - return copy(sounds = sounds + sound) - } - - override fun addLibrary(lib: String): GameParameters { - return copy(libraries = libraries + lib) + return copy(sound = this@GameParametersV1.sound + sound) } override fun setPalette(colors: List): GameParameters { diff --git a/tiny-cli/src/main/resources/sfx/data/sfx-0.sfx b/tiny-cli/src/main/resources/sfx/data/sfx-0.sfx deleted file mode 100644 index 48af0765..00000000 --- a/tiny-cli/src/main/resources/sfx/data/sfx-0.sfx +++ /dev/null @@ -1,7 +0,0 @@ -tiny-sfx 120 127 -1 01 19 00 FF 19 00 00 00 00 00 -010EFF 0110FF 0115FF 011DFF 0124FF 012AFF 0131FF 0139FF 0134FF 013BFF 0139FF 0134FF 012EFF 012EFF 0136FF 000100 -1 -0 01 19 00 FF 19 00 00 00 00 00 -0 01 19 00 FF 19 00 00 00 00 00 -0 01 19 00 FF 19 00 00 00 00 00 \ No newline at end of file diff --git a/tiny-cli/src/main/resources/sfx/data/sfx-1.sfx b/tiny-cli/src/main/resources/sfx/data/sfx-1.sfx deleted file mode 100644 index 145c5506..00000000 --- a/tiny-cli/src/main/resources/sfx/data/sfx-1.sfx +++ /dev/null @@ -1,7 +0,0 @@ -tiny-sfx 120 127 -1 01 19 00 FF 19 00 00 00 00 00 -01383F 014074 014394 0145AA 0145AA 013E9F 01368A 01246A 012A55 011B4A 01185F 01158A 0115AA 0116FF 011BFF 0127FF -1 -0 01 19 00 FF 19 00 00 00 00 00 -0 01 19 00 FF 19 00 00 00 00 00 -0 01 19 00 FF 19 00 00 00 00 00 \ No newline at end of file diff --git a/tiny-cli/src/main/resources/sfx/instrument-editor.lua b/tiny-cli/src/main/resources/sfx/instrument-editor.lua index 6fbeb815..18532a3c 100644 --- a/tiny-cli/src/main/resources/sfx/instrument-editor.lua +++ b/tiny-cli/src/main/resources/sfx/instrument-editor.lua @@ -15,11 +15,11 @@ local state = { } local on_press = function() - state.instrument.noteOn("C4") + state.instrument.note_on("C4") end local on_release = function() - state.instrument.noteOff("C4") + state.instrument.note_off("C4") end local on_press_repeat = function() @@ -35,7 +35,7 @@ local on_repeat_update = function() if state.next_note_off then state.next_note_off = state.next_note_off - tiny.dt if state.next_note_off < 0 then - state.instrument.noteOff("C4") + state.instrument.note_off("C4") state.next_note_off = nil if state.next_note_on then @@ -47,7 +47,7 @@ local on_repeat_update = function() if state.next_note_on and state.next_note_on >= 0 then state.next_note_on = state.next_note_on - tiny.dt if state.next_note_on < 0 then - state.instrument.noteOn("C4") + state.instrument.note_on("C4") state.next_note_off = state.instrument.attack + state.instrument.decay end end @@ -145,14 +145,14 @@ function _init_keyboard(entities) local currentNote local playNote = function(_, value) if value and currentNote == nil then - state.instrument.noteOn(value) + state.instrument.note_on(value) currentNote = value elseif value and currentNote ~= nil then - state.instrument.noteOn(value) - state.instrument.noteOff(currentNote) + state.instrument.note_on(value) + state.instrument.note_off(currentNote) currentNote = value elseif not value then - state.instrument.noteOff(currentNote) + state.instrument.note_off(currentNote) currentNote = nil end end diff --git a/tiny-cli/src/main/resources/sfx/sfx-editor.lua b/tiny-cli/src/main/resources/sfx/sfx-editor.lua index e55ad094..b5411ad1 100644 --- a/tiny-cli/src/main/resources/sfx/sfx-editor.lua +++ b/tiny-cli/src/main/resources/sfx/sfx-editor.lua @@ -448,7 +448,7 @@ function _init_sfx_editor(entities) wire.sync(state, "sfx.index", selector, "value") -- set the instrument to the bar wire.listen(selector, "value", function(source, value) - state.sfx = sfx.bar(value) + state.sfx = sfx.sfx(value) end) -- set the list of instruments wire.sync(state, "sfx.all", selector, "active_indices") @@ -478,7 +478,7 @@ function _init_player(entities) local saveButton = wire.find_widget(m.widgets, widget.fields.SaveButton) saveButton.on_change = function() - state.sfx.save() + sfx.save() end local exportButton = wire.find_widget(m.widgets, widget.fields.ExportButton) @@ -502,7 +502,7 @@ function _init() state = new(State) - state.sfx = sfx.bar(0) + state.sfx = sfx.sfx(0) map.level("SfxEditor") diff --git a/tiny-doc/build.gradle.kts b/tiny-doc/build.gradle.kts index 926ac05a..dac18896 100644 --- a/tiny-doc/build.gradle.kts +++ b/tiny-doc/build.gradle.kts @@ -36,16 +36,6 @@ dependencies { ), ), ) - - add( - asciidoctorDependencies.name, - project( - mapOf( - "path" to ":tiny-cli", - "configuration" to "tinyCliApiAsciidoctor", - ), - ), - ) } val unzipAsciidoctorResources = diff --git a/tiny-doc/src/docs/asciidoc/index.adoc b/tiny-doc/src/docs/asciidoc/index.adoc index 78390ca7..a68110cf 100644 --- a/tiny-doc/src/docs/asciidoc/index.adoc +++ b/tiny-doc/src/docs/asciidoc/index.adoc @@ -20,7 +20,7 @@ With `🧸 Tiny`, you'll be able to get started right away and see your progress > _Let's get started and unleash your creativity!_ ++++ - + ++++ NOTE: The code source of this sample is available in the https://github.com/minigdx/tiny/tree/main/tiny-sample[Tiny git repository]. @@ -64,6 +64,8 @@ include::tiny-showcase.adoc[] include::dependencies/tiny-cli-commands.adoc[] +include::tiny-sfx-editor.adoc[] + include::dependencies/tiny-api.adoc[] == Links diff --git a/tiny-doc/src/docs/asciidoc/sample/_boot.lua b/tiny-doc/src/docs/asciidoc/sample/_boot.lua deleted file mode 100644 index 98b82b38..00000000 --- a/tiny-doc/src/docs/asciidoc/sample/_boot.lua +++ /dev/null @@ -1,61 +0,0 @@ -function _init() - ready = false - dt = 0 - - prefix = {"b", "u", "i", "l", "d"," ", "w", "i", "t", "h", " "} - txt = { "t", "i", "n", "y" } - waiting = 3 -end - -function _update() - dt = dt + 1 / 60 - if ready then - waiting = waiting - 1 / 60 - end - - if (waiting < 0) then - gfx.cls("#000000") - tiny.exit(0) -- start the first script in the game script stack - end -end - -function letter(x, l, index, move) - local offset = 3 - if move then - offset = math.abs(math.cos(dt * math.pi * 2 + index) * 4) - end - if ((not ready) and (l ~= " ")) then - shape.rectf( - x + index * 4 + 1, - 1 + 8 + offset, - 4, 4, - "#5f574f" - ) - shape.rectf( - x + index * 4, - 8 + offset, - 4, 4, - "#FFFFFF" - ) - else - print(l, x + index * 4 + 1, 1 + 8 + offset, "#5f574f") - print(l, x + index * 4, 8 + offset, "#FFFFFF") - end -end -function _draw() - gfx.cls("#000000") - - for index = 1, #prefix do - letter(2, prefix[index], index, false) - end - - for index = 1, #txt do - letter(46, txt[index], index, true) - end - - -end - -function _resources() - ready = true -end diff --git a/tiny-doc/src/docs/asciidoc/sample/_boot.png b/tiny-doc/src/docs/asciidoc/sample/_boot.png deleted file mode 100644 index df2a310b..00000000 Binary files a/tiny-doc/src/docs/asciidoc/sample/_boot.png and /dev/null differ diff --git a/tiny-doc/src/docs/asciidoc/sample/_engine.lua b/tiny-doc/src/docs/asciidoc/sample/_engine.lua deleted file mode 100644 index f459b9ba..00000000 --- a/tiny-doc/src/docs/asciidoc/sample/_engine.lua +++ /dev/null @@ -1,50 +0,0 @@ -function _init(w, h) - dt = 0 - msg = { logo = 0, text = "", color = 0 } - width = w - forever = false - letter_split = math.ceil(width / 6) -end - -function _add_return_line(text) - local msg = string.gsub(text, "\n", "") - local new_msg = "" - - for i = 1, #msg, letter_split do - new_msg = new_msg .. msg:sub(i, i + letter_split) .."\n" - end - return new_msg -end - -function popup(logo, text, color, keep) - msg = { logo = logo, text = _add_return_line(text), color = color, lines = (math.ceil( #text / letter_split) + 1)} - dt = 2 - forever = keep -end - -function printDebug(index, text, color) - local prev = gfx.camera() - shape.rectf(0, index * 6, #text * 6 + 6, 6, color) - print(text, 6, index * 6 + 1, "#FFFFFF") - gfx.camera(prev.x, prev.y) -end - -function clear() - dt = 0 - forever = false -end - -function _update() - if dt > 0 then - dt = dt - 1 / 60 - end -end - -function _draw() - if forever or dt > 0 then - local prev = gfx.camera() - shape.rectf(0, 0, width, 6 * msg.lines, msg.color) - print(msg.text, 6, 1, "#FFFFFF") - gfx.camera(prev.x, prev.y) - end -end diff --git a/tiny-doc/src/docs/asciidoc/sample/_tiny.json b/tiny-doc/src/docs/asciidoc/sample/_tiny.json deleted file mode 100644 index c04db15e..00000000 --- a/tiny-doc/src/docs/asciidoc/sample/_tiny.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "version": "V1", - "id": "71c3108e-090b-4d8a-b3fe-0974db6a82bc", - "name": "Platform game", - "resolution": { - "width": 256, - "height": 256 - }, - "sprites": { - "width": 16, - "height": 16 - }, - "zoom": 2, - "colors": [ - "#000000", - "#1D2B53", - "#7E2553", - "#008751", - "#AB5236", - "#5F574F", - "#C2C3C7", - "#FFF1E8", - "#FF004D", - "#FFA300", - "#FFEC27", - "#00E436", - "#29ADFF", - "#83769C", - "#FF77A8", - "#FFCCAA" - ], - "scripts": [ - "pong.lua" - ], - "spritesheets": [ - "game.png" - ] -} diff --git a/tiny-doc/src/docs/asciidoc/sample/game.png b/tiny-doc/src/docs/asciidoc/sample/game.png deleted file mode 100644 index 69b56519..00000000 Binary files a/tiny-doc/src/docs/asciidoc/sample/game.png and /dev/null differ diff --git a/tiny-doc/src/docs/asciidoc/sample/index.html b/tiny-doc/src/docs/asciidoc/sample/index.html deleted file mode 100644 index d66aa4db..00000000 --- a/tiny-doc/src/docs/asciidoc/sample/index.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - Tiny - Platform game - - - - - - -
- - - - - - - - - - - -
- - diff --git a/tiny-doc/src/docs/asciidoc/sample/pong.lua b/tiny-doc/src/docs/asciidoc/sample/pong.lua deleted file mode 100644 index be49dc75..00000000 --- a/tiny-doc/src/docs/asciidoc/sample/pong.lua +++ /dev/null @@ -1,538 +0,0 @@ -player = nil -bricks = {} -balls = {} - -local draw_stencil = 2 -local draw_inside_stencil = 3 -local draw_outside_stencil = 4 - --- TRANSITIONS -- -local Nope = { - update = function() - end, - draw_start = function() - end, - draw_end = function() - end -} - - --- Transition when the game start. --- It will erase the title screen using a growing circle -local GameOut = { - progress = 0, - speed = 5, - start = false, - y = 0 -} - -GameOut.update = function(self) - if (self.start) then - self.progress = self.progress + self.speed - - if (self.progress > 300) then - transition = new(Nope) - end - self.y = juice.powIn2(self.y, -200, self.progress / 500) - end -end - -GameOut.draw_start = function(self) -end - -GameOut.draw_end = function(self) - gfx.draw_mode(draw_stencil) - shape.circlef(128, 128, self.progress, 0) - gfx.draw_mode(draw_outside_stencil) - - local y = 0 -- self.y - - -- title - spr.sdraw(0, 100 + y, 0, 208, 256, 3 * 16) - -- space - spr.sdraw(80, 150 + y, 0, 128, 3 * 16, 16) - -- left and right - spr.sdraw(88, 150 + 16 + y, 4 * 16, 128, 16, 16) - spr.sdraw(88 + 16, 150 + 16 + y, 3 * 16, 128, 16, 16) - print("launch the ball", 80 + 3 * 16, 154 + y, 2) - print("move the paddle", 80 + 3 * 16, 154 + 16 + y, 2) - - -- go back to normal drawing mode - gfx.draw_mode() -end - -local EndOut = { - start_radius = 40, - radius = 0, - target_radius = 300, - duration = 1, - t = 0 -} - -EndOut.update = function(self) - self.t = self.t + 1 / 60 - self.radius = juice.powIn5(self.start_radius, self.target_radius, self.t / self.duration) - - if (self.radius >= 300) then - for b in all(balls) do - b:reset() - end - transition = new(GameOut) - game.started = false - end -end - -EndOut.draw_start = function(self) - gfx.cls(1) - gfx.draw_mode(draw_stencil) - shape.circlef(player.x, player.y, self.radius, 3) - gfx.draw_mode(draw_inside_stencil) - -- fake cls - shape.rectf(0, 0, 256, 256, 13) -end - -EndOut.draw_end = function(self) - gfx.draw_mode() -end - --- Transition when the player just lost. --- Will draw a circle that will close on the player position -local EndIn = { - start_radius = 256, - radius = 256, - target_radius = 40, - duration = 1, - t = 0 -} - -EndIn.update = function(self) - self.t = self.t + tiny.dt - self.radius = juice.powOut5(self.start_radius, self.target_radius, self.t / self.duration) - - if (self.radius <= 40) then - transition = new(EndOut, { start_radius = self.radius }) - end -end - -EndIn.draw_start = function(self) - gfx.cls(1) - gfx.draw_mode(draw_stencil) - shape.circlef(player.x, player.y, self.radius, 3) - gfx.draw_mode(draw_inside_stencil) - -- fake cls - shape.rectf(0, 0, 256, 256, 13) -end - -EndIn.draw_end = function(self) - gfx.draw_mode() -end - - --- PARTICLES -- -local Particle = { - x = 0, - y = 0, - dir = { x = 0, y = 0, r = 0 }, - radius = 1, - ttl = 0.5, - color = 1 -} - -Particle.update = function(self) - self.x = self.x + self.dir.x - self.y = self.y + self.dir.y - self.radius = self.radius + self.dir.r - self.ttl = self.ttl - 1 / 60 - return self.ttl < 0 -end - -Particle.draw = function(self) - shape.circlef(self.x, self.y, self.radius, self.color) -end - --- Bricks -local Brick = { - -- position - x = 0, - y = 0, - start_y = 0, - -- size - width = 16, - height = 8, - -- sprite - color = 0, - hit = nil, - offset = -4, - progress = 0, -} - -Brick.update = function(self) - self.progress = self.progress + 1 / 20 - self.y = juice.pow2(self.start_y - 20, self.start_y, math.min(1.0, self.progress)) - - if self.hit then - self.hit = self.hit - 1 - return self.hit <= 0 -- is the brick should be destroyed? - end - for ball in all(balls) do - local collisionX = check_collision( - { x = self.x, y = self.y, width = 16, height = 8 }, - { x = ball.new_x, y = ball.y, width = ball.width, height = ball.height } - ) - local collisionY = check_collision( - { x = self.x, y = self.y, width = 16, height = 8 }, - { x = ball.x, y = ball.new_y, width = ball.width, height = ball.height } - ) - if collisionX then - ball.accept_move_x = false - ball.speed.x = ball.speed.x * -1 - end - - if collisionY then - ball.accept_move_y = false - ball.speed.y = ball.speed.y * -1 - end - - if collisionX or collisionY then - self.hit = 6 - - table.insert(particles, new(Particle, - { - x = self.x, - y = self.y, - dir = { x = 0, y = -0.2, r = 0 }, - draw = function(self) - local c = 2 - print("+1", self.x + 1, self.y, c) - print("+1", self.x - 1, self.y, c) - print("+1", self.x, self.y + 1, c) - print("+1", self.x, self.y - 1, c) - print("+1", self.x, self.y, math.rnd({ 8, 7, 14 })) - end - } - )) - end - end - return false -end - -local Ball = { - x = 0, - y = 0, - width = 7, - height = 7, - speed = { x = 3, y = -3 }, - glue_to = true, - new_x = 0, - new_y = 0, - accept_move_x = true, - accept_move_y = true, -} - -Ball.reset = function(self) - local r = player - - self.x = r.x + r.width * 0.5 - 7 * 0.5 - self.y = r.y - 7 - self.speed = { x = 3, y = -3 } - self.new_x = r.x + r.width * 0.5 - 7 * 0.5 - self.new_y = r.y - 7 - self.accept_move_x = true - self.accept_move_y = true - self.glue_to = true - - return self -end - -Ball.update = function(self) - self.accept_move_x = true - self.accept_move_y = true - - if (ctrl.touched(0) or ctrl.pressed(keys.space)) then - -- release the ball - self.glue_to = false - end - - if self.glue_to then - local r = player - self.new_x = r.x + r.width * 0.5 - 7 * 0.5 - self.new_y = r.y - 7 - - if ctrl.pressing(keys.left) then - self.speed.x = -1 - elseif ctrl.pressing(keys.right) then - self.speed.x = 1 - end - - local touch = ctrl.touching(0) - if touch then - if touch.x < (r.x + r.width * 0.5) then - self.speed.x = -1 - else - self.speed.x = 1 - end - end - else - self.new_x = self.x + self.speed.x - self.new_y = self.y + self.speed.y - - -- hit walls? - if self.new_x > 256 then - self.speed.x = -self.speed.x - self.accept_move_x = false - elseif self.new_x < 0 then - self.speed.x = -self.speed.x - self.accept_move_x = false - end - - if self.new_y < 0 then - self.speed.y = -self.speed.y - self.accept_move_y = false - end - - -- hit paddles ? - if self.new_y >= player.y then - local collision = check_collision( - { x = player.x, y = player.y, width = 32, height = 8 }, - { x = self.new_x, y = self.new_y, width = self.width, height = self.height } - ) - if collision then - self.speed.y = -self.speed.y - self.accept_move_y = false - end - - end - - table.insert(particles, new(Particle, { - x = self.x + 3 + math.rnd(-2, 2), - y = self.y + 3 + math.rnd(-2, 2), - ttl = 0.4, - dir = { x = 0, y = 0, r = -0.3 }, - radius = 4, - color = 8 - })) - end -end - -Ball.valid_move = function(self) - if self.accept_move_x then - self.x = self.new_x - end - if self.accept_move_y then - self.y = self.new_y - end - - if not self.accept_move_x or not self.accept_move_y then - for i = 1, 3 do - table.insert(particles, new(Particle, { - x = self.x + 3 + math.rnd(-1, 1), - y = self.y + 3 + math.rnd(-1, 1), - ttl = 1.5, - dir = { x = -self.speed.x * 0.1, y = -self.speed.y * 0.1, r = -0.1 }, - radius = 5, - color = math.rnd({ 8, 7, 14 }) - })) - end - end - return self.y > 256 -end - -local Paddle = { - x = 0, - y = 0, - height = 8, - width = 24 -} -local Player = { - x = 128 - 16, - y = 216, - width = 24, - height = 8, - color = 8, - speed = 6, - direction = 1, - paddles = {} -} - -Player.createPaddle = function(self, y) - table.insert(self.paddles, new(Paddle, { x = self.x, y = y })) -end - -Player.update = function(self) - local touching = ctrl.touching(0) - local touch = ctrl.touch() - local mleft = touching and touch.x < (self.x + self.width * 0.5) - local mright = touching and touch.x >= (self.x + self.width * 0.5) - - if ctrl.pressing(keys.left) or mleft then - self.x = math.max(0, self.x - self.speed) - self.direction = 0 - elseif ctrl.pressing(keys.right) or mright then - self.x = math.min(self.x + self.speed, 256 - self.width) - self.direction = 1 - end - self.y = 216 - - self.paddles[1].x = self.x - self.paddles[1].y = self.y - - self.paddles[2].x = self.x - - for i = 3, #self.paddles do - local prev = self.paddles[i - 1] - local current = self.paddles[i] - - current.x = juice.linear(current.x, prev.x, 0.2) - end -end - -Player.draw = function(self) - -- head - shape.rectf(player.x + player.width, player.y + 3, 1, player.height - 3, 2) - spr.sdraw(player.x, player.y, 0, 32, player.width, player.height, player.direction == 1) - - for i = 2, (#self.paddles - 1) do - local current = self.paddles[i] - local next = self.paddles[i + 1] - - for h = 0, current.height do - local x = juice.pow2(current.x, next.x, h / current.height) - local y = current.y + h - spr.sdraw(x, y, 0, 32 + (i - 1) * 8 + h, current.width + 1, 1) - end - end -end - -function _init() - transition = new(GameOut) - - game = { - radius_title = 0, - started = false, - lost = false, - cooldown = 0 - } - - player = new(Player) - for y = 216, 256, 8 do - player:createPaddle(y) - end - - balls = { - new(Ball):reset() - } - - bricks = {} - for y = 1, 6 do - for x = 1, 14 do - table.insert(bricks, new(Brick, { - x = x * 16, - y = y * 8, - start_y = y * 8, - color = math.rnd(2), - progress = x * -0.2 + y * -0.08, - })) - end - end - - particles = {} -end - -function check_collision(rect1, rect2) - local rect1Right = rect1.x + rect1.width - local rect1Bottom = rect1.y + rect1.height - local rect2Right = rect2.x + rect2.width - local rect2Bottom = rect2.y + rect2.height - - -- Check if rectangles overlap - if rect1.x < rect2Right and rect1Right > rect2.x and rect1.y < rect2Bottom and rect1Bottom > rect2.y then - -- Calculate overlap on each side - local overlapLeft = rect2Right - rect1.x - local overlapRight = rect1Right - rect2.x - local overlapTop = rect2Bottom - rect1.y - local overlapBottom = rect1Bottom - rect2.y - - -- Determine which side was hit based on the smallest overlap - local smallestOverlap = math.min(overlapLeft, overlapRight, overlapTop, overlapBottom) - - if smallestOverlap == overlapLeft then - return "left" - elseif smallestOverlap == overlapRight then - return "right" - elseif smallestOverlap == overlapTop then - return "top" - elseif smallestOverlap == overlapBottom then - return "bottom" - end - end - - return nil -- No collision -end - -function _update() - if ((ctrl.touched(0) or ctrl.pressed(keys.space)) and not game.started) then - game.started = true - transition.start = true - end - - transition:update() - - player:update() - - for index, b in rpairs(balls) do - b:update() - end - - for index, b in rpairs(bricks) do - if b:update() then - table.remove(bricks, index) - end - end - - for index, b in rpairs(balls) do - if b:valid_move() then - b:reset() - game.lost = true - transition = new(EndIn) - end - end - - for index, p in rpairs(particles) do - if p:update() then - table.remove(particles, index) - end - end -end - -function _draw() - -- game - gfx.cls(13) - transition:draw_start() - - for b in all(bricks) do - spr.sdraw(b.x, b.y, 16, b.color * 8, 16, 8) - if b.hit then - shape.rectf(b.x, b.y, 16, 8, 8 + b.hit) - end - end - - for p in all(particles) do - p:draw() - end - - for b in all(balls) do - if b.glue_to then - local x = math.sign(b.speed.x) * 8 - local y = math.sign(b.speed.y) * 8 - - local centerX = b.x + 3 - local centerY = b.y + 2 - shape.line(centerX, centerY, centerX + x, centerY + y, 11) - end - spr.sdraw(b.x, b.y, 0, 16, 8, 8) - end - - player:draw() - - transition:draw_end() -end diff --git a/tiny-doc/src/docs/asciidoc/sample/test.mid b/tiny-doc/src/docs/asciidoc/sample/test.mid deleted file mode 100644 index 70b0366e..00000000 Binary files a/tiny-doc/src/docs/asciidoc/sample/test.mid and /dev/null differ diff --git a/tiny-doc/src/docs/asciidoc/sample/tiny-engine.js b/tiny-doc/src/docs/asciidoc/sample/tiny-engine.js deleted file mode 100644 index 44a887c9..00000000 --- a/tiny-doc/src/docs/asciidoc/sample/tiny-engine.js +++ /dev/null @@ -1,363 +0,0 @@ -import{i as P,I as fr,V as l,a as p,by as zr,ak as Mg,a8 as N,bz as yr,bA as na,b1 as lt,bB as Ht,bC as T,bD as Gs,bq as Ni,bE as C$,bF as x$,bG as N1,bk as sa,aS as Ot,bH as ae,ai as et,bI as ja,bJ as vr,bK as hr,ay as ar,w as j,j as E,m as V,bL as Pr,bM as Mr,bN as Vt,y as H,d as $,aJ as Br,bO as wa,bP as ot,W as gt,n as S,aX as Rt,ae as Kt,bQ as $t,aF as ze,s as Li,b as tn,g as $5,u as bt,bR as S$,bS as Tg,bT as ai,aI as De,bU as Vn,bV as z$,T as m,E as Pe,bW as q$,bX as Js,O as I$,bY as Ct,bZ as ga,L as yt,b_ as Fg,l as nr,o as Ar,D as F,b$ as $$,bn as Dg,c0 as ya,Q as ba,e as Ke,ah as er,c1 as A$,x as O,c2 as E$,f as Pg,c3 as Bm,c4 as N$,c5 as A5,N as Bg,c6 as Og,a3 as Wt,c7 as Rg,b4 as Ug,c8 as E5,t as Wr,c9 as en,c as or,bs as kt,ca as Be,br as ge,av as C,bv as xr,aQ as Tr,aP as Lr,b8 as _r,a$ as ji,cb as Om,aa as On,k as br,h as Je,bx as N5,cc as xt,cd as L$,aW as Ur,a_ as J,ce as Rm,cf as Um,cg as Km,ch as Gm,ci as Mi,cj as Ti,ck as j$,cl as L5,X as sd,cm as Kg,cn as Gg,co as Jg,cp as Wg,b9 as Hg,cq as M$,cr as Vg,cs as Jr,ct as Yg,ax as Z,cu as Ws,cv as ka,cw as qn,cx as ld,cy as j5,cz as In,cA as ud,cB as M5,cC as $n,cD as _d,cE as T5,cF as An,az as od,cG as Zg,cH as T$,cI as Xg,aA as Et,cJ as Qg,cK as lr,cL as ur,aY as oe,aC as ce,cM as Hs,cN as Vs,cO as ry,cP as F$,cQ as D$,cR as P$,cS as ty,aD as Ys,cT as ey,cU as Zs,cV as cd,cW as Xs,al as Qs,cX as B$,cY as F5,cZ as r1,c_ as Fi,c$ as hd,aO as wi,d0 as O$,d1 as ny,d2 as L1,b6 as ay,d3 as j1,d4 as M1,d5 as T1,d6 as fd,d7 as gi,d8 as R$,d9 as U$,da as F1,db as yi,dc as K$,dd as G$,de as D1,df as bi,dg as J$,dh as W$,di as P1,dj as ki,dk as H$,dl as V$,dm as B1,dn as Jm,dp as Wm,dq as Di,dr as Hm,ds as Y$,dt as Pi,du as Vm,dv as Ym,dw as Z$,dx as Bi,dy as Zm,dz as X$,aT as Oi,dA as Xm,dB as Q$,dC as Qm,dD as rw,dE as tw,dF as ew,dG as Ri,dH as D5,dI as t1,dJ as r7,dK as iy,dL as t7,dM as e7,dN as n7,dO as vd,dP as sy,dQ as a7,aN as i7,bw as Nr,dR as nw,dS as aw,dT as s7,ap as iw,dU as ye,aH as l7,bb as ly,dV as u7,ba as Ui,dW as Yt,dX as la,dY as ua,J as Ca,dZ as P5,d_ as pd,d$ as dd,e0 as md,aw as Nn,e1 as uy,e2 as _7,e3 as o7,e4 as c7,aj as at,e5 as h7,e6 as _y,e7 as f7,e8 as v7,e9 as nn,ea as B5,eb as O5,ec as p7,ed as e1,bi as xa,ee as d7,ef as oy,eg as m7,eh as w7,ei as g7,ej as cy,ek as y7,el as b7,em as k7,en as C7,eo as x7,ep as S7,ar as Rr,b3 as an,eq as sw,er as z7,_ as q7,es as I7,a9 as st,et as R5,eu as lw,aE as Xt,ev as U5,ew as $7,ex as Zt,ey as A7,ez as E7,p as n1,eA as Ma,eB as wd,eC as N7,bu as L7,eD as j7,bc as hy,bd as M7,eE as fy,eF as uw,eG as Fe,eH as T7,U as F7,eI as D7,eJ as _w,eK as P7,eL as B7,eM as gd,eN as O7,eO as vy,eP as R7,eQ as U7,eR as We,eS as Sa,eT as K7,eU as G7,eV as J7,eW as ow,eX as cw,eY as W7,eZ as H7,e_ as V7,e$ as Y7,f0 as Z7,f1 as X7,f2 as Q7,f3 as rA,ao as tA,an as hw,bl as eA,f4 as nA,f5 as ii}from"./chunks/kotlin-stdlib-BsT14tOD.js";import{a as yd,D as K5,l as bd,b as kd,f as aA,F as ie,d as fw,o as Ki,c as iA,e as py,g as He,h as sA,_ as lA,i as uA,j as _A}from"./chunks/kotlin-coroutines-Ds1_bjPT.js";import{T as kr,L as sr,C as g,O as pr,a as gr,b as a1,B as oA,c as cA,V as Qt,Z as dy,d as fn,e as Ft,M as hA,G as fA,P as vA,f as pA,g as dA,S as mA,h as wA,i as gA,j as yA}from"./chunks/lua-CGDbY_QJ.js";(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))t(n);new MutationObserver(n=>{for(const a of n)if(a.type==="childList")for(const s of a.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&t(s)}).observe(document,{childList:!0,subtree:!0});function r(n){const a={};return n.integrity&&(a.integrity=n.integrity),n.referrerPolicy&&(a.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?a.credentials="include":n.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function t(n){if(n.ep)return;n.ep=!0;const a=r(n);fetch(n.href,a)}})();var O1;function bA(){if(O1===l){class e{c4c(r,t){if(!r)throw fr().u3(t())}}P(e,"Assert"),O1=e}return O1}var sn;sn=new(bA());var si=Math.imul;function vw(e,i){var r=i[0]&255,t=i[1]&255,n=i[2]&255,a=i[3]&255;return r<<24|t<<16|n<<8|a}function pw(e,i){var r=x$(i,"#",""),t=N1(sa(r,0,2),16),n=N1(sa(r,2,4),16),a=N1(sa(r,4,6),16),s=255;return new Int8Array([Ot(t),Ot(n),Ot(a),Ot(s)])}function kA(e,i,r,t,n,a,s,u,_){var o=Mr(i),c=Mr(a),h=hr(Pr(o)&255),f=hr(Pr(c)&255),v=hr(vr(h)-vr(f)|0),d=Mr(i),y=Mr(a),b=hr(Pr(d)&255),w=hr(Pr(y)&255),x=hr(vr(b)-vr(w)|0),q=hr(si(vr(v),vr(x))),k=Mr(r),A=Mr(s),D=hr(Pr(k)&255),B=hr(Pr(A)&255),R=hr(vr(D)-vr(B)|0),W=Mr(r),G=Mr(s),Q=hr(Pr(W)&255),X=hr(Pr(G)&255),rr=hr(vr(Q)-vr(X)|0),tr=hr(si(vr(R),vr(rr))),ir=Mr(t),dr=Mr(u),cr=hr(Pr(ir)&255),mr=hr(Pr(dr)&255),Dr=hr(vr(cr)-vr(mr)|0),Ir=Mr(t),Or=Mr(u),Yr=hr(Pr(Ir)&255),Gr=hr(Pr(Or)&255),Er=hr(vr(Yr)-vr(Gr)|0),ft=hr(si(vr(Dr),vr(Er))),vt=Mr(n),jt=Mr(_),tt=hr(Pr(vt)&255),qt=hr(Pr(jt)&255),pt=hr(vr(tt)-vr(qt)|0),It=Mr(n),Mt=Mr(_),fe=hr(Pr(It)&255),Tt=hr(Pr(Mt)&255),Ee=hr(vr(fe)-vr(Tt)|0),ve=hr(si(vr(pt),vr(Ee))),Wn=hr(vr(q)+vr(tr)|0),Hn=hr(vr(Wn)+vr(ft)|0),Cn=hr(vr(Hn)+vr(ve)|0);return vr(Cn)}var R1;function CA(){if(R1===l){class e{constructor(){G5=this;var r=this;r.n4b_1=new Int8Array([0,0,0,0]),this.o4b_1=0}}ar(e),R1=e}return R1}var G5;function dw(){return G5===l&&new(CA()),G5}var U1;function xA(){if(U1===l){class e{constructor(r){this.p4b_1=r}hh(r,t){return this.p4b_1(r,t)}compare(r,t){return this.hh(r,t)}o3(){return this.p4b_1}equals(r){var t;if(r!=null&&j(r,ae())){var n;r!=null&&j(r,et())?n=E(this.o3(),r.o3()):n=!1,t=n}else t=!1;return t}hashCode(){return V(this.o3())}}p(e,"sam$kotlin_Comparator$0",l,l,[ae(),et()]),U1=e}return U1}function SA(e,i){var r=e.xd_1,t=i.xd_1;return ja(r,t)}var K1;function zA(){if(K1===l){class e{constructor(r){dw();var t=this;t.t4b_1=zr().va();for(var n=Mg(dw().n4b_1),a=N().d1(yr(r,10)),s=r.e1();s.f1();){var u=s.g1(),_=pw(this,u);a.c1(_)}for(var o=na(n,a),c=this,h=0,f=o.h1(),v=Array(f);h"The color is not a RGBA color as it has "+r.length+" components"),r[3]===0)return 0;for(var a=999999999,s=0,u=0,_=this.q4b_1,o=0,c=_.length;o0)){var d="The width needs to be a positive number.";throw H().u($(d))}if(!(this.b47_1>0)){var y="The height needs to be a positive number.";throw H().u($(y))}if(!(this.c47_1.h1()<256)){var b="The number of colors should be less than 256.";throw H().u($(b))}if(!(this.e47_1.h1()<=256)){var w="The number of spritesheets is limited to 256.";throw H().u($(w))}if(!(this.h47_1>0)){var x="The zoom needs to be a positive non null value.";throw H().u($(x))}this.m47_1=new(zA())(this.c47_1)}n47(){return this.m47_1}o47(r,t){var n=dt(this.j47_1.xd_1,this.h47_1),a=dt(this.j47_1.xd_1+this.a47_1|0,this.h47_1),s=dt(this.j47_1.yd_1,this.h47_1),u=dt(this.j47_1.yd_1+this.b47_1|0,this.h47_1),_,o=Br(r);if(!(n<=o&&o<=a))_=!0;else{var c=Br(t);_=!(s<=c&&c<=u)}if(_)return null;var h=r/this.h47_1-this.j47_1.xd_1,f=t/this.h47_1-this.j47_1.yd_1;return new(jn())(h,f)}toString(){return"GameOptions(width="+this.a47_1+", height="+this.b47_1+", palette="+$(this.c47_1)+", gameScripts="+$(this.d47_1)+", spriteSheets="+$(this.e47_1)+", gameLevels="+$(this.f47_1)+", sounds="+$(this.g47_1)+", zoom="+this.h47_1+", record="+this.i47_1+", gutter="+this.j47_1.toString()+", spriteSize="+this.k47_1.toString()+", hideMouseCursor="+this.l47_1+")"}hashCode(){var r=this.a47_1;return r=dt(r,31)+this.b47_1|0,r=dt(r,31)+V(this.c47_1)|0,r=dt(r,31)+V(this.d47_1)|0,r=dt(r,31)+V(this.e47_1)|0,r=dt(r,31)+V(this.f47_1)|0,r=dt(r,31)+V(this.g47_1)|0,r=dt(r,31)+this.h47_1|0,r=dt(r,31)+Vt(this.i47_1)|0,r=dt(r,31)+this.j47_1.hashCode()|0,r=dt(r,31)+this.k47_1.hashCode()|0,r=dt(r,31)+wa(this.l47_1)|0,r}equals(r){return this===r?!0:!(!(r instanceof my())||this.a47_1!==r.a47_1||this.b47_1!==r.b47_1||!E(this.c47_1,r.c47_1)||!E(this.d47_1,r.d47_1)||!E(this.e47_1,r.e47_1)||!E(this.f47_1,r.f47_1)||!E(this.g47_1,r.g47_1)||this.h47_1!==r.h47_1||!E(this.i47_1,r.i47_1)||!this.j47_1.equals(r.j47_1)||!this.k47_1.equals(r.k47_1)||this.l47_1!==r.l47_1)}}p(e,"GameOptions"),J1=e}return J1}var wy,gy,yy,mw;function Cd(){if(mw)return S;mw=!0,wy=new(Yn())("DEBUG",0),gy=new(Yn())("INFO",1),yy=new(Yn())("WARN",2),new(Yn())("ERROR",3),new(Yn())("NONE",4)}var W1;function Yn(){if(W1===l){class e extends Kt(){}p(e,"LogLevel"),W1=e}return W1}function H1(e,i,r,t,n){if(i.i3_1>=e.b4f_1.i3_1){var a;switch(i.i3_1){case 0:a="🧰";break;case 1:a="ℹ️";break;case 2:a="⚠️";break;case 3:a="💥";break;case 4:return S;default:gt();break}var s=a;Rt(s+" |- "+e.a4f_1+" -| - ["+r+"] : "+n())}}var V1;function IA(){if(V1===l){class e{constructor(r,t){t=t===l?ww():t,this.a4f_1=r,this.b4f_1=t}n45(r,t){H1(this,ww(),r,null,t)}g48(r,t){H1(this,$A(),r,null,t)}w45(r,t){H1(this,AA(),r,null,t)}}p(e,"StdOutLogger"),V1=e}return V1}function ww(){return Cd(),wy}function $A(){return Cd(),gy}function AA(){return Cd(),yy}var Dt=Math.imul,Y1;function Gi(){if(Y1===l){class e{constructor(r,t,n,a,s,u,_,o,c,h,f,v,d){s=s===l?0n:s,u=u===l?0:u,_=_===l?0:_,o=o===l?0n:o,c=c===l?0n:c,h=h===l?0n:h,f=f===l?0n:f,v=v===l?0n:v,d=d===l?0n:d,this.z45_1=r,this.a46_1=t,this.b46_1=n,this.c46_1=a,this.d46_1=s,this.e46_1=u,this.f46_1=_,this.g46_1=o,this.h46_1=c,this.i46_1=h,this.j46_1=f,this.k46_1=v,this.l46_1=d}toString(){return"PerformanceMetrics(frameTime="+this.z45_1+", fps="+this.a46_1+", memoryUsed="+this.b46_1.toString()+", memoryAllocated="+this.c46_1.toString()+", gcCount="+this.d46_1.toString()+", renderTime="+this.e46_1+", cpuTime="+this.f46_1+", drawCalls="+this.g46_1.toString()+", readPixels="+this.h46_1.toString()+", vertexCount="+this.i46_1.toString()+", drawBatchPrimitives="+this.j46_1.toString()+", drawBatchSprites="+this.k46_1.toString()+", drawOnScreen="+this.l46_1.toString()+")"}hashCode(){var r=Vt(this.z45_1);return r=Dt(r,31)+Vt(this.a46_1)|0,r=Dt(r,31)+$t(this.b46_1)|0,r=Dt(r,31)+$t(this.c46_1)|0,r=Dt(r,31)+$t(this.d46_1)|0,r=Dt(r,31)+Vt(this.e46_1)|0,r=Dt(r,31)+Vt(this.f46_1)|0,r=Dt(r,31)+$t(this.g46_1)|0,r=Dt(r,31)+$t(this.h46_1)|0,r=Dt(r,31)+$t(this.i46_1)|0,r=Dt(r,31)+$t(this.j46_1)|0,r=Dt(r,31)+$t(this.k46_1)|0,r=Dt(r,31)+$t(this.l46_1)|0,r}equals(r){return this===r?!0:!(!(r instanceof Gi())||!E(this.z45_1,r.z45_1)||!E(this.a46_1,r.a46_1)||this.b46_1!==r.b46_1||this.c46_1!==r.c46_1||this.d46_1!==r.d46_1||!E(this.e46_1,r.e46_1)||!E(this.f46_1,r.f46_1)||this.g46_1!==r.g46_1||this.h46_1!==r.h46_1||this.i46_1!==r.i46_1||this.j46_1!==r.j46_1||this.k46_1!==r.k46_1||this.l46_1!==r.l46_1)}}p(e,"PerformanceMetrics"),Y1=e}return Y1}var Z1;function EA(){if(Z1===l){class e{constructor(){this.m54_1=0n,this.n54_1=0n,this.o54_1=0n,this.p54_1=0n,this.q54_1=0n,this.r54_1=0n,this.s54_1=0n;var r=this;r.t54_1=N().p1(),this.u54_1=300;var t=this;t.v54_1=zr().va(),this.w54_1=!1}e45(r){this.w54_1=r,r&&this.b1h()}d45(){return this.w54_1}k43(){if(!this.d45())return S;this.m54_1=this.x54()}z46(){if(!this.d45())return new(Gi())(0,0,0n,0n);var r=this.x54(),t=ze(Li(r,this.m54_1)),n=t>0?1e3/t:0,a=this.y54(),s=this.z54(),u=this.a55(t,n,a,s,this.p54_1,this.q54_1,this.s54_1,this.r54_1);return this.t54_1.c1(u),this.t54_1.h1()>this.u54_1&&this.t54_1.w2(0),this.n54_1=r,this.o54_1=a,this.p54_1=0n,this.q54_1=0n,this.r54_1=0n,this.s54_1=0n,u}y44(r){if(!this.d45())return S;var t=this.v54_1,n=this.x54();t.f3(r,n)}b55(r){if(!this.d45())return S;var t=this.p54_1;this.p54_1=tn(t,$5());var n=this,a=this.q54_1;n.q54_1=tn(a,bt(r))}c55(){if(!this.d45())return S;var r=this.r54_1;this.r54_1=tn(r,$5())}b45(r){if(!this.d45())return 0;var t=this.v54_1.g3(r),n;if(t==null)return 0;n=t;var a=n;return ze(Li(this.x54(),a))}y45(r){if(!this.d45()||this.t54_1.m1())return null;var t=S$(this.t54_1,Tg(r,this.t54_1.h1()));if(t.m1())return null;for(var n=N().d1(yr(t,10)),a=t.e1();a.f1();){var s=a.g1(),u=s.z45_1;n.c1(u)}for(var _=ai(n),o=N().d1(yr(t,10)),c=t.e1();c.f1();){var h=c.g1(),f=h.a46_1;o.c1(f)}for(var v=ai(o),d=N().d1(yr(t,10)),y=t.e1();y.f1();){var b=y.g1(),w=b.b46_1;d.c1(w)}for(var x=De(Vn(d)),q=0n,k=t.e1();k.f1();){var A=k.g1(),D=q,B=A.c46_1;q=tn(D,B)}for(var R=q,W=0n,G=t.e1();G.f1();){var Q=G.g1(),X=W,rr=Q.d46_1;W=tn(X,rr)}for(var tr=W,ir=N().d1(yr(t,10)),dr=t.e1();dr.f1();){var cr=dr.g1(),mr=cr.e46_1;ir.c1(mr)}for(var Dr=ai(ir),Ir=N().d1(yr(t,10)),Or=t.e1();Or.f1();){var Yr=Or.g1(),Gr=Yr.f46_1;Ir.c1(Gr)}for(var Er=ai(Ir),ft=N().d1(yr(t,10)),vt=t.e1();vt.f1();){var jt=vt.g1(),tt=jt.g46_1;ft.c1(tt)}for(var qt=De(Vn(ft)),pt=N().d1(yr(t,10)),It=t.e1();It.f1();){var Mt=It.g1(),fe=Mt.i46_1;pt.c1(fe)}for(var Tt=De(Vn(pt)),Ee=N().d1(yr(t,10)),ve=t.e1();ve.f1();){var Wn=ve.g1(),Hn=Wn.h46_1;Ee.c1(Hn)}for(var Cn=De(Vn(Ee)),ti=N().d1(yr(t,10)),Ye=t.e1();Ye.f1();){var ei=Ye.g1(),ni=ei.l46_1;ti.c1(ni)}var E1=De(Vn(ti));return new(Gi())(_,v,x,R,tr,Dr,Er,qt,Cn,Tt,l,l,E1)}b1h(){this.t54_1.v2(),this.v54_1.v2(),this.o54_1=this.y54()}}p(e,"BasePerformanceMonitor"),Z1=e}return Z1}function NA(e){var i;try{var r=typeof window.performance.memory<"u";i=r!=null&&typeof r=="boolean"?r:m()}catch(n){var t;if(n instanceof Pe())t=!1;else throw n;i=t}return i}function LA(e){var i;try{i=!1}catch(t){var r;if(t instanceof Pe())r=!1;else throw t;i=r}return i}function jA(e){return e.m5s_1,0}function MA(e,i,r){return q$(i-r,0)}var X1;function by(){if(X1===l){class e extends EA(){constructor(){super(),this.i5s_1=window.performance,this.j5s_1=0,this.k5s_1=0n,this.l5s_1=!1,this.m5s_1=!1,this.l5s_1=NA(),this.m5s_1=LA(),this.l5s_1&&(this.k5s_1=this.y54()),this.j5s_1=this.i5s_1.now()}y54(){if(!this.d45()||!this.l5s_1)return 0n;var r=window.performance.memory,t=r==null?null:r.usedJSHeapSize,n=t==null?null:t.toLong();return n??0n}z54(){if(!this.d45()||!this.l5s_1)return 0n;var r=this.y54(),t=z$(Li(r,this.k5s_1),0n);return this.k5s_1=r,t}x54(){return De(this.i5s_1.now())}a55(r,t,n,a,s,u,_,o){var c=this.i5s_1.now(),h;this.j5s_1>0?h=c-this.j5s_1:h=r;var f=h;this.j5s_1=c;var v=jA(this),d=MA(this,f,v),y=f>0?1e3/f:t;return new(Gi())(f,y,n,a,0n,v,d,l,_,l,l,l,o)}}p(e,"WebGlPerformanceMonitor",by),X1=e}return X1}var ky,Cy,xy,Q1;function TA(){if(Q1===l){class e{y4e(r){switch(r){case 0:return s1();case 1:return Sd();case 2:return zd();default:return null}}}ar(e),Q1=e}return Q1}var i1;function J5(){return[s1(),Sd(),zd()]}function En(){return rl==null&&(rl=Js(J5())),rl}var gw;function xd(){if(gw)return S;gw=!0,ky=new(el())("TOUCH1",0),Cy=new(el())("TOUCH2",1),xy=new(el())("TOUCH3",2)}var rl,tl;function el(){if(tl===l){class e extends Kt(){}p(e,"TouchSignal"),tl=e}return tl}function s1(){return xd(),ky}function Sd(){return xd(),Cy}function zd(){return xd(),xy}i1=new(TA());var nl;function Ta(){if(nl===l){class e{constructor(r,t){I$(this,t),this.s4d_1=r;var n=this;n.t4d_1=N().p1()}u4d(){if(this.t4d_1.m1()){var r=Ct(0,this.s4d_1),t=r.v1_1,n=r.w1_1;if(t<=n)do{var a=t;t=t+1|0,this.v4d(this.l4d())}while(a!==n)}var s=this.t4d_1.l1(this.t4d_1.h1()-1|0);return this.t4d_1.w2(this.t4d_1.h1()-1|0),s}v4d(r){this.r4d(r),this.t4d_1.c1(r)}w4d(r){for(var t=r.e1();t.f1();){var n=t.g1();this.r4d(n)}ga(this.t4d_1,r)}}p(e,"ObjectPool"),nl=e}return nl}var Sy,zy,qy,yw;function qd(){if(yw)return S;yw=!0,Sy=new(il())("UP",0),zy=new(il())("DOWN",1),qy=new(il())("MOVE",2)}var al;function il(){if(al===l){class e extends Kt(){}p(e,"InternalTouchEventWay"),al=e}return al}function bw(){return qd(),Sy}function W5(){return qd(),zy}function FA(){return qd(),qy}var sl;function H5(){if(sl===l){class e{constructor(r,t,n,a){r=r===l?null:r,t=t===l?s1():t,n=n===l?new(jn())(0,0):n,a=a===l?W5():a,this.n4d_1=r,this.o4d_1=t,this.p4d_1=n,this.q4d_1=a}x4e(){return this.n4d_1==null}}p(e,"InternalTouchEvent",H5),sl=e}return sl}var ll;function DA(){if(ll===l){class e extends Ta(){constructor(r,t){t===l&&(t={}),t.k4d_1=r,super(10,t)}l4d(){return new(H5())}m4d(r){r.n4d_1=null}r4d(r){return this.m4d(r instanceof H5()?r:m())}}p(e,"InternalTouchEventObjectPool"),ll=e}return ll}function PA(e,i,r){return e.z4d_1[r.i3_1]=i,r}function BA(e,i){var r=nr(i.n4d_1);switch(i.q4d_1.i3_1){case 1:e.c4e_1[r]||(e.c4e_1[r]=!0,e.d4e_1[r]=!0,e.e4e_1.c1(r),e.g4e_1=!0,e.f4e_1=e.f4e_1+1|0);break;case 0:e.c4e_1[r]=!1,e.f4e_1=e.f4e_1-1|0;break;case 2:throw H().u(""+i.n4d_1+" is not supposed to move.");default:gt();break}}function OA(e,i){switch(i.q4d_1.i3_1){case 1:e.b4e_1[i.o4d_1.i3_1]=i.p4d_1.l4e(),e.a4e_1[i.o4d_1.i3_1]=i.p4d_1.l4e(),e.y4d_1.m4e(i.p4d_1);break;case 2:e.y4d_1.m4e(i.p4d_1);break;case 0:e.a4e_1[i.o4d_1.i3_1]=null;break;default:gt();break}}var ul;function RA(){if(ul===l){class e{constructor(r){var t=this,n=En();t.x4d_1=lt(n),this.y4d_1=new(jn())(0,0);for(var a=this,s=0,u=En().h1(),_=Array(u);s{var t=e;return L8(t,r),S};return i.callableName="keyDown",i}function T8(e){var i=r=>{var t=e;return j8(t,r),S};return i.callableName="keyUp",i}function F8(e){var i=r=>{var t=e;return A8(t,r),S};return i.callableName="touchStart",i}function D8(e){var i=r=>{var t=e;return E8(t,r),S};return i.callableName="touchEnd",i}function P8(e){var i=r=>{var t=e;return N8(t,r),S};return i.callableName="touchMove",i}function B8(e){var i=r=>{var t=e;return S8(t,r),S};return i.callableName="mouseDown",i}function O8(e){var i=r=>{var t=e;return z8(t,r),S};return i.callableName="mouseUp",i}function R8(e){var i=r=>{var t=e;return q8(t,r),S};return i.callableName="mouseMove",i}function U8(e){var i=r=>{var t=e;return I8(t),S};return i.callableName="mouseLeave",i}function K8(e){var i=r=>{var t=e;return $8(t),S};return i.callableName="mouseEnter",i}var hl;function G8(){if(hl===l){class e{constructor(r,t){this.j5r_1=r,this.k5r_1=t,this.j5r_1.addEventListener("keydown",M8(this),!1),this.j5r_1.addEventListener("keyup",T8(this),!1),this.j5r_1.addEventListener("touchstart",F8(this),!1),this.j5r_1.addEventListener("touchend",D8(this),!1),this.j5r_1.addEventListener("touchmove",P8(this),!1),this.j5r_1.addEventListener("mousedown",B8(this),!1),this.j5r_1.addEventListener("mouseup",O8(this),!1),this.j5r_1.addEventListener("mousemove",R8(this),!1),this.j5r_1.addEventListener("mouseleave",U8(this),!1),this.j5r_1.addEventListener("mouseenter",K8(this),!1),this.l5r_1=1,this.m5r_1=16,this.n5r_1=256;var n=this;n.o5r_1=[this.l5r_1,this.m5r_1,this.n5r_1],this.p5r_1=$$([s1(),Sd(),zd()]),this.q5r_1=new(RA())(257),this.r5r_1=!1,this.s5r_1=new(jn())(0,0),this.t5r_1=null}c4d(r){var t;return r.equals(V5())?t=this.q5r_1.g4e_1:t=this.q5r_1.t4e(kw(r)),t}d4d(r){var t;return r.equals(V5())?t=this.q5r_1.n4e():t=this.q5r_1.s4e(kw(r)),t}e4d(r){return this.q5r_1.e4d(r)}f4d(r){return this.q5r_1.f4d(r)}g4d(){return this.s5r_1}a45(){return S}b1h(){this.q5r_1.w4e()}h4d(r){this.j5r_1.addEventListener("onClick",t=>(r(),S),!1),this.t5r_1=r}}F(e).g45=C8,p(e,"JsInputHandler",l,l,[x8()]),hl=e}return hl}var fl;function J8(){if(fl===l){class e{constructor(r,t,n,a,s,u){s=s===l?n/r|0:s,u=u===l?a/t|0:u,this.g54_1=r,this.h54_1=t,this.i54_1=n,this.j54_1=a,this.k54_1=s,this.l54_1=u}}p(e,"WindowManager"),fl=e}return fl}var vl;function W8(){if(vl===l){class e{constructor(r){this.fs_1=r}gs(r){return this.fs_1.createShader(r)}hs(r,t){return this.fs_1.shaderSource(r,t)}is(r){return this.fs_1.compileShader(r)}js(r){return this.fs_1.deleteShader(r)}ks(r,t){var n=nr(this.fs_1.getShaderParameter(r,t));return typeof n=="boolean"?n?1:0:typeof n=="number"?n:m()}ls(r){return this.fs_1.getProgramInfoLog(r)}ms(r){return this.fs_1.getShaderInfoLog(r)}ns(r,t){var n=nr(this.fs_1.getProgramParameter(r,t));return typeof n=="boolean"?n?1:0:typeof n=="number"?n:m()}os(){return this.fs_1.createProgram()}ps(r,t){var n=r;return this.fs_1.attachShader(n,t)}qs(r){return this.fs_1.linkProgram(r)}rs(r){return this.fs_1.useProgram(r)}ss(r,t){return this.fs_1.getUniformLocation(r,t)}ts(r,t){return this.fs_1.getAttribLocation(r,t)}us(r){return this.fs_1.enableVertexAttribArray(r)}vs(r){return this.fs_1.disableVertexAttribArray(r)}ws(r){return this.fs_1.enable(r)}xs(r){return this.fs_1.disable(r)}ys(){var r=this.fs_1.createBuffer(),t;if(r==null)throw Pe().sc();return t=r,t}zs(r,t){return this.fs_1.bindBuffer(r,t)}at(r,t,n,a){this.fs_1.bufferData(r,t.as(),a)}bt(r,t,n,a,s,u){return this.fs_1.vertexAttribPointer(r,t,n,a,s,u)}ct(r,t){return this.fs_1.uniform1i(r,t)}dt(r,t,n){return this.fs_1.uniform2f(r,t,n)}et(r,t,n){return this.fs_1.uniform2i(r,t,n)}ft(r,t,n,a){return this.fs_1.uniform3i(r,t,n,a)}gt(r,t,n,a){return this.fs_1.viewport(r,t,n,a)}ht(r){return this.fs_1.clear(r)}it(r,t,n,a){return this.fs_1.clearColor(r,t,n,a)}jt(r,t){return this.fs_1.blendFunc(r,t)}kt(){var r=this.fs_1.createTexture(),t;if(r==null)throw Pe().sc();return t=r,t}lt(r,t,n,a,s,u,_,o,c){this.fs_1.texImage2D(r,t,n,a,s,u,_,o,c==null?null:c.as())}mt(r){return this.fs_1.activeTexture(r)}nt(r,t){return this.fs_1.bindTexture(r,t)}ot(r,t,n){return this.fs_1.texParameteri(r,t,n)}pt(){var r=this.fs_1.createVertexArray(),t;if(r==null)throw Pe().sc();return t=r,t}qt(r){return this.fs_1.bindVertexArray(r)}rt(r,t,n){return this.fs_1.drawArrays(r,t,n)}st(r,t,n,a){return this.fs_1.drawArraysInstanced(r,t,n,a)}tt(r,t){return this.fs_1.vertexAttribDivisor(r,t)}ut(r,t){return this.fs_1.pixelStorei(r,t)}vt(r,t,n,a){return this.fs_1.blendFuncSeparate(r,t,n,a)}wt(r){this.fs_1.stencilMask(r)}xt(r,t,n,a){this.fs_1.colorMask(r,t,n,a)}yt(r,t,n){this.fs_1.stencilOp(r,t,n)}zt(r,t,n){this.fs_1.stencilFunc(r,t,n)}au(r,t){return this.fs_1.bindFramebuffer(r,t)}bu(){var r=this.fs_1.createFramebuffer(),t;if(r==null)throw Pe().sc();return t=r,t}cu(r){return this.fs_1.checkFramebufferStatus(r)}du(r,t,n,a,s){return this.fs_1.framebufferTexture2D(r,t,n,a,s)}eu(r,t){return this.fs_1.bindRenderbuffer(r,t)}fu(){var r=this.fs_1.createRenderbuffer(),t;if(r==null)throw Pe().sc();return t=r,t}gu(r,t,n,a){return this.fs_1.framebufferRenderbuffer(r,t,n,a)}hu(r,t,n,a){return this.fs_1.renderbufferStorage(r,t,n,a)}iu(r,t,n,a,s,u,_){this.fs_1.readPixels(r,t,n,a,s,u,_.as())}ju(r){return this.fs_1.depthFunc(r)}}p(e,"KglJs"),vl=e}return vl}function Db(){return!1}var pl;function l1(){if(pl===l){class e{}Ar(e,"SourceStream",l,l,l,[0]),pl=e}return pl}function H8(e,i){return new Int8Array(i)}var dl;function V8(){if(dl===l){class e{constructor(r){this.e5r_1=r}d4a(r){var t=ya().zb(ba(r)),n=t,a=new XMLHttpRequest;return a.responseType="arraybuffer",a.open("GET",this.e5r_1,!0),a.onload=s=>{if(a.readyState===4&&a.status===200){var u=a.response,_=u instanceof ArrayBuffer?u:m(),o=H8(this,_),c=Ke(o);n.ib(c)}return S},a.send(),t.ac()}c4a(r){var t=ya().zb(ba(r)),n=t,a=new XMLHttpRequest;return a.responseType="arraybuffer",a.open("HEAD",this.e5r_1,!0),a.onload=s=>{var u=a.status===200,_=Ke(u);return n.ib(_),S},a.send(),t.ac()}}F(e).f4a=Db,p(e,"AjaxStream",l,l,[l1()],[0]),dl=e}return dl}var ml;function Y8(){if(ml===l){class e{constructor(r,t,n){this.y53_1=r,this.z53_1=t,this.a54_1=n}}p(e,"ImageData"),ml=e}return ml}var wl;function Z8(){if(wl===l){class e{constructor(r,t,n,a){a=a===l?ot():a,this.y4v_1=r,this.z4v_1=t,this.a4w_1=n,this.b4w_1=a}}p(e,"SoundData"),wl=e}return wl}function X8(){return S}function Q8(){return S}function r9(e,i,r){return i=i===l?!0:i,r===l?this.b54(e,i):r.b54.call(this,e,i)}function t9(e,i,r){return i=i===l?!0:i,r===l?this.d54(e,i):r.d54.call(this,e,i)}var gl;function e9(){if(gl===l){class e{}Ar(e,"Platform"),gl=e}return gl}function*n9(e,i){var r=ya().zb(ba(i)),t=new Image;t.addEventListener("load",new(a9())(t,r)),t.src=e.f5r_1;var n=r.ac(),a=A$(n);return a===O()&&(a=yield a),a}var yl;function a9(){if(yl===l){class e{constructor(r,t){this.g5r_1=r,this.h5r_1=t}i5r(r){var t=document.createElement("canvas"),n=t instanceof HTMLCanvasElement?t:m(),a=n.getContext("2d"),s=a instanceof CanvasRenderingContext2D?a:m();n.width=this.g5r_1.width,n.height=this.g5r_1.height,s.drawImage(this.g5r_1,0,0);var u=s.getImageData(0,0,this.g5r_1.width,this.g5r_1.height),_=new Int8Array(u.data.buffer),o=new(Y8())(_,this.g5r_1.width,this.g5r_1.height),c=Ke(o);this.h5r_1.ib(c)}handleEvent(r){return this.i5r(r)}}p(e),yl=e}return yl}var bl;function i9(){if(bl===l){class e{constructor(r){this.f5r_1=r}c4a(r){var t=ya().zb(ba(r)),n=t,a=new XMLHttpRequest;return a.responseType="arraybuffer",a.open("HEAD",this.f5r_1,!0),a.onload=s=>{var u=a.status===200,_=Ke(u);return n.ib(_),S},a.send(),t.ac()}d4a(r){return er(n9.bind(l,this),r)}}F(e).f4a=Db,p(e,"ImageDataStream",l,l,[l1()],[0]),bl=e}return bl}const s9=()=>{class e{constructor(r){this.url=r}}return new e(new URL(""+new URL("assets/SynthesizerAudioWorklet__generated__worklet__module-CfRbTLAr.js",import.meta.url).href,import.meta.url),{type:"module"}).url};function l9(){return Bb(),Pb}var Pb;function u9(e){Bb();var i=E$("Kotlin raw error wrapper. Please check 'cause' for the original error");return i.name=l9(),Reflect.set(i,"cause",e),i}var xw;function Bb(){xw||(xw=!0,Pb="KotlinRawErrorWrapper")}function _9(e){var i=e,r=i instanceof Error?i:null;return r??u9(e)}function o9(e,i){var r=t=>{var n=i,a=Ke(t);return n.ib(a),null};e.then(r,t=>{var n=i,a=_9(t),s=Ke(Pg(a));return n.ib(s),null})}function c9(e,i){var r=ya().zb(ba(i));return o9(e,r),r.ac()}var kl;function h9(){if(kl===l){class e{constructor(r){this.r5q_1=r}o4u(r){var t=this.r5q_1.f4b(r);return this.r5q_1.s5q(t)}f4b(r){var t=this.r5q_1.f4b(r);return t}e4u(r,t){this.r5q_1.e4u(r,t)}f4u(r){this.r5q_1.f4u(r)}}p(e,"DefaultSoundBoard"),kl=e}return kl}function f9(e,i,r,t,n){if(i==null)return new Float32Array([]);if(r.m1())return new Float32Array([]);for(var a=60/t,s=new Float32Array([]),u=r.e1();u.f1();){var _=u.g1(),o=_.b4s_1,c=o??i,h=_.y4r_1*a+c.k4s_1,f=h*44100,v=Bm(f),d=N$(c.l4s_1),y=1/Math.max(1,d),b=new Float32Array(v),w=_.w4r_1,x=w==null?null:w.s4q_1,q=x??0,k=0;if(ks.length&&(s=A5(s,Yr));var Gr=0,Er=Ir;if(Erthis.x5q_1?!1:this.y5q_1.i1(r)}i1(r){return this.a5r(r)}v2(){return this.y5q_1.v2()}l1(r){return this.y5q_1.l1(r)}m1(){return this.y5q_1.m1()}e1(){return this.y5q_1.e1()}n1(r){return this.y5q_1.n1(r)}w2(r){return this.y5q_1.w2(r)}b5r(r,t){return this.y5q_1.r1(r,t)}r1(r,t){return this.b5r(r,t==null||t!=null?t:m())}c5r(r){return this.y5q_1.f2(r)}f2(r){return this.c5r(r)}d5r(r){return this.y5q_1.s2(r)}s2(r){return r==null||r!=null?this.d5r(r==null||r!=null?r:m()):-1}}p(e,"MutableFixedSizeList",l,l,[Bg()]),Sl=e}return Sl}var zl;function y9(){if(zl===l){class e{constructor(r){this.p4q_1=r}hh(r,t){return this.p4q_1(r,t)}compare(r,t){return this.hh(r,t)}o3(){return this.p4q_1}equals(r){var t;if(r!=null&&j(r,ae())){var n;r!=null&&j(r,et())?n=E(this.o3(),r.o3()):n=!1,t=n}else t=!1;return t}hashCode(){return V(this.o3())}}p(e,"sam$kotlin_Comparator$0",l,l,[ae(),et()]),zl=e}return zl}function b9(e,i){var r=e.t4q_1,t=i.t4q_1;return ja(r,t)}var Ob,Rb,Ub,Kb,Gb,Jb,Wb,Hb,Vb,Yb,Zb,Xb,Qb,rk,tk,ek,nk,ak,ik,sk,lk,uk,_k,ok,ck,hk,fk,vk,pk,dk,mk,wk,gk,yk,bk,kk,Ck,xk,Sk,zk,qk,Ik,$k,Ak,Ek,Nk,Lk,jk,Mk,Tk,Fk,Dk,Pk,Bk,Ok,Rk,Uk,Kk,Gk,Jk,Wk,Hk,Vk,Yk,Zk,Xk,Qk,rC,tC,eC,nC,aC,iC,sC,lC,uC,_C,oC,cC,hC,fC,vC,pC,dC,mC,wC,gC,yC,bC,kC,CC,xC,SC,zC,qC,IC,$C,AC,EC,NC,LC,jC,MC,TC,FC,DC,PC,BC,OC,RC,UC,KC,GC,JC,WC,HC,VC,YC,ZC,XC,QC,r6,t6,e6,n6,a6,i6,s6,l6,u6,_6,o6,c6,h6,f6,v6,p6,d6,m6,w6,g6,y6,b6,k6,C6,x6,S6,z6,q6,I6,$6,A6,E6,ql;function k9(){if(ql===l){class e{constructor(){Y5=this;for(var r=this,t=L6(),n=lt(t),a=Wt().u8(),s=N().p1(),u=0,_=n.length;u<_;){var o=n[u];u=u+1|0;var c=o.t4q_1;a.c1(c)&&s.c1(o)}var h=b9,f=new(y9())(h),v=Gs(s,f);r.v4q_1=lt(v)}w4q(r){return this.v4q_1[r]}x4q(r){return C9(r)}}ar(e),ql=e}return ql}var Y5;function qe(){return z(),Y5===l&&new(k9()),Y5}function N6(){return[u1(),j6(),M6(),T6(),F6(),D6(),P6(),B6(),O6(),R6(),U6(),K6(),G6(),J6(),W6(),H6(),V6(),Y6(),Z6(),X6(),Q6(),rx(),tx(),ex(),nx(),ax(),ix(),sx(),lx(),ux(),_x(),ox(),cx(),hx(),fx(),vx(),px(),dx(),mx(),wx(),gx(),yx(),bx(),kx(),Cx(),xx(),Sx(),zx(),qx(),Ix(),$x(),Ax(),Ex(),Nx(),Lx(),jx(),Mx(),Tx(),Fx(),Dx(),Px(),Bx(),Ox(),Rx(),Ux(),Kx(),Gx(),Jx(),Wx(),Hx(),Vx(),Yx(),Zx(),Xx(),Qx(),rS(),tS(),eS(),nS(),aS(),iS(),sS(),lS(),uS(),_S(),$d(),oS(),cS(),hS(),fS(),vS(),pS(),dS(),mS(),wS(),gS(),yS(),bS(),za(),kS(),CS(),xS(),SS(),zS(),qS(),IS(),$S(),AS(),ES(),NS(),LS(),jS(),MS(),TS(),FS(),DS(),PS(),BS(),OS(),RS(),US(),KS(),GS(),JS(),WS(),HS(),VS(),YS(),ZS(),XS(),QS(),rz(),tz(),ez(),nz(),az(),iz(),sz(),lz(),uz(),_z(),oz(),cz(),hz(),fz(),vz(),pz(),dz(),mz(),wz(),gz(),yz(),Ad()]}function C9(e){switch(e){case"C0":return u1();case"Cs0":return j6();case"Db0":return M6();case"D0":return T6();case"Ds0":return F6();case"Eb0":return D6();case"E0":return P6();case"F0":return B6();case"Fs0":return O6();case"Gb0":return R6();case"G0":return U6();case"Gs0":return K6();case"Ab0":return G6();case"A0":return J6();case"As0":return W6();case"Bb0":return H6();case"B0":return V6();case"C1":return Y6();case"Cs1":return Z6();case"Db1":return X6();case"D1":return Q6();case"Ds1":return rx();case"Eb1":return tx();case"E1":return ex();case"F1":return nx();case"Fs1":return ax();case"Gb1":return ix();case"G1":return sx();case"Gs1":return lx();case"Ab1":return ux();case"A1":return _x();case"As1":return ox();case"Bb1":return cx();case"B1":return hx();case"C2":return fx();case"Cs2":return vx();case"Db2":return px();case"D2":return dx();case"Ds2":return mx();case"Eb2":return wx();case"E2":return gx();case"F2":return yx();case"Fs2":return bx();case"Gb2":return kx();case"G2":return Cx();case"Gs2":return xx();case"Ab2":return Sx();case"A2":return zx();case"As2":return qx();case"Bb2":return Ix();case"B2":return $x();case"C3":return Ax();case"Cs3":return Ex();case"Db3":return Nx();case"D3":return Lx();case"Ds3":return jx();case"Eb3":return Mx();case"E3":return Tx();case"F3":return Fx();case"Fs3":return Dx();case"Gb3":return Px();case"G3":return Bx();case"Gs3":return Ox();case"Ab3":return Rx();case"A3":return Ux();case"As3":return Kx();case"Bb3":return Gx();case"B3":return Jx();case"C4":return Wx();case"Cs4":return Hx();case"Db4":return Vx();case"D4":return Yx();case"Ds4":return Zx();case"Eb4":return Xx();case"E4":return Qx();case"F4":return rS();case"Fs4":return tS();case"Gb4":return eS();case"G4":return nS();case"Gs4":return aS();case"Ab4":return iS();case"A4":return sS();case"As4":return lS();case"Bb4":return uS();case"B4":return _S();case"C5":return $d();case"Cs5":return oS();case"Db5":return cS();case"D5":return hS();case"Ds5":return fS();case"Eb5":return vS();case"E5":return pS();case"F5":return dS();case"Fs5":return mS();case"Gb5":return wS();case"G5":return gS();case"Gs5":return yS();case"Ab5":return bS();case"A5":return za();case"As5":return kS();case"Bb5":return CS();case"B5":return xS();case"C6":return SS();case"Cs6":return zS();case"Db6":return qS();case"D6":return IS();case"Ds6":return $S();case"Eb6":return AS();case"E6":return ES();case"F6":return NS();case"Fs6":return LS();case"Gb6":return jS();case"G6":return MS();case"Gs6":return TS();case"Ab6":return FS();case"A6":return DS();case"As6":return PS();case"Bb6":return BS();case"B6":return OS();case"C7":return RS();case"Cs7":return US();case"Db7":return KS();case"D7":return GS();case"Ds7":return JS();case"Eb7":return WS();case"E7":return HS();case"F7":return VS();case"Fs7":return YS();case"Gb7":return ZS();case"G7":return XS();case"Gs7":return QS();case"Ab7":return rz();case"A7":return tz();case"As7":return ez();case"Bb7":return nz();case"B7":return az();case"C8":return iz();case"Cs8":return sz();case"Db8":return lz();case"D8":return uz();case"Ds8":return _z();case"Eb8":return oz();case"E8":return cz();case"F8":return hz();case"Fs8":return fz();case"Gb8":return vz();case"G8":return pz();case"Gs8":return dz();case"Ab8":return mz();case"A8":return wz();case"As8":return gz();case"Bb8":return yz();case"B8":return Ad();default:z(),Rg("No enum constant com.github.minigdx.tiny.lua.Note."+e);break}}function L6(){return Il==null&&(Il=Js(N6())),Il}var Sw;function z(){if(Sw)return S;Sw=!0,Ob=new(I())("C0",0,16.35,1),Rb=new(I())("Cs0",1,17.32,2),Ub=new(I())("Db0",2,17.32,2),Kb=new(I())("D0",3,18.35,3),Gb=new(I())("Ds0",4,19.45,4),Jb=new(I())("Eb0",5,19.45,4),Wb=new(I())("E0",6,20.6,5),Hb=new(I())("F0",7,21.83,6),Vb=new(I())("Fs0",8,23.12,7),Yb=new(I())("Gb0",9,23.12,7),Zb=new(I())("G0",10,24.5,8),Xb=new(I())("Gs0",11,25.96,9),Qb=new(I())("Ab0",12,25.96,9),rk=new(I())("A0",13,27.5,10),tk=new(I())("As0",14,29.14,11),ek=new(I())("Bb0",15,29.14,11),nk=new(I())("B0",16,30.87,12),ak=new(I())("C1",17,32.7,13),ik=new(I())("Cs1",18,34.65,14),sk=new(I())("Db1",19,34.65,14),lk=new(I())("D1",20,36.71,15),uk=new(I())("Ds1",21,38.89,16),_k=new(I())("Eb1",22,38.89,16),ok=new(I())("E1",23,41.2,17),ck=new(I())("F1",24,43.65,18),hk=new(I())("Fs1",25,46.25,19),fk=new(I())("Gb1",26,46.25,19),vk=new(I())("G1",27,49,20),pk=new(I())("Gs1",28,51.91,21),dk=new(I())("Ab1",29,51.91,21),mk=new(I())("A1",30,55,22),wk=new(I())("As1",31,58.27,23),gk=new(I())("Bb1",32,58.27,23),yk=new(I())("B1",33,61.74,24),bk=new(I())("C2",34,65.41,25),kk=new(I())("Cs2",35,69.3,26),Ck=new(I())("Db2",36,69.3,26),xk=new(I())("D2",37,73.42,27),Sk=new(I())("Ds2",38,77.78,28),zk=new(I())("Eb2",39,77.78,28),qk=new(I())("E2",40,82.41,29),Ik=new(I())("F2",41,87.31,30),$k=new(I())("Fs2",42,92.5,31),Ak=new(I())("Gb2",43,92.5,31),Ek=new(I())("G2",44,98,32),Nk=new(I())("Gs2",45,103.83,33),Lk=new(I())("Ab2",46,103.83,33),jk=new(I())("A2",47,110,34),Mk=new(I())("As2",48,116.54,35),Tk=new(I())("Bb2",49,116.54,35),Fk=new(I())("B2",50,123.47,36),Dk=new(I())("C3",51,130.81,37),Pk=new(I())("Cs3",52,138.59,38),Bk=new(I())("Db3",53,138.59,38),Ok=new(I())("D3",54,146.83,39),Rk=new(I())("Ds3",55,155.56,40),Uk=new(I())("Eb3",56,155.56,40),Kk=new(I())("E3",57,164.81,41),Gk=new(I())("F3",58,174.61,42),Jk=new(I())("Fs3",59,185,43),Wk=new(I())("Gb3",60,185,43),Hk=new(I())("G3",61,196,44),Vk=new(I())("Gs3",62,207.65,45),Yk=new(I())("Ab3",63,207.65,45),Zk=new(I())("A3",64,220,46),Xk=new(I())("As3",65,233.08,47),Qk=new(I())("Bb3",66,233.08,47),rC=new(I())("B3",67,246.94,48),tC=new(I())("C4",68,261.63,49),eC=new(I())("Cs4",69,277.18,50),nC=new(I())("Db4",70,277.18,50),aC=new(I())("D4",71,293.66,51),iC=new(I())("Ds4",72,311.13,52),sC=new(I())("Eb4",73,311.13,52),lC=new(I())("E4",74,329.63,53),uC=new(I())("F4",75,349.23,54),_C=new(I())("Fs4",76,369.99,55),oC=new(I())("Gb4",77,369.99,55),cC=new(I())("G4",78,392,56),hC=new(I())("Gs4",79,415.3,57),fC=new(I())("Ab4",80,415.3,57),vC=new(I())("A4",81,440,58),pC=new(I())("As4",82,466.16,59),dC=new(I())("Bb4",83,466.16,59),mC=new(I())("B4",84,493.88,60),wC=new(I())("C5",85,523.25,61),gC=new(I())("Cs5",86,554.37,62),yC=new(I())("Db5",87,554.37,62),bC=new(I())("D5",88,587.33,63),kC=new(I())("Ds5",89,622.25,64),CC=new(I())("Eb5",90,622.25,64),xC=new(I())("E5",91,659.26,65),SC=new(I())("F5",92,698.46,66),zC=new(I())("Fs5",93,739.99,67),qC=new(I())("Gb5",94,739.99,67),IC=new(I())("G5",95,783.99,68),$C=new(I())("Gs5",96,830.61,69),AC=new(I())("Ab5",97,830.61,69),EC=new(I())("A5",98,880,70),NC=new(I())("As5",99,932.33,71),LC=new(I())("Bb5",100,932.33,71),jC=new(I())("B5",101,987.77,72),MC=new(I())("C6",102,1046.5,73),TC=new(I())("Cs6",103,1108.73,74),FC=new(I())("Db6",104,1108.73,74),DC=new(I())("D6",105,1174.66,75),PC=new(I())("Ds6",106,1244.51,76),BC=new(I())("Eb6",107,1244.51,76),OC=new(I())("E6",108,1318.51,77),RC=new(I())("F6",109,1396.91,78),UC=new(I())("Fs6",110,1479.98,79),KC=new(I())("Gb6",111,1479.98,79),GC=new(I())("G6",112,1567.98,80),JC=new(I())("Gs6",113,1661.22,81),WC=new(I())("Ab6",114,1661.22,81),HC=new(I())("A6",115,1760,82),VC=new(I())("As6",116,1864.66,83),YC=new(I())("Bb6",117,1864.66,83),ZC=new(I())("B6",118,1975.53,84),XC=new(I())("C7",119,2093,85),QC=new(I())("Cs7",120,2217.46,86),r6=new(I())("Db7",121,2217.46,86),t6=new(I())("D7",122,2349.32,87),e6=new(I())("Ds7",123,2489.02,88),n6=new(I())("Eb7",124,2489.02,88),a6=new(I())("E7",125,2637.02,89),i6=new(I())("F7",126,2793.83,90),s6=new(I())("Fs7",127,2959.96,91),l6=new(I())("Gb7",128,2959.96,91),u6=new(I())("G7",129,3135.96,92),_6=new(I())("Gs7",130,3322.44,93),o6=new(I())("Ab7",131,3322.44,93),c6=new(I())("A7",132,3520,94),h6=new(I())("As7",133,3729.31,95),f6=new(I())("Bb7",134,3729.31,95),v6=new(I())("B7",135,3951.07,96),p6=new(I())("C8",136,4186.01,97),d6=new(I())("Cs8",137,4434.92,98),m6=new(I())("Db8",138,4434.92,98),w6=new(I())("D8",139,4698.63,99),g6=new(I())("Ds8",140,4978.03,100),y6=new(I())("Eb8",141,4978.03,100),b6=new(I())("E8",142,5274.04,101),k6=new(I())("F8",143,5587.65,102),C6=new(I())("Fs8",144,5919.91,103),x6=new(I())("Gb8",145,5919.91,103),S6=new(I())("G8",146,6271.93,104),z6=new(I())("Gs8",147,6644.88,105),q6=new(I())("Ab8",148,6644.88,105),I6=new(I())("A8",149,7040,106),$6=new(I())("As8",150,7458.62,107),A6=new(I())("Bb8",151,7458.62,107),E6=new(I())("B8",152,7902.13,108),qe()}var Il,$l;function I(){if($l===l){class e extends Kt(){constructor(r,t,n,a){super(r,t),this.s4q_1=n,this.t4q_1=a,this.u4q_1=Og(this.h3_1,1)}y4q(){var r=(this.t4q_1-1|0)%12|0,t=((this.t4q_1-1|0)-r|0)/12|0;return t}}p(e,"Note"),$l=e}return $l}var Al;function x9(){if(Al===l){class e extends pr(){static c4r(r,t){return t===l&&(t={}),t.b4r_1=r,this.g2w(t)}f1q(r){return g().y1u(qe().w4q(r.i1p()).h3_1)}}p(e,"note",l,l,l,[1,0,2,3]),Al=e}return Al}var El;function S9(){if(El===l){class e extends kr(){static f4r(){return this.l2r()}g1q(r,t){for(var n=sr().p1i(),a=L6().e1();a.f1();){var s=a.g1();n.c1n(s.h3_1,g().y1t(s.t4q_1))}return n.c1n("note",x9().c4r(this)),t.c1n("notes",n),t.w1m("package").w1m("loaded").c1n("notes",n),n}}p(e,"NotesLib",e.f4r,l,l,[0,1,2,3]),El=e}return El}function u1(){return z(),Ob}function j6(){return z(),Rb}function M6(){return z(),Ub}function T6(){return z(),Kb}function F6(){return z(),Gb}function D6(){return z(),Jb}function P6(){return z(),Wb}function B6(){return z(),Hb}function O6(){return z(),Vb}function R6(){return z(),Yb}function U6(){return z(),Zb}function K6(){return z(),Xb}function G6(){return z(),Qb}function J6(){return z(),rk}function W6(){return z(),tk}function H6(){return z(),ek}function V6(){return z(),nk}function Y6(){return z(),ak}function Z6(){return z(),ik}function X6(){return z(),sk}function Q6(){return z(),lk}function rx(){return z(),uk}function tx(){return z(),_k}function ex(){return z(),ok}function nx(){return z(),ck}function ax(){return z(),hk}function ix(){return z(),fk}function sx(){return z(),vk}function lx(){return z(),pk}function ux(){return z(),dk}function _x(){return z(),mk}function ox(){return z(),wk}function cx(){return z(),gk}function hx(){return z(),yk}function fx(){return z(),bk}function vx(){return z(),kk}function px(){return z(),Ck}function dx(){return z(),xk}function mx(){return z(),Sk}function wx(){return z(),zk}function gx(){return z(),qk}function yx(){return z(),Ik}function bx(){return z(),$k}function kx(){return z(),Ak}function Cx(){return z(),Ek}function xx(){return z(),Nk}function Sx(){return z(),Lk}function zx(){return z(),jk}function qx(){return z(),Mk}function Ix(){return z(),Tk}function $x(){return z(),Fk}function Ax(){return z(),Dk}function Ex(){return z(),Pk}function Nx(){return z(),Bk}function Lx(){return z(),Ok}function jx(){return z(),Rk}function Mx(){return z(),Uk}function Tx(){return z(),Kk}function Fx(){return z(),Gk}function Dx(){return z(),Jk}function Px(){return z(),Wk}function Bx(){return z(),Hk}function Ox(){return z(),Vk}function Rx(){return z(),Yk}function Ux(){return z(),Zk}function Kx(){return z(),Xk}function Gx(){return z(),Qk}function Jx(){return z(),rC}function Wx(){return z(),tC}function Hx(){return z(),eC}function Vx(){return z(),nC}function Yx(){return z(),aC}function Zx(){return z(),iC}function Xx(){return z(),sC}function Qx(){return z(),lC}function rS(){return z(),uC}function tS(){return z(),_C}function eS(){return z(),oC}function nS(){return z(),cC}function aS(){return z(),hC}function iS(){return z(),fC}function sS(){return z(),vC}function lS(){return z(),pC}function uS(){return z(),dC}function _S(){return z(),mC}function $d(){return z(),wC}function oS(){return z(),gC}function cS(){return z(),yC}function hS(){return z(),bC}function fS(){return z(),kC}function vS(){return z(),CC}function pS(){return z(),xC}function dS(){return z(),SC}function mS(){return z(),zC}function wS(){return z(),qC}function gS(){return z(),IC}function yS(){return z(),$C}function bS(){return z(),AC}function za(){return z(),EC}function kS(){return z(),NC}function CS(){return z(),LC}function xS(){return z(),jC}function SS(){return z(),MC}function zS(){return z(),TC}function qS(){return z(),FC}function IS(){return z(),DC}function $S(){return z(),PC}function AS(){return z(),BC}function ES(){return z(),OC}function NS(){return z(),RC}function LS(){return z(),UC}function jS(){return z(),KC}function MS(){return z(),GC}function TS(){return z(),JC}function FS(){return z(),WC}function DS(){return z(),HC}function PS(){return z(),VC}function BS(){return z(),YC}function OS(){return z(),ZC}function RS(){return z(),XC}function US(){return z(),QC}function KS(){return z(),r6}function GS(){return z(),t6}function JS(){return z(),e6}function WS(){return z(),n6}function HS(){return z(),a6}function VS(){return z(),i6}function YS(){return z(),s6}function ZS(){return z(),l6}function XS(){return z(),u6}function QS(){return z(),_6}function rz(){return z(),o6}function tz(){return z(),c6}function ez(){return z(),h6}function nz(){return z(),f6}function az(){return z(),v6}function iz(){return z(),p6}function sz(){return z(),d6}function lz(){return z(),m6}function uz(){return z(),w6}function _z(){return z(),g6}function oz(){return z(),y6}function cz(){return z(),b6}function hz(){return z(),k6}function fz(){return z(),C6}function vz(){return z(),x6}function pz(){return z(),S6}function dz(){return z(),z6}function mz(){return z(),q6}function wz(){return z(),I6}function gz(){return z(),$6}function yz(){return z(),A6}function Ad(){return z(),E6}var Nl;function z9(){if(Nl===l){class e{constructor(r,t,n,a){this.n5o_1=r,this.o5o_1=t,this.p5o_1=n,this.q5o_1=a}r5o(r){var t=this.n5o_1(),n=this.o5o_1(),a=this.p5o_1(),s;if(r<0)s=0;else if(r<=t){var u;t===0?u=1:u=r/t,s=u}else if(r<=(t+n|0)){var _;if(n===0)_=a;else{var o=r-t|0,c=1-a;_=1-c*o/n}s=_}else s=a;return s}s5o(r){var t=this.p5o_1(),n=this.q5o_1(),a;if(r<=n){var s;n===0||r<0?s=0:s=t*(1-r/n),a=s}else a=0;return a}}p(e,"Envelop"),Nl=e}return Nl}var Ll;function q9(){if(Ll===l){class e{constructor(r){this.t5o_1=r}u5o(r,t,n){for(var a=r.s4q_1,s=this.t5o_1(),u=0,_=0,o=0,c=s.length;o0?1:-1;break;case 0:var f=r*n%1;s=2*f-1;break;case 1:var v=r*n%1,d=.25;s=vr}toString(){return this.c5p_1.toString()+" - "+this.d5p_1+" - "+this.e5p_1}}p(e,"NoteProgress",Ji),Tl=e}return Tl}var Fl;function A9(){if(Fl===l){class e extends Ta(){constructor(){super(100)}l4d(){return new(Ji())}i5p(r){r.d5p_1=0,r.e5p_1=0}r4d(r){return this.i5p(r instanceof Ji()?r:m())}}p(e),Fl=e}return Fl}var Dl;function E9(){if(Dl===l){class e{constructor(r){this.j5p_1=r;var t=this,n=()=>Br(this.j5p_1.h4s_1*44100),a=()=>Br(this.j5p_1.i4s_1*44100),s=()=>this.j5p_1.j4s_1;t.k5p_1=new(z9())(n,a,s,()=>Br(this.j5p_1.k4s_1*44100));var u=this;u.l5p_1=new(q9())(()=>this.j5p_1.l4s_1);var _=this;_.m5p_1=new($9())(()=>this.j5p_1.g4s_1);var o=this;o.n5p_1=yt().o1();var c=this;c.o5p_1=yt().o1();var h=this;h.p5p_1=new(A9())}q5p(r){var t=this.p5p_1.u4d();t.c5p_1=r,this.n5p_1.c1(t)}f4u(r){var t=this.n5p_1,n;r:{for(var a=t.e1();a.f1();){var s=a.g1();if(s.c5p_1.equals(r)){n=s;break r}}n=null}var u=n,_;if(u==null){var o=this.p5p_1.u4d();o.c5p_1=r,_=o}else _=u;var c=_;this.n5p_1.u2(c),this.o5p_1.c1(c)}r5p(){for(var r=0,t=this.n5p_1.e1();t.f1();){var n=t.g1(),a=n.c5p_1,s=n.d5p_1+n.e5p_1|0,u=this.l5p_1.u5o(a,s,(B,R)=>{for(var W=this.j5p_1.m4s_1,G=N().p1(),Q=W.e1();Q.f1();){var X=Q.g1();X.w4t()&&G.c1(X)}for(var rr=B,tr=G.e1();tr.f1();){var ir=tr.g1(),dr=rr;rr=ir.g5o(R/44100,dr)}var cr=rr;return this.m5p_1.w5p(cr,R)});u=u*this.k5p_1.r5o(n.d5p_1),r=r+u,n.d5p_1=n.d5p_1+1|0}for(var _=this.o5p_1.e1();_.f1();){var o=_.g1(),c=o.c5p_1,h=o.d5p_1+o.e5p_1|0,f=this.l5p_1.u5o(c,h,(B,R)=>{for(var W=this.j5p_1.m4s_1,G=N().p1(),Q=W.e1();Q.f1();){var X=Q.g1();X.w4t()&&G.c1(X)}for(var rr=B,tr=G.e1();tr.f1();){var ir=tr.g1(),dr=rr;rr=ir.g5o(R/44100,dr)}var cr=rr;return this.m5p_1.w5p(cr,R)}),v;if(o.d5p_1<=(this.k5p_1.n5o_1()+this.k5p_1.o5o_1()|0)){var d=o.d5p_1;o.d5p_1=d+1|0,v=this.k5p_1.r5o(d)}else{var y=o.e5p_1;o.e5p_1=y+1|0,v=this.k5p_1.s5o(y)}var b=v;f=f*b,r=r+f}for(var w=this.k5p_1.q5o_1(),x=this.o5p_1,q=N().p1(),k=x.e1();k.f1();){var A=k.g1();A.f5p(w)&&q.c1(A)}var D=q;return this.o5p_1.f2(E5(D)),this.p5p_1.w4d(D),r}c1h(){for(var r=this.n5p_1.e1();r.f1();){var t=r.g1();t.d5p_1=0}this.o5p_1.i1(this.n5p_1),this.n5p_1.v2()}}p(e,"InstrumentPlayer"),Dl=e}return Dl}var Pl;function bz(){if(Pl===l){class e{constructor(r,t,n,a,s,u,_,o,c,h,f,v,d,y,b,w,x){r=r===l?!1:r,t=t===l?!1:t,n=n===l?!1:n,a=a===l?!1:a,s=s===l?!1:s,u=u===l?!0:u,_=_===l?" ":_,o=o===l?!1:o,c=c===l?!1:c,h=h===l?"type":h,f=f===l?!1:f,v=v===l?!0:v,d=d===l?null:d,y=y===l?!1:y,b=b===l?!1:b,w=w===l?!1:w,x=x===l?zz():x,this.c3t_1=r,this.d3t_1=t,this.e3t_1=n,this.f3t_1=a,this.g3t_1=s,this.h3t_1=u,this.i3t_1=_,this.j3t_1=o,this.k3t_1=c,this.l3t_1=h,this.m3t_1=f,this.n3t_1=v,this.o3t_1=d,this.p3t_1=y,this.q3t_1=b,this.r3t_1=w,this.s3t_1=x}toString(){return"JsonConfiguration(encodeDefaults="+this.c3t_1+", ignoreUnknownKeys="+this.d3t_1+", isLenient="+this.e3t_1+", "+("allowStructuredMapKeys="+this.f3t_1+", prettyPrint="+this.g3t_1+", explicitNulls="+this.h3t_1+", ")+("prettyPrintIndent='"+this.i3t_1+"', coerceInputValues="+this.j3t_1+", useArrayPolymorphism="+this.k3t_1+", ")+("classDiscriminator='"+this.l3t_1+"', allowSpecialFloatingPointValues="+this.m3t_1+", ")+("useAlternativeNames="+this.n3t_1+", namingStrategy="+Wr(this.o3t_1)+", decodeEnumsCaseInsensitive="+this.p3t_1+", ")+("allowTrailingComma="+this.q3t_1+", allowComments="+this.r3t_1+", classDiscriminatorMode="+this.s3t_1.toString()+")")}}p(e,"JsonConfiguration"),Pl=e}return Pl}var kz,Cz,zw;function xz(){if(zw)return S;zw=!0,kz=new(Ol())("NONE",0),new(Ol())("ALL_JSON_OBJECTS",1),Cz=new(Ol())("POLYMORPHIC",2)}var Bl;function Ol(){if(Bl===l){class e extends Kt(){}p(e,"ClassDiscriminatorMode"),Bl=e}return Bl}function Sz(){return xz(),kz}function zz(){return xz(),Cz}var Rl;function Y(){if(Rl===l){class e{}Ar(e,"KSerializer",l,l,[Rn(),oa()]),Rl=e}return Rl}var Ul;function Rn(){if(Ul===l){class e{}Ar(e,"SerializationStrategy"),Ul=e}return Ul}var Kl;function oa(){if(Kl===l){class e{}Ar(e,"DeserializationStrategy"),Kl=e}return Kl}function N9(){return F9(),qz}var qz,Gl;function L9(){if(Gl===l){class e{g38(r,t,n){return t=t===l?ot():t,n===l?this.h38(r,t):n.h38.call(this,r,t)}}p(e,"SerializersModule"),Gl=e}return Gl}var Jl;function j9(){if(Jl===l){class e extends L9(){constructor(r,t,n,a,s,u){super(),this.x3q_1=r,this.y3q_1=t,this.z3q_1=n,this.a3r_1=a,this.b3r_1=s,this.c3r_1=u}f38(){return this.c3r_1}k3c(r,t){if(!r.de(t))return null;var n=this.y3q_1.b3(r),a=n==null?null:n.b3(or(t)),s=a!=null&&j(a,Rn())?a:null;if(s!=null)return s;var u=this.z3q_1.b3(r),_=u!=null&&typeof u=="function"?u:null;return _==null?null:_(t)}j3c(r,t){var n=this.a3r_1.b3(r),a;n==null?a=null:a=(j(n,kt())?n:m()).b3(t);var s=a,u=s!=null&&j(s,Y())?s:null;if(u!=null)return u;var _=this.b3r_1.b3(r),o=_!=null&&typeof _=="function"?_:null;return o==null?null:o(t)}h38(r,t){var n=this.x3q_1.b3(r),a=n==null?null:n.d3r(t);return a==null||j(a,Y())?a:null}w3q(r){for(var t=this.x3q_1.e3().e1();t.f1();){var n=t.g1(),a=n.x2(),s=n.y2();if(s instanceof M9()){var u=j(a,Be())?a:m(),_=s.g3r_1;r.h3r(u,j(_,Y())?_:m())}else s instanceof T9()?r.f3r(a,s.e3r_1):gt()}for(var o=this.y3q_1.e3().e1();o.f1();)for(var c=o.g1(),h=c.x2(),f=c.y2(),v=f.e3().e1();v.f1();){var d=v.g1(),y=d.x2(),b=d.y2(),w=j(h,Be())?h:m(),x=j(y,Be())?y:m(),q=j(b,Y())?b:m();r.i3r(w,x,q)}for(var k=this.z3q_1.e3().e1();k.f1();){var A=k.g1(),D=A.x2(),B=A.y2(),R=j(D,Be())?D:m();r.j3r(R,typeof B=="function"?B:m())}for(var W=this.b3r_1.e3().e1();W.f1();){var G=W.g1(),Q=G.x2(),X=G.y2(),rr=j(Q,Be())?Q:m();r.k3r(rr,typeof X=="function"?X:m())}}}p(e,"SerialModuleImpl"),Jl=e}return Jl}var Wl;function M9(){if(Wl===l){class e extends Iz(){}p(e,"Argless"),Wl=e}return Wl}var Hl;function T9(){if(Hl===l){class e extends Iz(){}p(e,"WithTypeArguments"),Hl=e}return Hl}var Vl;function Iz(){if(Vl===l){class e{}p(e,"ContextualProvider"),Vl=e}return Vl}var qw;function F9(){qw||(qw=!0,qz=new(j9())(en(),en(),en(),en(),en(),!1))}function Un(){return N9()}function Iw(e){return ge().p7(e)}var Yl;function qa(){if(Yl===l){class e{}p(e,"Key",qa),Yl=e}return Yl}var Zl;function $z(){if(Zl===l){class e{constructor(){this.c3x_1=Iw(16)}p3y(r,t,n){var a=this.c3x_1,s=a.b3(r),u;if(s==null){var _=Iw(2);a.f3(r,_),u=_}else u=s;var o=u,c=t instanceof qa()?t:m(),h=n??m();o.f3(c,h)}d3x(r,t,n){var a=this.q3y(r,t);if(a!=null)return a;var s=n();return this.p3y(r,t,s),s}q3y(r,t){var n=this.c3x_1.b3(r),a;n==null?a=null:a=n.b3(t instanceof qa()?t:m());var s=a;return s??null}}p(e,"DescriptorSchemaCache",$z),Zl=e}return Zl}function Xl(){return _1(),Az}var Az;function li(e){_1();var i=e&15,r;if(i<10){var t=C(48),n=_r(t);r=ji(i+n|0)}else{var a=i-10|0,s=C(97),u=_r(s);r=ji(a+u|0)}return r}function Ed(e,i){_1(),e.ka(C(34));var r=0,t=0,n=xr(i)-1|0;if(t<=n)do{var a=t;t=t+1|0;var s=Tr(i,a),u=_r(s);u>12),n=li(r>>8),a=li(r>>4),s=li(r);e[r]="\\u"+Lr(t)+Lr(n)+Lr(a)+Lr(s)}while(i<=31);var u=C(34);e[_r(u)]='\\"';var _=C(92);e[_r(_)]="\\\\";var o=C(9);e[_r(o)]="\\t";var c=C(8);e[_r(c)]="\\b";var h=C(10);e[_r(h)]="\\n";var f=C(13);e[_r(f)]="\\r",e[12]="\\f",Az=e;var v=new Int8Array(93),d=0;if(d<=31)do{var y=d;d=d+1|0,v[y]=1}while(d<=31);var b=C(34),w=_r(b),x=C(34),q=_r(x);v[w]=Ot(q);var k=C(92),A=_r(k),D=C(92),B=_r(D);v[A]=Ot(B);var R=C(9),W=_r(R),G=C(116),Q=_r(G);v[W]=Ot(Q);var X=C(8),rr=_r(X),tr=C(98),ir=_r(tr);v[rr]=Ot(ir);var dr=C(10),cr=_r(dr),mr=C(110),Dr=_r(mr);v[cr]=Ot(Dr);var Ir=C(13),Or=_r(Ir),Yr=C(114),Gr=_r(Yr);v[Or]=Ot(Gr);var Er=C(102),ft=_r(Er);v[12]=Ot(ft)}}var Ql;function Nz(){if(Ql===l){class e{constructor(){this.v3r_1=On().na(128)}d2b(r){this.v3r_1.vf(r)}o3v(r){this.v3r_1.ka(r)}p3v(r){this.v3r_1.ja(r)}y3v(r){Ed(this.v3r_1,r)}i1b(){this.v3r_1.yf()}toString(){return this.v3r_1.toString()}}p(e,"JsonToStringWriter",Nz),Ql=e}return Ql}var ru;function Nd(){if(ru===l){class e extends Fa(){constructor(){Wi=null,super(),Wi=this}}P(e,"ENUM"),ru=e}return ru}var Wi;function Ie(){return Wi===l&&new(Nd()),Wi}var tu;function D9(){if(tu===l){class e extends Fa(){constructor(){Hi=null,super(),Hi=this}}P(e,"CONTEXTUAL"),tu=e}return tu}var Hi;function o1(){return Hi===l&&new(D9()),Hi}var eu;function Fa(){if(eu===l){class e{toString(){return nr(or(this).ce())}hashCode(){return br(this.toString())}}p(e,"SerialKind"),eu=e}return eu}var nu;function P9(){if(nu===l){class e extends h1(){constructor(){Vi=null,super(),Vi=this}}P(e,"CLASS"),nu=e}return nu}var Vi;function Da(){return Vi===l&&new(P9()),Vi}var au;function B9(){if(au===l){class e extends h1(){constructor(){Yi=null,super(),Yi=this}}P(e,"LIST"),au=e}return au}var Yi;function Pa(){return Yi===l&&new(B9()),Yi}var iu;function O9(){if(iu===l){class e extends h1(){constructor(){Zi=null,super(),Zi=this}}P(e,"MAP"),iu=e}return iu}var Zi;function Ba(){return Zi===l&&new(O9()),Zi}var su;function R9(){if(su===l){class e extends h1(){constructor(){Xi=null,super(),Xi=this}}P(e,"OBJECT"),su=e}return su}var Xi;function c1(){return Xi===l&&new(R9()),Xi}var lu;function h1(){if(lu===l){class e extends Fa(){}p(e,"StructureKind"),lu=e}return lu}var uu;function U9(){if(uu===l){class e extends St(){constructor(){Qi=null,super(),Qi=this}}P(e,"BOOLEAN"),uu=e}return uu}var Qi;function K9(){return Qi===l&&new(U9()),Qi}var _u;function G9(){if(_u===l){class e extends St(){constructor(){rs=null,super(),rs=this}}P(e,"BYTE"),_u=e}return _u}var rs;function J9(){return rs===l&&new(G9()),rs}var ou;function W9(){if(ou===l){class e extends St(){constructor(){ts=null,super(),ts=this}}P(e,"CHAR"),ou=e}return ou}var ts;function H9(){return ts===l&&new(W9()),ts}var cu;function V9(){if(cu===l){class e extends St(){constructor(){es=null,super(),es=this}}P(e,"SHORT"),cu=e}return cu}var es;function Y9(){return es===l&&new(V9()),es}var hu;function Z9(){if(hu===l){class e extends St(){constructor(){ns=null,super(),ns=this}}P(e,"INT"),hu=e}return hu}var ns;function X9(){return ns===l&&new(Z9()),ns}var fu;function Q9(){if(fu===l){class e extends St(){constructor(){as=null,super(),as=this}}P(e,"LONG"),fu=e}return fu}var as;function rN(){return as===l&&new(Q9()),as}var vu;function tN(){if(vu===l){class e extends St(){constructor(){is=null,super(),is=this}}P(e,"FLOAT"),vu=e}return vu}var is;function eN(){return is===l&&new(tN()),is}var pu;function nN(){if(pu===l){class e extends St(){constructor(){ss=null,super(),ss=this}}P(e,"DOUBLE"),pu=e}return pu}var ss;function aN(){return ss===l&&new(nN()),ss}var du;function iN(){if(du===l){class e extends St(){constructor(){ls=null,super(),ls=this}}P(e,"STRING"),du=e}return du}var ls;function vn(){return ls===l&&new(iN()),ls}var mu;function St(){if(mu===l){class e extends Fa(){}p(e,"PrimitiveKind"),mu=e}return mu}var wu;function sN(){if(wu===l){class e extends pn(){constructor(){us=null,super(),us=this}}P(e,"SEALED"),wu=e}return wu}var us;function Lz(){return us===l&&new(sN()),us}var gu;function lN(){if(gu===l){class e extends pn(){constructor(){_s=null,super(),_s=this}}P(e,"OPEN"),gu=e}return gu}var _s;function uN(){return _s===l&&new(lN()),_s}var yu;function pn(){if(yu===l){class e extends Fa(){}p(e,"PolymorphicKind"),yu=e}return yu}function bu(e){Je(e,e.m37_1)}var ku;function jr(){if(ku===l){class e extends H(){static n37(){var r=this.vc();return bu(r),r}static o37(r){var t=this.u(r);return bu(t),t}static p37(r,t){var n=this.xc(r,t);return bu(n),n}}p(e,"SerializationException",e.n37),ku=e}return ku}var Cu;function Xr(){if(Cu===l){class e extends jr(){static v37(r){var t=this.o37(r);return Je(t,t.u37_1),t}static w37(r){return this.v37("An unknown field for index "+r)}}p(e,"UnknownFieldException"),Cu=e}return Cu}var xu;function Z5(){if(xu===l){class e extends jr(){static d38(r,t,n){var a=this.p37(t,n);return Je(a,a.c38_1),a.b38_1=r,a}static e38(r,t){return this.d38(r,r.h1()===1?"Field '"+r.l1(0)+"' is required for type with serial name '"+t+"', but it was missing":"Fields "+$(r)+" are required for type with serial name '"+t+"', but they were missing",null)}}p(e,"MissingFieldException"),xu=e}return xu}var Su;function dn(){if(Su===l){class e extends Ld(){static d3v(r){var t=this.s3w(r);return Je(t,t.c3v_1),t}}p(e,"JsonDecodingException"),Su=e}return Su}function Sr(e,i,r){return jd(e,i+` -JSON input: `+$(Oa(r,e)))}var zu;function Ld(){if(zu===l){class e extends jr(){static s3w(r){var t=this.o37(r);return Je(t,t.r3w_1),t}}p(e,"JsonException"),zu=e}return zu}function jd(e,i){return dn().d3v(e>=0?"Unexpected JSON token at offset "+e+": "+i:i)}function Oa(e,i){if(i=i===l?-1:i,xr(e)<200)return e;if(i===-1){var r=xr(e)-60|0;if(r<=0)return e;var t=xr(e);return"....."+$(N5(e,r,t))}var n=i-30|0,a=i+30|0,s=n<=0?"":".....",u=a>=xr(e)?"":".....",_=xt(n,0),o=Tg(a,xr(e));return s+$(N5(e,_,o))+u}function mn(e,i){i=i===l?"object":i,e.t3w("Trailing comma before the end of JSON "+i,e.e3s_1-1|0,"Trailing commas are non-complaint JSON and not allowed by default. Use 'allowTrailingComma = true' in 'Json {}' builder to support them.")}function Aw(e,i){e.u3w("Unexpected special floating-point value "+$(i)+". By default, non-finite floating point values are prohibited because they do not conform JSON specification",l,"It is possible to deserialize them using 'JsonBuilder.allowSpecialFloatingPointValues = true'")}var qu;function jz(){if(qu===l){class e extends Ld(){static b3x(r){var t=this.s3w(r);return Je(t,t.a3x_1),t}}p(e,"JsonEncodingException"),qu=e}return qu}function Mz(e){return jz().b3x("Value of type '"+e.f37()+"' can't be used in JSON as a key in the map. "+("It should have either primitive or enum kind, but its kind is '"+e.o38().toString()+`'. -`)+"Use 'allowStructuredMapKeys = true' in 'Json {}' builder to convert such maps to [key1, value1, key2, value2,...] arrays.")}function Ew(e,i,r){return jd(-1,_N(e,i,r))}function Nw(e,i){return jz().b3x("Unexpected special floating-point value "+$(e)+`. By default, non-finite floating point values are prohibited because they do not conform JSON specification. It is possible to deserialize them using 'JsonBuilder.allowSpecialFloatingPointValues = true' -`+("Current output: "+$(Oa(i))))}function _N(e,i,r){return"Unexpected special floating-point value "+$(e)+" with key "+i+`. By default, non-finite floating point values are prohibited because they do not conform JSON specification. It is possible to deserialize them using 'JsonBuilder.allowSpecialFloatingPointValues = true' -`+("Current output: "+$(Oa(r)))}function wn(){return!1}function gn(){return!1}function Ra(){return ot()}var Iu;function Lt(){if(Iu===l){class e{}Ar(e,"SerialDescriptor"),Iu=e}return Iu}function oN(e){return new(hN())(e)}function Lw(e){return new(vN())(e)}var $u;function cN(){if($u===l){class e{constructor(r){this.b39_1=r,this.a39_1=r.q38()}f1(){return this.a39_1>0}g1(){var r=this.b39_1.q38(),t=this.a39_1;return this.a39_1=t-1|0,this.b39_1.v38(r-t|0)}}p(e),$u=e}return $u}var Au;function hN(){if(Au===l){class e{constructor(r){this.c39_1=r}e1(){return new(cN())(this.c39_1)}}p(e),Au=e}return Au}var Eu;function fN(){if(Eu===l){class e{constructor(r){this.e39_1=r,this.d39_1=r.q38()}f1(){return this.d39_1>0}g1(){var r=this.e39_1.q38(),t=this.d39_1;return this.d39_1=t-1|0,this.e39_1.s38(r-t|0)}}p(e),Eu=e}return Eu}var Nu;function vN(){if(Nu===l){class e{constructor(r){this.f39_1=r}e1(){return new(fN())(this.f39_1)}}p(e),Nu=e}return Nu}var Lu;function f1(){if(Lu===l){class e{}Ar(e,"CachedNames"),Lu=e}return Lu}function pN(){return yn(),Tz}var Tz;function os(e){if(yn(),j(e,f1()))return e.t39();var i=Wt().k1(e.q38()),r=0,t=e.q38();if(r")}function wN(e){return yn(),"Serializer for class '"+e+`' is not found. -Please ensure that class is marked as '@Serializable' and that the serialization compiler plugin is applied. -`}var jw;function yn(){jw||(jw=!0,Tz=[])}var gN=Math.imul,ju;function Dz(){if(ju===l){class e{constructor(r){this.v3i_1=r,this.w3i_1=new(Md())(this.v3i_1.c36())}c36(){return this.w3i_1}x3i(r,t){t!=null?(r.g3c(),r.d3c(this.v3i_1,t)):r.g3b()}d36(r,t){return this.x3i(r,t==null||t!=null?t:m())}e36(r){return r.v39()?r.j3a(this.v3i_1):r.w39()}equals(r){return this===r?!0:!(r==null||!or(this).equals(or(r))||(r instanceof Dz()||m(),!E(this.v3i_1,r.v3i_1)))}hashCode(){return V(this.v3i_1)}}p(e,"NullableSerializer",l,l,[Y()]),ju=e}return ju}var Mu;function Md(){if(Mu===l){class e{constructor(r){this.x38_1=r,this.y38_1=this.x38_1.f37()+"?",this.z38_1=os(this.x38_1)}f37(){return this.y38_1}t39(){return this.z38_1}k38(){return!0}equals(r){return this===r?!0:!(!(r instanceof Md())||!E(this.x38_1,r.x38_1))}toString(){return $(this.x38_1)+"?"}hashCode(){return gN(V(this.x38_1),31)}o38(){return this.x38_1.o38()}p38(){return this.x38_1.p38()}q38(){return this.x38_1.q38()}r38(){return this.x38_1.r38()}s38(r){return this.x38_1.s38(r)}t38(r){return this.x38_1.t38(r)}u38(r){return this.x38_1.u38(r)}v38(r){return this.x38_1.v38(r)}w38(r){return this.x38_1.w38(r)}}p(e,"SerialDescriptorForNullable",l,l,[Lt(),f1()]),Mu=e}return Mu}var yN=Math.imul;function bN(e,i){return new(Td())(e,i)}var Tu;function Td(){if(Tu===l){class e{constructor(r,t){this.l38_1=r,this.m38_1=t,this.n38_1=this.l38_1.f37()+"<"+this.m38_1.ce()+">"}f37(){return this.n38_1}equals(r){var t=r instanceof Td()?r:null,n;if(t==null)return!1;n=t;var a=n;return E(this.l38_1,a.l38_1)&&a.m38_1.equals(this.m38_1)}hashCode(){var r=this.m38_1.hashCode();return r=yN(31,r)+br(this.n38_1)|0,r}toString(){return"ContextDescriptor(kClass: "+$(this.m38_1)+", original: "+$(this.l38_1)+")"}o38(){return this.l38_1.o38()}k38(){return this.l38_1.k38()}p38(){return this.l38_1.p38()}q38(){return this.l38_1.q38()}r38(){return this.l38_1.r38()}s38(r){return this.l38_1.s38(r)}t38(r){return this.l38_1.t38(r)}u38(r){return this.l38_1.u38(r)}v38(r){return this.l38_1.v38(r)}w38(r){return this.l38_1.w38(r)}}p(e,"ContextDescriptor",l,l,[Lt()]),Tu=e}return Tu}function kN(e,i){var r=Pz(i),t;if(r==null)t=null;else{var n=e.g38(r);t=n==null?null:n.c36()}return t}function Pz(e){var i;return e instanceof Td()?i=e.m38_1:e instanceof Md()?i=Pz(e.x38_1):i=null,i}var Bz,Oz,Rz,Uz;function CN(){return[p1(),Q5(),hs(),Gz()]}function xN(){return Fu==null&&(Fu=Js(CN())),Fu}var Mw;function v1(){if(Mw)return S;Mw=!0,Bz=new(ui())("OBJ",0,C(123),C(125)),Oz=new(ui())("LIST",1,C(91),C(93)),Rz=new(ui())("MAP",2,C(123),C(125)),Uz=new(ui())("POLY_OBJ",3,C(91),C(93))}var Fu,Du;function ui(){if(Du===l){class e extends Kt(){constructor(r,t,n,a){super(r,t),this.d3z_1=n,this.e3z_1=a}}p(e,"WriteMode"),Du=e}return Du}function Kz(e,i){var r=i.o38(),t;if(r instanceof pn())t=Gz();else if(E(r,Pa()))t=Q5();else if(E(r,Ba())){var n=cs(i.v38(0),e.z3a()),a=n.o38(),s,u;if(a instanceof St()?u=!0:u=E(a,Ie()),u)s=hs();else if(e.o3r_1.f3t_1)s=Q5();else throw Mz(n);t=s}else t=p1();return t}function cs(e,i){var r;if(E(e.o38(),o1())){var t=kN(i,e),n=t==null?null:cs(t,i);r=n??e}else e.p38()?r=cs(e.v38(0),i):r=e;return r}function p1(){return v1(),Bz}function Q5(){return v1(),Oz}function hs(){return v1(),Rz}function Gz(){return v1(),Uz}var Pu;function SN(){if(Pu===l){class e extends rp(){static s3i(){fs=null;var r=this.d3b();return fs=r,r.r3i_1=Un(),r}z3a(){return this.r3i_1}f3b(r){return S}g3b(){return S}h3b(r){return S}i3b(r){return S}j3b(r){return S}k3b(r){return S}l3b(r){return S}m3b(r){return S}n3b(r){return S}o3b(r){return S}p3b(r){return S}q3b(r,t){return S}}P(e,"NoOpEncoder"),Pu=e}return Pu}var fs;function zN(){return fs===l&&SN().s3i(),fs}function qN(){}function IN(e,i){return this.k3a(e)}function $N(e,i){e.d36(this,i)}function AN(e,i){var r=e.c36().k38();if(r)return this.d3c(j(e,Rn())?e:m(),i);i==null?this.g3b():(this.g3c(),this.d3c(e,i))}var Bu;function Jz(){if(Bu===l){class e{}Ar(e,"Encoder"),Bu=e}return Bu}function EN(e,i){return!0}var Ou;function Wz(){if(Ou===l){class e{}Ar(e,"CompositeEncoder"),Ou=e}return Ou}var Ru;function rp(){if(Ru===l){class e{static d3b(){return Ur(this)}k3a(r){return this}l3a(r){}e3b(r,t){return!0}f3b(r){throw jr().o37("Non-serializable "+$(or(r))+" is not supported by "+$(or(this))+" encoder")}g3b(){throw jr().o37("'null' is not supported by default")}h3b(r){return this.f3b(r)}i3b(r){return this.f3b(r)}j3b(r){return this.f3b(r)}k3b(r){return this.f3b(r)}l3b(r){return this.f3b(r)}m3b(r){return this.f3b(r)}n3b(r){return this.f3b(r)}o3b(r){return this.f3b(new(J())(r))}p3b(r){return this.f3b(r)}q3b(r,t){return this.f3b(t)}r3b(r){return this}s3b(r,t,n){this.e3b(r,t)&&this.h3b(n)}t3b(r,t,n){this.e3b(r,t)&&this.i3b(n)}u3b(r,t,n){this.e3b(r,t)&&this.j3b(n)}v3b(r,t,n){this.e3b(r,t)&&this.k3b(n)}w3b(r,t,n){this.e3b(r,t)&&this.l3b(n)}x3b(r,t,n){this.e3b(r,t)&&this.m3b(n)}y3b(r,t,n){this.e3b(r,t)&&this.n3b(n)}z3b(r,t,n){this.e3b(r,t)&&this.o3b(n)}a3c(r,t,n){this.e3b(r,t)&&this.p3b(n)}b3c(r,t){return this.e3b(r,t)?this.r3b(r.v38(t)):zN()}c3c(r,t,n,a){this.e3b(r,t)&&this.d3c(n,a)}e3c(r,t,n,a){this.e3b(r,t)&&this.f3c(n,a)}}F(e).g3c=qN,F(e).h3c=IN,F(e).d3c=$N,F(e).f3c=AN,F(e).i3c=EN,p(e,"AbstractEncoder",l,l,[Jz(),Wz()]),Ru=e}return Ru}var Uu;function d1(){if(Uu===l){class e{constructor(r){this.g3v_1=r,this.h3v_1=!0}i3v(){this.h3v_1=!0}j3v(){return S}k3v(){this.h3v_1=!1}l3v(){this.h3v_1=!1}m3v(){return S}n3v(r){return this.g3v_1.o3v(r)}t2p(r){return this.g3v_1.p3v(r)}q3v(r){return this.g3v_1.p3v(r.toString())}r3v(r){return this.g3v_1.p3v(r.toString())}s3v(r){return this.g3v_1.d2b(bt(r))}t3v(r){return this.g3v_1.d2b(bt(r))}u3v(r){return this.g3v_1.d2b(bt(r))}v3v(r){return this.g3v_1.d2b(r)}w3v(r){return this.g3v_1.p3v(r.toString())}x3v(r){return this.g3v_1.y3v(r)}}p(e,"Composer"),Uu=e}return Uu}function NN(e,i){return i.o3r_1.g3t_1?new(LN())(e,i):new(d1())(e)}var Ku;function Tw(){if(Ku===l){class e extends d1(){constructor(r,t){super(r),this.b3w_1=t}u3v(r){if(this.b3w_1){var t=hr(r);this.x3v(Rm(t))}else{var n=hr(r);this.t2p(Rm(n))}}v3v(r){if(this.b3w_1){var t=Ti(r);this.x3v(Um(t))}else{var n=Ti(r);this.t2p(Um(n))}}s3v(r){if(this.b3w_1){var t=Mr(r);this.x3v(Km(t))}else{var n=Mr(r);this.t2p(Km(n))}}t3v(r){if(this.b3w_1){var t=Mi(r);this.x3v(Gm(t))}else{var n=Mi(r);this.t2p(Gm(n))}}}p(e,"ComposerForUnsignedNumbers"),Ku=e}return Ku}var Gu;function Fw(){if(Gu===l){class e extends d1(){constructor(r,t){super(r),this.e3w_1=t}x3v(r){this.e3w_1?super.x3v(r):super.t2p(r)}}p(e,"ComposerForUnquotedLiterals"),Gu=e}return Gu}var Ju;function LN(){if(Ju===l){class e extends d1(){constructor(r,t){super(r),this.h3w_1=t,this.i3w_1=0}i3v(){this.h3v_1=!0,this.i3w_1=this.i3w_1+1|0}j3v(){this.i3w_1=this.i3w_1-1|0}k3v(){this.h3v_1=!1,this.t2p(` -`);var r=this.i3w_1,t=0;if(tQz(e)}function eL(){return e=>e.z3h()}function nL(){return e=>rq(e)}var n_;function Kr(){if(n_===l){class e{constructor(r,t,n){t=t===l?null:t,this.x3g_1=r,this.y3g_1=t,this.z3g_1=n,this.a3h_1=-1;for(var a=this,s=0,u=this.z3g_1,_=Array(u);s{var w=this.y3g_1,x=w==null?null:w.p3i();return x??Hz()});var v=this,d=lr();v.h3h_1=ur(d,()=>{var w=this.y3g_1,x=w==null?null:w.q3i(),q;if(x==null)q=null;else{for(var k=N().d1(x.length),A=0,D=x.length;Atq(this,this.z3h()))}f37(){return this.x3g_1}q38(){return this.z3g_1}o38(){return Da()}r38(){var r=this.d3h_1;return r??ot()}t39(){return this.f3h_1.c3()}z3h(){var r=this.h3h_1,t=oe();return ce("typeParameterDescriptors",1,t,eL(),null),r.y2()}a3i(r,t){this.a3h_1=this.a3h_1+1|0,this.b3h_1[this.a3h_1]=r,this.e3h_1[this.a3h_1]=t,this.c3h_1[this.a3h_1]=null,this.a3h_1===(this.z3g_1-1|0)&&(this.f3h_1=rL(this))}j3h(r,t,n){t=t===l?!1:t;var a;return n===l?(this.a3i(r,t),a=S):a=n.a3i.call(this,r,t),a}v38(r){return ln(Qz(this),r).c36()}w38(r){return Zz(this.e3h_1,r)}u38(r){var t=ln(this.c3h_1,r);return t??ot()}s38(r){return ln(this.b3h_1,r)}t38(r){var t=this.f3h_1.b3(r);return t??-3}equals(r){var t;r:{if(this===r){t=!0;break r}if(!(r instanceof Kr())){t=!1;break r}if(this.f37()!==r.f37()){t=!1;break r}if(!Hs(this.z3h(),r.z3h())){t=!1;break r}if(this.q38()!==r.q38()){t=!1;break r}var n=0,a=this.q38();if(ne.s38(t)+": "+e.v38(t).f37())}function se(e,i,r,t){var n;if(t===l?n=iL:n=t,t=n,Vs(e)){var a="Blank serial names are prohibited";throw H().u($(a))}if(E(i,Da())){var s="For StructureKind.CLASS please use 'buildClassSerialDescriptor' instead";throw H().u($(s))}var u=new(nq())(e);return t(u),new(Fd())(e,i,u.n36_1.h1(),ry(r),u)}var a_;function nq(){if(a_===l){class e{constructor(r){this.k36_1=r,this.l36_1=!1,this.m36_1=ot(),this.n36_1=N().p1(),this.o36_1=Wt().u8(),this.p36_1=N().p1(),this.q36_1=N().p1(),this.r36_1=N().p1()}g39(r,t,n,a){if(!this.o36_1.c1(r)){var s="Element with name '"+r+"' is already registered in "+this.k36_1;throw H().u($(s))}this.n36_1.c1(r),this.p36_1.c1(t),this.q36_1.c1(n),this.r36_1.c1(a)}s36(r,t,n,a,s){n=n===l?ot():n,a=a===l?!1:a;var u;return s===l?(this.g39(r,t,n,a),u=S):u=s.g39.call(this,r,t,n,a),u}}p(e,"ClassSerialDescriptorBuilder"),a_=e}return a_}function aq(e){var i=e.s39_1,r=oe();return ce("_hashCode",1,r,aL(),null),i.y2()}function aL(){return e=>aq(e)}var i_;function Fd(){if(i_===l){class e{constructor(r,t,n,a,s){this.h39_1=r,this.i39_1=t,this.j39_1=n,this.k39_1=s.m36_1,this.l39_1=F$(s.n36_1);var u=this,_=s.n36_1;u.m39_1=lt(_),this.n39_1=X5(s.p36_1);var o=this,c=s.q36_1;o.o39_1=lt(c),this.p39_1=D$(s.r36_1);for(var h=this,f=P$(this.m39_1),v=N().d1(yr(f,10)),d=f.e1();d.f1();){var y=d.g1(),b=T(y.aj_1,y.zi_1);v.c1(b)}h.q39_1=ty(v),this.r39_1=X5(a);var w=this;w.s39_1=Ys(()=>tq(this,this.r39_1))}f37(){return this.h39_1}o38(){return this.i39_1}q38(){return this.j39_1}r38(){return this.k39_1}t39(){return this.l39_1}s38(r){return ln(this.m39_1,r)}t38(r){var t=this.q39_1.b3(r);return t??-3}u38(r){return ln(this.o39_1,r)}v38(r){return ln(this.n39_1,r)}w38(r){return Zz(this.p39_1,r)}equals(r){var t;r:{if(this===r){t=!0;break r}if(!(r instanceof Fd())){t=!1;break r}if(this.f37()!==r.f37()){t=!1;break r}if(!Hs(this.r39_1,r.r39_1)){t=!1;break r}if(this.q38()!==r.q38()){t=!1;break r}var n=0,a=this.q38();if(ne.c36()}var s_;function uL(){if(s_===l){class e{constructor(r,t){this.y3i_1=t,this.z3i_1=ot();var n=this,a=lr();n.a3j_1=ur(a,()=>{var s=c1();return se(r,s,[],u=>(u.m36_1=this.z3i_1,S))})}c36(){var r=this.a3j_1,t=oe();return ce("descriptor",1,t,lL(),null),r.y2()}u36(r,t){r.k3a(this.c36()).l3a(this.c36())}d36(r,t){return this.u36(r,t??m())}e36(r){var t=this.c36(),n=r.k3a(t);r:{if(n.a3b())break r;var a=n.b3b(this.c36());if(a===-1)break r;throw jr().o37("Unexpected index "+a)}return n.l3a(t),this.y3i_1}}p(e,"ObjectSerializer",l,l,[Y()]),s_=e}return s_}var _L=Math.imul;function sq(){return w1(),lq}var lq,l_;function oL(){if(l_===l){class e{constructor(){lp=this,this.q3n_1=new(zt())("kotlin.String",vn())}c36(){return this.q3n_1}r3n(r,t){return r.p3b(t)}d36(r,t){return this.r3n(r,t!=null&&typeof t=="string"?t:m())}e36(r){return r.f3a()}}P(e,"StringSerializer",l,l,[Y()]),l_=e}return l_}var lp;function qr(){return lp===l&&new(oL()),lp}function Qn(e){throw fr().u3("Primitive descriptor "+e.s3n_1+" does not have elements")}var u_;function zt(){if(u_===l){class e{constructor(r,t){this.s3n_1=r,this.t3n_1=t}f37(){return this.s3n_1}o38(){return this.t3n_1}q38(){return 0}s38(r){Qn(this)}t38(r){Qn(this)}w38(r){Qn(this)}v38(r){Qn(this)}u38(r){Qn(this)}toString(){return"PrimitiveDescriptor("+this.s3n_1+")"}equals(r){return this===r?!0:r instanceof zt()?!!(this.s3n_1===r.s3n_1&&E(this.t3n_1,r.t3n_1)):!1}hashCode(){return br(this.s3n_1)+_L(31,this.t3n_1.hashCode())|0}}F(e).k38=wn,F(e).p38=gn,F(e).r38=Ra,p(e,"PrimitiveSerialDescriptor",l,l,[Lt()]),u_=e}return u_}function cL(e){w1();var i=sq().b3(e);return i==null||j(i,Y())?i:m()}var __;function hL(){if(__===l){class e{constructor(){up=this,this.u3n_1=new(zt())("kotlin.Int",X9())}c36(){return this.u3n_1}v3n(r,t){return r.k3b(t)}d36(r,t){return this.v3n(r,t!=null&&typeof t=="number"?t:m())}e36(r){return r.a3a()}}P(e,"IntSerializer",l,l,[Y()]),__=e}return __}var up;function K(){return up===l&&new(hL()),up}var o_;function fL(){if(o_===l){class e{constructor(){_p=this,this.w3n_1=new(zt())("kotlin.Long",rN())}c36(){return this.w3n_1}x3n(r,t){return r.l3b(t)}d36(r,t){return this.x3n(r,t!=null&&typeof t=="bigint"?t:m())}e36(r){return r.b3a()}}P(e,"LongSerializer",l,l,[Y()]),o_=e}return o_}var _p;function Ua(){return _p===l&&new(fL()),_p}var c_;function vL(){if(c_===l){class e{constructor(){op=this,this.y3n_1=new(zt())("kotlin.Byte",J9())}c36(){return this.y3n_1}z3n(r,t){return r.i3b(t)}d36(r,t){return this.z3n(r,t!=null&&typeof t=="number"?t:m())}e36(r){return r.y39()}}P(e,"ByteSerializer",l,l,[Y()]),c_=e}return c_}var op;function pL(){return op===l&&new(vL()),op}var h_;function dL(){if(h_===l){class e{constructor(){cp=this,this.a3o_1=new(zt())("kotlin.Short",Y9())}c36(){return this.a3o_1}b3o(r,t){return r.j3b(t)}d36(r,t){return this.b3o(r,t!=null&&typeof t=="number"?t:m())}e36(r){return r.z39()}}P(e,"ShortSerializer",l,l,[Y()]),h_=e}return h_}var cp;function mL(){return cp===l&&new(dL()),cp}var f_;function wL(){if(f_===l){class e{constructor(){hp=this,this.c3o_1=new(zt())("kotlin.Char",H9())}c36(){return this.c3o_1}d3o(r,t){return r.o3b(t)}d36(r,t){return this.d3o(r,t instanceof J()?t.g2_1:m())}e3o(r){return r.e3a()}e36(r){return new(J())(this.e3o(r))}}P(e,"CharSerializer",l,l,[Y()]),f_=e}return f_}var hp;function gL(){return hp===l&&new(wL()),hp}var v_;function yL(){if(v_===l){class e{constructor(){fp=this,this.f3o_1=new(zt())("kotlin.Double",aN())}c36(){return this.f3o_1}g3o(r,t){return r.n3b(t)}d36(r,t){return this.g3o(r,t!=null&&typeof t=="number"?t:m())}e36(r){return r.d3a()}}P(e,"DoubleSerializer",l,l,[Y()]),v_=e}return v_}var fp;function bL(){return fp===l&&new(yL()),fp}var p_;function kL(){if(p_===l){class e{constructor(){vp=this,this.h3o_1=new(zt())("kotlin.Float",eN())}c36(){return this.h3o_1}i3o(r,t){return r.m3b(t)}d36(r,t){return this.i3o(r,t!=null&&typeof t=="number"?t:m())}e36(r){return r.c3a()}}P(e,"FloatSerializer",l,l,[Y()]),p_=e}return p_}var vp;function mt(){return vp===l&&new(kL()),vp}var d_;function CL(){if(d_===l){class e{constructor(){pp=this,this.j3o_1=new(zt())("kotlin.Boolean",K9())}c36(){return this.j3o_1}k3o(r,t){return r.h3b(t)}d36(r,t){return this.k3o(r,t!=null&&typeof t=="boolean"?t:m())}e36(r){return r.x39()}}P(e,"BooleanSerializer",l,l,[Y()]),d_=e}return d_}var pp;function Mn(){return pp===l&&new(CL()),pp}var m_;function xL(){if(m_===l){class e{constructor(){dp=this,this.l3o_1=new(uL())("kotlin.Unit",S)}c36(){return this.l3o_1.c36()}m3o(r,t){this.l3o_1.u36(r,S)}d36(r,t){return this.m3o(r,t instanceof od()?t:m())}n3o(r){this.l3o_1.e36(r)}e36(r){return this.n3o(r),S}}P(e,"UnitSerializer",l,l,[Y()]),m_=e}return m_}var dp;function SL(){return dp===l&&new(xL()),dp}function zL(e,i){return w1(),qL(e),new(zt())(e,i)}function qL(e){w1();for(var i=sq().d3(),r=i.e1();r.f1();){var t=r.g1(),n=t.c36().f37();if(e===n)throw H().u(ey(` - The name of serial descriptor should uniquely identify associated serializer. - For serial name `+e+" there already exists "+or(t).ce()+`. - Please refer to SerialDescriptor documentation for additional information. - `))}}var Ow;function w1(){Ow||(Ow=!0,lq=JN())}var IL=Math.imul;function Ka(e,i){return new(uq())(e,new($L())(i))}var w_;function uq(){if(w_===l){class e extends Kr(){constructor(r,t){super(r,t,1),this.n3i_1=!0}p38(){return this.n3i_1}hashCode(){return IL(super.hashCode(),31)}equals(r){var t;r:{if(this===r){t=!0;break r}if(!(r instanceof uq())){t=!1;break r}if(this.f37()!==r.f37()){t=!1;break r}if(!(r.n3i_1&&Hs(this.z3h(),r.z3h()))){t=!1;break r}if(this.q38()!==r.q38()){t=!1;break r}var n=0,a=this.q38();if(n=0)){var t="Illegal index "+r+", "+this.f37()+" expects only non-negative indices";throw H().u($(t))}return!1}u38(r){if(!(r>=0)){var t="Illegal index "+r+", "+this.f37()+" expects only non-negative indices";throw H().u($(t))}return ot()}v38(r){if(!(r>=0)){var t="Illegal index "+r+", "+this.f37()+" expects only non-negative indices";throw H().u($(t))}return this.w3c_1}equals(r){return this===r?!0:r instanceof Kn()?!!(E(this.w3c_1,r.w3c_1)&&this.f37()===r.f37()):!1}hashCode(){return bp(V(this.w3c_1),31)+br(this.f37())|0}toString(){return this.f37()+"("+$(this.w3c_1)+")"}}F(e).k38=wn,F(e).p38=gn,F(e).r38=Ra,p(e,"ListLikeDescriptor",l,l,[Lt()]),A_=e}return A_}var E_;function Pd(){if(E_===l){class e{constructor(r,t,n){this.c3d_1=r,this.d3d_1=t,this.e3d_1=n,this.f3d_1=2}f37(){return this.c3d_1}o38(){return Ba()}q38(){return this.f3d_1}s38(r){return r.toString()}t38(r){var t=Xs(r),n;if(t==null)throw H().u(r+" is not a valid map index");return n=t,n}w38(r){if(!(r>=0)){var t="Illegal index "+r+", "+this.f37()+" expects only non-negative indices";throw H().u($(t))}return!1}u38(r){if(!(r>=0)){var t="Illegal index "+r+", "+this.f37()+" expects only non-negative indices";throw H().u($(t))}return ot()}v38(r){if(!(r>=0)){var t="Illegal index "+r+", "+this.f37()+" expects only non-negative indices";throw H().u($(t))}var n;switch(r%2|0){case 0:n=this.d3d_1;break;case 1:n=this.e3d_1;break;default:var a="Unreached";throw fr().u3($(a))}return n}equals(r){return this===r?!0:!(!(r instanceof Pd())||this.f37()!==r.f37()||!E(this.d3d_1,r.d3d_1)||!E(this.e3d_1,r.e3d_1))}hashCode(){var r=br(this.f37());return r=bp(31,r)+V(this.d3d_1)|0,r=bp(31,r)+V(this.e3d_1)|0,r}toString(){return this.f37()+"("+$(this.d3d_1)+", "+$(this.e3d_1)+")"}}F(e).k38=wn,F(e).p38=gn,F(e).r38=Ra,p(e,"MapLikeDescriptor",l,l,[Lt()]),E_=e}return E_}var N_;function KL(){if(N_===l){class e extends Kn(){constructor(r){super(r),this.k3d_1=r.f37()+"Array"}f37(){return this.k3d_1}}p(e,"PrimitiveArrayDescriptor"),N_=e}return N_}var Bd=Math.imul,L_;function Cr(){if(L_===l){class e extends Od(){constructor(r){super(r),this.m3d_1=new(DL())(r.c36())}c36(){return this.m3d_1}n3d(){return N().p1()}o3d(r){return r.h1()}p3d(r){return this.o3d(r instanceof N()?r:m())}q3d(r){return r}r3d(r){return this.q3d(r instanceof N()?r:m())}s3d(r){var t=r instanceof N()?r:null;return t??N().y(r)}t3d(r){return this.s3d(r!=null&&j(r,Qs())?r:m())}u3d(r,t){return r.o6(t)}v3d(r,t){return this.u3d(r instanceof N()?r:m(),t)}w3d(r,t,n){r.q5(t,n)}x3d(r,t,n){var a=r instanceof N()?r:m();return this.w3d(a,t,n==null||n!=null?n:m())}}p(e,"ArrayListSerializer"),L_=e}return L_}var j_;function GL(){if(j_===l){class e extends Od(){constructor(r){super(r),this.i3e_1=new(PL())(r.c36())}c36(){return this.i3e_1}n3d(){return Wt().u8()}j3e(r){return r.h1()}p3d(r){return this.j3e(r instanceof Wt()?r:m())}k3e(r){return r}r3d(r){return this.k3e(r instanceof Wt()?r:m())}l3e(r){var t=r instanceof Wt()?r:null;return t??Wt().v8(r)}t3d(r){return this.l3e(r!=null&&j(r,hd())?r:m())}m3e(r,t){}v3d(r,t){return this.m3e(r instanceof Wt()?r:m(),t)}n3e(r,t,n){r.c1(n)}x3d(r,t,n){var a=r instanceof Wt()?r:m();return this.n3e(a,t,n==null||n!=null?n:m())}}p(e,"HashSetSerializer"),j_=e}return j_}var M_;function JL(){if(M_===l){class e extends Od(){constructor(r){super(r),this.p3e_1=new(BL())(r.c36())}c36(){return this.p3e_1}n3d(){return yt().o1()}q3e(r){return r.h1()}p3d(r){return this.q3e(r instanceof yt()?r:m())}r3e(r){return r}r3d(r){return this.r3e(r instanceof yt()?r:m())}l3e(r){var t=r instanceof yt()?r:null;return t??yt().e2(r)}t3d(r){return this.l3e(r!=null&&j(r,hd())?r:m())}s3e(r,t){}v3d(r,t){return this.s3e(r instanceof yt()?r:m(),t)}t3e(r,t,n){r.c1(n)}x3d(r,t,n){var a=r instanceof yt()?r:m();return this.t3e(a,t,n==null||n!=null?n:m())}}p(e,"LinkedHashSetSerializer"),M_=e}return M_}var T_;function WL(){if(T_===l){class e extends oq(){constructor(r,t){super(r,t),this.w3e_1=new(OL())(r.c36(),t.c36())}c36(){return this.w3e_1}x3e(r){return r.h1()}y3e(r){return this.x3e(r!=null&&j(r,kt())?r:m())}z3e(r){return r.e3().e1()}a3f(r){return this.z3e(r!=null&&j(r,kt())?r:m())}n3d(){return ge().b7()}b3f(r){return Bd(r.h1(),2)}p3d(r){return this.b3f(r instanceof ge()?r:m())}c3f(r){return r}r3d(r){return this.c3f(r instanceof ge()?r:m())}d3f(r){var t=r instanceof ge()?r:null;return t??ge().q7(r)}t3d(r){return this.d3f(r!=null&&j(r,kt())?r:m())}e3f(r,t){}v3d(r,t){return this.e3f(r instanceof ge()?r:m(),t)}}p(e,"HashMapSerializer"),T_=e}return T_}var F_;function _q(){if(F_===l){class e extends oq(){constructor(r,t){super(r,t),this.l3f_1=new(RL())(r.c36(),t.c36())}c36(){return this.l3f_1}x3e(r){return r.h1()}y3e(r){return this.x3e(r!=null&&j(r,kt())?r:m())}z3e(r){return r.e3().e1()}a3f(r){return this.z3e(r!=null&&j(r,kt())?r:m())}n3d(){return zr().va()}m3f(r){return Bd(r.h1(),2)}p3d(r){return this.m3f(r instanceof zr()?r:m())}n3f(r){return r}r3d(r){return this.n3f(r instanceof zr()?r:m())}d3f(r){var t=r instanceof zr()?r:null;return t??zr().xa(r)}t3d(r){return this.d3f(r!=null&&j(r,kt())?r:m())}o3f(r,t){}v3d(r,t){return this.o3f(r instanceof zr()?r:m(),t)}}p(e,"LinkedHashMapSerializer"),F_=e}return F_}var D_;function Ga(){if(D_===l){class e extends Rd(){constructor(r,t){super(t),this.q3f_1=r,this.r3f_1=new(UL())(t.c36())}c36(){return this.r3f_1}s3f(r){return r.length}y3e(r){return this.s3f(r!=null&&wi(r)?r:m())}t3f(r){return O$(r)}a3f(r){return this.t3f(r!=null&&wi(r)?r:m())}n3d(){return N().p1()}u3f(r){return r.h1()}p3d(r){return this.u3f(r instanceof N()?r:m())}v3f(r){return ZN(r,this.q3f_1)}r3d(r){return this.v3f(r instanceof N()?r:m())}w3f(r){return N().y(ny(r))}t3d(r){return this.w3f(r!=null&&wi(r)?r:m())}x3f(r,t){return r.o6(t)}v3d(r,t){return this.x3f(r instanceof N()?r:m(),t)}y3f(r,t,n){r.q5(t,n)}x3d(r,t,n){var a=r instanceof N()?r:m();return this.y3f(a,t,n==null||n!=null?n:m())}}p(e,"ReferenceArraySerializer"),D_=e}return D_}var P_;function Od(){if(P_===l){class e extends Rd(){z3d(r){return r.h1()}y3e(r){return this.z3d(r!=null&&j(r,Fi())?r:m())}a3e(r){return r.e1()}a3f(r){return this.a3e(r!=null&&j(r,Fi())?r:m())}}p(e,"CollectionSerializer"),P_=e}return P_}var B_;function oq(){if(B_===l){class e extends cq(){constructor(r,t){super(),this.f3f_1=r,this.g3f_1=t}h3f(r,t,n,a){if(!(a>=0)){var s="Size must be known in advance when using READ_ALL";throw H().u($(s))}var u=B$(Ct(0,Bd(a,2)),2),_=u.v1_1,o=u.w1_1,c=u.x1_1;if(c>0&&_<=o||c<0&&o<=_)do{var h=_;_=_+c|0,this.i3f(r,n+h|0,t,!1)}while(h!==o)}d3e(r,t,n,a){return this.h3f(r,t!=null&&j(t,F5())?t:m(),n,a)}i3f(r,t,n,a){var s=r.x3a(this.c36(),t,this.f3f_1),u;if(a){var _=r.b3b(this.c36());if(_!==(t+1|0)){var o="Value must follow key in a map, index for key: "+t+", returned index for value: "+_;throw H().u($(o))}u=_}else u=t+1|0;var c=u,h,f;if(n.z2(s)){var v=this.g3f_1.c36().o38();f=!(v instanceof St())}else f=!1;f?h=r.w3a(this.c36(),c,this.g3f_1,r1(n,s)):h=r.x3a(this.c36(),c,this.g3f_1);var d=h;n.f3(s,d)}e3e(r,t,n,a){return this.i3f(r,t,n!=null&&j(n,F5())?n:m(),a)}c3e(r,t){for(var n=this.y3e(t),a=this.c36(),s=r.h3c(a,n),u=this.a3f(t),_=0,o=u;o.f1();){var c=o.g1(),h=c.x2(),f=c.y2(),v=this.c36(),d=_;_=d+1|0,s.c3c(v,d,this.f3f_1,h);var y=this.c36(),b=_;_=b+1|0,s.c3c(y,b,this.g3f_1,f)}s.l3a(a)}d36(r,t){return this.c3e(r,t==null||t!=null?t:m())}}p(e,"MapLikeSerializer"),B_=e}return B_}var O_;function Rd(){if(O_===l){class e extends cq(){constructor(r){super(),this.b3e_1=r}c3e(r,t){var n=this.y3e(t),a=this.c36(),s=r.h3c(a,n),u=this.a3f(t),_=0;if(_=0)){var s="Size must be known in advance when using READ_ALL";throw H().u($(s))}var u=0;if(u(s.s36("key",r.c36()),s.s36("value",t.c36()),S))}c36(){return this.r3p_1}s3p(r){return r.x2()}t3p(r){return this.s3p(r!=null&&j(r,Ri())?r:m())}u3p(r){return r.y2()}v3p(r){return this.u3p(r!=null&&j(r,Ri())?r:m())}w3p(r,t){return new(kp())(r,t)}}p(e,"MapEntrySerializer"),$o=e}return $o}var Ao;function yj(){if(Ao===l){class e extends fq(){constructor(r,t){super(r,t);var n=this;n.c3q_1=Dd("kotlin.Pair",[],a=>(a.s36("first",r.c36()),a.s36("second",t.c36()),S))}c36(){return this.c3q_1}d3q(r){return r.xd_1}t3p(r){return this.d3q(r instanceof D5()?r:m())}e3q(r){return r.yd_1}v3p(r){return this.e3q(r instanceof D5()?r:m())}w3p(r,t){return T(r,t)}}p(e,"PairSerializer"),Ao=e}return Ao}function bj(e,i){var r=i.x3a(e.i3q_1,0,e.f3q_1),t=i.x3a(e.i3q_1,1,e.g3q_1),n=i.x3a(e.i3q_1,2,e.h3q_1);return i.l3a(e.i3q_1),new(t1())(r,t,n)}function kj(e,i){var r=re(),t=re(),n=re();r:for(;;){var a=i.b3b(e.i3q_1);switch(a){case-1:break r;case 0:r=i.x3a(e.i3q_1,0,e.f3q_1);break;case 1:t=i.x3a(e.i3q_1,1,e.g3q_1);break;case 2:n=i.x3a(e.i3q_1,2,e.h3q_1);break;default:throw jr().o37("Unexpected index "+a)}}if(i.l3a(e.i3q_1),r===re())throw jr().o37("Element 'first' is missing");if(t===re())throw jr().o37("Element 'second' is missing");if(n===re())throw jr().o37("Element 'third' is missing");var s=r==null||r!=null?r:m(),u=t==null||t!=null?t:m();return new(t1())(s,u,n==null||n!=null?n:m())}var Eo;function Cj(){if(Eo===l){class e{constructor(r,t,n){this.f3q_1=r,this.g3q_1=t,this.h3q_1=n;var a=this;a.i3q_1=Dd("kotlin.Triple",[],s=>(s.s36("first",this.f3q_1.c36()),s.s36("second",this.g3q_1.c36()),s.s36("third",this.h3q_1.c36()),S))}c36(){return this.i3q_1}j3q(r,t){var n=r.k3a(this.i3q_1);n.c3c(this.i3q_1,0,this.f3q_1,t.tp_1),n.c3c(this.i3q_1,1,this.g3q_1,t.up_1),n.c3c(this.i3q_1,2,this.h3q_1,t.vp_1),n.l3a(this.i3q_1)}d36(r,t){return this.j3q(r,t instanceof t1()?t:m())}e36(r){var t=r.k3a(this.i3q_1);return t.a3b()?bj(this,t):kj(this,t)}}p(e,"TripleSerializer",l,l,[Y()]),Eo=e}return Eo}var No;function fq(){if(No===l){class e{constructor(r,t){this.x3p_1=r,this.y3p_1=t}z3p(r,t){var n=r.k3a(this.c36());n.c3c(this.c36(),0,this.x3p_1,this.t3p(t)),n.c3c(this.c36(),1,this.y3p_1,this.v3p(t)),n.l3a(this.c36())}d36(r,t){return this.z3p(r,t==null||t!=null?t:m())}e36(r){var t=this.c36(),n=r.k3a(t),a;r:{if(n.a3b()){var s=n.x3a(this.c36(),0,this.x3p_1),u=n.x3a(this.c36(),1,this.y3p_1);a=this.w3p(s,u);break r}var _=re(),o=re();t:for(;;){var c=n.b3b(this.c36());switch(c){case-1:break t;case 0:_=n.x3a(this.c36(),0,this.x3p_1);break;case 1:o=n.x3a(this.c36(),1,this.y3p_1);break;default:throw jr().o37("Invalid index: "+c)}}if(_===re())throw jr().o37("Element 'key' is missing");if(o===re())throw jr().o37("Element 'value' is missing");var h=_==null||_!=null?_:m();a=this.w3p(h,o==null||o!=null?o:m())}var f=a;return n.l3a(t),f}}p(e,"KeyValueSerializer",l,l,[Y()]),No=e}return No}var Rw;function xj(){Rw||(Rw=!0,hq=new Object)}function _n(e){return qr()}function Ud(e){return EL()}function g1(e){return LL()}function Kd(e){return ML()}function Gd(e){return FL()}function $r(e){var i;return e.c36().k38()?i=j(e,Y())?e:m():i=new(Dz())(e),i}function Jd(e){return K()}function Wd(e){return Ua()}function Hd(e){return pL()}function Vd(e){return mL()}function vq(e){return gL()}function Sj(){return YL()}function pq(e){return bL()}function zj(){return XL()}function dq(e){return mt()}function qj(){return aa()}function Ij(){return tj()}function $j(){return nj()}function Aj(){return ij()}function Ej(){return lj()}function Nj(){return _j()}function Lj(){return cj()}function jj(){return fj()}function Mj(){return pj()}function mq(e){return Mn()}function Tj(){return mj()}function Fj(e){return SL()}function Dj(){return Yz()}function Pj(e){return BN()}function Bj(e){return RN()}function Oj(e){return KN()}function Rj(e,i){return new(gj())(e,i)}function Uj(e,i){return new(yj())(e,i)}function Kj(e,i,r){return new(Cj())(e,i,r)}function Gj(e,i){return new(Ga())(e,i)}function Cp(e,i){return new(_q())(e,i)}function xp(e){return new(Cr())(e)}function Jj(){return e=>e.c36()}var Lo;function zs(){if(Lo===l){class e extends on(){static i36(r){var t=this.j36();t.f36_1=r,t.g36_1=ot();var n=t,a=lr();return n.h36_1=ur(a,()=>{var s=uN();return bN(se("kotlinx.serialization.Polymorphic",s,[],u=>(u.s36("type",_n().c36()),u.s36("value",se("kotlinx.serialization.Polymorphic<"+t.f36_1.ce()+">",o1(),[])),u.m36_1=t.g36_1,S)),t.f36_1)}),t}t36(){return this.f36_1}c36(){var r=this.h36_1,t=oe();return ce("descriptor",1,t,Jj(),null),r.y2()}toString(){return"kotlinx.serialization.PolymorphicSerializer(baseClass: "+$(this.f36_1)+")"}}p(e,"PolymorphicSerializer"),Lo=e}return Lo}function wq(e,i,r){var t=e.w36(i,r),n;return t==null?Hj(or(r),e.t36()):n=t,n}function Ia(e,i,r){var t=e.v36(i,r),n;return t==null?gq(r,e.t36()):n=t,n}function Wj(e,i){var r=i.u3a(e.c36(),0),t=Ia(e,i,r);return i.x3a(e.c36(),1,t)}var jo;function on(){if(jo===l){class e{static j36(){return Ur(this)}u36(r,t){var n=wq(this,r,t),a=this.c36(),s=r.k3a(a);s.a3c(this.c36(),0,n.c36().f37());var u=this.c36(),_=j(n,Rn())?n:m();s.c3c(u,1,_,t),s.l3a(a)}d36(r,t){return this.u36(r,t??m())}e36(r){var t=this.c36(),n=r.k3a(t),a;r:{var s=null,u=null;if(n.a3b()){a=Wj(this,n);break r}t:for(;;){var _=n.b3b(this.c36());switch(_){case-1:break t;case 0:s=n.u3a(this.c36(),_);break;case 1:var o=s,c;e:if(o==null){var h="Cannot read polymorphic value before its type token";throw H().u($(h))}else{c=o;break e}s=c;var f=Ia(this,n,s);u=n.x3a(this.c36(),_,f);break;default:var v=s;throw jr().o37("Invalid index in polymorphic deserialization of "+(v??"unknown class")+(` - Expected 0, 1 or DECODE_DONE(-1), but found `+_))}}var d=u,y;t:if(d==null){var b="Polymorphic value has not been read for class "+s;throw H().u($(b))}else{y=d;break t}var w=y;a=w??m()}var x=a;return n.l3a(t),x}v36(r,t){return r.z3a().j3c(this.t36(),t)}w36(r,t){return r.z3a().k3c(this.t36(),t)}}p(e,"AbstractPolymorphicSerializer",l,l,[Y()]),jo=e}return jo}function Hj(e,i){var r=e.ce();gq(r??$(e),i)}function gq(e,i){var r="in the polymorphic scope of '"+i.ce()+"'";throw jr().o37(e==null?"Class discriminator was missing and no default serializers were registered "+r+".":"Serializer for subclass '"+e+"' is not found "+r+`. -`+("Check if class with serial name '"+e+`' exists and serializer is registered in a corresponding SerializersModule. -`)+("To be registered automatically, class '"+e+"' has to be '@Serializable', and the base class '"+i.ce()+"' has to be sealed and '@Serializable'."))}var Mo;function Vj(){if(Mo===l){class e{}p(e,"JsonClassDiscriminator"),Mo=e}return Mo}var To;function Yj(){if(To===l){class e{}p(e,"JsonIgnoreUnknownKeys"),To=e}return To}var Fo;function Zj(){if(Fo===l){class e{}p(e,"JsonNames"),Fo=e}return Fo}function Xj(){return e=>e.c36()}var Do;function Qj(){if(Do===l){class e{constructor(r){this.c37_1=r}d37(){return this.c37_1.e1()}e37(r){return r.y2().c36().f37()}g37(r){return this.e37(r==null||r!=null?r:m())}}p(e),Do=e}return Do}var Po;function Yd(){if(Po===l){class e extends on(){static h37(r,t,n,a){var s=this.j36();s.x36_1=t,s.y36_1=ot();var u=s,_=lr();if(u.z36_1=ur(_,()=>{var B=Lz();return se(r,B,[],R=>{R.s36("type",_n().c36());var W="kotlinx.serialization.Sealed<"+s.x36_1.ce()+">",G=o1(),Q=se(W,G,[],X=>{for(var rr=s.b37_1.e3().e1();rr.f1();){var tr=rr.g1(),ir=tr.x2(),dr=tr.y2();X.s36(ir,dr.c36())}return S});return R.s36("value",Q),R.m36_1=s.y36_1,S})}),n.length!==a.length)throw H().u("All subclasses of sealed class "+s.x36_1.ce()+" should be marked @Serializable");s.a37_1=ty(r7(n,a));for(var o=s,c=s.a37_1.e3(),h=new(Qj())(c),f=zr().va(),v=h.d37();v.f1();){var d=v.g1(),y=h.g37(d),b=f.b3(y);if(b==null&&f.z2(y),b!=null){var w="Multiple sealed subclasses of '"+$(s.x36_1)+"' have the same serial name '"+y+"':"+(" '"+$(b.x2())+"', '"+$(d.x2())+"'");throw fr().u3($(w))}f.f3(y,d)}for(var x=zr().wa(iy(f.h1())),q=f.e3().e1();q.f1();){var k=q.g1(),A=k.x2(),D=k.y2().y2();x.f3(A,D)}return o.b37_1=x,s}t36(){return this.x36_1}static i37(r,t,n,a,s){var u=this.h37(r,t,n,a);return u.y36_1=ny(s),u}c36(){var r=this.z36_1,t=oe();return ce("descriptor",1,t,Xj(),null),r.y2()}v36(r,t){var n=this.b37_1,a=(j(n,kt())?n:m()).b3(t);return a??super.v36(r,t)}w36(r,t){var n=this.a37_1.b3(or(t)),a=n??super.w36(r,t),s;return a==null?s=null:s=j(a,Rn())?a:m(),s}}p(e,"SealedClassSerializer"),Po=e}return Po}function Sp(e){return os(e)}function qs(e,i){for(var r=e.r38().e1();r.f1();){var t=r.g1();if(t instanceof Vj())return t.o3y_1}return i.o3r_1.l3t_1}function rM(e,i,r){if(!(e instanceof Yd()))return S;if(Sp(i.c36()).d2(r)){var t=e.c36().f37(),n=i.c36().f37(),a="Sealed class '"+n+"' cannot be serialized as base class '"+t+"' because"+(" it has property name that conflicts with JSON class discriminator '"+r+"'. ")+"You can either change class discriminator in JsonConfiguration, rename property with @SerialName annotation or fall back to array polymorphism";throw fr().u3($(a))}}function tM(e){if(e instanceof Nd()){var i="Enums cannot be serialized polymorphically with 'type' parameter. You can use 'JsonBuilder.useArrayPolymorphism' instead";throw fr().u3($(i))}if(e instanceof St()){var r="Primitives cannot be serialized polymorphically with 'type' parameter. You can use 'JsonBuilder.useArrayPolymorphism' instead";throw fr().u3($(r))}if(e instanceof pn()){var t="Actual serializer for polymorphic cannot be polymorphic itself";throw fr().u3($(t))}}function eM(e,i,r){return rM(e,i,r)}function Zd(e){return e.q3r_1}function yq(){return Jt(),bq}var bq;function nM(){return Jt(),kq}var kq;function Xd(e,i){Jt();var r;if(i.o3r_1.d3t_1)r=!0;else{var t=e.r38(),n;r:{var a;if(j(t,Fi())?a=t.m1():a=!1,a){n=!1;break r}for(var s=t.e1();s.f1();){var u=s.g1();if(u instanceof Yj()){n=!0;break r}}n=!1}r=n}return r}function y1(e,i,r){if(Jt(),xq(i,e)){var t=r.toLowerCase();return Bo(e,i,t)}var n=$a(e,i);if(n!=null)return Bo(e,i,r);var a=e.t38(r);return a!==-3||!i.o3r_1.n3t_1?a:Bo(e,i,r)}function Cq(e,i,r,t){t=t===l?"":t,Jt();var n=y1(e,i,r);if(n===-3)throw jr().o37(e.f37()+" does not contain element with name '"+r+"'"+t);return n}function aM(e,i,r){Jt();var t=$a(e,i);return t==null?e.s38(r):iM(e,i,t)[r]}function $a(e,i){return Jt(),E(e.o38(),Da())?i.o3r_1.o3t_1:null}function zp(e,i){Jt();var r=Zd(e),t=yq();return r.d3x(i,t,()=>sM(i,e))}function xq(e,i){return Jt(),e.o3r_1.p3t_1&&E(i.o38(),Ie())}function Bo(e,i,r){Jt();var t=zp(i,e).b3(r);return t??-3}function iM(e,i,r){Jt();var t=Zd(i),n=nM();return t.d3x(e,n,()=>{for(var a=0,s=e.q38(),u=Array(s);awe(e)}var Qo;function SM(){if(Qo===l){class e{constructor(r){this.f3v_1=Ys(r)}f37(){return we(this).f37()}o38(){return we(this).o38()}q38(){return we(this).q38()}s38(r){return we(this).s38(r)}t38(r){return we(this).t38(r)}u38(r){return we(this).u38(r)}v38(r){return we(this).v38(r)}w38(r){return we(this).w38(r)}}F(e).k38=wn,F(e).p38=gn,F(e).r38=Ra,p(e,l,l,l,[Lt()]),Qo=e}return Qo}var zM=Math.imul,rc;function qM(){if(rc===l){class e{}P(e,"Tombstone"),rc=e}return rc}var Mp;function Gw(e){var i=zM(e.i3x_1,2);e.g3x_1=a7(e.g3x_1,i);for(var r=0,t=new Int32Array(i);r=0&&(r.ja("."),r.ja(s.s38(u)))}else s!==Mp&&(r.ja("["),r.ja("'"),r.ia(s),r.ja("'"),r.ja("]"))}while(n=xr(i)?(e.e3s_1=r,e.y41(),(e.e3s_1+4|0)>=xr(i)&&e.u3w("Unexpected EOF during unicode escape"),Nq(e,i,e.e3s_1)):(e.h3s_1.ka(ji((((_i(e,i,r)<<12)+(_i(e,i,r+1|0)<<8)|0)+(_i(e,i,r+2|0)<<4)|0)+_i(e,i,r+3|0)|0)),r+4|0)}function _i(e,i,r){var t=Nr(i,r),n;if(C(48)<=t&&t<=C(57)){var a=_r(t),s=C(48);n=a-_r(s)|0}else if(C(97)<=t&&t<=C(102)){var u=_r(t),_=C(97);n=(u-_r(_)|0)+10|0}else if(C(65)<=t&&t<=C(70)){var o=_r(t),c=C(65);n=(o-_r(c)|0)+10|0}else e.u3w("Invalid toHexChar char '"+Lr(t)+"' in unicode escape");return n}function EM(e,i){var r=e.x41(i);(r>=xr(e.w41())||r===-1)&&e.u3w("EOF");var t=e.w41(),n=r;r=n+1|0;var a=Nr(t,n),s=_r(a)|32,u,_=C(116);if(s===_r(_))Ww(e,"rue",r),u=!0;else{var o=C(102);s===_r(o)?(Ww(e,"alse",r),u=!1):e.u3w("Expected valid boolean literal prefix, but had '"+e.l3y()+"'")}return u}function Ww(e,i,r){(xr(e.w41())-r|0)=xr(t)||r===-1?!1:Nr(t,r)===C(44)?(this.e3s_1=this.e3s_1+1|0,!0):!1}a42(r){return!(r===C(125)||r===C(93)||r===C(58)||r===C(44))}i3s(){var r=this.m3y();r!==10&&this.u3w("Expected EOF after parsing, but had "+Lr(Nr(this.w41(),this.e3s_1-1|0))+" instead")}i3y(r){var t=this.m3y();if(t!==r){var n=$s(r),a=this.e3s_1-1|0,s=this.e3s_1===xr(this.w41())||a<0?"EOF":Lr(Nr(this.w41(),a)),u="Expected "+n+", but had '"+s+"' instead";this.u3w(u,a)}return t}b42(r){if(this.e3s_1>0&&r===C(34)){var t;r:{var n=this.e3s_1;try{this.e3s_1=this.e3s_1-1|0,t=this.l3y();break r}finally{this.e3s_1=n}}var a=t;a==="null"&&this.t3w("Expected string literal but 'null' literal was found",this.e3s_1-1|0,"Use 'coerceInputValues = true' in 'Json {}' builder to coerce nulls if property has a default value.")}var s=be(r),u=$s(s),_=this.e3s_1-1|0,o=this.e3s_1===xr(this.w41())||_<0?"EOF":Lr(Nr(this.w41(),_)),c="Expected "+u+", but had '"+o+"' instead";this.u3w(c,_)}h3y(){var r=this.w41(),t=this.e3s_1;r:for(;;){if(t=this.x41(t),t===-1)break r;var n=Nr(r,t);if(n===C(32)||n===C(10)||n===C(13)||n===C(9)){t=t+1|0;continue r}return this.e3s_1=t,be(n)}return this.e3s_1=t,10}u3y(r){var t=this.z41();t=this.x41(t);var n=xr(this.w41())-t|0;if(n<4||t===-1)return!1;var a=0;if(a<=3)do{var s=a;if(a=a+1|0,Tr("null",s)!==Nr(this.w41(),t+s|0))return!1}while(a<=3);return n>4&&be(Nr(this.w41(),t+4|0))===0?!1:(r&&(this.e3s_1=t+4|0),!0)}f3z(r,t){return r=r===l?!0:r,t===l?this.u3y(r):t.u3y.call(this,r)}v3y(r){var t=this.h3y(),n;if(r){if(t!==1&&t!==0)return null;n=this.l3y()}else{if(t!==1)return null;n=this.k3y()}var a=n;return this.g3s_1=a,a}c42(){this.g3s_1=null}d23(r,t){var n=this.w41();return $(N5(n,r,t))}k3y(){return this.g3s_1!=null?Jw(this):this.y3y()}consumeString2(r,t,n){for(var a=n,s=t,u=Nr(r,a),_=!1;u!==C(34);)u===C(92)?(_=!0,a=this.x41(IM(this,s,a)),a===-1&&this.u3w("Unexpected EOF",a),s=a):(a=a+1|0,a>=xr(r)&&(_=!0,this.v41(s,a),a=this.x41(a),a===-1&&this.u3w("Unexpected EOF",a),s=a)),u=Nr(r,a);var o;_?o=ec(this,s,a):o=this.d23(s,a);var c=o;return this.e3s_1=a+1|0,c}z3y(){var r=this.l3y();return r==="null"&&$M(this)&&this.u3w("Unexpected 'null' value instead of string literal"),r}l3y(){if(this.g3s_1!=null)return Jw(this);var r=this.z41();(r>=xr(this.w41())||r===-1)&&this.u3w("EOF",r);var t=be(Nr(this.w41(),r));if(t===1)return this.k3y();t!==0&&this.u3w("Expected beginning of the string, but got "+Lr(Nr(this.w41(),r)));for(var n=!1;be(Nr(this.w41(),r))===0;)if(r=r+1|0,r>=xr(this.w41())){n=!0,this.v41(this.e3s_1,r);var a=this.x41(r);if(a===-1)return this.e3s_1=r,ec(this,0,0);r=a}var s;n?s=ec(this,this.e3s_1,r):s=this.d23(this.e3s_1,r);var u=s;return this.e3s_1=r,u}v41(r,t){this.h3s_1.qf(this.w41(),r,t)}x3y(r){var t=N().p1(),n=this.h3y();if(n!==8&&n!==6)return this.l3y(),S;r:for(;;){if(n=this.h3y(),n===1){r?this.l3y():this.y3y();continue r}var a=n;if(a===8||a===6)t.c1(n);else if(a===9){if(nw(t)!==8)throw Sr(this.e3s_1,"found ] instead of } at path: "+this.f3s_1.toString(),this.w41());aw(t)}else if(a===7){if(nw(t)!==6)throw Sr(this.e3s_1,"found } instead of ] at path: "+this.f3s_1.toString(),this.w41());aw(t)}else a===10&&this.u3w("Unexpected end of input due to malformed JSON during ignoring unknown keys");if(this.m3y(),t.h1()===0)return S}}toString(){return"JsonReader(source='"+$(this.w41())+"', currentPosition="+this.e3s_1+")"}w3y(r){var t=this.d23(0,this.e3s_1),n=s7(t,r);throw dn().d3v("Encountered an unknown key '"+r+"' at offset "+n+" at path: "+this.f3s_1.o3x()+` -Use 'ignoreUnknownKeys = true' in 'Json {}' builder or '@JsonIgnoreUnknownKeys' annotation to ignore unknown keys. -`+("JSON input: "+$(Oa(this.w41(),n))))}t3w(r,t,n){var a;xr(n)===0?a="":a=` -`+n;var s=a;throw Sr(t,r+" at path: "+this.f3s_1.o3x()+s,this.w41())}u3w(r,t,n,a){return t=t===l?this.e3s_1:t,n=n===l?"":n,a===l?this.t3w(r,t,n):a.t3w.call(this,r,t,n)}h3z(){var r=this.z41();r=this.x41(r),(r>=xr(this.w41())||r===-1)&&this.u3w("EOF");var t;Nr(this.w41(),r)===C(34)?(r=r+1|0,r===xr(this.w41())&&this.u3w("EOF"),t=!0):t=!1;var n=t,a=0n,s=0n,u=!1,_=!1,o=!1,c=r;r:for(;r!==xr(this.w41());){var h=Nr(this.w41(),r);if((h===C(101)||h===C(69))&&!o){r===c&&this.u3w("Unexpected symbol "+Lr(h)+" in numeric literal"),_=!0,o=!0,r=r+1|0;continue r}if(h===C(45)&&o){r===c&&this.u3w("Unexpected symbol '-' in numeric literal"),_=!1,r=r+1|0;continue r}if(h===C(43)&&o){r===c&&this.u3w("Unexpected symbol '+' in numeric literal"),_=!0,r=r+1|0;continue r}if(h===C(45)){r!==c&&this.u3w("Unexpected symbol '-' in numeric literal"),u=!0,r=r+1|0;continue r}var f=be(h);if(f!==0)break r;r=r+1|0;var v=ye(h,C(48));if(0<=v&&v<=9||this.u3w("Unexpected symbol '"+Lr(h)+"' in numeric literal"),o){var d=s,y=iw(d,bt(10));s=tn(y,bt(v));continue r}var b=a,w=iw(b,bt(10));a=Li(w,bt(v)),a>0n&&this.u3w("Numeric value overflow")}var x=r!==c;if((c===r||u&&c===(r-1|0))&&this.u3w("Expected numeric literal"),n&&(x||this.u3w("EOF"),Nr(this.w41(),r)!==C(34)&&this.u3w("Expected closing quotation mark"),r=r+1|0),this.e3s_1=r,o){var q=ze(a)*NM(s,_);(q>ze(9223372036854775807n)||q=r.length||t===-1?10:(this.e3s_1=t+1|0,be(Tr(r,t)))}j3y(){var r=this.z41();return r>=this.w41().length||r===-1?!1:this.a42(Tr(this.w41(),r))}s3y(r){var t=this.w41(),n=this.z41();(n>=t.length||n===-1)&&(this.e3s_1=-1,this.b42(r));var a=Tr(t,n);if(this.e3s_1=n+1|0,a===r)return S;this.b42(r)}h3y(){var r=this.w41(),t=this.z41();return t>=r.length||t===-1?10:(this.e3s_1=t,be(Tr(r,t)))}z41(){var r=this.e3s_1;if(r===-1)return r;var t=this.w41();r:for(;r>>6|0,t=i&63,n=fd(r);return t!==0&&(n[_7(n)]=Nn(-1n,i)),n}function _T(e,i){var r=(i>>>6|0)-1|0,t=i&63;e.s3g_1[r]=e.s3g_1[r]|Nn(1n,t)}function oT(e){var i=0,r=e.s3g_1.length-1|0;if(i<=r)do{var t=i;i=i+1|0;for(var n=sT(t+1|0,64),a=e.s3g_1[t];a!==-1n;){var s=uy(~a);a=a|Nn(1n,s);var u=n+s|0;if(e.q3g_1(e.p3g_1,u))return e.s3g_1[t]=a,u}e.s3g_1[t]=a}while(i<=r);return-1}var kc;function cT(){if(kc===l){class e{constructor(r,t){Yw(),this.p3g_1=r,this.q3g_1=t;var n=this.p3g_1.q38();if(n<=64){var a=this,s;n===64?s=0n:s=Nn(-1n,n),a.r3g_1=s,this.s3g_1=Yw().o3g_1}else this.r3g_1=0n,this.s3g_1=uT(this,n)}a1h(r){r<64?this.r3g_1=this.r3g_1|Nn(1n,r):_T(this,r)}t3g(){for(var r=this.p3g_1.q38();this.r3g_1!==-1n;){var t=uy(~this.r3g_1);if(this.r3g_1=this.r3g_1|Nn(1n,t),this.q3g_1(this.p3g_1,t))return t}return r>64?oT(this):-1}}p(e,"ElementMarker"),kc=e}return kc}function hT(e,i,r){return e.k3w_1=!i.w38(r)&&i.v38(r).k38(),e.k3w_1}function fT(e){var i=(r,t)=>{var n=e;return hT(n,r,t)};return i.callableName="readIfAbsent",i}var Cc;function vT(){if(Cc===l){class e{constructor(r){var t=this;t.j3w_1=new(cT())(r,fT(this)),this.k3w_1=!1}l3w(r){this.j3w_1.a1h(r)}m3w(){return this.j3w_1.t3g()}}p(e,"JsonElementMarker"),Cc=e}return Cc}function*pT(e,i,r,t){var n=e.g3y_1.c3y_1.h3y(),a;if(n===1)a=Es(e.g3y_1,!0);else if(n===0)a=Es(e.g3y_1,!1);else if(n===6){var s=wT(e.g3y_1,i,t);s===O()&&(s=yield s),a=s}else n===8?a=Pq(e.g3y_1):e.g3y_1.c3y_1.u3w("Can't begin reading element, unexpected token");return a}function dT(e){var i=e.c3y_1.i3y(6);e.c3y_1.h3y()===4&&e.c3y_1.u3w("Unexpected leading comma");var r=zr().va();r:for(;e.c3y_1.j3y();){var t=e.d3y_1?e.c3y_1.l3y():e.c3y_1.k3y();e.c3y_1.i3y(5);var n=e.x1g();r.f3(t,n),i=e.c3y_1.m3y();var a=i;if(a!==4){if(a===7)break r;e.c3y_1.u3w("Expected end of the object or comma")}}return i===6?e.c3y_1.i3y(7):i===4&&(e.e3y_1||mn(e.c3y_1),e.c3y_1.i3y(7)),new(Zr())(r)}function*mT(e,i,r){var t=e.c3y_1.i3y(6);e.c3y_1.h3y()===4&&e.c3y_1.u3w("Unexpected leading comma");var n=zr().va();r:for(;e.c3y_1.j3y();){var a=e.d3y_1?e.c3y_1.l3y():e.c3y_1.k3y();e.c3y_1.i3y(5);var s=i.hp(S,r);s===O()&&(s=yield s);var u=s;n.f3(a,u),t=e.c3y_1.m3y();var _=t;if(_!==4){if(_===7)break r;e.c3y_1.u3w("Expected end of the object or comma")}}return t===6?e.c3y_1.i3y(7):t===4&&(e.e3y_1||mn(e.c3y_1),e.c3y_1.i3y(7)),new(Zr())(n)}function wT(e,i,r){return er(mT.bind(l,e,i),r)}function Pq(e){var i=e.c3y_1.m3y();e.c3y_1.h3y()===4&&e.c3y_1.u3w("Unexpected leading comma");for(var r=N().p1();e.c3y_1.j3y();){var t=e.x1g();if(r.c1(t),i=e.c3y_1.m3y(),i!==4){var n=e.c3y_1,a=i===9,s=n.e3s_1;if(!a){var u="Expected end of the array or comma";n.u3w(u,s)}}}return i===8?e.c3y_1.i3y(9):i===4&&(e.e3y_1||mn(e.c3y_1,"array"),e.c3y_1.i3y(9)),new(Ut())(r)}function Es(e,i){var r;e.d3y_1||!i?r=e.c3y_1.l3y():r=e.c3y_1.k3y();var t=r;return!i&&t==="null"?Ae():new(le())(t,i)}function gT(e){return o7(new(c7())(bT(e)),S)}var xc;function yT(){if(xc===l){class e{constructor(r){this.g3y_1=r}n3y(r,t,n){return er(pT.bind(l,this,r,t),n)}qc(r,t,n){var a=r instanceof h7()?r:m();return this.n3y(a,t instanceof od()?t:m(),n)}}at(e,l,l,[2]),xc=e}return xc}function bT(e){var i=new(yT())(e),r=(t,n,a)=>i.n3y(t,n,a);return r.$arity=2,r}var Sc;function kT(){if(Sc===l){class e{constructor(r,t){this.c3y_1=t,this.d3y_1=r.e3t_1,this.e3y_1=r.q3t_1,this.f3y_1=0}x1g(){var r=this.c3y_1.h3y(),t;if(r===1)t=Es(this,!0);else if(r===0)t=Es(this,!1);else if(r===6){var n;this.f3y_1=this.f3y_1+1|0,this.f3y_1===200?n=gT(this):n=dT(this);var a=n;this.f3y_1=this.f3y_1-1|0,t=a}else r===8?t=Pq(this):this.c3y_1.u3w("Cannot read Json element because of unexpected "+$s(r));return t}}p(e,"JsonTreeReader",l,l,l,[1]),Sc=e}return Sc}var zc;function Zw(){if(zc===l){class e extends CT(){q3o(r,t){return this.s3o(this.r3o(r,t))}s3o(r){var t=this.v3o();return this.w3o(t??"",r)}r3o(r,t){return r.s38(t)}w3o(r,t){var n;return xr(r)===0?n=t:n=r+"."+t,n}x3o(){return this.t3o_1.m1()?"$":Et(this.t3o_1,".","$.")}}p(e,"NamedValueDecoder"),zc=e}return zc}function Xw(e,i,r){e.l3p(i);var t=r();return e.u3o_1||e.m3p(),e.u3o_1=!1,t}var qc;function CT(){if(qc===l){class e{constructor(){var r=this;r.t3o_1=N().p1(),this.u3o_1=!1}z3a(){return Un()}y3o(r){throw jr().o37($(or(this))+" can't retrieve untyped values")}z3o(r){return!0}a3p(r){var t=this.y3o(r);return typeof t=="boolean"?t:m()}b3p(r){var t=this.y3o(r);return typeof t=="number"?t:m()}c3p(r){var t=this.y3o(r);return typeof t=="number"?t:m()}d3p(r){var t=this.y3o(r);return typeof t=="number"?t:m()}e3p(r){var t=this.y3o(r);return typeof t=="bigint"?t:m()}f3p(r){var t=this.y3o(r);return typeof t=="number"?t:m()}g3p(r){var t=this.y3o(r);return typeof t=="number"?t:m()}h3p(r){var t=this.y3o(r);return t instanceof J()?t.g2_1:m()}i3p(r){var t=this.y3o(r);return typeof t=="string"?t:m()}j3p(r,t){var n=this.y3o(r);return typeof n=="number"?n:m()}k3p(r,t){return this.l3p(r),this}i3a(r,t){return this.j3a(r)}h3a(r){return this.k3p(this.m3p(),r)}v39(){var r=this.v3o(),t;if(r==null)return!1;t=r;var n=t;return this.z3o(n)}w39(){return null}x39(){return this.a3p(this.m3p())}y39(){return this.b3p(this.m3p())}z39(){return this.c3p(this.m3p())}a3a(){return this.d3p(this.m3p())}b3a(){return this.e3p(this.m3p())}c3a(){return this.f3p(this.m3p())}d3a(){return this.g3p(this.m3p())}e3a(){return this.h3p(this.m3p())}f3a(){return this.i3p(this.m3p())}g3a(r){return this.j3p(this.m3p(),r)}k3a(r){return this}l3a(r){}m3a(r,t){return this.a3p(this.q3o(r,t))}n3a(r,t){return this.b3p(this.q3o(r,t))}o3a(r,t){return this.c3p(this.q3o(r,t))}p3a(r,t){return this.d3p(this.q3o(r,t))}q3a(r,t){return this.e3p(this.q3o(r,t))}r3a(r,t){return this.f3p(this.q3o(r,t))}s3a(r,t){return this.g3p(this.q3o(r,t))}t3a(r,t){return this.h3p(this.q3o(r,t))}u3a(r,t){return this.i3p(this.q3o(r,t))}v3a(r,t){return this.k3p(this.q3o(r,t),r.v38(t))}w3a(r,t,n,a){var s=this.q3o(r,t);return Xw(this,s,()=>this.i3a(n,a))}y3a(r,t,n,a){var s=this.q3o(r,t);return Xw(this,s,()=>{var u=n.c36().k38(),_;return u||this.v39()?_=this.i3a(n,a):_=this.w39(),_})}v3o(){return _y(this.t3o_1)}l3p(r){this.t3o_1.c1(r)}m3p(){var r=this.t3o_1.w2(f7(this.t3o_1));return this.u3o_1=!0,r}}F(e).x3a=$q,F(e).j3a=zq,F(e).a3b=qq,F(e).c3b=Iq,p(e,"TaggedDecoder",l,l,[Qd(),rm()]),qc=e}return qc}var xT=Math.imul;function ST(e,i,r){var t;if(i instanceof Zr())t=new(Ja())(e,i);else if(i instanceof Ut())t=new(Pp())(e,i);else{var n;i instanceof le()?n=!0:n=E(i,Ae()),n?t=new(Bq())(e,i instanceof wr()?i:m()):gt()}var a=t;return a.j3a(r)}function ut(e,i,r,t){var n=xa(r,"i")?"an "+r:"a "+r;throw Sr(-1,"Failed to parse literal '"+i.toString()+"' as "+n+" value at element: "+e.r3z(t),$(e.s3z()))}var Ic;function cm(){if(Ic===l){class e extends Zw(){constructor(r,t,n){n=n===l?null:n,super(),this.n3z_1=r,this.o3z_1=t,this.p3z_1=n,this.q3z_1=this.t3t().o3r_1}t3t(){return this.n3z_1}y2(){return this.o3z_1}z3a(){return this.t3t().z3a()}s3z(){var r=this.v3o(),t;r==null?t=null:t=this.t3z(r);var n=t;return n??this.y2()}r3z(r){return this.x3o()+("."+r)}u3t(){return this.s3z()}j3a(r){var t;r:{var n;if(r instanceof on()?n=this.t3t().o3r_1.k3t_1:n=!0,n){t=r.e36(this);break r}var a=qs(r.c36(),this.t3t()),s=this.u3t(),u=r.c36().f37();if(!(s instanceof Zr())){var _=Z(Zr()).ce(),o=or(s).ce(),c=this.x3o();throw Sr(-1,"Expected "+_+", but had "+o+" as the serialized body of "+u+" at element: "+c,$(s))}var h=s,f=h.w1m(a),v=f==null?null:Ce(f),d=v==null?null:um(v),y;try{y=Ia(r,this,d)}catch(q){if(q instanceof jr()){var b=q;throw Sr(-1,nr(b.message),h.toString())}else throw q}var w=y,x=j(w,oa())?w:m();t=Oq(this.t3t(),a,h,x)}return t}w3o(r,t){return t}k3a(r){var t=this.s3z(),n=r.o38(),a,s;if(E(n,Pa())?s=!0:s=n instanceof pn(),s){var u=this.t3t(),_=r.f37();if(!(t instanceof Ut())){var o=Z(Ut()).ce(),c=or(t).ce(),h=this.x3o();throw Sr(-1,"Expected "+o+", but had "+c+" as the serialized body of "+_+" at element: "+h,$(t))}a=new(Pp())(u,t)}else if(E(n,Ba())){var f=this.t3t(),v=cs(r.v38(0),f.z3a()),d=v.o38(),y,b;if(d instanceof St()?b=!0:b=E(d,Ie()),b){var w=this.t3t(),x=r.f37();if(!(t instanceof Zr())){var q=Z(Zr()).ce(),k=or(t).ce(),A=this.x3o();throw Sr(-1,"Expected "+q+", but had "+k+" as the serialized body of "+x+" at element: "+A,$(t))}y=new(zT())(w,t)}else if(f.o3r_1.f3t_1){var D=this.t3t(),B=r.f37();if(!(t instanceof Ut())){var R=Z(Ut()).ce(),W=or(t).ce(),G=this.x3o();throw Sr(-1,"Expected "+R+", but had "+W+" as the serialized body of "+B+" at element: "+G,$(t))}y=new(Pp())(D,t)}else throw Mz(v);a=y}else{var Q=this.t3t(),X=r.f37();if(!(t instanceof Zr())){var rr=Z(Zr()).ce(),tr=or(t).ce(),ir=this.x3o();throw Sr(-1,"Expected "+rr+", but had "+tr+" as the serialized body of "+X+" at element: "+ir,$(t))}a=new(Ja())(Q,t,this.p3z_1)}return a}l3a(r){}v39(){var r=this.s3z();return!(r instanceof Ge())}u3z(r,t){var n=this.t3t(),a=this.t3z(r),s=t.f37();if(!(a instanceof wr())){var u=Z(wr()).ce(),_=or(a).ce(),o=this.r3z(r);throw Sr(-1,"Expected "+u+", but had "+_+" as the serialized body of "+s+" at element: "+o,$(a))}return Cq(t,n,a.c3u())}j3p(r,t){return this.u3z(r!=null&&typeof r=="string"?r:m(),t)}v3z(r){return this.t3z(r)!==Ae()}z3o(r){return this.v3z(r!=null&&typeof r=="string"?r:m())}w3z(r){var t;r:{var n=this.t3z(r);if(!(n instanceof wr())){var a=Z(wr()).ce(),s=or(n).ce(),u=this.r3z(r);throw Sr(-1,"Expected "+a+", but had "+s+" as the serialized body of boolean at element: "+u,$(n))}var _=n;try{var o=Tq(_),c;o==null?ut(this,_,"boolean",r):c=o,t=c;break r}catch(h){if(h instanceof H())ut(this,_,"boolean",r);else throw h}}return t}a3p(r){return this.w3z(r!=null&&typeof r=="string"?r:m())}x3z(r){var t;r:{var n=this.t3z(r);if(!(n instanceof wr())){var a=Z(wr()).ce(),s=or(n).ce(),u=this.r3z(r);throw Sr(-1,"Expected "+a+", but had "+s+" as the serialized body of byte at element: "+u,$(n))}var _=n;try{var o=Re(_),c,h=Yt(-128,127);la(j(h,ua())?h:m(),o)?c=B5(o):c=null;var f=c,v;f==null?ut(this,_,"byte",r):v=f,t=v;break r}catch(d){if(d instanceof H())ut(this,_,"byte",r);else throw d}}return t}b3p(r){return this.x3z(r!=null&&typeof r=="string"?r:m())}y3z(r){var t;r:{var n=this.t3z(r);if(!(n instanceof wr())){var a=Z(wr()).ce(),s=or(n).ce(),u=this.r3z(r);throw Sr(-1,"Expected "+a+", but had "+s+" as the serialized body of short at element: "+u,$(n))}var _=n;try{var o=Re(_),c,h=Yt(-32768,32767);la(j(h,ua())?h:m(),o)?c=O5(o):c=null;var f=c,v;f==null?ut(this,_,"short",r):v=f,t=v;break r}catch(d){if(d instanceof H())ut(this,_,"short",r);else throw d}}return t}c3p(r){return this.y3z(r!=null&&typeof r=="string"?r:m())}z3z(r){var t;r:{var n=this.t3z(r);if(!(n instanceof wr())){var a=Z(wr()).ce(),s=or(n).ce(),u=this.r3z(r);throw Sr(-1,"Expected "+a+", but had "+s+" as the serialized body of int at element: "+u,$(n))}var _=n;try{var o=Re(_),c,h=Yt(-2147483648,2147483647);la(j(h,ua())?h:m(),o)?c=Ca(o):c=null;var f=c,v;f==null?ut(this,_,"int",r):v=f,t=v;break r}catch(d){if(d instanceof H())ut(this,_,"int",r);else throw d}}return t}d3p(r){return this.z3z(r!=null&&typeof r=="string"?r:m())}a40(r){var t;r:{var n=this.t3z(r);if(!(n instanceof wr())){var a=Z(wr()).ce(),s=or(n).ce(),u=this.r3z(r);throw Sr(-1,"Expected "+a+", but had "+s+" as the serialized body of long at element: "+u,$(n))}var _=n;try{var o=Re(_),c;o==null?ut(this,_,"long",r):c=o,t=c;break r}catch(h){if(h instanceof H())ut(this,_,"long",r);else throw h}}return t}e3p(r){return this.a40(r!=null&&typeof r=="string"?r:m())}b40(r){var t;r:{var n=this.t3z(r);if(!(n instanceof wr())){var a=Z(wr()).ce(),s=or(n).ce(),u=this.r3z(r);throw Sr(-1,"Expected "+a+", but had "+s+" as the serialized body of float at element: "+u,$(n))}var _=n;try{var o=tT(_),c;o==null?ut(this,_,"float",r):c=o,t=c;break r}catch(v){if(v instanceof H())ut(this,_,"float",r);else throw v}}var h=t,f=this.t3t().o3r_1.m3t_1;if(f||pd(h))return h;throw Ew(h,r,$(this.s3z()))}f3p(r){return this.b40(r!=null&&typeof r=="string"?r:m())}c40(r){var t;r:{var n=this.t3z(r);if(!(n instanceof wr())){var a=Z(wr()).ce(),s=or(n).ce(),u=this.r3z(r);throw Sr(-1,"Expected "+a+", but had "+s+" as the serialized body of double at element: "+u,$(n))}var _=n;try{var o=Fq(_),c;o==null?ut(this,_,"double",r):c=o,t=c;break r}catch(v){if(v instanceof H())ut(this,_,"double",r);else throw v}}var h=t,f=this.t3t().o3r_1.m3t_1;if(f||dd(h))return h;throw Ew(h,r,$(this.s3z()))}g3p(r){return this.c40(r!=null&&typeof r=="string"?r:m())}d40(r){var t;r:{var n=this.t3z(r);if(!(n instanceof wr())){var a=Z(wr()).ce(),s=or(n).ce(),u=this.r3z(r);throw Sr(-1,"Expected "+a+", but had "+s+" as the serialized body of char at element: "+u,$(n))}var _=n;try{var o=new(J())(p7(_.c3u())),c;o==null?ut(this,_,"char",r):c=o,t=c.g2_1;break r}catch(h){if(h instanceof H())ut(this,_,"char",r);else throw h}}return t}h3p(r){return this.d40(r!=null&&typeof r=="string"?r:m())}e40(r){var t=this.t3z(r);if(!(t instanceof wr())){var n=Z(wr()).ce(),a=or(t).ce(),s=this.r3z(r);throw Sr(-1,"Expected "+n+", but had "+a+" as the serialized body of string at element: "+s,$(t))}var u=t;if(!(u instanceof le()))throw Sr(-1,"Expected string value for a non-null key '"+r+"', got null literal instead at element: "+this.r3z(r),$(this.s3z()));if(!u.f3u_1&&!this.t3t().o3r_1.e3t_1)throw Sr(-1,"String literal for key '"+r+"' should be quoted at element: "+this.r3z(r)+`. -Use 'isLenient = true' in 'Json {}' builder to accept non-compliant JSON.`,$(this.s3z()));return u.h3u_1}i3p(r){return this.e40(r!=null&&typeof r=="string"?r:m())}f40(r,t){var n;if(_m(t)){var a=this.t3t(),s=this.t3z(r),u=t.f37();if(!(s instanceof wr())){var _=Z(wr()).ce(),o=or(s).ce(),c=this.r3z(r);throw Sr(-1,"Expected "+_+", but had "+o+" as the serialized body of "+u+" at element: "+c,$(s))}var h=jq(a,s.c3u());n=new(Rq())(h,this.t3t())}else n=super.k3p(r,t);return n}k3p(r,t){return this.f40(r!=null&&typeof r=="string"?r:m(),t)}h3a(r){return this.v3o()!=null?super.h3a(r):new(Bq())(this.t3t(),this.y2(),this.p3z_1).h3a(r)}}p(e,"AbstractJsonTreeDecoder",l,l,[Zw(),tm()]),Ic=e}return Ic}function Qw(e,i,r){return e.p40_1=!e.t3t().o3r_1.h3t_1&&!i.w38(r)&&i.v38(r).k38(),e.p40_1}var $c;function Ja(){if($c===l){class e extends cm(){constructor(r,t,n,a){n=n===l?null:n,a=a===l?null:a,super(r,t,n),this.m40_1=t,this.n40_1=a,this.o40_1=0,this.p40_1=!1}y2(){return this.m40_1}b3b(r){r:for(;this.o40_1i)}var Tc;function DT(){if(Tc===l){class e{}Ar(e,"SerializersModuleCollector"),Tc=e}return Tc}function PT(e,i,r){var t=i.o38(),n;if(t instanceof pn()?n=!0:n=E(t,o1()),n)throw H().u("Serializer for "+r.ce()+" can't be registered as a subclass for polymorphic serialization "+("because its kind "+t.toString()+" is not concrete. To work with multiple hierarchies, register it as a base class."));if(e.q3x_1)return S;if(!e.r3x_1)return S;var a,s;if(E(t,Pa())||E(t,Ba())?s=!0:s=t instanceof St(),s?a=!0:a=t instanceof Nd(),a)throw H().u("Serializer for "+r.ce()+" of kind "+t.toString()+" cannot be serialized polymorphically with class discriminator.")}function BT(e,i,r){var t=0,n=i.q38();if(te.c36()}var Rc;function HT(){if(Rc===l){class e{constructor(r,t){this.u3g_1=t,this.v3g_1=null;var n=this;n.w3g_1=Ys(()=>{var a=this.v3g_1;return a??JT(this,r)})}c36(){var r=this.w3g_1,t=oe();return ce("descriptor",1,t,WT(),null),r.y2()}k3h(r,t){var n=x7(this.u3g_1,t);if(n===-1)throw jr().o37($(t)+" is not a valid enum "+this.c36().f37()+", "+("must be one of "+S7(this.u3g_1)));r.q3b(this.c36(),n)}d36(r,t){return this.k3h(r,t instanceof Kt()?t:m())}e36(r){var t=r.g3a(this.c36());if(!(0<=t&&t<=(this.u3g_1.length-1|0)))throw jr().o37(""+t+" is not among valid "+this.c36().f37()+" enum values, "+("values size is "+this.u3g_1.length));return this.u3g_1[t]}toString(){return"kotlinx.serialization.internal.EnumSerializer<"+this.c36().f37()+">"}}p(e,"EnumSerializer",l,l,[Y()]),Rc=e}return Rc}function Gq(e){var i=e.y3h_1,r=oe();return ce("elementDescriptors",1,r,VT(),null),i.y2()}function VT(){return e=>Gq(e)}var Uc;function YT(){if(Uc===l){class e extends Kr(){constructor(r,t){super(r,l,t),this.x3h_1=Ie();var n=this;n.y3h_1=Ys(()=>{for(var a=0,s=t,u=Array(s);a>>1|0}while(a<32);throw Z5().e38(t,r.f37())}var Kc;function ZT(){if(Kc===l){class e{v3t(){var r=Z(vm()),t=[Z(ee()),Z(ne())],n=[Rp(),Kp()],a=[];return Yd().i37("com.github.minigdx.tiny.sound.Modulation",r,t,n,a)}d3j(r){return this.v3t()}}ar(e,l,[m1()]),Kc=e}return Kc}var fm;function XT(){return fm}var Gc;function vm(){if(Gc===l){class e{}Ar(e,"Modulation",l,l,l,l,l,{0:XT}),Gc=e}return Gc}function QT(e){return e.z4t_1*2-1}var Jc;function rF(){if(Jc===l){class e{}ar(e),Jc=e}return Jc}var Wc;function tF(){if(Wc===l){class e{constructor(){Op=this;var r=new(Kr())("com.github.minigdx.tiny.sound.Sweep",this,3);r.a3i("sweep",!1),r.a3i("acceleration",!1),r.a3i("active",!0),this.h5o_1=r}i5o(r,t){var n=this.h5o_1,a=r.k3a(n);a.x3b(n,0,t.y4t_1),a.x3b(n,1,t.z4t_1),(a.i3c(n,2)||t.a4u_1!==!1)&&a.s3b(n,2,t.a4u_1),a.l3a(n)}d36(r,t){return this.i5o(r,t instanceof ee()?t:m())}e36(r){var t=this.h5o_1,n=!0,a=0,s=0,u=0,_=0,o=!1,c=r.k3a(t);if(c.a3b())u=c.r3a(t,0),s=s|1,_=c.r3a(t,1),s=s|2,o=c.m3a(t,2),s=s|4;else for(;n;)switch(a=c.b3b(t),a){case-1:n=!1;break;case 0:u=c.r3a(t,0),s=s|1;break;case 1:_=c.r3a(t,1),s=s|2;break;case 2:o=c.m3a(t,2),s=s|4;break;default:throw Xr().w37(a)}return c.l3a(t),ee().j5o(s,u,_,o,null)}c36(){return this.h5o_1}p3i(){return[mt(),mt(),Mn()]}}F(e).q3i=Hr,P(e,"$serializer",l,l,[Vr()]),Wc=e}return Wc}var Op;function Rp(){return Op===l&&new(tF()),Op}var Hc;function ee(){if(Hc===l){class e{constructor(r,t){this.y4t_1=r,this.z4t_1=t,this.a4u_1=!1}x4t(r){this.a4u_1=r}w4t(){return this.a4u_1}g5o(r,t){return t+r*(this.y4t_1*QT(this))}static j5o(r,t,n,a,s){(3&r)!==3&&rt(r,3,Rp().h5o_1);var u=Ur(this);return u.y4t_1=t,u.z4t_1=n,(r&4)===0?u.a4u_1=!1:u.a4u_1=a,u}}p(e,"Sweep",l,l,[vm()],l,l,{0:Rp}),Hc=e}return Hc}var Vc;function eF(){if(Vc===l){class e{}ar(e),Vc=e}return Vc}var Yc;function nF(){if(Yc===l){class e{constructor(){Up=this;var r=new(Kr())("com.github.minigdx.tiny.sound.Vibrato",this,3);r.a3i("vibratoFrequency",!1),r.a3i("depth",!1),r.a3i("active",!0),this.k5o_1=r}l5o(r,t){var n=this.k5o_1,a=r.k3a(n);a.x3b(n,0,t.b4u_1),a.x3b(n,1,t.c4u_1),(a.i3c(n,2)||t.d4u_1!==!1)&&a.s3b(n,2,t.d4u_1),a.l3a(n)}d36(r,t){return this.l5o(r,t instanceof ne()?t:m())}e36(r){var t=this.k5o_1,n=!0,a=0,s=0,u=0,_=0,o=!1,c=r.k3a(t);if(c.a3b())u=c.r3a(t,0),s=s|1,_=c.r3a(t,1),s=s|2,o=c.m3a(t,2),s=s|4;else for(;n;)switch(a=c.b3b(t),a){case-1:n=!1;break;case 0:u=c.r3a(t,0),s=s|1;break;case 1:_=c.r3a(t,1),s=s|2;break;case 2:o=c.m3a(t,2),s=s|4;break;default:throw Xr().w37(a)}return c.l3a(t),ne().m5o(s,u,_,o,null)}c36(){return this.k5o_1}p3i(){return[mt(),mt(),Mn()]}}F(e).q3i=Hr,P(e,"$serializer",l,l,[Vr()]),Yc=e}return Yc}var Up;function Kp(){return Up===l&&new(nF()),Up}var Zc;function ne(){if(Zc===l){class e{constructor(r,t){this.b4u_1=r,this.c4u_1=t,this.d4u_1=!1}x4t(r){this.d4u_1=r}w4t(){return this.d4u_1}g5o(r,t){var n=6.2831855*this.b4u_1*r,a=Math.sin(n)*this.c4u_1;return t+a}static m5o(r,t,n,a,s){(3&r)!==3&&rt(r,3,Kp().k5o_1);var u=Ur(this);return u.b4u_1=t,u.c4u_1=n,(r&4)===0?u.d4u_1=!1:u.d4u_1=a,u}}p(e,"Vibrato",l,l,[vm()],l,l,{0:Kp}),Zc=e}return Zc}fm=new(ZT());new(rF());new(eF());var Jq,Wq,Hq,Vq,Yq,Zq;function aF(){return[Ls(),pm(),js(),cn(),dm(),mm()]}function iF(e){switch(e){case"SAW_TOOTH":return Ls();case"PULSE":return pm();case"TRIANGLE":return js();case"SINE":return cn();case"NOISE":return dm();case"SQUARE":return mm();default:bn(),Rg("No enum constant com.github.minigdx.tiny.sound.Instrument.WaveType."+e);break}}var tg;function bn(){if(tg)return S;tg=!0,Jq=new(xn())("SAW_TOOTH",0),Wq=new(xn())("PULSE",1),Hq=new(xn())("TRIANGLE",2),Vq=new(xn())("SINE",3),Yq=new(xn())("NOISE",4),Zq=new(xn())("SQUARE",5)}function sF(){return hm("com.github.minigdx.tiny.sound.Instrument.WaveType",aF())}function lF(){return new(Cr())(fm.v3t())}var Xc;function xn(){if(Xc===l){class e extends Kt(){}p(e,"WaveType"),Xc=e}return Xc}var Qc;function uF(){if(Qc===l){class e{constructor(){Gp=this;var r=this,t=lr(),n=ur(t,sF),a=lr();r.v5o_1=[null,null,n,null,null,null,null,null,ur(a,lF)],this.w5o_1=7,this.x5o_1=6.2831855}}ar(e),Qc=e}return Qc}var Gp;function ha(){return Gp===l&&new(uF()),Gp}var rh;function _F(){if(rh===l){class e{constructor(){Jp=this;var r=new(Kr())("com.github.minigdx.tiny.sound.Instrument",this,9);r.a3i("index",!1),r.a3i("name",!0),r.a3i("wave",!0),r.a3i("attack",!0),r.a3i("decay",!0),r.a3i("sustain",!0),r.a3i("release",!0),r.a3i("harmonics",!0),r.a3i("modulations",!0),this.y5o_1=r}z5o(r,t){var n=this.y5o_1,a=r.k3a(n),s=ha().v5o_1;a.v3b(n,0,t.e4s_1),(a.i3c(n,1)||t.f4s_1!=="Instrument "+t.e4s_1)&&a.e3c(n,1,qr(),t.f4s_1),(a.i3c(n,2)||!t.g4s_1.equals(cn()))&&a.c3c(n,2,s[2].y2(),t.g4s_1),(a.i3c(n,3)||!E(t.h4s_1,0))&&a.x3b(n,3,t.h4s_1),(a.i3c(n,4)||!E(t.i4s_1,0))&&a.x3b(n,4,t.i4s_1),(a.i3c(n,5)||!E(t.j4s_1,0))&&a.x3b(n,5,t.j4s_1),(a.i3c(n,6)||!E(t.k4s_1,0))&&a.x3b(n,6,t.k4s_1),(a.i3c(n,7)||!E(t.l4s_1,new Float32Array(7)))&&a.c3c(n,7,aa(),t.l4s_1),(a.i3c(n,8)||!E(t.m4s_1,Rr([new(ee())(za().s4q_1,1),new(ne())(0,0)])))&&a.c3c(n,8,s[8].y2(),t.m4s_1),a.l3a(n)}d36(r,t){return this.z5o(r,t instanceof At()?t:m())}e36(r){var t=this.y5o_1,n=!0,a=0,s=0,u=0,_=null,o=null,c=0,h=0,f=0,v=0,d=null,y=null,b=r.k3a(t),w=ha().v5o_1;if(b.a3b())u=b.p3a(t,0),s=s|1,_=b.y3a(t,1,qr(),_),s=s|2,o=b.w3a(t,2,w[2].y2(),o),s=s|4,c=b.r3a(t,3),s=s|8,h=b.r3a(t,4),s=s|16,f=b.r3a(t,5),s=s|32,v=b.r3a(t,6),s=s|64,d=b.w3a(t,7,aa(),d),s=s|128,y=b.w3a(t,8,w[8].y2(),y),s=s|256;else for(;n;)switch(a=b.b3b(t),a){case-1:n=!1;break;case 0:u=b.p3a(t,0),s=s|1;break;case 1:_=b.y3a(t,1,qr(),_),s=s|2;break;case 2:o=b.w3a(t,2,w[2].y2(),o),s=s|4;break;case 3:c=b.r3a(t,3),s=s|8;break;case 4:h=b.r3a(t,4),s=s|16;break;case 5:f=b.r3a(t,5),s=s|32;break;case 6:v=b.r3a(t,6),s=s|64;break;case 7:d=b.w3a(t,7,aa(),d),s=s|128;break;case 8:y=b.w3a(t,8,w[8].y2(),y),s=s|256;break;default:throw Xr().w37(a)}return b.l3a(t),At().a5p(s,u,_,o,c,h,f,v,d,y,null)}c36(){return this.y5o_1}p3i(){var r=ha().v5o_1;return[K(),$r(qr()),r[2].y2(),mt(),mt(),mt(),mt(),aa(),r[8].y2()]}}F(e).q3i=Hr,P(e,"$serializer",l,l,[Vr()]),rh=e}return rh}var Jp;function Wp(){return Jp===l&&new(_F()),Jp}function Ls(){return bn(),Jq}function pm(){return bn(),Wq}function js(){return bn(),Hq}function cn(){return bn(),Vq}function dm(){return bn(),Yq}function mm(){return bn(),Zq}var th;function At(){if(th===l){class e{constructor(r,t,n,a,s,u,_,o,c){ha(),t=t===l?"Instrument "+r:t,n=n===l?cn():n,a=a===l?0:a,s=s===l?0:s,u=u===l?0:u,_=_===l?0:_,o=o===l?new Float32Array(7):o,c=c===l?Rr([new(ee())(za().s4q_1,1),new(ne())(0,0)]):c,this.e4s_1=r,this.f4s_1=t,this.g4s_1=n,this.h4s_1=a,this.i4s_1=s,this.j4s_1=u,this.k4s_1=_,this.l4s_1=o,this.m4s_1=c,this.n4s_1=0,this.o4s_1=0,this.p4s_1=0}b5p(r,t){for(var n=this.m4s_1,a=N().p1(),s=n.e1();s.f1();){var u=s.g1();u.w4t()&&a.c1(u)}for(var _=r,o=a.e1();o.f1();){var c=o.g1(),h=_;_=c.g5o(t,h)}var f=_,v;switch(this.g4s_1.i3_1){case 2:var d=6.2831855*f*t,y=Math.sin(d),b=(y+1)%1;return b<.5?4*b-1:3-4*b;case 3:var w=6.2831855*f*t;v=Math.sin(w);break;case 5:var x=6.2831855*f*t,q=Math.sin(x),k;return q>0?k=1:k=-1,k;case 1:var A=6.2831855*f*t,D=Math.sin(A),B=D%1,R=2*(D/128%1)-1,W=Math.abs(R),G=(B+.5*W)%1,Q=4*G-2,X=Math.abs(Q),rr=8*B-4,tr=X-Math.abs(rr);return tr/6;case 0:var ir=6.2831855*f*t,dr=Math.sin(ir);return dr*2-1;case 4:var cr;if(this.o4s_1===f)cr=this.p4s_1;else{var mr=Math.max(1,f),Dr=6.2831855*mr/44100,Ir=-Dr,Or=Math.exp(Ir);this.p4s_1=1-Or,this.o4s_1=f,cr=this.p4s_1}var Yr=cr,Gr=an().el()*2-1,Er=Yr*Gr+(1-Yr)*this.n4s_1;return this.n4s_1=Er,Er;default:gt();break}return v}static a5p(r,t,n,a,s,u,_,o,c,h,f){ha(),(1&r)!==1&&rt(r,1,Wp().y5o_1);var v=Ur(this);return v.e4s_1=t,(r&2)===0?v.f4s_1="Instrument "+v.e4s_1:v.f4s_1=n,(r&4)===0?v.g4s_1=cn():v.g4s_1=a,(r&8)===0?v.h4s_1=0:v.h4s_1=s,(r&16)===0?v.i4s_1=0:v.i4s_1=u,(r&32)===0?v.j4s_1=0:v.j4s_1=_,(r&64)===0?v.k4s_1=0:v.k4s_1=o,(r&128)===0?v.l4s_1=new Float32Array(7):v.l4s_1=c,(r&256)===0?v.m4s_1=Rr([new(ee())(za().s4q_1,1),new(ne())(0,0)]):v.m4s_1=h,v.n4s_1=0,v.o4s_1=0,v.p4s_1=0,v}}p(e,"Instrument",l,l,l,l,l,{0:Wp}),th=e}return th}function oF(){return he(),Xq}var Xq;function cF(){return he(),Qq}var Qq;function hF(){return he(),rI}var rI;function fF(){return he(),tI}var tI;function vF(e,i){he();var r;if(i)r=cF().i38(e);else{var t=oF().i38(e),n;t==null?n=null:n=j(t,Y())?t:m(),r=n}return r}function pF(e,i,r){he();var t;if(r)t=fF().j38(e,i);else{var n=hF().j38(e,i);t=new(sw())(n)instanceof sw()?n:m()}return t}function dF(e){he();var i=wm(e),r;return i==null?r=ca(e)?zs().i36(e):null:r=i,r}function mF(e){he();var i=wm(e),r;i==null?r=ca(e)?zs().i36(e):null:r=i;var t=r,n=t==null?null:$r(t),a;return n==null?a=null:a=j(n,Y())?n:m(),a}function wF(e,i){he();var r=nr(gm(Un(),i));return ym(e,r,()=>i.l1(0).ne())}function gF(e,i){he();var r=nr(gm(Un(),i)),t=ym(e,r,()=>i.l1(0).ne()),n=t==null?null:$r(t),a;return n==null?a=null:a=j(n,Y())?n:m(),a}var eg;function he(){eg||(eg=!0,Xq=Pw(dF),Qq=Pw(mF),rI=Bw(wF),tI=Bw(gF))}function wm(e){var i=HN(e);return i??cL(e)}function gm(e,i,r){var t;{for(var n=N().d1(yr(i,10)),a=i.e1();a.f1();){var s=a.g1(),u=Ms(e,s);n.c1(u)}t=n}var _=t;return _}function ym(e,i,r){var t=yF(e,i,r);return t??bF(e,i)}function Ms(e,i){var r=kF(e,i),t;return r==null?VN(Fz(i)):t=r,t}function yF(e,i,r){var t;if(e.equals(Z(Fi()))||e.equals(Z(Qs()))||e.equals(Z(Bg()))||e.equals(Z(N())))t=new(Cr())(i.l1(0));else if(e.equals(Z(Wt())))t=new(GL())(i.l1(0));else if(e.equals(Z(hd()))||e.equals(Z(I7()))||e.equals(Z(yt())))t=new(JL())(i.l1(0));else if(e.equals(Z(ge())))t=new(WL())(i.l1(0),i.l1(1));else if(e.equals(Z(kt()))||e.equals(Z(F5()))||e.equals(Z(zr())))t=new(_q())(i.l1(0),i.l1(1));else if(e.equals(Z(Ri())))t=Rj(i.l1(0),i.l1(1));else if(e.equals(Z(D5())))t=Uj(i.l1(0),i.l1(1));else if(e.equals(Z(t1())))t=Kj(i.l1(0),i.l1(1),i.l1(2));else{var n;if(YN(e)){var a=r();n=Gj(a!=null&&j(a,Be())?a:m(),i.l1(0))}else n=null;t=n}return t}function bF(e,i){var r=lt(i);return Xz(e,r.slice())}function kF(e,i,r){for(var t=Fz(i),n=i.pe(),a=i.oe(),s=N().d1(yr(a,10)),u=a.e1();u.f1();){var _=u.g1(),o=dN(_);s.c1(o)}var c=s,h;if(c.m1()){var f;ca(t)&&e.g38(t)!=null?f=null:f=vF(t,n),h=f}else{var v;if(e.f38())v=null;else{var d=pF(t,c,n),y;if(z7(d))y=null;else{var b=q7(d);y=b==null||b!=null?b:m()}v=y}h=v}var w=h;if(w!=null)return w;var x;if(c.m1()){var q=wm(t),k=q??e.g38(t),A;k==null?A=ca(t)?zs().i36(t):null:A=k,x=A}else{var D=gm(e,c),B;if(D==null)return null;B=D;var R=B,W=ym(t,R,()=>c.l1(0).ne()),G=W??e.h38(t,R),Q;G==null?Q=ca(t)?zs().i36(t):null:Q=G,x=Q}var X=x,rr;X==null?rr=null:rr=j(X,Y())?X:m();var tr=rr;return tr==null?null:CF(tr,n)}function CF(e,i){return i?$r(e):j(e,Y())?e:m()}function*xF(e,i,r){Rt("Loading audio worklet module...");var t=e.e5t_1.f5t().audioWorklet,n=s9(),a=t.addModule(n),s=c9(a,r);s===O()&&(s=yield s);var u=S;Rt("Audio worklet module loaded successfully "+u.toString()),Rt("Creating AudioWorkletNode for SynthesizerProcessor");var _=e.e5t_1,o=e.e5t_1.f5t(),c="SynthesizerProcessor";_.b5t_1=new AudioWorkletNode(o,c);var h=e.e5t_1.f5t().destination;return Rt("Connecting worklet to destination node: "+$(h)),Hp(e.e5t_1).connect(h),Rt("Audio worklet ready!"),e.e5t_1.y5s_1=!0,S}function Hp(e){var i=e.b5t_1;if(i!=null)return i;st("audioWorkletNode")}function ng(e){e.z5s_1=e.f5t().currentTime,bd(e.c5t_1,l,l,IF(e))}function SF(e,i){var r=i.i3_1+12|0,t=(r-69|0)/12;return 440*Math.pow(2,t)}var eh;function zF(){if(eh===l){class e{constructor(){this.g5t_1=4096,this.h5t_1=8}}ar(e),eh=e}return eh}var nh;function qF(){if(nh===l){class e{constructor(r){this.e5t_1=r}b1b(r,t){return er(xF.bind(l,this,r),t)}oc(r,t){return this.b1b(r!=null&&j(r,kd())?r:m(),t)}}at(e,l,l,[1]),nh=e}return nh}function IF(e){var i=new(qF())(e),r=(t,n)=>i.b1b(t,n);return r.$arity=1,r}var ah;function eI(){if(ah===l){class e extends m9(){constructor(){super(),this.y5s_1=!1,this.z5s_1=0,this.a5t_1=new(g9())(8),this.c5t_1=yd(K5().q14())}f5t(){var r=this.x5s_1;if(r!=null)return r;st("audioContext")}d5t(r){this.x5s_1=new AudioContext,Rt("INIT audio context "+$(this.f5t().state));var t=this.f5t();t.onstatechange=()=>{Rt("audio context "+$(this.f5t().state));var a=this.f5t().state;return E(a,"running")?this.y5s_1=!0:this.f5t().resume(),S};var n=this.f5t().state;E(n,"running")?(Rt("FIRST USER audio context "+$(this.f5t().state)),ng(this)):r.h4d(()=>(Rt("FIRST USER audio context "+$(this.f5t().state)),this.f5t().resume(),ng(this),S))}e4u(r,t){if(Rt("noteOn is ready + "+this.y5s_1),!this.y5s_1)return S;var n=new(E9())(t);this.a5t_1.z5q(n),n.q5p(r);var a=SF(this,r),s=Ue(),u=s.z3a(),_=Ms(u,R5(Z(At()),U5([]),!1)),o=j(_,Y())?_:m(),c=s.r3r(o,t);Rt("Prepare to post message to worklet"),Hp(this).port.postMessage(lw([T("type","noteOn"),T("note",r.i3_1),T("frequency",a),T("instrument",c)]))}f4u(r){if(!this.y5s_1)return S;for(var t=this.a5t_1.e1();t.f1();){var n=t.g1();n.f4u(r)}Hp(this).port.postMessage(lw([T("type","noteOff"),T("note",r.i3_1)]))}s5q(r){throw Xt().nc()}}p(e,"WebSoundManager",eI),ah=e}return ah}new(zF());var Ze=Math.imul;function $F(){return hm("com.github.minigdx.tiny.lua.Note",N6())}var ih;function AF(){if(ih===l){class e{constructor(){Vp=this;var r=this,t=lr();r.e5q_1=[ur(t,$F),null,null,null,null,null,null]}}ar(e),ih=e}return ih}var Vp;function fa(){return Vp===l&&new(AF()),Vp}var sh;function EF(){if(sh===l){class e{constructor(){Yp=this;var r=new(Kr())("com.github.minigdx.tiny.sound.MusicalNote",this,7);r.a3i("note",!1),r.a3i("beat",!1),r.a3i("duration",!1),r.a3i("volume",!1),r.a3i("instrumentIndex",!0),r.a3i("isRepeating",!0),r.a3i("isOffNote",!0),this.f5q_1=r}g5q(r,t){var n=this.f5q_1,a=r.k3a(n),s=fa().e5q_1;a.e3c(n,0,s[0].y2(),t.w4r_1),a.x3b(n,1,t.x4r_1),a.x3b(n,2,t.y4r_1),a.x3b(n,3,t.z4r_1),(a.i3c(n,4)||t.a4s_1!=null)&&a.e3c(n,4,K(),t.a4s_1),(a.i3c(n,5)||t.c4s_1!==!1)&&a.s3b(n,5,t.c4s_1),(a.i3c(n,6)||t.d4s_1!==!1)&&a.s3b(n,6,t.d4s_1),a.l3a(n)}d36(r,t){return this.g5q(r,t instanceof Tn()?t:m())}e36(r){var t=this.f5q_1,n=!0,a=0,s=0,u=null,_=0,o=0,c=0,h=null,f=!1,v=!1,d=r.k3a(t),y=fa().e5q_1;if(d.a3b())u=d.y3a(t,0,y[0].y2(),u),s=s|1,_=d.r3a(t,1),s=s|2,o=d.r3a(t,2),s=s|4,c=d.r3a(t,3),s=s|8,h=d.y3a(t,4,K(),h),s=s|16,f=d.m3a(t,5),s=s|32,v=d.m3a(t,6),s=s|64;else for(;n;)switch(a=d.b3b(t),a){case-1:n=!1;break;case 0:u=d.y3a(t,0,y[0].y2(),u),s=s|1;break;case 1:_=d.r3a(t,1),s=s|2;break;case 2:o=d.r3a(t,2),s=s|4;break;case 3:c=d.r3a(t,3),s=s|8;break;case 4:h=d.y3a(t,4,K(),h),s=s|16;break;case 5:f=d.m3a(t,5),s=s|32;break;case 6:v=d.m3a(t,6),s=s|64;break;default:throw Xr().w37(a)}return d.l3a(t),Tn().h5q(s,u,_,o,c,h,f,v,null)}c36(){return this.f5q_1}p3i(){var r=fa().e5q_1;return[$r(r[0].y2()),mt(),mt(),mt(),$r(K()),Mn(),Mn()]}}F(e).q3i=Hr,P(e,"$serializer",l,l,[Vr()]),sh=e}return sh}var Yp;function Ts(){return Yp===l&&new(EF()),Yp}var lh;function Tn(){if(lh===l){class e{constructor(r,t,n,a,s,u,_,o){fa(),s=s===l?null:s,u=u===l?null:u,_=_===l?!1:_,o=o===l?!1:o,this.w4r_1=r,this.x4r_1=t,this.y4r_1=n,this.z4r_1=a,this.a4s_1=s,this.b4s_1=u,this.c4s_1=_,this.d4s_1=o}toString(){return"MusicalNote(note="+Wr(this.w4r_1)+", beat="+this.x4r_1+", duration="+this.y4r_1+", volume="+this.z4r_1+", instrumentIndex="+this.a4s_1+", instrument="+Wr(this.b4s_1)+", isRepeating="+this.c4s_1+", isOffNote="+this.d4s_1+")"}hashCode(){var r=this.w4r_1==null?0:this.w4r_1.hashCode();return r=Ze(r,31)+Vt(this.x4r_1)|0,r=Ze(r,31)+Vt(this.y4r_1)|0,r=Ze(r,31)+Vt(this.z4r_1)|0,r=Ze(r,31)+(this.a4s_1==null?0:this.a4s_1)|0,r=Ze(r,31)+(this.b4s_1==null?0:V(this.b4s_1))|0,r=Ze(r,31)+wa(this.c4s_1)|0,r=Ze(r,31)+wa(this.d4s_1)|0,r}equals(r){return this===r?!0:!(!(r instanceof Tn())||!E(this.w4r_1,r.w4r_1)||!E(this.x4r_1,r.x4r_1)||!E(this.y4r_1,r.y4r_1)||!E(this.z4r_1,r.z4r_1)||this.a4s_1!=r.a4s_1||!E(this.b4s_1,r.b4s_1)||this.c4s_1!==r.c4s_1||this.d4s_1!==r.d4s_1)}static h5q(r,t,n,a,s,u,_,o,c){fa(),(15&r)!==15&&rt(r,15,Ts().f5q_1);var h=Ur(this);return h.w4r_1=t,h.x4r_1=n,h.y4r_1=a,h.z4r_1=s,(r&16)===0?h.a4s_1=null:h.a4s_1=u,h.b4s_1=null,(r&32)===0?h.c4s_1=!1:h.c4s_1=_,(r&64)===0?h.d4s_1=!1:h.d4s_1=o,h}}p(e,"MusicalNote",l,l,l,l,l,{0:Ts}),lh=e}return lh}function NF(){return new(Cr())(Ts())}function uh(e,i,r){for(var t=e.v4a_1,n=N().p1(),a=t.e1();a.f1();){var s=a.g1();s.x4r_1i&&n.c1(s)}return n}var _h;function LF(){if(_h===l){class e{constructor(){Zp=this;var r=this,t=lr();r.a5q_1=[null,null,null,ur(t,NF)]}}ar(e),_h=e}return _h}var Zp;function va(){return Zp===l&&new(LF()),Zp}var oh;function jF(){if(oh===l){class e{constructor(){Xp=this;var r=new(Kr())("com.github.minigdx.tiny.sound.MusicalBar",this,4);r.a3i("index",!0),r.a3i("instrumentIndex",!0),r.a3i("tempo",!0),r.a3i("beats",!0),this.b5q_1=r}c5q(r,t){var n=this.b5q_1,a=r.k3a(n),s=va().a5q_1;(a.i3c(n,0)||t.r4a_1!==1)&&a.v3b(n,0,t.r4a_1),(a.i3c(n,1)||t.t4a_1!==-1)&&a.v3b(n,1,t.t4a_1),(a.i3c(n,2)||t.u4a_1!==120)&&a.v3b(n,2,t.u4a_1);var u;if(a.i3c(n,3))u=!0;else{var _=N().p1();u=!E(t.v4a_1,_)}u&&a.c3c(n,3,s[3].y2(),t.v4a_1),a.l3a(n)}d36(r,t){return this.c5q(r,t instanceof hn()?t:m())}e36(r){var t=this.b5q_1,n=!0,a=0,s=0,u=0,_=0,o=0,c=null,h=r.k3a(t),f=va().a5q_1;if(h.a3b())u=h.p3a(t,0),s=s|1,_=h.p3a(t,1),s=s|2,o=h.p3a(t,2),s=s|4,c=h.w3a(t,3,f[3].y2(),c),s=s|8;else for(;n;)switch(a=h.b3b(t),a){case-1:n=!1;break;case 0:u=h.p3a(t,0),s=s|1;break;case 1:_=h.p3a(t,1),s=s|2;break;case 2:o=h.p3a(t,2),s=s|4;break;case 3:c=h.w3a(t,3,f[3].y2(),c),s=s|8;break;default:throw Xr().w37(a)}return h.l3a(t),hn().d5q(s,u,_,o,c,null)}c36(){return this.b5q_1}p3i(){var r=va().a5q_1;return[K(),K(),K(),r[3].y2()]}}F(e).q3i=Hr,P(e,"$serializer",l,l,[Vr()]),oh=e}return oh}var Xp;function Qp(){return Xp===l&&new(jF()),Xp}var ch;function hn(){if(ch===l){class e{constructor(r,t,n,a){va(),r=r===l?1:r,t=t===l?null:t,n=n===l?-1:n,a=a===l?120:a,this.r4a_1=r,this.s4a_1=t,this.t4a_1=n,this.u4a_1=a;var s=this;s.v4a_1=N().p1()}m4u(r,t,n,a){for(var s=uh(this,t,n),u=N().p1(),_=s.e1();_.f1();){var o=_.g1();(a||E(o.w4r_1,r))&&u.c1(o)}var c=u,h=$7(c),f=h==null?null:h.z4r_1,v=f??1;this.v4a_1.f2(c),this.v4a_1.c1(new(Tn())(r,t,n,v))}n4u(r,t){for(var n=uh(this,t,.5),a=N().p1(),s=n.e1();s.f1();){var u=s.g1();E(u.w4r_1,r)&&a.c1(u)}for(var _=N().p1(),o=a.e1();o.f1();){var c=o.g1(),h=c.x4r_1;t<=c.x4r_1+c.y4r_1&&h<=t&&_.c1(c)}var f=_;this.v4a_1.f2(f)}l4u(r,t){for(var n=uh(this,r,.5),a=n.e1();a.f1();){var s=a.g1();s.z4r_1=t}}static d5q(r,t,n,a,s,u){va(),(0&r)!==0&&rt(r,0,Qp().b5q_1);var _=Ur(this);if((r&1)===0?_.r4a_1=1:_.r4a_1=t,_.s4a_1=null,(r&2)===0?_.t4a_1=-1:_.t4a_1=n,(r&4)===0?_.u4a_1=120:_.u4a_1=a,(r&8)===0){var o=_;o.v4a_1=N().p1()}else _.v4a_1=s;return _}}p(e,"MusicalBar",hn,l,l,l,l,{0:Qp}),ch=e}return ch}function MF(){return new(Cr())(Ts())}var hh;function TF(){if(hh===l){class e{constructor(){r0=this;var r=this,t=lr();r.i5q_1=[null,null,null,ur(t,MF),null]}}ar(e),hh=e}return hh}var r0;function pa(){return r0===l&&new(TF()),r0}var fh;function FF(){if(fh===l){class e{constructor(){t0=this;var r=new(Kr())("com.github.minigdx.tiny.sound.MusicalSequence.Track",this,5);r.a3i("index",!0),r.a3i("instrumentIndex",!1),r.a3i("mute",!0),r.a3i("beats",!0),r.a3i("volume",!0),this.j5q_1=r}k5q(r,t){var n=this.j5q_1,a=r.k3a(n),s=pa().i5q_1;(a.i3c(n,0)||t.z4a_1!==0)&&a.v3b(n,0,t.z4a_1),a.v3b(n,1,t.a4b_1),(a.i3c(n,2)||t.b4b_1!==!1)&&a.s3b(n,2,t.b4b_1);var u;if(a.i3c(n,3))u=!0;else{var _=N().p1();u=!E(t.d4b_1,_)}u&&a.c3c(n,3,s[3].y2(),t.d4b_1),(a.i3c(n,4)||!E(t.e4b_1,1))&&a.x3b(n,4,t.e4b_1),a.l3a(n)}d36(r,t){return this.k5q(r,t instanceof Fn()?t:m())}e36(r){var t=this.j5q_1,n=!0,a=0,s=0,u=0,_=0,o=!1,c=null,h=0,f=r.k3a(t),v=pa().i5q_1;if(f.a3b())u=f.p3a(t,0),s=s|1,_=f.p3a(t,1),s=s|2,o=f.m3a(t,2),s=s|4,c=f.w3a(t,3,v[3].y2(),c),s=s|8,h=f.r3a(t,4),s=s|16;else for(;n;)switch(a=f.b3b(t),a){case-1:n=!1;break;case 0:u=f.p3a(t,0),s=s|1;break;case 1:_=f.p3a(t,1),s=s|2;break;case 2:o=f.m3a(t,2),s=s|4;break;case 3:c=f.w3a(t,3,v[3].y2(),c),s=s|8;break;case 4:h=f.r3a(t,4),s=s|16;break;default:throw Xr().w37(a)}return f.l3a(t),Fn().l5q(s,u,_,o,c,h,null)}c36(){return this.j5q_1}p3i(){var r=pa().i5q_1;return[K(),K(),Mn(),r[3].y2(),mt()]}}F(e).q3i=Hr,P(e,"$serializer",l,l,[Vr()]),fh=e}return fh}var t0;function e0(){return t0===l&&new(FF()),t0}function DF(){return new(Ga())(Z(Fn()),e0())}var vh;function Fn(){if(vh===l){class e{constructor(r,t,n,a,s,u){pa(),r=r===l?0:r,n=n===l?!1:n,a=a===l?null:a;var _;s===l?_=N().p1():_=s,s=_,u=u===l?1:u,this.z4a_1=r,this.a4b_1=t,this.b4b_1=n,this.c4b_1=a,this.d4b_1=s,this.e4b_1=u;var o=Yt(0,32),c=o.v1_1,h=o.w1_1;if(c<=h)do{var f=c;c=c+1|0;var v=f;this.d4b_1.c1(new(Tn())(null,v,1,1))}while(f!==h)}static l5q(r,t,n,a,s,u,_){pa(),(2&r)!==2&&rt(r,2,e0().j5q_1);var o=Ur(this);if((r&1)===0?o.z4a_1=0:o.z4a_1=t,o.a4b_1=n,(r&4)===0?o.b4b_1=!1:o.b4b_1=a,o.c4b_1=null,(r&8)===0){var c=o;c.d4b_1=N().p1()}else o.d4b_1=s;(r&16)===0?o.e4b_1=1:o.e4b_1=u;var h=Yt(0,32),f=h.v1_1,v=h.w1_1;if(f<=v)do{var d=f;f=f+1|0;var y=d;o.d4b_1.c1(new(Tn())(null,y,1,1))}while(d!==v);return o}}p(e,"Track",l,l,l,l,l,{0:e0}),vh=e}return vh}var ph;function PF(){if(ph===l){class e{constructor(){n0=this;var r=this,t=lr();r.m5q_1=[null,ur(t,DF),null]}}ar(e),ph=e}return ph}var n0;function da(){return n0===l&&new(PF()),n0}var dh;function BF(){if(dh===l){class e{constructor(){a0=this;var r=new(Kr())("com.github.minigdx.tiny.sound.MusicalSequence",this,3);r.a3i("index",!1),r.a3i("tracks",!0),r.a3i("tempo",!0),this.n5q_1=r}o5q(r,t){var n=this.n5q_1,a=r.k3a(n),s=da().m5q_1;a.v3b(n,0,t.w4a_1);var u;if(a.i3c(n,1))u=!0;else{for(var _=0,o=Array(4);_<4;){var c=_;o[c]=new(Fn())(c,0),_=_+1|0}u=!E(t.x4a_1,o)}u&&a.c3c(n,1,s[1].y2(),t.x4a_1),(a.i3c(n,2)||t.y4a_1!==120)&&a.v3b(n,2,t.y4a_1),a.l3a(n)}d36(r,t){return this.o5q(r,t instanceof Dn()?t:m())}e36(r){var t=this.n5q_1,n=!0,a=0,s=0,u=0,_=null,o=0,c=r.k3a(t),h=da().m5q_1;if(c.a3b())u=c.p3a(t,0),s=s|1,_=c.w3a(t,1,h[1].y2(),_),s=s|2,o=c.p3a(t,2),s=s|4;else for(;n;)switch(a=c.b3b(t),a){case-1:n=!1;break;case 0:u=c.p3a(t,0),s=s|1;break;case 1:_=c.w3a(t,1,h[1].y2(),_),s=s|2;break;case 2:o=c.p3a(t,2),s=s|4;break;default:throw Xr().w37(a)}return c.l3a(t),Dn().p5q(s,u,_,o,null)}c36(){return this.n5q_1}p3i(){var r=da().m5q_1;return[K(),r[1].y2(),K()]}}F(e).q3i=Hr,P(e,"$serializer",l,l,[Vr()]),dh=e}return dh}var a0;function i0(){return a0===l&&new(BF()),a0}var mh;function Dn(){if(mh===l){class e{constructor(r,t,n){da();var a;if(t===l){for(var s=0,u=Array(4);s<4;){var _=s;u[_]=new(Fn())(_,0),s=s+1|0}a=u}else a=t;t=a,n=n===l?120:n,this.w4a_1=r,this.x4a_1=t,this.y4a_1=n}static p5q(r,t,n,a,s){da(),(1&r)!==1&&rt(r,1,i0().n5q_1);var u=Ur(this);if(u.w4a_1=t,(r&2)===0){for(var _=u,o=0,c=Array(4);o<4;){var h=o;c[h]=new(Fn())(h,0),o=o+1|0}_.x4a_1=c}else u.x4a_1=n;return(r&4)===0?u.y4a_1=120:u.y4a_1=a,u}}p(e,"MusicalSequence",l,l,l,l,l,{0:i0}),mh=e}return mh}function ke(){return Ve(),nI}var nI;function s0(){return Ve(),aI}var aI;function l0(){return Ve(),iI}var iI;function u0(){return Ve(),sI}var sI;function _0(){return Ve(),lI}var lI;function o0(){return Ve(),uI}var uI;function c0(){return Ve(),_I}var _I;function h0(){return Ve(),oI}var oI;function OF(){return new(Ga())(Z(At()),$r(Wp()))}function RF(){return new(Ga())(Z(hn()),Qp())}function UF(){return new(Ga())(Z(Dn()),i0())}function KF(e){return e.l3s_1=!0,S}var wh;function GF(){if(wh===l){class e{constructor(){f0=this;var r=this,t=lr(),n=ur(t,OF),a=lr(),s=ur(a,RF),u=lr();r.l4a_1=[n,s,ur(u,UF)];var _=this;_.m4a_1=Kq(l,KF)}r4u(r){var t=this.m4a_1,n=t.z3a(),a=Ms(n,R5(Z(Pn()),U5([]),!1)),s=j(a,Y())?a:m(),u=t.r3r(s,r);return u}n4a(r){var t=this.m4a_1,n=t.z3a(),a=Ms(n,R5(Z(Pn()),U5([]),!1)),s=j(a,Y())?a:m(),u=t.s3r(s,r);return u}}ar(e),wh=e}return wh}var f0;function un(){return f0===l&&new(GF()),f0}var gh;function JF(){if(gh===l){class e{constructor(){v0=this;var r=new(Kr())("com.github.minigdx.tiny.sound.Music",this,3);r.a3i("instruments",!0),r.a3i("musicalBars",!0),r.a3i("sequences",!0),this.x5p_1=r}y5p(r,t){var n=this.x5p_1,a=r.k3a(n),s=un().l4a_1,u;if(a.i3c(n,0))u=!0;else{var _=t.o4a_1,o=[ke(),s0(),l0(),u0(),_0(),o0(),c0(),h0(),null,null,null,null,null,null,null,null];u=!E(_,o)}u&&a.c3c(n,0,s[0].y2(),t.o4a_1);var c;if(a.i3c(n,1))c=!0;else{for(var h=0,f=Array(32);h<32;){var v=h;f[v]=new(hn())(v,ke(),ke().e4s_1),h=h+1|0}c=!E(t.p4a_1,f)}c&&a.c3c(n,1,s[1].y2(),t.p4a_1);var d;if(a.i3c(n,2))d=!0;else{for(var y=0,b=Array(8);y<8;){var w=y;b[w]=new(Dn())(w),y=y+1|0}d=!E(t.q4a_1,b)}d&&a.c3c(n,2,s[2].y2(),t.q4a_1),a.l3a(n)}d36(r,t){return this.y5p(r,t instanceof Pn()?t:m())}e36(r){var t=this.x5p_1,n=!0,a=0,s=0,u=null,_=null,o=null,c=r.k3a(t),h=un().l4a_1;if(c.a3b())u=c.w3a(t,0,h[0].y2(),u),s=s|1,_=c.w3a(t,1,h[1].y2(),_),s=s|2,o=c.w3a(t,2,h[2].y2(),o),s=s|4;else for(;n;)switch(a=c.b3b(t),a){case-1:n=!1;break;case 0:u=c.w3a(t,0,h[0].y2(),u),s=s|1;break;case 1:_=c.w3a(t,1,h[1].y2(),_),s=s|2;break;case 2:o=c.w3a(t,2,h[2].y2(),o),s=s|4;break;default:throw Xr().w37(a)}return c.l3a(t),Pn().z5p(s,u,_,o,null)}c36(){return this.x5p_1}p3i(){var r=un().l4a_1;return[r[0].y2(),r[1].y2(),r[2].y2()]}}F(e).q3i=Hr,P(e,"$serializer",l,l,[Vr()]),gh=e}return gh}var v0;function ag(){return v0===l&&new(JF()),v0}var yh;function Pn(){if(yh===l){class e{constructor(r,t,n){un();var a;r===l?a=[ke(),s0(),l0(),u0(),_0(),o0(),c0(),h0(),null,null,null,null,null,null,null,null]:a=r,r=a;var s;if(t===l){for(var u=0,_=Array(32);u<32;){var o=u;_[o]=new(hn())(o,ke(),ke().e4s_1),u=u+1|0}s=_}else s=t;t=s;var c;if(n===l){for(var h=0,f=Array(8);h<8;){var v=h;f[v]=new(Dn())(v),h=h+1|0}c=f}else c=n;n=c,this.o4a_1=r,this.p4a_1=t,this.q4a_1=n}static z5p(r,t,n,a,s){un(),(0&r)!==0&&rt(r,0,ag().x5p_1);var u=Ur(this);if((r&1)===0){var _=u;_.o4a_1=[ke(),s0(),l0(),u0(),_0(),o0(),c0(),h0(),null,null,null,null,null,null,null,null]}else u.o4a_1=t;if((r&2)===0){for(var o=u,c=0,h=Array(32);c<32;){var f=c;h[f]=new(hn())(f,ke(),ke().e4s_1),c=c+1|0}o.p4a_1=h}else u.p4a_1=n;if((r&4)===0){for(var v=u,d=0,y=Array(8);d<8;){var b=d;y[b]=new(Dn())(b),d=d+1|0}v.q4a_1=y}else u.q4a_1=a;return u}}p(e,"Music",Pn,l,l,l,l,{0:ag}),yh=e}return yh}var ig;function Ve(){if(!ig){ig=!0;var e=js(),i=new Float32Array([1.1,.3,.031,.039,.345,.29,.0119]);nI=new(At())(0,"clarinet",e,.01,.1,.8,.5,i);var r=cn(),t=new Float32Array([1,.65,.7,.55,.45,.35,.3]);aI=new(At())(1,"violon",r,.1,.1,.9,.05,t);var n=Ls(),a=new Float32Array([1,.05,.01]);iI=new(At())(2,"obos",n,.1,.1,.9,.05,a);var s=dm(),u=new Float32Array([1]);sI=new(At())(3,"drum",s,.1,.1,.9,.05,u);var _=pm(),o=new Float32Array([1,.05,.01]);lI=new(At())(4,"custom1",_,.1,.1,.9,.05,o);var c=Ls(),h=new Float32Array([1,.05,.01]);uI=new(At())(5,"custom2",c,.1,.1,.9,.05,h);var f=js(),v=new Float32Array([1,.05,.01]);_I=new(At())(6,"custom3",f,.1,.1,.9,.05,v);var d=mm(),y=new Float32Array([1,.05,.01]);oI=new(At())(7,"custom4",d,.1,.1,.9,.05,y)}}function*WF(e,i){var r=e.k4a_1.d4a(i);r===O()&&(r=yield r);for(var t=r,n=un().n4a(Zt(t)),a=n,s=0,u=Array(16);s<16;){var _=s,o;0<=_&&_r.b1b(n,a);return t.$arity=1,t}var Ch;function XF(){if(Ch===l){class e{constructor(r,t,n,a){this.p5s_1=r,this.q5s_1=t,this.r5s_1=n,this.s5s_1=a,this.t5s_1=new(by()),this.u5s_1=new(G8())(this.p5s_1,this.q5s_1),this.v5s_1=0,this.w5s_1=yd(K5().q14())}n46(){return this.t5s_1}q46(){return new(J8())(this.p5s_1.clientWidth,this.p5s_1.clientHeight,this.p5s_1.clientWidth,this.p5s_1.clientHeight)}u46(r){var t=this.p5s_1.getContext("webgl2"),n=t instanceof WebGL2RenderingContext?t:null,a;if(n==null)throw fr().u3("The canvas context is expected to be a webgl2 context. WebGL2 doesn't seems to be supported by your browser. Please update to a compatible browser to run the game in WebGL2.");a=n;var s=a;return new(W8())(s)}w46(r){var t=window;t.requestAnimationFrame(n=>{var a=n*.001,s=a-this.v5s_1;return this.v5s_1=a,bd(this.w5s_1,l,l,ZF(r,s)),r.y46(),this.w46(r),S})}r46(){return this.u5s_1}s46(){return this.u5s_1}q49(){return K5().m14_1}b54(r,t){return new(V8())(this.s5s_1+"/"+r)}d54(r,t){return new(i9())(this.s5s_1+"/"+r)}t46(r){var t=new(eI());return t.d5t(r),t}f54(r,t){return new(HF())(r,t,this.c54(r))}w4g(r,t){localStorage.setItem(this.r5s_1+"-"+r,t)}b4h(r){return localStorage.getItem(this.r5s_1+"-"+r)}y4u(r,t){return S}z4u(r){return S}}F(e).c54=r9,F(e).e54=t9,F(e).a45=X8,F(e).h45=Q8,p(e,"WebGlPlatform",l,l,[e9()]),Ch=e}return Ch}function*QF(e,i,r){var t=e.a4a_1.c4a(r);if(t===O()&&(t=yield t),t){var n=e.a4a_1.d4a(r);n===O()&&(n=yield n);var a=i.l1a(n,r);a===O()&&(a=yield a);var s=fw(e.b4a_1.e4a_1,r);s===O()&&(s=yield s)}for(;;){if(e.a4a_1.f4a()){var u=e.a4a_1.d4a(r);u===O()&&(u=yield u);var _=i.l1a(u,r);_===O()&&(_=yield _)}var o=fw(e.b4a_1.e4a_1,r);o===O()&&(o=yield o)}return S}var xh;function rD(){if(xh===l){class e{constructor(r,t){this.a4a_1=r,this.b4a_1=t}g4a(r,t){return er(QF.bind(l,this,r),t)}oc(r,t){return this.g4a(r!=null&&j(r,ie())?r:m(),t)}}at(e,l,l,[1]),xh=e}return xh}function tD(e,i){var r=new(rD())(e,i),t=(n,a)=>r.g4a(n,a);return t.$arity=1,t}var Sh;function cI(){if(Sh===l){class e{constructor(){var r=this;sd(),r.e4a_1=A7(1,E7())}h4a(r){return aA(tD(r,this))}}p(e,"CommonVirtualFileSystem",cI,l,l,[2]),Sh=e}return Sh}var zh;function bm(){if(zh===l){class e extends n1(){static z49(r,t,n,a,s){var u=this.yc(a,s);Je(u,u.v45_1),u.r45_1=r,u.s45_1=t,u.t45_1=n;var _=u,o=Ma(wd(u.t45_1,[` -`]),u.s45_1-1|0),c;o==null?c=null:c=$(N7(L7(o)?o:m()));var h=c;return _.u45_1=h??"",u}}p(e,"TinyException"),zh=e}return zh}function eD(e){var i=e.q1u_1,r;if(i==null)r=null;else{var t=hy(i,C(58)),n=nn(M7(i,t+1|0)),a;xa(i,"@")?a="into the file "+i:a=fy(i).l1(n-1|0);var s=a;r=T(n,s)}return r}function nD(e){var i=eD(e);return i==null?null:i.xd_1}function aD(e){var i=e.message,r;if(i==null)return null;r=i;var t=r,n="\\[[\\s\\S]*]:(\\d+):.*",a=j7().mg(n),s=a.ng(t),u=s==null?null:s.fh(),_=u==null?null:u.l1(1);return _==null?null:Xs(_)}function C1(e,i){var r=e.r1u_1,t;e.r1u_1!==-1?t=r:t=null;var n=t,a=n??nD(e),s=a??aD(e),u=s??-1,_=e.s1u_1,o=e.message;return bm().z49(_,u,i,o,e)}function sg(e,i){var r=0,t=i.length;if(r 0; -} - -void main() { - if(!dither(u_dither, int(v_pos.x), int(v_pos.y))) { - discard; - } - // Read the index color from the current texture. - int pixel = readPixel(v_uvs); - // Read the RGBA color from the index color. - vec4 color = readColor(pixel); - if(color.a <= 0.1) { - discard; - } else { - fragColor = color; - } -}`}}ar(e),hf=e}return hf}var Nm,ff;function xD(){if(ff===l){class e{constructor(r,t,n){this.v55_1=t,this.w55_1=n,this.x55_1=new(Em())(r,new(yI()),new(bI()))}p56(){this.x55_1.b5c()}b44(r){this.x55_1.c5c(),this.x55_1.r5c((t,n)=>{for(var a=r.e1();a.f1();){var s=a.g1();s.w48_1==null&&(s.w48_1=this.x55_1.kt()),n.d5g_1.i5g(s.t48_1.x4c_1,s.u48_1,s.v48_1,s.w48_1)}return S})}y55(){this.x55_1.c5c()}z55(r,t){var n=r.z56_1,a=new Int8Array(262144),s=0,u=0;if(u<256)do{var _=u;u=u+1|0;var o=n[_%n.length|0],c=this.v55_1.n47().y4b(o),h=s;s=h+1|0,a[h]=c[0];var f=s;s=f+1|0,a[f]=c[1];var v=s;s=v+1|0,a[v]=c[2];var d=s;s=d+1|0,a[d]=c[3]}while(u<256);this.x55_1.c5c(),this.x55_1.r5c((y,b)=>{y.r5f_1.k5f(t.p59_1),y.u5f_1.j5c(t.q59_1),y.s5f_1.i5f(new Float32Array([this.v55_1.a47_1,this.v55_1.b47_1*-1])),y.t5f_1.i5f(new Float32Array([r.c5a().u48_1,r.c5a().v48_1])),b.c5g_1.f5f(a,256,256),b.e5g_1.l5g(new Int32Array([r.y56_1]));var w=r.c5a().w48_1;r:if(w==null){var x="Texture unit should be already initialized!";throw fr().u3($(x))}else break r;return b.d5g_1.q5c(w),S}),this.x55_1.s5c(),this.x55_1.rt(4,0,t.o59_1),this.w55_1.b55(t.o59_1),this.x55_1.t5c()}i56(){return S}}p(e,"SpriteBatchStage"),ff=e}return ff}Nm=new(CD());var vf;function kI(){if(vf===l){class e extends $m(){constructor(){super(Lm.x5c_1),this.d5d_1=this.a5b("a_shapeType").e5e(),this.e5d_1=this.a5b("a_shapeColor").e5e(),this.f5d_1=this.a5b("a_shapeFilled").e5e(),this.g5d_1=this.a5b("a_dither").e5e(),this.h5d_1=this.y5a("a_shapePosition").l5e(),this.i5d_1=this.q5a("a_shapeSize").m5e(),this.j5d_1=this.q5a("a_shapeParams12").m5e(),this.k5d_1=this.q5a("a_shapeParams34").m5e(),this.l5d_1=this.q5a("a_shapeParams56").m5e(),this.m5d_1=this.q5a("a_pos"),this.n5d_1=this.n5e("u_viewport"),this.o5d_1=this.r5a("v_fragPos"),this.p5d_1=this.o5e("v_dither",!0),this.q5d_1=this.b5b("v_shapePosition",!0),this.r5d_1=this.b5b("v_shapeSize",!0),this.s5d_1=this.o5e("v_shapeType",!0),this.t5d_1=this.o5e("v_shapeColor",!0),this.u5d_1=this.o5e("v_shapeFilled",!0),this.v5d_1=this.b5b("v_shapeParams12",!0),this.w5d_1=this.b5b("v_shapeParams34",!0),this.x5d_1=this.b5b("v_shapeParams56",!0)}}p(e,"VShader",kI),vf=e}return vf}var pf;function CI(){if(pf===l){class e extends Am(){constructor(){super(Lm.y5c_1),this.u5e_1=this.f5b("palette_colors"),this.v5e_1=this.q5a("v_fragPos"),this.w5e_1=this.z5a("v_dither",!0),this.x5e_1=this.w5a("v_shapePosition",!0),this.y5e_1=this.w5a("v_shapeSize",!0),this.z5e_1=this.z5a("v_shapeType",!0),this.a5f_1=this.z5a("v_shapeColor",!0),this.b5f_1=this.z5a("v_shapeFilled",!0),this.c5f_1=this.w5a("v_shapeParams12",!0),this.d5f_1=this.w5a("v_shapeParams34",!0),this.e5f_1=this.w5a("v_shapeParams56",!0)}}p(e,"FShader",CI),pf=e}return pf}var df;function SD(){if(df===l){class e{constructor(){this.x5c_1=`void main() { - // Scale the rectangle (mutiply by the size) then translate (add the offset) - vec2 vertex_pos = ((a_pos * a_shapeSize) + vec2(a_shapePosition.x, a_shapePosition.y)); - // Convert the pixel coordinates into NDC coordinates - vec2 ndc_pos = vertex_pos / u_viewport; - // Move the origin to the left/up corner - vec2 origin_pos = vec2(-1.0, 1.0) + ndc_pos * 2.0; - - gl_Position = vec4(origin_pos, a_shapePosition.z, 1.0); - - v_fragPos = vertex_pos; - v_dither = a_dither; - v_shapeType = a_shapeType; - v_shapeSize = a_shapeSize; - v_shapePosition = vec2(a_shapePosition.x, a_shapePosition.y); - v_shapeColor = a_shapeColor; - v_shapeFilled = a_shapeFilled; - v_shapeParams12 = a_shapeParams12; - v_shapeParams34 = a_shapeParams34; - v_shapeParams56 = a_shapeParams56; -}`,this.y5c_1=`#define T_RECT 0 -#define T_TRIANGLE 1 -#define T_CIRCLE 2 -#define T_LINE 3 -#define T_POINT 4 - -int imod(int value, int limit) { - return value - limit * (value / limit); -} - -vec4 readData(sampler2D txt, int index, int textureWidth, int textureHeight) { - int x = imod(index, textureWidth); - int y = index / textureWidth; - vec2 uv = vec2((float(x) + 0.5) / float(textureWidth), (float(y) + 0.5) / float(textureHeight)); - return texture(txt, uv); -} - -vec4 readColor(int index) { - int icolor = imod(index, 256); - return readData(palette_colors, icolor, 255, 255); -} - -float sdfRectangle(vec2 fragCoord, vec2 position, vec2 size) { - // Position of the center of the rectangle - vec2 center = position + size * 0.5; - // Position of the frag regarding the center - vec2 pos = abs(fragCoord - center); - // Distance from the edge to the pos. - vec2 d = pos - (size * 0.5); - - // > 1.0 is outside the rectangle. - // < 1.0 is inside the rectangle. - // 0 = is on the rectangle. - return max(d.x, d.y); -} - -float sdfLine(vec2 fragCoord, vec2 startLine, vec2 endLine) { - vec2 p = fragCoord; - - // Position of the start of the line in pixel - vec2 p0 = startLine; - // Position of the end of the line in pixel - vec2 p1 = endLine; - - // The frag is outsine the line on the horizontal side - if (int(fragCoord.x) < int(startLine.x) || int(fragCoord.x) > int(endLine.x)) { - return 2.0; - } - - // The frag is outside the line on the vertical side - if(int(fragCoord.y) > int((max(startLine.y, endLine.y))) || int(fragCoord.y) < int((min(startLine.y, endLine.y)))) { - return 2.0; - } - - // Check for vertical or horizontal line - if ((int(p.x) == int(p0.x) && int(p0.x) == int(p1.x)) || - (int(p.y) == int(p0.y) && int(p0.y) == int(p1.y)) - ) { - return 0.0; - } - - // Bresenham algorithm - // See: https://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm#Method - vec2 d = p1 - p0; - - float slope; - // the frag position from the start point (~ progress of the slope) - float a; - // other axis of the start line - float b; - // other axis for the frag - float c; - if (abs(d.x) > abs(d.y)) { - slope = (d.y / d.x); - a = p.x - p0.x; - b = p0.y; - c = p.y; - } else { - slope = (d.x / d.y); - a = p.y - p0.y; - b = p0.x; - c = p.x; - } - - float expected = slope * a + b; - - float sdf; - // Is the current y match the expected y of the algo ? - if (int(expected) == int(c)) { - // It's on the line - sdf = 0.0; - } else { - // It's NOT on the line - sdf = 2.0; - } - return sdf; -} - -float sdfPoint(vec2 frag, vec2 pos) { - return 0.0; -} - -float sdfCircle(vec2 frag, vec2 center, float radius) { - vec2 p = frag - center; - - // Distance between the frag and the border of the circle - float dist = length(p + vec2(0.5)) - radius; - - // Is on the line? - if (abs(dist) < 0.5) { - return 0.0; - } - - return dist * 4.0; -} - - -/** -* Is the point p inside the triangle(a,b,c) ? -* @return true if inside the triangle. false otherwise -*/ -bool pointInTriangle(vec2 p, vec2 a, vec2 b, vec2 c) { - vec2 v0 = c - a; - vec2 v1 = b - a; - vec2 v2 = p - a; - - float dot00 = dot(v0, v0); - float dot01 = dot(v0, v1); - float dot02 = dot(v0, v2); - float dot11 = dot(v1, v1); - float dot12 = dot(v1, v2); - - float invDenom = 1.0 / (dot00 * dot11 - dot01 * dot01); - float u = (dot11 * dot02 - dot01 * dot12) * invDenom; - float v = (dot00 * dot12 - dot01 * dot02) * invDenom; - - return (u >= 0.0 && v >= 0.0 && u + v <= 1.0); -} - -float sdfTriangle(vec2 frag, vec2 p0, vec2 p1, vec2 p2) { - - // BUG: maybe the line should not assume that it's only from left to right - float a = sdfLine(frag, p0, p1); - float b = sdfLine(frag, p0, p2); - float c = sdfLine(frag, p1, p2); - // is the frag on a line? - if (a + b + c < 6.0) { - return 0.0; - } - bool isInside = pointInTriangle(frag, p0, p1, p2); - if (isInside) { - // is inside the triangle - return -2.0; - } else { - // is outside the triangle - return 2.0; - } -} - -/** -* Return true if the pixel x,y pass the pattern mask -*/ -bool dither(int pattern, int x, int y) { - int a = imod(x, 4); - int b = imod(y, 4) * 4; - int bitPosition = a + b; - - float powerOfTwo = pow(2.0, float(bitPosition)); - int bit = int(floor(mod(float(pattern) / powerOfTwo, 2.0))); - - return bit > 0; -} - -void main() { - if(!dither(int(v_dither), int(v_fragPos.x), int(v_fragPos.y))) { - discard; - } - - float sdf; - int type = int(v_shapeType); - if (type == T_LINE) { - sdf = sdfLine(v_fragPos, v_shapeParams12, v_shapeParams34); - } else if (type == T_POINT) { - sdf = sdfPoint(v_fragPos, v_shapePosition); - } else if (type == T_CIRCLE) { - sdf = sdfCircle(v_fragPos, v_shapeParams12, v_shapeParams34.x); - } else if (type == T_TRIANGLE) { - sdf = sdfTriangle(v_fragPos, v_shapeParams12, v_shapeParams34, v_shapeParams56); - } else { - sdf = sdfRectangle(v_fragPos, v_shapePosition, v_shapeSize); - } - - // The distance is more than one pixel away (ie: it's out of the border) - if (sdf >= 1.0) { - discard; - // If the frag is inside the shape and the shape should NOT be filled. - } else if (sdf <= -1.0 && v_shapeFilled < 1.0) { - discard; - } else { - // If the frag is on the border OR inside the shape AND should be filled - // Get color from palette - vec4 color = readColor(int(v_shapeColor)); - - fragColor = vec4(color.rgb, 1.0); - } - -}`}}ar(e),df=e}return df}var Lm,mf;function zD(){if(mf===l){class e{constructor(r,t,n){this.j56_1=t,this.k56_1=n,this.l56_1=new(Em())(r,new(kI()),new(CI()));var a=this;a.m56_1=new Float32Array([0,0,1,0,1,1,1,1,0,1,0,0])}p56(){this.l56_1.b5c()}y55(){this.l56_1.c5c();var r=new Int8Array(262144),t=0,n=0;if(n<256)do{var a=n;n=n+1|0;var s=this.j56_1.n47().y4b(a),u=t;t=u+1|0,r[u]=s[0];var _=t;t=_+1|0,r[_]=s[1];var o=t;t=o+1|0,r[o]=s[2];var c=t;t=c+1|0,r[c]=s[3]}while(n<256);this.l56_1.r5c((h,f)=>(h.m5d_1.j5c(this.m56_1),f.u5e_1.f5f(r,256,256),S))}n56(r,t){this.l56_1.c5c(),this.l56_1.r5c((n,a)=>(n.n5d_1.i5f(new Float32Array([this.j56_1.a47_1,this.j56_1.b47_1*-1])),n.g5d_1.j5f(t.f59_1),n.d5d_1.j5f(t.z58_1),n.e5d_1.j5f(t.a59_1),n.f5d_1.j5f(t.b59_1),n.h5d_1.k5f(t.x58_1),n.i5d_1.j5c(t.y58_1),n.j5d_1.j5c(t.c59_1),n.k5d_1.j5c(t.d59_1),n.l5d_1.j5c(t.e59_1),S)),this.l56_1.s5c(),this.l56_1.st(4,0,6,t.w58_1),this.k56_1.b55(6),this.l56_1.t5c()}i56(){return S}}p(e,"PrimitiveBatchStage"),mf=e}return mf}Lm=new(SD());var Le=Math.imul;function hi(e){var i=e.v56_1;if(i!=null)return i;st("windowManager")}var wf;function xI(){if(wf===l){class e extends $m(){constructor(){super(jm.d5a_1),this.j5a_1=this.q5a("position"),this.k5a_1=this.q5a("uvs"),this.l5a_1=this.r5a("viewport")}}p(e,"VShader",xI),wf=e}return wf}var gf;function SI(){if(gf===l){class e extends Am(){constructor(){super(jm.e5a_1),this.l5b_1=this.q5a("viewport"),this.m5b_1=this.e5b("frame_buffer",!0)}}p(e,"FShader",SI),gf=e}return gf}var yf;function qD(){if(yf===l){class e{constructor(){this.d5a_1=`void main() { - gl_Position = vec4(position, 0.0, 1.0); - viewport = uvs; -}`,this.e5a_1=`void main() { - fragColor = texture(frame_buffer, viewport); -}`}}ar(e),yf=e}return yf}var jm,bf;function ID(){if(bf===l){class e{constructor(r,t,n){this.q56_1=t,this.r56_1=n;var a=this;a.s56_1=new Float32Array([2,-1,0,1,0,-1]);var s=this;s.t56_1=new Float32Array([3,-1,-1,3,-1,-1]),this.u56_1=new(Em())(r,new(xI()),new(SI()))}v46(r){this.u56_1.b5c(),this.v56_1=r}e58(r){this.u56_1.c5c(),this.u56_1.au(36160,null),this.u56_1.gt(Le(Le(this.q56_1.j47_1.xd_1,this.q56_1.h47_1),hi(this).k54_1),Le(Le(this.q56_1.j47_1.yd_1,this.q56_1.h47_1),hi(this).l54_1),Le(Le(this.q56_1.a47_1,this.q56_1.h47_1),hi(this).k54_1),Le(Le(this.q56_1.b47_1,this.q56_1.h47_1),hi(this).l54_1)),this.u56_1.it(0,0,0,1),this.u56_1.ht(16640),this.u56_1.r5c((n,a)=>(n.j5a_1.j5c(this.t56_1),n.k5a_1.j5c(this.s56_1),a.m5b_1.q5c(r),S)),this.u56_1.s5c();var t=3;this.u56_1.rt(4,0,t),this.r56_1.b55(t),this.r56_1.c55(),this.u56_1.t5c()}}p(e,"FrameBufferStage"),bf=e}return bf}jm=new(qD());var kf;function $D(){if(kf===l){class e{constructor(){this.h58_1=1e3,this.i58_1=100}}ar(e),kf=e}return kf}var Cf;function AD(){if(Cf===l){class e extends Ta(){constructor(r,t){t===l&&(t={}),t.l58_1=r,super(1e3,t)}l4d(){return this.l58_1.a56_1()}m58(r){r.b1h()}r4d(r){return this.m58(r!=null&&j(r,km())?r:m())}}p(e),Cf=e}return Cf}var xf;function ED(){if(xf===l){class e extends Ta(){constructor(r,t){t===l&&(t={}),t.p58_1=r,super(1e3,t)}l4d(){return this.p58_1.b56_1()}q58(r){r.b1h()}r4d(r){return this.q58(r!=null&&j(r,Cm())?r:m())}}p(e),xf=e}return xf}var Sf;function ND(){if(Sf===l){class e extends Ta(){constructor(r,t){t===l&&(t={}),t.t58_1=r,super(100,t)}l4d(){return this.t58_1.c56_1()}u58(r){r.b1h()}r4d(r){return this.u58(r!=null&&j(r,Sm())?r:m())}}p(e),Sf=e}return Sf}var zf;function cg(){if(zf===l){class e{constructor(r,t,n){this.a56_1=r,this.b56_1=t,this.c56_1=n;var a=this;a.d56_1=zr().va();var s=this;s.e56_1=new(AD())(this);var u=this;u.f56_1=new(ED())(this);var _=this;_.g56_1=new(ND())(this)}w56(){return this.e56_1.u4d()}d57(){return this.f56_1.u4d()}o57(r,t){var n=this.d56_1,a=n.b3(r),s;if(a==null){var u=N().p1();n.f3(r,u),s=u}else s=a;var _=s,o=_y(_),c;if(o==null)c=null;else{var h;o.f58()?h=o:h=null,c=h}var f=c,v;if(f==null){var d=this.g56_1.u4d();_.c1(d),v=d}else v=f;var y=v;y.g58(t),this.f56_1.v4d(t)}h56(r){for(var t=this.d56_1.e3().e1();t.f1();)for(var n=t.g1(),a=n.x2(),s=n.y2(),u=s.e1();u.f1();){var _=u.g1();r(a,_)}this.v2()}v2(){this.g56_1.w4d(T7(this.d56_1.d3())),this.e56_1.w4d(this.d56_1.c3()),this.d56_1.v2()}}p(e,"BatchManager"),zf=e}return zf}new($D());var me=Math.imul,qf;function Mm(){if(qf===l){class e{constructor(r,t,n){n=n===l?1:n,this.u4c_1=r,this.v4c_1=t,this.w4c_1=n;for(var a=this,s=0,u=me(me(this.u4c_1,this.v4c_1),this.w4c_1),_=new Int8Array(u);s"x ("+r+") has to be between 0 and "+this.u4c_1+" (excluded)");var u=sn,_=0<=t?t"y ("+t+") has to be between 0 and "+this.v4c_1+" (excluded)");var o=sn,c=n.length===this.w4c_1;o.c4c(c,()=>"the assigned pixel needs to conform the pixel format ("+this.w4c_1+")");for(var h=Math.max(0,r),f=this.u4c_1-1|0,v=Math.min(h,f),d=Math.max(0,t),y=this.v4c_1-1|0,b=Math.min(d,y),w=me(v+me(b,this.u4c_1)|0,this.w4c_1),x=0,q=0,k=n.length;q=0&&r"x ("+r+") has to be between 0 and "+this.u4c_1+" (excluded)");var s=sn,u=t>=0&&t"y ("+t+") has to be between 0 and "+this.v4c_1+" (excluded)");var _=me(r+me(t,this.u4c_1)|0,this.w4c_1);switch(this.w4c_1){case 4:this.z4c_1[0]=this.x4c_1[_],this.z4c_1[1]=this.x4c_1[_+1|0],this.z4c_1[2]=this.x4c_1[_+2|0],this.z4c_1[3]=this.x4c_1[_+3|0];break;case 3:this.z4c_1[0]=this.x4c_1[_],this.z4c_1[1]=this.x4c_1[_+1|0],this.z4c_1[2]=this.x4c_1[_+2|0];break;case 1:this.z4c_1[0]=this.x4c_1[_];break}return this.z4c_1}toString(){for(var r=me(this.u4c_1,this.w4c_1),t=0,n=0,a=On().na(this.y4c_1+this.v4c_1|0);t=r&&(n=0,a.ja(` -`));return a.toString()}}p(e,"PixelArray"),qf=e}return qf}var If;function zI(){if(If===l){class e{constructor(r,t){this.g4b_1=r,this.h4b_1=t,this.i4b_1=0,this.j4b_1=this.g4b_1,this.k4b_1=0,this.l4b_1=this.h4b_1}m4b(r,t,n,a){var s=this,u=r+n|0,_=Math.min(r,u);s.i4b_1=Math.max(0,_);var o=this,c=r+n|0,h=Math.max(r,c),f=this.g4b_1;o.j4b_1=Math.min(h,f);var v=this,d=t+a|0,y=Math.min(t,d);v.k4b_1=Math.max(0,y);var b=this,w=t+a|0,x=Math.max(t,w),q=this.h4b_1;b.l4b_1=Math.min(x,q)}b1h(){this.i4b_1=0,this.j4b_1=this.g4b_1,this.k4b_1=0,this.l4b_1=this.h4b_1}equals(r){var t=r instanceof zI()?r:null,n;if(t==null)return!1;n=t;var a=n;return this.g4b_1===a.g4b_1&&this.h4b_1===a.h4b_1&&this.i4b_1===a.i4b_1&&this.j4b_1===a.j4b_1&&this.k4b_1===a.k4b_1&&this.l4b_1===a.l4b_1}}p(e,"Clipper"),If=e}return If}var $f;function LD(){if($f===l){class e{constructor(r){this.d4c_1=r;for(var t=this,n=0,a=this.d4c_1.w4b_1,s=Array(a);n(e.h55_1.z55(i,r),S)),e.h55_1.i56(),e.i55_1.y55(),e.o55_1.h56((i,r)=>(e.i55_1.n56(i,r),S)),e.i55_1.i56(),e.d55_1.xs(2929),e.d55_1.au(36160,null),e.l55_1=1,e.k55_1=null}function je(e){e.m55_1=null}function Xe(e,i){var r=i==null?null:i.y48_1,t=e.k55_1;E(r,t==null?null:t.y48_1)||(e.l55_1=e.l55_1-1e-4,e.k55_1=i)}var Lf;function TD(){if(Lf===l){class e{constructor(){this.o56_1=1e-4}}ar(e),Lf=e}return Lf}function FD(e){return m0(e),e.d55_1.au(36160,e.u55().s55_1),e.d55_1.iu(0,0,e.e55_1.a47_1,e.e55_1.b47_1,6408,5121,e.u55().t55_1),e.d55_1.au(36160,null),new(iD())(e.u55().t55_1,e.e55_1)}function DD(){return new(p0())}function PD(){return new(xm())}function BD(){return new(hI())}function OD(){return fI}function RD(){return new(zm())}function UD(){return new(vI())}var jf;function KD(){if(jf===l){class e{constructor(r,t,n){this.d55_1=r,this.e55_1=t,this.f55_1=n,this.h55_1=new(xD())(this.d55_1,this.e55_1,this.f55_1),this.i55_1=new(zD())(this.d55_1,this.e55_1,this.f55_1),this.j55_1=new(ID())(this.d55_1,this.e55_1,this.f55_1),this.k55_1=null,this.l55_1=1,this.m55_1=null;var a=this,s=DD,u=PD;a.n55_1=new(cg())(s,u,BD);var _=this,o=OD,c=RD;_.o55_1=new(cg())(o,c,UD),this.p55_1=new(jD())(this.e55_1.a47_1,this.e55_1.b47_1,this.e55_1.n47()),this.q55_1=MD(this)}u55(){var r=this.g55_1;if(r!=null)return r;st("frameBufferContext")}v46(r){this.h55_1.p56(),this.i55_1.p56(),this.j55_1.v46(r);var t=d0().yr(fg(fg(this.e55_1.a47_1,this.e55_1.b47_1),4)),n=this.d55_1.fu();this.d55_1.eu(36161,n),this.d55_1.hu(36161,35056,this.e55_1.a47_1,this.e55_1.b47_1);var a=this.d55_1.bu();this.d55_1.au(36160,a),this.d55_1.gu(36160,36128,36161,n),this.d55_1.gu(36160,36096,36161,n);var s=this.d55_1.kt();if(this.d55_1.nt(3553,s),this.d55_1.lt(3553,0,6408,this.e55_1.a47_1,this.e55_1.b47_1,0,6408,5121,t),this.d55_1.ot(3553,10241,9728),this.d55_1.ot(3553,10240,9728),this.d55_1.du(36160,36064,3553,s,0),this.d55_1.cu(36160)!==36053)throw fr().u3("Framebuffer is NOT complete!");this.g55_1=new(II())(s,a,t),this.d55_1.ws(3042),this.d55_1.xs(3089),this.d55_1.nt(3553,null),this.d55_1.au(36160,null)}i50(r,t,n,a,s,u,_,o,c,h){je(this),Xe(this,r);var f=this.n55_1.w56();f.c57(r,this.p55_1.q4c_1.f4c_1,this.q55_1[t],this.p55_1.r4c_1,this.p55_1.p4c_1);var v=this.n55_1.d57();v.n57(n,a,s,u,_,o,c,h,this.l55_1),this.n55_1.o57(f,v)}o4o(r,t,n,a,s,u,_,o,c){je(this),Xe(this,r);var h=this.n55_1.w56();h.c57(r,this.p55_1.q4c_1.f4c_1,this.p55_1.q4c_1.e4c_1,this.p55_1.r4c_1,this.p55_1.p4c_1);var f=this.n55_1.d57();f.n57(t,n,a,s,u,_,o,c,this.l55_1),this.n55_1.o57(h,f)}s4w(r,t,n,a,s,u){je(this),Xe(this,null);var _=this.o55_1.w56(),o=this.o55_1.d57(),c=this.p55_1.q4c_1.f4c_1,h=this.l55_1,f=o.z57(r,t,n,a,s,c,u,h);this.o55_1.o57(_,f)}n4w(r,t,n,a,s){je(this),Xe(this,null);var u=this.o55_1.w56(),_=this.o55_1.d57(),o=this.p55_1.q4c_1.f4c_1,c=this.l55_1,h=_.a58(r,t,n,a,o,s,c);this.o55_1.o57(u,h)}b4x(r,t,n,a,s){je(this),Xe(this,null);var u=this.o55_1.w56(),_=this.o55_1.d57(),o=this.p55_1.q4c_1.f4c_1,c=this.l55_1,h=_.b58(r,t,n,a,o,s,c);this.o55_1.o57(u,h)}e4i(r,t,n){je(this),Xe(this,null);var a=this.o55_1.w56(),s=this.o55_1.d57(),u=this.p55_1.q4c_1.f4c_1,_=this.l55_1,o=s.c58(r,t,u,n,_);this.o55_1.o57(a,o)}l4x(r,t,n,a,s,u,_,o){je(this),Xe(this,null);var c=this.o55_1.w56(),h=this.o55_1.d57().d58(r,t,n,a,s,u,_,this.p55_1.q4c_1.f4c_1,o,this.l55_1);this.o55_1.o57(c,h)}y46(){m0(this),this.j55_1.e58(this.u55().r55_1)}b44(r){this.h55_1.b44(r)}j4i(){var r=this.m55_1,t=r??FD(this);return this.m55_1=t,t}a4j(r){var t=this.p55_1.q4c_1.f4c_1;return this.p55_1.q4c_1.f4c_1=r,t}ht(r){je(this),this.n55_1.v2(),this.o55_1.v2(),this.d55_1.au(36160,this.u55().s55_1);var t=this.e55_1.n47().y4b(r),n=t[0],a=t[1],s=t[2],u=Mr(n),_=(Pr(u)&255)/255,o=Mr(a),c=(Pr(o)&255)/255,h=Mr(s),f=Pr(h)&255;this.d55_1.it(_,c,f/255,1),this.d55_1.ht(16640),this.d55_1.au(36160,null)}r4i(){this.p55_1.q4c_1.g4c()}s4i(r,t){this.p55_1.q4c_1.h4c(r,t)}v4i(r,t){this.p55_1.r4c_1.k4c(r,t)}o4h(){return T(this.p55_1.r4c_1.i4c_1,this.p55_1.r4c_1.j4c_1)}u4i(){this.p55_1.r4c_1.k4c(0,0)}g4j(r,t,n,a){this.p55_1.p4c_1.m4b(r,t,n,a)}f4j(){this.p55_1.p4c_1.b1h()}v4h(r){switch(m0(this),this.d55_1.au(36160,this.u55().s55_1),r.i3_1){case 0:this.d55_1.xs(2960),this.d55_1.ws(3042),this.d55_1.wt(0),this.d55_1.jt(770,771),this.d55_1.xt(!0,!0,!0,!0);break;case 1:this.d55_1.xs(2960),this.d55_1.ws(3042),this.d55_1.vt(0,1,0,771),this.d55_1.xt(!0,!0,!0,!0);break;case 2:this.d55_1.ws(2960),this.d55_1.xs(3042),this.d55_1.wt(255),this.d55_1.ht(1024),this.d55_1.zt(519,1,255),this.d55_1.yt(7680,7680,7681),this.d55_1.xt(!1,!1,!1,!1);break;case 3:this.d55_1.ws(2960),this.d55_1.ws(3042),this.d55_1.wt(0),this.d55_1.zt(514,1,255),this.d55_1.yt(7680,7680,7680),this.d55_1.xt(!0,!0,!0,!0),this.d55_1.jt(770,771);break;case 4:this.d55_1.ws(2960),this.d55_1.ws(3042),this.d55_1.wt(0),this.d55_1.zt(517,1,255),this.d55_1.yt(7680,7680,7680),this.d55_1.xt(!0,!0,!0,!0),this.d55_1.jt(770,771);break;default:gt();break}this.d55_1.au(36160,null)}}p(e,"DefaultVirtualFrameBuffer"),jf=e}return jf}new(TD());var $I,AI,EI,NI,LI,jI,MI,vg;function kn(){if(vg)return S;vg=!0,$I=new(Me())("BOOT_GAMESCRIPT",0),AI=new(Me())("GAME_GAMESCRIPT",1),EI=new(Me())("ENGINE_GAMESCRIPT",2),NI=new(Me())("BOOT_SPRITESHEET",3),LI=new(Me())("GAME_SPRITESHEET",4),jI=new(Me())("GAME_LEVEL",5),MI=new(Me())("GAME_SOUND",6),new(Me())("PRIMITIVE_SPRITESHEET",7)}var Mf;function Me(){if(Mf===l){class e extends Kt(){}p(e,"ResourceType"),Mf=e}return Mf}function Fs(){return kn(),$I}function GD(){return kn(),AI}function Ds(){return kn(),EI}function pg(){return kn(),NI}function Tm(){return kn(),LI}function TI(){return kn(),jI}function JD(){return kn(),MI}var Tf;function Va(){if(Tf===l){class e{}Ar(e,"GameResource"),Tf=e}return Tf}var ta=Math.imul,Ff;function S1(){if(Ff===l){class e{constructor(r,t,n,a,s,u){s=s===l?JD():s,u=u===l?!1:u,this.s4u_1=r,this.t4u_1=t,this.u4u_1=n,this.v4u_1=a,this.w4u_1=s,this.x4u_1=u}f48(){return this.s4u_1}v47(){return this.t4u_1}b48(){return this.u4u_1}u47(){return this.w4u_1}w47(r){this.x4u_1=r}e48(){return this.x4u_1}toString(){return"Sound(version="+this.s4u_1+", index="+this.t4u_1+", name="+this.u4u_1+", data="+$(this.v4u_1)+", type="+this.w4u_1.toString()+", reload="+this.x4u_1+")"}hashCode(){var r=this.s4u_1;return r=ta(r,31)+this.t4u_1|0,r=ta(r,31)+br(this.u4u_1)|0,r=ta(r,31)+V(this.v4u_1)|0,r=ta(r,31)+this.w4u_1.hashCode()|0,r=ta(r,31)+wa(this.x4u_1)|0,r}equals(r){return this===r?!0:!(!(r instanceof S1())||this.s4u_1!==r.s4u_1||this.t4u_1!==r.t4u_1||this.u4u_1!==r.u4u_1||!E(this.v4u_1,r.v4u_1)||!this.w4u_1.equals(r.w4u_1)||this.x4u_1!==r.x4u_1)}}p(e,"Sound",l,l,[Va()]),Ff=e}return Ff}var U=Math.imul,FI,DI,PI,BI;function WD(){return[HP(),VP(),YP(),ZP()]}var dg;function z1(){if(dg)return S;dg=!0,FI=new(fi())("LinearHorizontal",0),DI=new(fi())("LinearVertical",1),PI=new(fi())("Free",2),BI=new(fi())("GridVania",3)}var Df;function fi(){if(Df===l){class e extends Kt(){}p(e,"WorldLayout"),Df=e}return Df}function HD(){return hm("com.github.minigdx.tiny.resources.ldtk.WorldLayout",WD())}function VD(){return new(Cr())(C0())}function YD(e){return e.y3s_1=!0,e.l3s_1=!0,e.q3s_1="__type",S}var Pf;function ZD(){if(Pf===l){class e{constructor(){w0=this;var r=this,t=lr(),n=ur(t,HD),a=lr();r.h5i_1=[null,n,ur(a,VD)]}i5i(r){var t=Kq(l,YD);return t.s3r(this.v3t(),r)}v3t(){return y0()}}ar(e),Pf=e}return Pf}var w0;function ma(){return w0===l&&new(ZD()),w0}var Bf;function XD(){if(Bf===l){class e{constructor(){g0=this;var r=new(Kr())("com.github.minigdx.tiny.resources.ldtk.Ldtk",this,3);r.a3i("iid",!1),r.a3i("worldLayout",!1),r.a3i("levels",!1),this.q5l_1=r}r5l(r,t){var n=this.q5l_1,a=r.k3a(n),s=ma().h5i_1;a.a3c(n,0,t.m4n_1),a.c3c(n,1,s[1].y2(),t.n4n_1),a.c3c(n,2,s[2].y2(),t.o4n_1),a.l3a(n)}d36(r,t){return this.r5l(r,t instanceof Ps()?t:m())}e36(r){var t=this.q5l_1,n=!0,a=0,s=0,u=null,_=null,o=null,c=r.k3a(t),h=ma().h5i_1;if(c.a3b())u=c.u3a(t,0),s=s|1,_=c.w3a(t,1,h[1].y2(),_),s=s|2,o=c.w3a(t,2,h[2].y2(),o),s=s|4;else for(;n;)switch(a=c.b3b(t),a){case-1:n=!1;break;case 0:u=c.u3a(t,0),s=s|1;break;case 1:_=c.w3a(t,1,h[1].y2(),_),s=s|2;break;case 2:o=c.w3a(t,2,h[2].y2(),o),s=s|4;break;default:throw Xr().w37(a)}return c.l3a(t),Ps().s5l(s,u,_,o,null)}c36(){return this.q5l_1}p3i(){var r=ma().h5i_1;return[qr(),r[1].y2(),r[2].y2()]}}F(e).q3i=Hr,P(e,"$serializer",l,l,[Vr()]),Bf=e}return Bf}var g0;function y0(){return g0===l&&new(XD()),g0}var Of;function Ps(){if(Of===l){class e{toString(){return"Ldtk(iid="+this.m4n_1+", worldLayout="+this.n4n_1.toString()+", levels="+$(this.o4n_1)+")"}hashCode(){var r=br(this.m4n_1);return r=U(r,31)+this.n4n_1.hashCode()|0,r=U(r,31)+V(this.o4n_1)|0,r}equals(r){return this===r?!0:!(!(r instanceof Ps())||this.m4n_1!==r.m4n_1||!this.n4n_1.equals(r.n4n_1)||!E(this.o4n_1,r.o4n_1))}static s5l(r,t,n,a,s){ma(),(7&r)!==7&&rt(r,7,y0().q5l_1);var u=Ur(this);return u.m4n_1=t,u.n4n_1=n,u.o4n_1=a,u}}p(e,"Ldtk",l,l,l,l,l,{0:y0}),Of=e}return Of}function QD(){return new(Cr())(Fm.v3t())}function rP(){return new(Cr())(q1())}var Rf;function tP(){if(Rf===l){class e{constructor(){b0=this;var r=this,t=lr(),n=ur(t,QD),a=lr();r.t5l_1=[null,null,null,null,n,ur(a,rP)]}}ar(e),Rf=e}return Rf}var b0;function xi(){return b0===l&&new(tP()),b0}var Uf;function eP(){if(Uf===l){class e{constructor(){k0=this;var r=new(Kr())("com.github.minigdx.tiny.resources.ldtk.Level",this,6);r.a3i("identifier",!1),r.a3i("iid",!1),r.a3i("worldX",!1),r.a3i("worldY",!1),r.a3i("layerInstances",!1),r.a3i("fieldInstances",!1),this.u5l_1=r}v5l(r,t){var n=this.u5l_1,a=r.k3a(n),s=xi().t5l_1;a.a3c(n,0,t.y4l_1),a.a3c(n,1,t.z4l_1),a.v3b(n,2,t.a4m_1),a.v3b(n,3,t.b4m_1),a.c3c(n,4,s[4].y2(),t.c4m_1),a.c3c(n,5,s[5].y2(),t.d4m_1),a.l3a(n)}d36(r,t){return this.v5l(r,t instanceof x0()?t:m())}e36(r){var t=this.u5l_1,n=!0,a=0,s=0,u=null,_=null,o=0,c=0,h=null,f=null,v=r.k3a(t),d=xi().t5l_1;if(v.a3b())u=v.u3a(t,0),s=s|1,_=v.u3a(t,1),s=s|2,o=v.p3a(t,2),s=s|4,c=v.p3a(t,3),s=s|8,h=v.w3a(t,4,d[4].y2(),h),s=s|16,f=v.w3a(t,5,d[5].y2(),f),s=s|32;else for(;n;)switch(a=v.b3b(t),a){case-1:n=!1;break;case 0:u=v.u3a(t,0),s=s|1;break;case 1:_=v.u3a(t,1),s=s|2;break;case 2:o=v.p3a(t,2),s=s|4;break;case 3:c=v.p3a(t,3),s=s|8;break;case 4:h=v.w3a(t,4,d[4].y2(),h),s=s|16;break;case 5:f=v.w3a(t,5,d[5].y2(),f),s=s|32;break;default:throw Xr().w37(a)}return v.l3a(t),x0().w5l(s,u,_,o,c,h,f,null)}c36(){return this.u5l_1}p3i(){var r=xi().t5l_1;return[qr(),qr(),K(),K(),r[4].y2(),r[5].y2()]}}F(e).q3i=Hr,P(e,"$serializer",l,l,[Vr()]),Uf=e}return Uf}var k0;function C0(){return k0===l&&new(eP()),k0}var Kf;function x0(){if(Kf===l){class e{toString(){return"Level(identifier="+this.y4l_1+", iid="+this.z4l_1+", worldX="+this.a4m_1+", worldY="+this.b4m_1+", layerInstances="+$(this.c4m_1)+", fieldInstances="+$(this.d4m_1)+")"}hashCode(){var r=br(this.y4l_1);return r=U(r,31)+br(this.z4l_1)|0,r=U(r,31)+this.a4m_1|0,r=U(r,31)+this.b4m_1|0,r=U(r,31)+V(this.c4m_1)|0,r=U(r,31)+V(this.d4m_1)|0,r}equals(r){return this===r?!0:!(!(r instanceof x0())||this.y4l_1!==r.y4l_1||this.z4l_1!==r.z4l_1||this.a4m_1!==r.a4m_1||this.b4m_1!==r.b4m_1||!E(this.c4m_1,r.c4m_1)||!E(this.d4m_1,r.d4m_1))}static w5l(r,t,n,a,s,u,_,o){xi(),(63&r)!==63&&rt(r,63,C0().u5l_1);var c=Ur(this);return c.y4l_1=t,c.z4l_1=n,c.a4m_1=a,c.b4m_1=s,c.c4m_1=u,c.d4m_1=_,c}}p(e,"Level",l,l,l,l,l,{0:C0}),Kf=e}return Kf}function nP(){return new(Cr())(K())}function aP(){return new(Cr())(Bn())}function iP(){return new(Cr())(ue())}function sP(){return new(Cr())(ue())}var Gf;function lP(){if(Gf===l){class e{constructor(){S0=this;var r=this,t=lr(),n=ur(t,nP),a=lr(),s=ur(a,aP),u=lr(),_=ur(u,iP),o=lr();r.x5l_1=[null,null,null,null,null,null,null,n,null,s,null,_,ur(o,sP)]}}ar(e),Gf=e}return Gf}var S0;function Si(){return S0===l&&new(lP()),S0}var Jf;function uP(){if(Jf===l){class e{constructor(){z0=this;var r=new(Kr())("IntGrid",this,13);r.a3i("__identifier",!1),r.a3i("__cWid",!1),r.a3i("__cHei",!1),r.a3i("__gridSize",!1),r.a3i("pxOffsetX",!1),r.a3i("pxOffsetY",!1),r.a3i("seed",!1),r.a3i("intGridCsv",!1),r.a3i("overrideTilesetUid",!0),r.a3i("entityInstances",!0),r.a3i("__tilesetRelPath",!0),r.a3i("autoLayerTiles",!0),r.a3i("gridTiles",!0),this.y5l_1=r}z5l(r,t){var n=this.y5l_1,a=r.k3a(n),s=Si().x5l_1;a.a3c(n,0,t.a5m_1),a.v3b(n,1,t.b5m_1),a.v3b(n,2,t.c5m_1),a.v3b(n,3,t.d5m_1),a.v3b(n,4,t.e5m_1),a.v3b(n,5,t.f5m_1),a.w3b(n,6,t.g5m_1),a.c3c(n,7,s[7].y2(),t.h5m_1),(a.i3c(n,8)||t.i5m_1!=null)&&a.e3c(n,8,K(),t.i5m_1),(a.i3c(n,9)||t.j5m_1!=null)&&a.e3c(n,9,s[9].y2(),t.j5m_1),(a.i3c(n,10)||t.k5m_1!=null)&&a.e3c(n,10,qr(),t.k5m_1),(a.i3c(n,11)||t.l5m_1!=null)&&a.e3c(n,11,s[11].y2(),t.l5m_1),(a.i3c(n,12)||t.m5m_1!=null)&&a.e3c(n,12,s[12].y2(),t.m5m_1),a.l3a(n)}d36(r,t){return this.z5l(r,t instanceof Aa()?t:m())}e36(r){var t=this.y5l_1,n=!0,a=0,s=0,u=null,_=0,o=0,c=0,h=0,f=0,v=0n,d=null,y=null,b=null,w=null,x=null,q=null,k=r.k3a(t),A=Si().x5l_1;if(k.a3b())u=k.u3a(t,0),s=s|1,_=k.p3a(t,1),s=s|2,o=k.p3a(t,2),s=s|4,c=k.p3a(t,3),s=s|8,h=k.p3a(t,4),s=s|16,f=k.p3a(t,5),s=s|32,v=k.q3a(t,6),s=s|64,d=k.w3a(t,7,A[7].y2(),d),s=s|128,y=k.y3a(t,8,K(),y),s=s|256,b=k.y3a(t,9,A[9].y2(),b),s=s|512,w=k.y3a(t,10,qr(),w),s=s|1024,x=k.y3a(t,11,A[11].y2(),x),s=s|2048,q=k.y3a(t,12,A[12].y2(),q),s=s|4096;else for(;n;)switch(a=k.b3b(t),a){case-1:n=!1;break;case 0:u=k.u3a(t,0),s=s|1;break;case 1:_=k.p3a(t,1),s=s|2;break;case 2:o=k.p3a(t,2),s=s|4;break;case 3:c=k.p3a(t,3),s=s|8;break;case 4:h=k.p3a(t,4),s=s|16;break;case 5:f=k.p3a(t,5),s=s|32;break;case 6:v=k.q3a(t,6),s=s|64;break;case 7:d=k.w3a(t,7,A[7].y2(),d),s=s|128;break;case 8:y=k.y3a(t,8,K(),y),s=s|256;break;case 9:b=k.y3a(t,9,A[9].y2(),b),s=s|512;break;case 10:w=k.y3a(t,10,qr(),w),s=s|1024;break;case 11:x=k.y3a(t,11,A[11].y2(),x),s=s|2048;break;case 12:q=k.y3a(t,12,A[12].y2(),q),s=s|4096;break;default:throw Xr().w37(a)}return k.l3a(t),Aa().n5m(s,u,_,o,c,h,f,v,d,y,b,w,x,q,null)}c36(){return this.y5l_1}p3i(){var r=Si().x5l_1;return[qr(),K(),K(),K(),K(),K(),Ua(),r[7].y2(),$r(K()),$r(r[9].y2()),$r(qr()),$r(r[11].y2()),$r(r[12].y2())]}}F(e).q3i=Hr,P(e,"$serializer",l,l,[Vr()]),Jf=e}return Jf}var z0;function q0(){return z0===l&&new(uP()),z0}function _P(){return new(Cr())(ue())}function oP(){return new(Cr())(K())}function cP(){return new(Cr())(Bn())}function hP(){return new(Cr())(ue())}var Wf;function fP(){if(Wf===l){class e{constructor(){I0=this;var r=this,t=lr(),n=ur(t,_P),a=lr(),s=ur(a,oP),u=lr(),_=ur(u,cP),o=lr();r.o5m_1=[null,null,null,null,null,null,null,n,null,null,s,_,ur(o,hP)]}}ar(e),Wf=e}return Wf}var I0;function zi(){return I0===l&&new(fP()),I0}var Hf;function vP(){if(Hf===l){class e{constructor(){$0=this;var r=new(Kr())("AutoLayer",this,13);r.a3i("__identifier",!1),r.a3i("__cWid",!1),r.a3i("__cHei",!1),r.a3i("__gridSize",!1),r.a3i("pxOffsetX",!1),r.a3i("pxOffsetY",!1),r.a3i("seed",!1),r.a3i("autoLayerTiles",!1),r.a3i("__tilesetRelPath",!1),r.a3i("overrideTilesetUid",!0),r.a3i("intGridCsv",!0),r.a3i("entityInstances",!0),r.a3i("gridTiles",!0),this.p5m_1=r}q5m(r,t){var n=this.p5m_1,a=r.k3a(n),s=zi().o5m_1;a.a3c(n,0,t.n5k_1),a.v3b(n,1,t.o5k_1),a.v3b(n,2,t.p5k_1),a.v3b(n,3,t.q5k_1),a.v3b(n,4,t.r5k_1),a.v3b(n,5,t.s5k_1),a.w3b(n,6,t.t5k_1),a.c3c(n,7,s[7].y2(),t.u5k_1),a.a3c(n,8,t.v5k_1),(a.i3c(n,9)||t.w5k_1!=null)&&a.e3c(n,9,K(),t.w5k_1),(a.i3c(n,10)||t.x5k_1!=null)&&a.e3c(n,10,s[10].y2(),t.x5k_1),(a.i3c(n,11)||t.y5k_1!=null)&&a.e3c(n,11,s[11].y2(),t.y5k_1),(a.i3c(n,12)||t.z5k_1!=null)&&a.e3c(n,12,s[12].y2(),t.z5k_1),a.l3a(n)}d36(r,t){return this.q5m(r,t instanceof Ea()?t:m())}e36(r){var t=this.p5m_1,n=!0,a=0,s=0,u=null,_=0,o=0,c=0,h=0,f=0,v=0n,d=null,y=null,b=null,w=null,x=null,q=null,k=r.k3a(t),A=zi().o5m_1;if(k.a3b())u=k.u3a(t,0),s=s|1,_=k.p3a(t,1),s=s|2,o=k.p3a(t,2),s=s|4,c=k.p3a(t,3),s=s|8,h=k.p3a(t,4),s=s|16,f=k.p3a(t,5),s=s|32,v=k.q3a(t,6),s=s|64,d=k.w3a(t,7,A[7].y2(),d),s=s|128,y=k.u3a(t,8),s=s|256,b=k.y3a(t,9,K(),b),s=s|512,w=k.y3a(t,10,A[10].y2(),w),s=s|1024,x=k.y3a(t,11,A[11].y2(),x),s=s|2048,q=k.y3a(t,12,A[12].y2(),q),s=s|4096;else for(;n;)switch(a=k.b3b(t),a){case-1:n=!1;break;case 0:u=k.u3a(t,0),s=s|1;break;case 1:_=k.p3a(t,1),s=s|2;break;case 2:o=k.p3a(t,2),s=s|4;break;case 3:c=k.p3a(t,3),s=s|8;break;case 4:h=k.p3a(t,4),s=s|16;break;case 5:f=k.p3a(t,5),s=s|32;break;case 6:v=k.q3a(t,6),s=s|64;break;case 7:d=k.w3a(t,7,A[7].y2(),d),s=s|128;break;case 8:y=k.u3a(t,8),s=s|256;break;case 9:b=k.y3a(t,9,K(),b),s=s|512;break;case 10:w=k.y3a(t,10,A[10].y2(),w),s=s|1024;break;case 11:x=k.y3a(t,11,A[11].y2(),x),s=s|2048;break;case 12:q=k.y3a(t,12,A[12].y2(),q),s=s|4096;break;default:throw Xr().w37(a)}return k.l3a(t),Ea().r5m(s,u,_,o,c,h,f,v,d,y,b,w,x,q,null)}c36(){return this.p5m_1}p3i(){var r=zi().o5m_1;return[qr(),K(),K(),K(),K(),K(),Ua(),r[7].y2(),qr(),$r(K()),$r(r[10].y2()),$r(r[11].y2()),$r(r[12].y2())]}}F(e).q3i=Hr,P(e,"$serializer",l,l,[Vr()]),Hf=e}return Hf}var $0;function A0(){return $0===l&&new(vP()),$0}function pP(){return new(Cr())(ue())}function dP(){return new(Cr())(K())}function mP(){return new(Cr())(Bn())}function wP(){return new(Cr())(ue())}var Vf;function gP(){if(Vf===l){class e{constructor(){E0=this;var r=this,t=lr(),n=ur(t,pP),a=lr(),s=ur(a,dP),u=lr(),_=ur(u,mP),o=lr();r.s5m_1=[null,null,null,null,null,null,null,n,null,null,s,_,ur(o,wP)]}}ar(e),Vf=e}return Vf}var E0;function qi(){return E0===l&&new(gP()),E0}var Yf;function yP(){if(Yf===l){class e{constructor(){N0=this;var r=new(Kr())("Tiles",this,13);r.a3i("__identifier",!1),r.a3i("__cWid",!1),r.a3i("__cHei",!1),r.a3i("__gridSize",!1),r.a3i("pxOffsetX",!1),r.a3i("pxOffsetY",!1),r.a3i("seed",!1),r.a3i("gridTiles",!1),r.a3i("__tilesetRelPath",!1),r.a3i("overrideTilesetUid",!0),r.a3i("intGridCsv",!0),r.a3i("entityInstances",!0),r.a3i("autoLayerTiles",!0),this.t5m_1=r}u5m(r,t){var n=this.t5m_1,a=r.k3a(n),s=qi().s5m_1;a.a3c(n,0,t.a5k_1),a.v3b(n,1,t.b5k_1),a.v3b(n,2,t.c5k_1),a.v3b(n,3,t.d5k_1),a.v3b(n,4,t.e5k_1),a.v3b(n,5,t.f5k_1),a.w3b(n,6,t.g5k_1),a.c3c(n,7,s[7].y2(),t.h5k_1),a.a3c(n,8,t.i5k_1),(a.i3c(n,9)||t.j5k_1!=null)&&a.e3c(n,9,K(),t.j5k_1),(a.i3c(n,10)||t.k5k_1!=null)&&a.e3c(n,10,s[10].y2(),t.k5k_1),(a.i3c(n,11)||t.l5k_1!=null)&&a.e3c(n,11,s[11].y2(),t.l5k_1),(a.i3c(n,12)||t.m5k_1!=null)&&a.e3c(n,12,s[12].y2(),t.m5k_1),a.l3a(n)}d36(r,t){return this.u5m(r,t instanceof Na()?t:m())}e36(r){var t=this.t5m_1,n=!0,a=0,s=0,u=null,_=0,o=0,c=0,h=0,f=0,v=0n,d=null,y=null,b=null,w=null,x=null,q=null,k=r.k3a(t),A=qi().s5m_1;if(k.a3b())u=k.u3a(t,0),s=s|1,_=k.p3a(t,1),s=s|2,o=k.p3a(t,2),s=s|4,c=k.p3a(t,3),s=s|8,h=k.p3a(t,4),s=s|16,f=k.p3a(t,5),s=s|32,v=k.q3a(t,6),s=s|64,d=k.w3a(t,7,A[7].y2(),d),s=s|128,y=k.u3a(t,8),s=s|256,b=k.y3a(t,9,K(),b),s=s|512,w=k.y3a(t,10,A[10].y2(),w),s=s|1024,x=k.y3a(t,11,A[11].y2(),x),s=s|2048,q=k.y3a(t,12,A[12].y2(),q),s=s|4096;else for(;n;)switch(a=k.b3b(t),a){case-1:n=!1;break;case 0:u=k.u3a(t,0),s=s|1;break;case 1:_=k.p3a(t,1),s=s|2;break;case 2:o=k.p3a(t,2),s=s|4;break;case 3:c=k.p3a(t,3),s=s|8;break;case 4:h=k.p3a(t,4),s=s|16;break;case 5:f=k.p3a(t,5),s=s|32;break;case 6:v=k.q3a(t,6),s=s|64;break;case 7:d=k.w3a(t,7,A[7].y2(),d),s=s|128;break;case 8:y=k.u3a(t,8),s=s|256;break;case 9:b=k.y3a(t,9,K(),b),s=s|512;break;case 10:w=k.y3a(t,10,A[10].y2(),w),s=s|1024;break;case 11:x=k.y3a(t,11,A[11].y2(),x),s=s|2048;break;case 12:q=k.y3a(t,12,A[12].y2(),q),s=s|4096;break;default:throw Xr().w37(a)}return k.l3a(t),Na().v5m(s,u,_,o,c,h,f,v,d,y,b,w,x,q,null)}c36(){return this.t5m_1}p3i(){var r=qi().s5m_1;return[qr(),K(),K(),K(),K(),K(),Ua(),r[7].y2(),qr(),$r(K()),$r(r[10].y2()),$r(r[11].y2()),$r(r[12].y2())]}}F(e).q3i=Hr,P(e,"$serializer",l,l,[Vr()]),Yf=e}return Yf}var N0;function L0(){return N0===l&&new(yP()),N0}function bP(){return new(Cr())(Bn())}function kP(){return new(Cr())(K())}function CP(){return new(Cr())(ue())}function xP(){return new(Cr())(ue())}var Zf;function SP(){if(Zf===l){class e{constructor(){j0=this;var r=this,t=lr(),n=ur(t,bP),a=lr(),s=ur(a,kP),u=lr(),_=ur(u,CP),o=lr();r.w5m_1=[null,null,null,null,null,null,null,n,s,null,null,_,ur(o,xP)]}}ar(e),Zf=e}return Zf}var j0;function Ii(){return j0===l&&new(SP()),j0}var Xf;function zP(){if(Xf===l){class e{constructor(){M0=this;var r=new(Kr())("Entities",this,13);r.a3i("__identifier",!1),r.a3i("__cWid",!1),r.a3i("__cHei",!1),r.a3i("__gridSize",!1),r.a3i("pxOffsetX",!1),r.a3i("pxOffsetY",!1),r.a3i("seed",!1),r.a3i("entityInstances",!1),r.a3i("intGridCsv",!0),r.a3i("__tilesetRelPath",!0),r.a3i("overrideTilesetUid",!0),r.a3i("autoLayerTiles",!0),r.a3i("gridTiles",!0),this.x5m_1=r}y5m(r,t){var n=this.x5m_1,a=r.k3a(n),s=Ii().w5m_1;a.a3c(n,0,t.z5m_1),a.v3b(n,1,t.a5n_1),a.v3b(n,2,t.b5n_1),a.v3b(n,3,t.c5n_1),a.v3b(n,4,t.d5n_1),a.v3b(n,5,t.e5n_1),a.w3b(n,6,t.f5n_1),a.c3c(n,7,s[7].y2(),t.g5n_1),(a.i3c(n,8)||t.h5n_1!=null)&&a.e3c(n,8,s[8].y2(),t.h5n_1),(a.i3c(n,9)||t.i5n_1!=null)&&a.e3c(n,9,qr(),t.i5n_1),(a.i3c(n,10)||t.j5n_1!=null)&&a.e3c(n,10,K(),t.j5n_1),(a.i3c(n,11)||t.k5n_1!=null)&&a.e3c(n,11,s[11].y2(),t.k5n_1),(a.i3c(n,12)||t.l5n_1!=null)&&a.e3c(n,12,s[12].y2(),t.l5n_1),a.l3a(n)}d36(r,t){return this.y5m(r,t instanceof La()?t:m())}e36(r){var t=this.x5m_1,n=!0,a=0,s=0,u=null,_=0,o=0,c=0,h=0,f=0,v=0n,d=null,y=null,b=null,w=null,x=null,q=null,k=r.k3a(t),A=Ii().w5m_1;if(k.a3b())u=k.u3a(t,0),s=s|1,_=k.p3a(t,1),s=s|2,o=k.p3a(t,2),s=s|4,c=k.p3a(t,3),s=s|8,h=k.p3a(t,4),s=s|16,f=k.p3a(t,5),s=s|32,v=k.q3a(t,6),s=s|64,d=k.w3a(t,7,A[7].y2(),d),s=s|128,y=k.y3a(t,8,A[8].y2(),y),s=s|256,b=k.y3a(t,9,qr(),b),s=s|512,w=k.y3a(t,10,K(),w),s=s|1024,x=k.y3a(t,11,A[11].y2(),x),s=s|2048,q=k.y3a(t,12,A[12].y2(),q),s=s|4096;else for(;n;)switch(a=k.b3b(t),a){case-1:n=!1;break;case 0:u=k.u3a(t,0),s=s|1;break;case 1:_=k.p3a(t,1),s=s|2;break;case 2:o=k.p3a(t,2),s=s|4;break;case 3:c=k.p3a(t,3),s=s|8;break;case 4:h=k.p3a(t,4),s=s|16;break;case 5:f=k.p3a(t,5),s=s|32;break;case 6:v=k.q3a(t,6),s=s|64;break;case 7:d=k.w3a(t,7,A[7].y2(),d),s=s|128;break;case 8:y=k.y3a(t,8,A[8].y2(),y),s=s|256;break;case 9:b=k.y3a(t,9,qr(),b),s=s|512;break;case 10:w=k.y3a(t,10,K(),w),s=s|1024;break;case 11:x=k.y3a(t,11,A[11].y2(),x),s=s|2048;break;case 12:q=k.y3a(t,12,A[12].y2(),q),s=s|4096;break;default:throw Xr().w37(a)}return k.l3a(t),La().m5n(s,u,_,o,c,h,f,v,d,y,b,w,x,q,null)}c36(){return this.x5m_1}p3i(){var r=Ii().w5m_1;return[qr(),K(),K(),K(),K(),K(),Ua(),r[7].y2(),$r(r[8].y2()),$r(qr()),$r(K()),$r(r[11].y2()),$r(r[12].y2())]}}F(e).q3i=Hr,P(e,"$serializer",l,l,[Vr()]),Xf=e}return Xf}var M0;function T0(){return M0===l&&new(zP()),M0}var Qf;function Aa(){if(Qf===l){class e{h4o(){return this.a5m_1}g4m(){return this.b5m_1}f4m(){return this.d5m_1}a4p(){return this.h5m_1}o4m(){return this.j5m_1}c4n(){return this.k5m_1}h4n(){return this.l5m_1}d4n(){return this.m5m_1}toString(){return"IntGrid(__identifier="+this.a5m_1+", __cWid="+this.b5m_1+", __cHei="+this.c5m_1+", __gridSize="+this.d5m_1+", pxOffsetX="+this.e5m_1+", pxOffsetY="+this.f5m_1+", seed="+this.g5m_1.toString()+", intGridCsv="+$(this.h5m_1)+", overrideTilesetUid="+this.i5m_1+", entityInstances="+Wr(this.j5m_1)+", __tilesetRelPath="+this.k5m_1+", autoLayerTiles="+Wr(this.l5m_1)+", gridTiles="+Wr(this.m5m_1)+")"}hashCode(){var r=br(this.a5m_1);return r=U(r,31)+this.b5m_1|0,r=U(r,31)+this.c5m_1|0,r=U(r,31)+this.d5m_1|0,r=U(r,31)+this.e5m_1|0,r=U(r,31)+this.f5m_1|0,r=U(r,31)+$t(this.g5m_1)|0,r=U(r,31)+V(this.h5m_1)|0,r=U(r,31)+(this.i5m_1==null?0:this.i5m_1)|0,r=U(r,31)+(this.j5m_1==null?0:V(this.j5m_1))|0,r=U(r,31)+(this.k5m_1==null?0:br(this.k5m_1))|0,r=U(r,31)+(this.l5m_1==null?0:V(this.l5m_1))|0,r=U(r,31)+(this.m5m_1==null?0:V(this.m5m_1))|0,r}equals(r){return this===r?!0:!(!(r instanceof Aa())||this.a5m_1!==r.a5m_1||this.b5m_1!==r.b5m_1||this.c5m_1!==r.c5m_1||this.d5m_1!==r.d5m_1||this.e5m_1!==r.e5m_1||this.f5m_1!==r.f5m_1||this.g5m_1!==r.g5m_1||!E(this.h5m_1,r.h5m_1)||this.i5m_1!=r.i5m_1||!E(this.j5m_1,r.j5m_1)||this.k5m_1!=r.k5m_1||!E(this.l5m_1,r.l5m_1)||!E(this.m5m_1,r.m5m_1))}static n5m(r,t,n,a,s,u,_,o,c,h,f,v,d,y,b){Si(),(255&r)!==255&&rt(r,255,q0().y5l_1);var w=Ur(this);return w.a5m_1=t,w.b5m_1=n,w.c5m_1=a,w.d5m_1=s,w.e5m_1=u,w.f5m_1=_,w.g5m_1=o,w.h5m_1=c,(r&256)===0?w.i5m_1=null:w.i5m_1=h,(r&512)===0?w.j5m_1=null:w.j5m_1=f,(r&1024)===0?w.k5m_1=null:w.k5m_1=v,(r&2048)===0?w.l5m_1=null:w.l5m_1=d,(r&4096)===0?w.m5m_1=null:w.m5m_1=y,w}}p(e,"IntGrid",l,l,[Ya()],l,l,{0:q0}),Qf=e}return Qf}var rv;function Ea(){if(rv===l){class e{h4o(){return this.n5k_1}g4m(){return this.o5k_1}f4m(){return this.q5k_1}h4n(){return this.u5k_1}c4n(){return this.v5k_1}a4p(){return this.x5k_1}o4m(){return this.y5k_1}d4n(){return this.z5k_1}toString(){return"AutoLayer(__identifier="+this.n5k_1+", __cWid="+this.o5k_1+", __cHei="+this.p5k_1+", __gridSize="+this.q5k_1+", pxOffsetX="+this.r5k_1+", pxOffsetY="+this.s5k_1+", seed="+this.t5k_1.toString()+", autoLayerTiles="+$(this.u5k_1)+", __tilesetRelPath="+this.v5k_1+", overrideTilesetUid="+this.w5k_1+", intGridCsv="+Wr(this.x5k_1)+", entityInstances="+Wr(this.y5k_1)+", gridTiles="+Wr(this.z5k_1)+")"}hashCode(){var r=br(this.n5k_1);return r=U(r,31)+this.o5k_1|0,r=U(r,31)+this.p5k_1|0,r=U(r,31)+this.q5k_1|0,r=U(r,31)+this.r5k_1|0,r=U(r,31)+this.s5k_1|0,r=U(r,31)+$t(this.t5k_1)|0,r=U(r,31)+V(this.u5k_1)|0,r=U(r,31)+br(this.v5k_1)|0,r=U(r,31)+(this.w5k_1==null?0:this.w5k_1)|0,r=U(r,31)+(this.x5k_1==null?0:V(this.x5k_1))|0,r=U(r,31)+(this.y5k_1==null?0:V(this.y5k_1))|0,r=U(r,31)+(this.z5k_1==null?0:V(this.z5k_1))|0,r}equals(r){return this===r?!0:!(!(r instanceof Ea())||this.n5k_1!==r.n5k_1||this.o5k_1!==r.o5k_1||this.p5k_1!==r.p5k_1||this.q5k_1!==r.q5k_1||this.r5k_1!==r.r5k_1||this.s5k_1!==r.s5k_1||this.t5k_1!==r.t5k_1||!E(this.u5k_1,r.u5k_1)||this.v5k_1!==r.v5k_1||this.w5k_1!=r.w5k_1||!E(this.x5k_1,r.x5k_1)||!E(this.y5k_1,r.y5k_1)||!E(this.z5k_1,r.z5k_1))}static r5m(r,t,n,a,s,u,_,o,c,h,f,v,d,y,b){zi(),(511&r)!==511&&rt(r,511,A0().p5m_1);var w=Ur(this);return w.n5k_1=t,w.o5k_1=n,w.p5k_1=a,w.q5k_1=s,w.r5k_1=u,w.s5k_1=_,w.t5k_1=o,w.u5k_1=c,w.v5k_1=h,(r&512)===0?w.w5k_1=null:w.w5k_1=f,(r&1024)===0?w.x5k_1=null:w.x5k_1=v,(r&2048)===0?w.y5k_1=null:w.y5k_1=d,(r&4096)===0?w.z5k_1=null:w.z5k_1=y,w}}p(e,"AutoLayer",l,l,[Ya()],l,l,{0:A0}),rv=e}return rv}var tv;function Na(){if(tv===l){class e{h4o(){return this.a5k_1}g4m(){return this.b5k_1}f4m(){return this.d5k_1}d4n(){return this.h5k_1}c4n(){return this.i5k_1}a4p(){return this.k5k_1}o4m(){return this.l5k_1}h4n(){return this.m5k_1}toString(){return"TilesLayer(__identifier="+this.a5k_1+", __cWid="+this.b5k_1+", __cHei="+this.c5k_1+", __gridSize="+this.d5k_1+", pxOffsetX="+this.e5k_1+", pxOffsetY="+this.f5k_1+", seed="+this.g5k_1.toString()+", gridTiles="+$(this.h5k_1)+", __tilesetRelPath="+this.i5k_1+", overrideTilesetUid="+this.j5k_1+", intGridCsv="+Wr(this.k5k_1)+", entityInstances="+Wr(this.l5k_1)+", autoLayerTiles="+Wr(this.m5k_1)+")"}hashCode(){var r=br(this.a5k_1);return r=U(r,31)+this.b5k_1|0,r=U(r,31)+this.c5k_1|0,r=U(r,31)+this.d5k_1|0,r=U(r,31)+this.e5k_1|0,r=U(r,31)+this.f5k_1|0,r=U(r,31)+$t(this.g5k_1)|0,r=U(r,31)+V(this.h5k_1)|0,r=U(r,31)+br(this.i5k_1)|0,r=U(r,31)+(this.j5k_1==null?0:this.j5k_1)|0,r=U(r,31)+(this.k5k_1==null?0:V(this.k5k_1))|0,r=U(r,31)+(this.l5k_1==null?0:V(this.l5k_1))|0,r=U(r,31)+(this.m5k_1==null?0:V(this.m5k_1))|0,r}equals(r){return this===r?!0:!(!(r instanceof Na())||this.a5k_1!==r.a5k_1||this.b5k_1!==r.b5k_1||this.c5k_1!==r.c5k_1||this.d5k_1!==r.d5k_1||this.e5k_1!==r.e5k_1||this.f5k_1!==r.f5k_1||this.g5k_1!==r.g5k_1||!E(this.h5k_1,r.h5k_1)||this.i5k_1!==r.i5k_1||this.j5k_1!=r.j5k_1||!E(this.k5k_1,r.k5k_1)||!E(this.l5k_1,r.l5k_1)||!E(this.m5k_1,r.m5k_1))}static v5m(r,t,n,a,s,u,_,o,c,h,f,v,d,y,b){qi(),(511&r)!==511&&rt(r,511,L0().t5m_1);var w=Ur(this);return w.a5k_1=t,w.b5k_1=n,w.c5k_1=a,w.d5k_1=s,w.e5k_1=u,w.f5k_1=_,w.g5k_1=o,w.h5k_1=c,w.i5k_1=h,(r&512)===0?w.j5k_1=null:w.j5k_1=f,(r&1024)===0?w.k5k_1=null:w.k5k_1=v,(r&2048)===0?w.l5k_1=null:w.l5k_1=d,(r&4096)===0?w.m5k_1=null:w.m5k_1=y,w}}p(e,"TilesLayer",l,l,[Ya()],l,l,{0:L0}),tv=e}return tv}var ev;function La(){if(ev===l){class e{h4o(){return this.z5m_1}g4m(){return this.a5n_1}f4m(){return this.c5n_1}o4m(){return this.g5n_1}a4p(){return this.h5n_1}c4n(){return this.i5n_1}h4n(){return this.k5n_1}d4n(){return this.l5n_1}toString(){return"EntitiesLayer(__identifier="+this.z5m_1+", __cWid="+this.a5n_1+", __cHei="+this.b5n_1+", __gridSize="+this.c5n_1+", pxOffsetX="+this.d5n_1+", pxOffsetY="+this.e5n_1+", seed="+this.f5n_1.toString()+", entityInstances="+$(this.g5n_1)+", intGridCsv="+Wr(this.h5n_1)+", __tilesetRelPath="+this.i5n_1+", overrideTilesetUid="+this.j5n_1+", autoLayerTiles="+Wr(this.k5n_1)+", gridTiles="+Wr(this.l5n_1)+")"}hashCode(){var r=br(this.z5m_1);return r=U(r,31)+this.a5n_1|0,r=U(r,31)+this.b5n_1|0,r=U(r,31)+this.c5n_1|0,r=U(r,31)+this.d5n_1|0,r=U(r,31)+this.e5n_1|0,r=U(r,31)+$t(this.f5n_1)|0,r=U(r,31)+V(this.g5n_1)|0,r=U(r,31)+(this.h5n_1==null?0:V(this.h5n_1))|0,r=U(r,31)+(this.i5n_1==null?0:br(this.i5n_1))|0,r=U(r,31)+(this.j5n_1==null?0:this.j5n_1)|0,r=U(r,31)+(this.k5n_1==null?0:V(this.k5n_1))|0,r=U(r,31)+(this.l5n_1==null?0:V(this.l5n_1))|0,r}equals(r){return this===r?!0:!(!(r instanceof La())||this.z5m_1!==r.z5m_1||this.a5n_1!==r.a5n_1||this.b5n_1!==r.b5n_1||this.c5n_1!==r.c5n_1||this.d5n_1!==r.d5n_1||this.e5n_1!==r.e5n_1||this.f5n_1!==r.f5n_1||!E(this.g5n_1,r.g5n_1)||!E(this.h5n_1,r.h5n_1)||this.i5n_1!=r.i5n_1||this.j5n_1!=r.j5n_1||!E(this.k5n_1,r.k5n_1)||!E(this.l5n_1,r.l5n_1))}static m5n(r,t,n,a,s,u,_,o,c,h,f,v,d,y,b){Ii(),(255&r)!==255&&rt(r,255,T0().x5m_1);var w=Ur(this);return w.z5m_1=t,w.a5n_1=n,w.b5n_1=a,w.c5n_1=s,w.d5n_1=u,w.e5n_1=_,w.f5n_1=o,w.g5n_1=c,(r&256)===0?w.h5n_1=null:w.h5n_1=h,(r&512)===0?w.i5n_1=null:w.i5n_1=f,(r&1024)===0?w.j5n_1=null:w.j5n_1=v,(r&2048)===0?w.k5n_1=null:w.k5n_1=d,(r&4096)===0?w.l5n_1=null:w.l5n_1=y,w}}p(e,"EntitiesLayer",l,l,[Ya()],l,l,{0:T0}),ev=e}return ev}var nv;function qP(){if(nv===l){class e{v3t(){var r=Z(Ya()),t=[Z(Ea()),Z(La()),Z(Aa()),Z(Na())],n=[A0(),T0(),q0(),L0()],a=[];return Yd().i37("com.github.minigdx.tiny.resources.ldtk.Layer",r,t,n,a)}d3j(r){return this.v3t()}}ar(e,l,[m1()]),nv=e}return nv}var Fm;function IP(){return Fm}var av;function Ya(){if(av===l){class e{}Ar(e,"Layer",l,l,l,l,l,{0:IP}),av=e}return av}function $P(){return new(Cr())(K())}function AP(){return new(Cr())(K())}var iv;function EP(){if(iv===l){class e{constructor(){F0=this;var r=this,t=lr(),n=ur(t,$P),a=lr();r.n5n_1=[null,null,n,ur(a,AP),null]}}ar(e),iv=e}return iv}var F0;function $i(){return F0===l&&new(EP()),F0}var sv;function NP(){if(sv===l){class e{constructor(){D0=this;var r=new(Kr())("com.github.minigdx.tiny.resources.ldtk.Tile",this,5);r.a3i("a",!1),r.a3i("f",!1),r.a3i("px",!1),r.a3i("src",!1),r.a3i("t",!1),this.o5n_1=r}p5n(r,t){var n=this.o5n_1,a=r.k3a(n),s=$i().n5n_1;a.x3b(n,0,t.j4o_1),a.v3b(n,1,t.k4o_1),a.c3c(n,2,s[2].y2(),t.l4o_1),a.c3c(n,3,s[3].y2(),t.m4o_1),a.v3b(n,4,t.n4o_1),a.l3a(n)}d36(r,t){return this.p5n(r,t instanceof P0()?t:m())}e36(r){var t=this.o5n_1,n=!0,a=0,s=0,u=0,_=0,o=null,c=null,h=0,f=r.k3a(t),v=$i().n5n_1;if(f.a3b())u=f.r3a(t,0),s=s|1,_=f.p3a(t,1),s=s|2,o=f.w3a(t,2,v[2].y2(),o),s=s|4,c=f.w3a(t,3,v[3].y2(),c),s=s|8,h=f.p3a(t,4),s=s|16;else for(;n;)switch(a=f.b3b(t),a){case-1:n=!1;break;case 0:u=f.r3a(t,0),s=s|1;break;case 1:_=f.p3a(t,1),s=s|2;break;case 2:o=f.w3a(t,2,v[2].y2(),o),s=s|4;break;case 3:c=f.w3a(t,3,v[3].y2(),c),s=s|8;break;case 4:h=f.p3a(t,4),s=s|16;break;default:throw Xr().w37(a)}return f.l3a(t),P0().q5n(s,u,_,o,c,h,null)}c36(){return this.o5n_1}p3i(){var r=$i().n5n_1;return[mt(),K(),r[2].y2(),r[3].y2(),K()]}}F(e).q3i=Hr,P(e,"$serializer",l,l,[Vr()]),sv=e}return sv}var D0;function ue(){return D0===l&&new(NP()),D0}var lv;function P0(){if(lv===l){class e{toString(){return"Tile(a="+this.j4o_1+", f="+this.k4o_1+", px="+$(this.l4o_1)+", src="+$(this.m4o_1)+", t="+this.n4o_1+")"}hashCode(){var r=Vt(this.j4o_1);return r=U(r,31)+this.k4o_1|0,r=U(r,31)+V(this.l4o_1)|0,r=U(r,31)+V(this.m4o_1)|0,r=U(r,31)+this.n4o_1|0,r}equals(r){return this===r?!0:!(!(r instanceof P0())||!E(this.j4o_1,r.j4o_1)||this.k4o_1!==r.k4o_1||!E(this.l4o_1,r.l4o_1)||!E(this.m4o_1,r.m4o_1)||this.n4o_1!==r.n4o_1)}static q5n(r,t,n,a,s,u,_){$i(),(31&r)!==31&&rt(r,31,ue().o5n_1);var o=Ur(this);return o.j4o_1=t,o.k4o_1=n,o.l4o_1=a,o.m4o_1=s,o.n4o_1=u,o}}p(e,"Tile",l,l,l,l,l,{0:ue}),lv=e}return lv}function LP(){return new(Cr())(K())}function jP(){return new(Cr())(mt())}function MP(){return new(Cr())(q1())}function TP(){return new(Cr())(K())}var uv;function FP(){if(uv===l){class e{constructor(){B0=this;var r=this,t=lr(),n=ur(t,LP),a=lr(),s=ur(a,jP),u=lr(),_=ur(u,MP),o=lr();r.r5n_1=[n,null,s,null,null,_,null,null,null,ur(o,TP)]}}ar(e),uv=e}return uv}var B0;function Ai(){return B0===l&&new(FP()),B0}var _v;function DP(){if(_v===l){class e{constructor(){O0=this;var r=new(Kr())("com.github.minigdx.tiny.resources.ldtk.Entity",this,10);r.a3i("__grid",!1),r.a3i("__identifier",!1),r.a3i("__pivot",!1),r.a3i("__worldX",!0),r.a3i("__worldY",!0),r.a3i("fieldInstances",!1),r.a3i("height",!1),r.a3i("width",!1),r.a3i("iid",!1),r.a3i("px",!1),this.s5n_1=r}t5n(r,t){var n=this.s5n_1,a=r.k3a(n),s=Ai().r5n_1;a.c3c(n,0,s[0].y2(),t.p4m_1),a.a3c(n,1,t.q4m_1),a.c3c(n,2,s[2].y2(),t.r4m_1),(a.i3c(n,3)||t.s4m_1!=null)&&a.e3c(n,3,K(),t.s4m_1),(a.i3c(n,4)||t.t4m_1!=null)&&a.e3c(n,4,K(),t.t4m_1),a.c3c(n,5,s[5].y2(),t.u4m_1),a.v3b(n,6,t.v4m_1),a.v3b(n,7,t.w4m_1),a.a3c(n,8,t.x4m_1),a.c3c(n,9,s[9].y2(),t.y4m_1),a.l3a(n)}d36(r,t){return this.t5n(r,t instanceof R0()?t:m())}e36(r){var t=this.s5n_1,n=!0,a=0,s=0,u=null,_=null,o=null,c=null,h=null,f=null,v=0,d=0,y=null,b=null,w=r.k3a(t),x=Ai().r5n_1;if(w.a3b())u=w.w3a(t,0,x[0].y2(),u),s=s|1,_=w.u3a(t,1),s=s|2,o=w.w3a(t,2,x[2].y2(),o),s=s|4,c=w.y3a(t,3,K(),c),s=s|8,h=w.y3a(t,4,K(),h),s=s|16,f=w.w3a(t,5,x[5].y2(),f),s=s|32,v=w.p3a(t,6),s=s|64,d=w.p3a(t,7),s=s|128,y=w.u3a(t,8),s=s|256,b=w.w3a(t,9,x[9].y2(),b),s=s|512;else for(;n;)switch(a=w.b3b(t),a){case-1:n=!1;break;case 0:u=w.w3a(t,0,x[0].y2(),u),s=s|1;break;case 1:_=w.u3a(t,1),s=s|2;break;case 2:o=w.w3a(t,2,x[2].y2(),o),s=s|4;break;case 3:c=w.y3a(t,3,K(),c),s=s|8;break;case 4:h=w.y3a(t,4,K(),h),s=s|16;break;case 5:f=w.w3a(t,5,x[5].y2(),f),s=s|32;break;case 6:v=w.p3a(t,6),s=s|64;break;case 7:d=w.p3a(t,7),s=s|128;break;case 8:y=w.u3a(t,8),s=s|256;break;case 9:b=w.w3a(t,9,x[9].y2(),b),s=s|512;break;default:throw Xr().w37(a)}return w.l3a(t),R0().u5n(s,u,_,o,c,h,f,v,d,y,b,null)}c36(){return this.s5n_1}p3i(){var r=Ai().r5n_1;return[r[0].y2(),qr(),r[2].y2(),$r(K()),$r(K()),r[5].y2(),K(),K(),qr(),r[9].y2()]}}F(e).q3i=Hr,P(e,"$serializer",l,l,[Vr()]),_v=e}return _v}var O0;function Bn(){return O0===l&&new(DP()),O0}var ov;function R0(){if(ov===l){class e{toString(){return"Entity(__grid="+$(this.p4m_1)+", __identifier="+this.q4m_1+", __pivot="+$(this.r4m_1)+", __worldX="+this.s4m_1+", __worldY="+this.t4m_1+", fieldInstances="+$(this.u4m_1)+", height="+this.v4m_1+", width="+this.w4m_1+", iid="+this.x4m_1+", px="+$(this.y4m_1)+")"}hashCode(){var r=V(this.p4m_1);return r=U(r,31)+br(this.q4m_1)|0,r=U(r,31)+V(this.r4m_1)|0,r=U(r,31)+(this.s4m_1==null?0:this.s4m_1)|0,r=U(r,31)+(this.t4m_1==null?0:this.t4m_1)|0,r=U(r,31)+V(this.u4m_1)|0,r=U(r,31)+this.v4m_1|0,r=U(r,31)+this.w4m_1|0,r=U(r,31)+br(this.x4m_1)|0,r=U(r,31)+V(this.y4m_1)|0,r}equals(r){return this===r?!0:!(!(r instanceof R0())||!E(this.p4m_1,r.p4m_1)||this.q4m_1!==r.q4m_1||!E(this.r4m_1,r.r4m_1)||this.s4m_1!=r.s4m_1||this.t4m_1!=r.t4m_1||!E(this.u4m_1,r.u4m_1)||this.v4m_1!==r.v4m_1||this.w4m_1!==r.w4m_1||this.x4m_1!==r.x4m_1||!E(this.y4m_1,r.y4m_1))}static u5n(r,t,n,a,s,u,_,o,c,h,f,v){Ai(),(999&r)!==999&&rt(r,999,Bn().s5n_1);var d=Ur(this);return d.p4m_1=t,d.q4m_1=n,d.r4m_1=a,(r&8)===0?d.s4m_1=null:d.s4m_1=s,(r&16)===0?d.t4m_1=null:d.t4m_1=u,d.u4m_1=_,d.v4m_1=o,d.w4m_1=c,d.x4m_1=h,d.y4m_1=f,d}}p(e,"Entity",l,l,l,l,l,{0:Bn}),ov=e}return ov}var cv;function PP(){if(cv===l){class e{}ar(e),cv=e}return cv}var hv;function U0(){if(hv===l){class e{constructor(r,t,n){this.z4m_1=r,this.a4n_1=t,this.b4n_1=n}toString(){return"CustomField(__identifier="+this.z4m_1+", __type="+this.a4n_1+", __value="+Wr(this.b4n_1)+")"}hashCode(){var r=br(this.z4m_1);return r=U(r,31)+br(this.a4n_1)|0,r=U(r,31)+(this.b4n_1==null?0:V(this.b4n_1))|0,r}equals(r){return this===r?!0:!(!(r instanceof U0())||this.z4m_1!==r.z4m_1||this.a4n_1!==r.a4n_1||!E(this.b4n_1,r.b4n_1))}}p(e,"CustomField",l,l,l,l,l,{0:q1}),hv=e}return hv}var fv;function BP(){if(fv===l){class e{v3t(){return G0()}}ar(e),fv=e}return fv}var OI,vv;function OP(){if(vv===l){class e{constructor(){K0=this;var r=new(Kr())("com.github.minigdx.tiny.resources.ldtk.EntityRef",this,4);r.a3i("entityIid",!1),r.a3i("layerIid",!1),r.a3i("levelIid",!1),r.a3i("worldIid",!1),this.v5n_1=r}w5n(r,t){var n=this.v5n_1,a=r.k3a(n);a.a3c(n,0,t.p4o_1),a.a3c(n,1,t.q4o_1),a.a3c(n,2,t.r4o_1),a.a3c(n,3,t.s4o_1),a.l3a(n)}d36(r,t){return this.w5n(r,t instanceof Bs()?t:m())}e36(r){var t=this.v5n_1,n=!0,a=0,s=0,u=null,_=null,o=null,c=null,h=r.k3a(t);if(h.a3b())u=h.u3a(t,0),s=s|1,_=h.u3a(t,1),s=s|2,o=h.u3a(t,2),s=s|4,c=h.u3a(t,3),s=s|8;else for(;n;)switch(a=h.b3b(t),a){case-1:n=!1;break;case 0:u=h.u3a(t,0),s=s|1;break;case 1:_=h.u3a(t,1),s=s|2;break;case 2:o=h.u3a(t,2),s=s|4;break;case 3:c=h.u3a(t,3),s=s|8;break;default:throw Xr().w37(a)}return h.l3a(t),Bs().x5n(s,u,_,o,c,null)}c36(){return this.v5n_1}p3i(){return[qr(),qr(),qr(),qr()]}}F(e).q3i=Hr,P(e,"$serializer",l,l,[Vr()]),vv=e}return vv}var K0;function G0(){return K0===l&&new(OP()),K0}var pv;function Bs(){if(pv===l){class e{toString(){return"EntityRef(entityIid="+this.p4o_1+", layerIid="+this.q4o_1+", levelIid="+this.r4o_1+", worldIid="+this.s4o_1+")"}hashCode(){var r=br(this.p4o_1);return r=U(r,31)+br(this.q4o_1)|0,r=U(r,31)+br(this.r4o_1)|0,r=U(r,31)+br(this.s4o_1)|0,r}equals(r){return this===r?!0:!(!(r instanceof Bs())||this.p4o_1!==r.p4o_1||this.q4o_1!==r.q4o_1||this.r4o_1!==r.r4o_1||this.s4o_1!==r.s4o_1)}static x5n(r,t,n,a,s,u){(15&r)!==15&&rt(r,15,G0().v5n_1);var _=Ur(this);return _.p4o_1=t,_.q4o_1=n,_.r4o_1=a,_.s4o_1=s,_}}p(e,"EntityRef",l,l,l,l,l,{0:G0}),pv=e}return pv}var dv;function RP(){if(dv===l){class e{v3t(){return W0()}}ar(e),dv=e}return dv}var RI,mv;function UP(){if(mv===l){class e{constructor(){J0=this;var r=new(Kr())("com.github.minigdx.tiny.resources.ldtk.TilesetRect",this,5);r.a3i("h",!1),r.a3i("tilesetUid",!1),r.a3i("w",!1),r.a3i("x",!1),r.a3i("y",!1),this.y5n_1=r}z5n(r,t){var n=this.y5n_1,a=r.k3a(n);a.v3b(n,0,t.v4o_1),a.v3b(n,1,t.w4o_1),a.v3b(n,2,t.x4o_1),a.v3b(n,3,t.y4o_1),a.v3b(n,4,t.z4o_1),a.l3a(n)}d36(r,t){return this.z5n(r,t instanceof Os()?t:m())}e36(r){var t=this.y5n_1,n=!0,a=0,s=0,u=0,_=0,o=0,c=0,h=0,f=r.k3a(t);if(f.a3b())u=f.p3a(t,0),s=s|1,_=f.p3a(t,1),s=s|2,o=f.p3a(t,2),s=s|4,c=f.p3a(t,3),s=s|8,h=f.p3a(t,4),s=s|16;else for(;n;)switch(a=f.b3b(t),a){case-1:n=!1;break;case 0:u=f.p3a(t,0),s=s|1;break;case 1:_=f.p3a(t,1),s=s|2;break;case 2:o=f.p3a(t,2),s=s|4;break;case 3:c=f.p3a(t,3),s=s|8;break;case 4:h=f.p3a(t,4),s=s|16;break;default:throw Xr().w37(a)}return f.l3a(t),Os().a5o(s,u,_,o,c,h,null)}c36(){return this.y5n_1}p3i(){return[K(),K(),K(),K(),K()]}}F(e).q3i=Hr,P(e,"$serializer",l,l,[Vr()]),mv=e}return mv}var J0;function W0(){return J0===l&&new(UP()),J0}var wv;function Os(){if(wv===l){class e{toString(){return"TilesetRect(h="+this.v4o_1+", tilesetUid="+this.w4o_1+", w="+this.x4o_1+", x="+this.y4o_1+", y="+this.z4o_1+")"}hashCode(){var r=this.v4o_1;return r=U(r,31)+this.w4o_1|0,r=U(r,31)+this.x4o_1|0,r=U(r,31)+this.y4o_1|0,r=U(r,31)+this.z4o_1|0,r}equals(r){return this===r?!0:!(!(r instanceof Os())||this.v4o_1!==r.v4o_1||this.w4o_1!==r.w4o_1||this.x4o_1!==r.x4o_1||this.y4o_1!==r.y4o_1||this.z4o_1!==r.z4o_1)}static a5o(r,t,n,a,s,u,_){(31&r)!==31&&rt(r,31,W0().y5n_1);var o=Ur(this);return o.v4o_1=t,o.w4o_1=n,o.x4o_1=a,o.y4o_1=s,o.z4o_1=u,o}}p(e,"TilesetRect",l,l,l,l,l,{0:W0}),wv=e}return wv}var gv;function KP(){if(gv===l){class e{v3t(){return V0()}}ar(e),gv=e}return gv}var UI,yv;function GP(){if(yv===l){class e{constructor(){H0=this;var r=new(Kr())("com.github.minigdx.tiny.resources.ldtk.GridPoint",this,2);r.a3i("cx",!1),r.a3i("cy",!1),this.b5o_1=r}c5o(r,t){var n=this.b5o_1,a=r.k3a(n);a.v3b(n,0,t.t4o_1),a.v3b(n,1,t.u4o_1),a.l3a(n)}d36(r,t){return this.c5o(r,t instanceof Rs()?t:m())}e36(r){var t=this.b5o_1,n=!0,a=0,s=0,u=0,_=0,o=r.k3a(t);if(o.a3b())u=o.p3a(t,0),s=s|1,_=o.p3a(t,1),s=s|2;else for(;n;)switch(a=o.b3b(t),a){case-1:n=!1;break;case 0:u=o.p3a(t,0),s=s|1;break;case 1:_=o.p3a(t,1),s=s|2;break;default:throw Xr().w37(a)}return o.l3a(t),Rs().d5o(s,u,_,null)}c36(){return this.b5o_1}p3i(){return[K(),K()]}}F(e).q3i=Hr,P(e,"$serializer",l,l,[Vr()]),yv=e}return yv}var H0;function V0(){return H0===l&&new(GP()),H0}var bv;function Rs(){if(bv===l){class e{toString(){return"GridPoint(cx="+this.t4o_1+", cy="+this.u4o_1+")"}hashCode(){var r=this.t4o_1;return r=U(r,31)+this.u4o_1|0,r}equals(r){return this===r?!0:!(!(r instanceof Rs())||this.t4o_1!==r.t4o_1||this.u4o_1!==r.u4o_1)}static d5o(r,t,n,a){(3&r)!==3&&rt(r,3,V0().b5o_1);var s=Ur(this);return s.t4o_1=t,s.u4o_1=n,s}}p(e,"GridPoint",l,l,l,l,l,{0:V0}),bv=e}return bv}function KI(e,i,r){if(r instanceof Ge())return null;var t;switch(i){case"Int":var n=r==null?null:Ce(r),a=n==null?null:n.c3u();t=a==null?null:Xs(a);break;case"Float":var s=r==null?null:Ce(r),u=s==null?null:s.c3u(),_;u==null?_=null:_=vd(u),t=_;break;case"String":case"Multilines":case"Text":case"FilePath":case"Color":var o=r==null?null:Ce(r);t=o==null?null:o.c3u();break;case"Bool":var c=r==null?null:Ce(r),h=c==null?null:c.c3u();t=h==null?null:sy(h);break;case"Point":var f;r==null?f=null:f=Ue().t3r(UI.v3t(),r),t=f;break;case"Tile":var v;r==null?v=null:v=Ue().t3r(RI.v3t(),r),t=v;break;case"EntityRef":var d;r==null?d=null:d=Ue().t3r(OI.v3t(),r),t=d;break;default:var y;if(xa(i,"LocalEnum.")){var b=r==null?null:Ce(r);y=b==null?null:b.c3u()}else if(xa(i,"Array<")){var w=oy(D7(i,"Array<"),">"),x=r==null?null:rT(r),q;if(x==null)q=null;else{for(var k=N().d1(yr(x,10)),A=x.e1();A.f1();){var D=A.g1(),B=KI(q1(),w,D);k.c1(B)}q=k}y=q}else throw H().u(i+" is not supported. Is the type describe exist in LdTK ? (https://ldtk.io/json/#ldtk-FieldInstanceJson) If yes, please fill an issue to support it in Tiny (https://github.com/minigdx/tiny/issues).");t=y;break}return t}function JP(e){return e.s36("__type",iq("__type",vn())),e.s36("__value",k1.v3t().c36()),S}var kv;function WP(){if(kv===l){class e{constructor(){Y0=this;var r=this;r.e5o_1=Dd("CustomField",[],JP)}c36(){return this.e5o_1}f5o(r,t){throw F7().r8("LdTk file is not supposed to be serialized. If you need to update it, Use LdTk instead: https://ldtk.io/")}d36(r,t){return this.f5o(r,t instanceof U0()?t:m())}e36(r){var t=k1.v3t().e36(r),n=QM(t),a=n.w1m("__identifier"),s=a==null?null:Ce(a),u=nr(s==null?null:s.c3u()),_=n.w1m("__type"),o=_==null?null:Ce(_),c=nr(o==null?null:o.c3u()),h=n.w1m("__value");return new(U0())(u,c,KI(this,c,h))}}P(e,"CustomFieldSerializer",l,l,[Y()]),kv=e}return kv}var Y0;function q1(){return Y0===l&&new(WP()),Y0}function HP(){return z1(),FI}function VP(){return z1(),DI}function YP(){return z1(),PI}function ZP(){return z1(),BI}Fm=new(qP());new(PP());OI=new(BP());RI=new(RP());UI=new(KP());var Cv;function GI(){if(Cv===l){class e{constructor(r,t,n,a,s,u,_){a=a===l?TI():a,this.i48_1=r,this.j48_1=t,this.k48_1=n,this.l48_1=a,this.m48_1=s,this.n48_1=u,this.o48_1=_}f48(){return this.i48_1}v47(){return this.j48_1}b48(){return this.k48_1}u47(){return this.l48_1}w47(r){this.m48_1=r}e48(){return this.m48_1}}p(e,"GameLevel",l,l,[Va()]),Cv=e}return Cv}var mg=Math.imul,xv;function XP(){if(xv===l){class e extends kr(){static b4y(r,t){return t===l&&(t={}),t.a4y_1=r,this.l2r(t)}g1q(r,t){var n=this.a4y_1.f4y_1.s49(this.a4y_1.h4y_1),a=n==null?null:n.t48_1,s;if(a==null)return g().c1k_1;s=a;var u=s,_=r.i1p(),o=t.i1p();if(JI(this.a4y_1,u,_,o)){var c=u.b4d(_,o),h=c[0];return g().y1t(h)}else return g().c1k_1}}p(e,"pget",l,l,l,[0,1,2,3]),xv=e}return xv}function JI(e,i,r,t){return(0<=r?r=n.length)return g().f1k_1;var a=this.x4y_1;this.x4y_1=a+1|0;var s=n[a],u=t.v1m(s);return u}}p(e,l,l,l,l,[1,2,0,3]),Ev=e}return Ev}var Nv;function iB(){if(Nv===l){class e extends Qt(){static b4z(){return this.n2q()}q1q(r){var t=nr(r.p1m(1)),n=r.j1p(2)-1|0;if(n<1)return g().f1k_1;var a=t.l1(n);if(a.k1o())return g().f1k_1;var s=g(),u=[g().y1t(n),a];return s.p25(u)}}p(e,l,l,l,l,[1,2,0,3]),Nv=e}return Nv}var Lv;function sB(){if(Lv===l){class e extends kr(){static f4z(r,t){return t===l&&(t={}),t.e4z_1=r,this.l2r(t)}f1q(r){return F(kr()).f1q.call(this,r)}g1q(r,t){var n;t.n1m()?n=Z0(this,nr(t.o1m())):n=sr().p1i();var a=n,s=Z0(this,nr(r.o1m()));return a.u1m(s),s.i1n("__index",s),a}}p(e,"new",l,l,l,[0,1,2,3]),Lv=e}return Lv}var jv;function lB(){if(jv===l){class e extends kr(){static j4z(r,t){return t===l&&(t={}),t.i4z_1=r,this.l2r(t)}g1q(r,t){var n;if(r.n1m()&t.n1m()){r instanceof sr()||m(),t instanceof sr()||m();for(var a=r.v1n(),s=0,u=a.length;sn;a.f3(r,s)}o4t(r,t){var n=dB().n52(t),a=this.j4l_1,s=()=>n;a.f3(r,s)}v1m(r){var t=r.o1p(),n=this.j4l_1,a=(j(n,kt())?n:m()).b3(t),s=a==null?null:a();return s??g().c1k_1}b1n(r,t){var n=r.o1p(),a=this.k4l_1,s=(j(a,kt())?a:m()).b3(n);s?.(t)}}p(e,"WrapperLuaTable",e.l4l,l,l,[0,1,2,3]),Uv=e}return Uv}var Dm=Math.imul;function gg(e,i,r,t){var n=Se().l4l();return n.e4m("toggle",()=>{if(e.x4l_1.u4l_1.length===0){for(var a=e.x4l_1,s=0,u=t.c4m_1.h1(),_=Array(u);syg(this,n.c4m_1))}f1q(r){var t=_e(this.n4m_1),n;if(t==null)return g().f1k_1;n=t;var a=n,s=Za(this.n4m_1,r),u;if(s==null)return g().f1k_1;u=s;var _=u,o=a.c4m_1.l1(_),c=o.h4o();return HI(this,c,()=>yg(this,Mg(o)))}}p(e,"entities",l,l,l,[0,1,2,3]),Yv=e}return Yv}function kg(e,i){if(e.u4l_1.length===0)return!0;var r=e.u4l_1,t;if(0<=i&&i<=(r.length-1|0))t=r[i];else return!0;return t}function _e(e){var i=e.o4l_1.w49(e.s4l_1),r=i==null?null:i.n48_1,t=r==null?null:r.o4n_1;return t==null?null:Ma(t,e.t4l_1)}function Za(e,i){var r=_e(e),t;if(r==null)return null;t=r;var n=t,a;if(i.h1o()){var s=i.i1p(),u;Ma(n.c4m_1,s)!=null?u=s:u=null,a=u}else{var _=i.o1p(),o=n.c4m_1,c;r:{for(var h=0,f=o.e1();f.f1();){var v=f.g1();if(v.h4o()===_){c=h;break r}h=h+1|0}c=-1}var d=c,y;d!==-1?y=d:y=null,a=y}return a}var Zv;function $B(){if(Zv===l){class e extends gr(){static i4o(r,t){return t===l&&(t={}),t.g4n_1=r,this.p2r(t)}e1q(){var r=this.g4n_1.o4l_1.w49(this.g4n_1.s4l_1),t;if(r==null)return g().c1k_1;t=r;var n=t,a=_e(this.g4n_1),s;if(a==null)return g().c1k_1;s=a;for(var u=s,_=u.c4m_1,o=N().p1(),c=0,h=_.e1();h.f1();){var f=h.g1(),v=c;c=v+1|0;var d=Ht(v);kg(this.g4n_1,d)&&f.c4n()!=null&&o.c1(f)}for(var y=gd(O7(o)),b=y.e1();b.f1();){var w=b.g1();bg(this,n,w)}return g().f1k_1}f1q(r){var t=Za(this.g4n_1,r),n;if(t==null)return g().c1k_1;n=t;var a=n;if(!kg(this.g4n_1,a))return g().c1k_1;var s=_e(this.g4n_1),u=s==null?null:s.c4m_1,_=u==null?null:Ma(u,a),o;if(_==null)return g().c1k_1;o=_;var c=o;if(c.c4n()==null)return g().c1k_1;var h=this.g4n_1.o4l_1.w49(this.g4n_1.s4l_1),f;if(h==null)return g().c1k_1;f=h;var v=f;return bg(this,v,c),g().f1k_1}}p(e,"draw",l,l,l,[0,1,2,3]),Zv=e}return Zv}function Cg(e,i,r,t){var n=t.m4o_1,a=n.l1(0),s=n.l1(1),u=t.l4o_1,_=u.l1(0),o=u.l1(1),c=LB(t.k4o_1),h=c.zd(),f=c.ae();e.q4l_1.o4o(i,a,s,r,r,_,o,h,f)}function AB(e,i){var r=sr().p1i();return r.c1n("entityIid",g().y1u(i.p4o_1)),r.c1n("layerIid",g().y1u(i.q4o_1)),r.c1n("levelIid",g().y1u(i.r4o_1)),r.c1n("worldIid",g().y1u(i.s4o_1)),r}function EB(e,i){var r=sr().p1i();return r.c1n("cx",g().y1t(i.t4o_1)),r.c1n("cy",g().y1t(i.u4o_1)),r}function NB(e,i){var r=sr().p1i();return r.c1n("x",g().y1t(i.y4o_1)),r.c1n("y",g().y1t(i.z4o_1)),r.c1n("w",g().y1t(i.x4o_1)),r.c1n("h",g().y1t(i.v4o_1)),r.c1n("tilesetUid",g().y1t(i.w4o_1)),r}function rd(e,i,r,t,n){var a=R7(i,MB),s=U7(a,f=>{var v=n(f,r,t),d=nr(f.a4p()),y;return 0<=v&&v=this.p4f_1.length||t<0)return g().e1k_1;var n=this.p4f_1[t];return g().u26(this.q4f_1.i4f_1.c4d(n))}}p(e,"pressed",l,l,l,[1,0,2,3]),f3=e}return f3}var v3;function tO(){if(v3===l){class e extends pr(){static v4f(r,t){return t===l&&(t={}),t.u4f_1=r,this.g2w(t)}f1q(r){var t=Cb(),n=r.i1p();if(n>=t.length||n<0)return g().e1k_1;var a=t[n];return g().u26(this.u4f_1.i4f_1.d4d(a))}}p(e,"pressing",l,l,l,[1,0,2,3]),v3=e}return v3}var p3;function eO(){if(p3===l){class e extends pr(){static z4f(r,t){return t===l&&(t={}),t.y4f_1=r,this.g2w(t)}f1q(r){var t=J5(),n=r.i1p();if(n>=t.length||n<0)return g().e1k_1;var a=J5()[n],s=this.y4f_1.i4f_1.f4d(a),u;if(s==null)u=null;else{var _=sr().p1i();_.e1n("x",Br(s.j4e_1)),_.e1n("y",Br(s.k4e_1)),u=_}var o=u,c=o??g().c1k_1;return c}}p(e,"touched",l,l,l,[1,0,2,3]),p3=e}return p3}var d3;function nO(){if(d3===l){class e extends pr(){static d4g(r,t){return t===l&&(t={}),t.c4g_1=r,this.g2w(t)}f1q(r){var t=En(),n=lt(t),a=r.i1p();if(a>=n.length||a<0)return g().e1k_1;var s=En().l1(a),u=this.c4g_1.i4f_1.e4d(s),_;if(u==null)_=null;else{var o=sr().p1i();o.e1n("x",Br(u.j4e_1)),o.e1n("y",Br(u.k4e_1)),_=o}var c=_,h=c??g().c1k_1;return h}}p(e,"touching",l,l,l,[1,0,2,3]),d3=e}return d3}var m3;function aO(){if(m3===l){class e extends kr(){static e4g(r,t){var n=this.l2r();return n.i4f_1=r,n.j4f_1=WI().f4g(t),n}g1q(r,t){var n=sr().p1i();return n.c1n("pressed",rO().r4f(this)),n.c1n("pressing",tO().v4f(this)),n.c1n("touch",QB().f4f(this)),n.c1n("touched",eO().z4f(this)),n.c1n("touching",nO().d4g(this)),t.c1n("ctrl",n),t.w1m("package").w1m("loaded").c1n("ctrl",n),n}}p(e,"CtrlLib",l,l,l,[0,1,2,3]),m3=e}return m3}var e$=Math.imul;function iO(e,i,r){var t=Sa(i.q4a_1,e.v4r_1.o4r_1),n=t==null?null:t.x4a_1;return n==null?null:Sa(n,r)}function sO(e){throw Xt().nc("An operation is not implemented: H")}function lO(e){return()=>{var i=e,r=i==null?null:i.u4q_1,t;r==null?t=null:t=g().y1u(r);var n=t;return n??g().c1k_1}}function uO(e,i){return()=>{var r;if(e.d4s_1)r=g().y1t(-1);else{var t=i;(t==null?null:t.t4q_1)!=null?r=g().y1t(i.t4q_1):r=g().c1k_1}return r}}function _O(e){return i=>{if(i.k1o())e.w4r_1=null,e.d4s_1=!1;else if(i.i1p()===-1)e.w4r_1=null,e.d4s_1=!0;else{var r=i.i1p();e.w4r_1=qe().w4q(K7(r,Yt(u1().t4q_1,Ad().t4q_1))-1|0),e.d4s_1=!1}return S}}function oO(e){return()=>{var i=e,r=i==null?null:i.y4q(),t;r==null?t=null:t=g().y1t(r);var n=t;return n??g().c1k_1}}function cO(e,i){return r=>{var t=e,n;return r.k1o()||i==null?n=$d():n=qe().x4q(i.u4q_1+We(r.i1p(),0,8)),t.w4r_1=n,S}}function hO(e){return()=>g().z1t(e.z4r_1*255)}function fO(e){return i=>(e.z4r_1=G7(i.r1o(),0,255)/255,S)}function vO(e){return()=>e.c4s_1?g().y1t(1):g().y1t(0)}function pO(e){return i=>(e.c4s_1=i.i1p()>=1,S)}function dO(e){return()=>{var i=e.a4s_1,r;i==null?r=null:r=g().y1t(i);var t=r;return t??g().c1k_1}}function mO(e){return i=>{var r=e,t;if(i.k1o())t=null;else{var n;i.i1p()<0?n=null:n=We(i.i1p(),0,7),t=n}return r.a4s_1=t,S}}function wO(e,i){return()=>g().z1t(e.l4s_1[i])}function gO(e,i){return r=>(e.l4s_1[i]=r.r1o(),S)}var w3;function yO(){if(w3===l){class e{constructor(r){this.q4s_1=r}hh(r,t){return this.q4s_1(r,t)}compare(r,t){return this.hh(r,t)}o3(){return this.q4s_1}equals(r){var t;if(r!=null&&j(r,ae())){var n;r!=null&&j(r,et())?n=E(this.o3(),r.o3()):n=!1,t=n}else t=!1;return t}hashCode(){return V(this.o3())}}p(e,"sam$kotlin_Comparator$0",l,l,[ae(),et()]),w3=e}return w3}function bO(e){var i=qe().x4q(e.z1f()),r=sr().p1i();return r.c1n("note",g().y1u(i.h3_1)),r.c1n("notei",g().y1t(i.t4q_1)),r.c1n("octave",g().y1t(i.y4q())),r}function kO(e,i){var r=e.x4r_1,t=i.x4r_1;return ja(r,t)}var g3;function n$(){if(g3===l){class e{constructor(r,t){this.r4s_1=r,this.s4s_1=t}toString(){return"SoundKey(soundIndex="+this.r4s_1+", barIndex="+this.s4s_1+")"}hashCode(){var r=this.r4s_1;return r=e$(r,31)+this.s4s_1|0,r}equals(r){return this===r?!0:!(!(r instanceof n$())||this.r4s_1!==r.r4s_1||this.s4s_1!==r.s4s_1)}}p(e,"SoundKey"),g3=e}return g3}var y3;function a$(){if(y3===l){class e{constructor(r,t){this.t4s_1=r,this.u4s_1=t}toString(){return"SequenceKey(soundIndex="+this.t4s_1+", sequenceIndex="+this.u4s_1+")"}hashCode(){var r=this.t4s_1;return r=e$(r,31)+this.u4s_1|0,r}equals(r){return this===r?!0:!(!(r instanceof a$())||this.t4s_1!==r.t4s_1||this.u4s_1!==r.u4s_1)}}p(e,"SequenceKey"),y3=e}return y3}function CO(e){e.r4r_1.v2(),e.s4r_1=e.s4r_1+1|0}var b3;function xO(){if(b3===l){class e extends dy(){static y4s(r,t){return t===l&&(t={}),t.x4s_1=r,this.v35(t)}e1q(){throw Xt().nc("An operation is not implemented: E")}}p(e,"export",l,l,l,[0,1,2,3]),b3=e}return b3}var k3;function SO(){if(k3===l){class e extends pr(){static c4t(r,t){return t===l&&(t={}),t.b4t_1=r,this.g2w(t)}f1q(r){throw Xt().nc("An operation is not implemented: F")}}p(e,"save",l,l,l,[1,0,2,3]),k3=e}return k3}var C3;function zO(){if(C3===l){class e extends pr(){static g4t(r,t){return t===l&&(t={}),t.f4t_1=r,this.g2w(t)}f1q(r){throw Xt().nc()}}p(e,"load",l,l,l,[1,0,2,3]),C3=e}return C3}var x3;function qO(){if(x3===l){class e extends pr(){static k4t(r,t){return t===l&&(t={}),t.j4t_1=r,this.g2w(t)}f1q(r){throw Xt().nc("An operation is not implemented: G")}}p(e,"music",l,l,l,[1,0,2,3]),x3=e}return x3}var S3;function IO(){if(S3===l){class e extends pr(){static l4t(r,t){return t===l&&(t={}),t.v4r_1=r,this.g2w(t)}f1q(r){var t=this.v4r_1.m4t(),n=FO(this.v4r_1,r,t),a;if(n==null)return g().c1k_1;a=n;var s=a,u=iO(this,t,s),_=u==null?null:this.n4t(u);return _??g().c1k_1}n4t(r){var t=Se().l4l();t.o4t("play",sO);var n=()=>g().z1t(r.e4b_1);return t.p4t("volume",n,a=>(r.e4b_1=a.y1o(0),S)),t.q4t("beats",()=>{for(var a=sr().p1i(),s=r.d4b_1,u=N().d1(yr(s,10)),_=s.e1();_.f1();){var o=_.g1(),c=o.w4r_1,h=Se().l4l();h.q4t("note",lO(c));var f=uO(o,c);h.p4t("notei",f,_O(o));var v=oO(c);h.p4t("octave",v,cO(o,c));var d=hO(o);h.p4t("volume",d,fO(o));var y=vO(o);h.p4t("mode",y,pO(o));var b=dO(o);h.p4t("instrument",b,mO(o)),u.c1(h)}for(var w=0,x=u.e1();x.f1();){var q=x.g1(),k=w;w=k+1|0;var A=Ht(k);a.k1n(A+1|0,q)}return a}),t}}p(e,"track",l,l,l,[1,0,2,3]),S3=e}return S3}var z3;function $O(){if(z3===l){class e extends gr(){static u4t(r,t){return t===l&&(t={}),t.t4t_1=r,this.p2r(t)}f1q(r){var t=this.t4t_1.m4t(),n=i$(this.t4t_1,r,t),a;if(n==null)return g().c1k_1;a=n;var s=a,u=this.t4t_1.r4r_1.b3(s),_;if(u==null){var o=Sa(t.o4a_1,s),c=o==null?null:this.v4t(o),h;c==null?h=null:(this.t4t_1.r4r_1.f3(s,c),h=c),_=h}else _=u;var f=_;return f??g().c1k_1}g1q(r,t){var n=this.f1q(r),a;if(n.equals(g().c1k_1)&&t.x1o(!1)){var s=r.s1o(),u=new(At())(s);this.t4t_1.m4t().o4a_1[s]=u,this.t4t_1.r4r_1.g3(s),a=this.v4t(u)}else a=n;return a}v4t(r){var t=Se().l4l();t.q4t("index",()=>g().y1t(r.e4s_1)),t.q4t("all",()=>{for(var f=sr().p1i(),v=this.t4t_1.m4t().o4a_1,d=N().p1(),y=0,b=v.length;y{var f=r.f4s_1,v;f==null?v=null:v=g().y1u(f);var d=v;return d??g().c1k_1};t.p4t("name",n,f=>(r.f4s_1=f.b1p(null),S));var a=()=>g().y1u(r.g4s_1.h3_1);t.p4t("wave",a,f=>{var v=r,d=f.o1p(),y;d==null?y=null:y=iF(d);var b=y;return v.g4s_1=b??cn(),S});var s=()=>g().z1t(r.h4s_1);t.p4t("attack",s,f=>(r.h4s_1=f.y1o(0),S));var u=()=>g().z1t(r.i4s_1);t.p4t("decay",u,f=>(r.i4s_1=f.y1o(0),S));var _=()=>g().z1t(r.j4s_1);t.p4t("sustain",_,f=>(r.j4s_1=f.y1o(0),S));var o=()=>g().z1t(r.k4s_1);t.p4t("release",o,f=>(r.k4s_1=f.y1o(0),S)),t.q4t("sweep",()=>{var f=Se().l4l(),v=()=>{var b=r.m4s_1.l1(0).w4t();return g().u26(b)};f.p4t("active",v,b=>{var w=b.x1o(!1);return r.m4s_1.l1(0).x4t(w),S});var d=()=>{var b=g(),w=r.m4s_1.l1(0);return b.z1t((w instanceof ee()?w:m()).z4t_1)};f.p4t("acceleration",d,b=>{var w=r.m4s_1.l1(0);return(w instanceof ee()?w:m()).z4t_1=b.y1o(0),S});var y=()=>{var b=g(),w=r.m4s_1.l1(0);return b.z1t((w instanceof ee()?w:m()).y4t_1)};return f.p4t("sweep",y,b=>{var w=r.m4s_1.l1(0);return(w instanceof ee()?w:m()).y4t_1=b.y1o(0),S}),f}),t.q4t("vibrato",()=>{var f=Se().l4l(),v=()=>{var b=r.m4s_1.l1(1).w4t();return g().u26(b)};f.p4t("active",v,b=>{var w=b.x1o(!1);return r.m4s_1.l1(1).x4t(w),S});var d=()=>{var b=g(),w=r.m4s_1.l1(1);return b.z1t((w instanceof ne()?w:m()).b4u_1)};f.p4t("frequency",d,b=>{var w=r.m4s_1.l1(1);return(w instanceof ne()?w:m()).b4u_1=b.y1o(0),S});var y=()=>{var b=g(),w=r.m4s_1.l1(1);return b.z1t((w instanceof ne()?w:m()).c4u_1)};return f.p4t("depth",y,b=>{var w=r.m4s_1.l1(1);return(w instanceof ne()?w:m()).c4u_1=b.y1o(0),S}),f}),t.o4t("noteOn",f=>{var v=qe().x4q(f.z1f());return this.t4t_1.j4r_1.e4u(v,r),g().f1k_1}),t.o4t("noteOff",f=>{var v=qe().x4q(f.z1f());return this.t4t_1.j4r_1.f4u(v),g().f1k_1}),t.q4t("harmonics",()=>{var f=Se().l4l(),v=Ct(0,r.l4s_1.length),d=v.v1_1,y=v.w1_1;if(d<=y)do{var b=d;d=d+1|0;var w=b,x=""+(w+1|0),q=wO(r,w);f.p4t(x,q,gO(r,w))}while(b!==y);return f});var c=this.t4t_1.r4r_1,h=r.e4s_1;return c.f3(h,t),t}}p(e,"instrument",l,l,l,[0,1,2,3]),z3=e}return z3}var q3;function AO(){if(q3===l){class e extends pr(){static j4u(r,t){return t===l&&(t={}),t.i4u_1=r,this.g2w(t)}f1q(r){var t=this.i4u_1.m4t(),n=r.i1p(),a=Sa(t.p4a_1,n),s=a==null?null:this.k4u(a,t);return s??g().c1k_1}k4u(r,t){var n=Se().l4l();n.q4t("index",()=>g().y1t(r.r4a_1)),n.q4t("all",()=>{for(var s=sr().p1i(),u=this.i4u_1.m4t().p4a_1,_=N().d1(u.length),o=0,c=u.length;og().y1t(r.u4a_1);return n.p4t("bpm",a,s=>(r.u4a_1=s.i1p(),S)),n.o4t("set_volume",s=>{var u=s.w1m("beat").q1o(),_=s.w1m("volume").q1o();return r.l4u(u,_),g().f1k_1}),n.o4t("set_note",s=>{var u=s.w1m("beat").q1o(),_=qe().x4q(s.w1m("note").z1f()),o=s.w1m("duration").q1o(),c=s.w1m("unique").x1o(!1);return r.m4u(_,u,o,c),g().f1k_1}),n.o4t("remove_note",s=>{var u=s.w1m("beat").q1o(),_=qe().x4q(s.w1m("note").z1f());return r.n4u(_,u),g().f1k_1}),n.o4t("note_data",bO),n.q4t("notes",()=>{for(var s=sr().p1i(),u=r.v4a_1,_=kO,o=new(yO())(_),c=Gs(u,o),h=N().d1(yr(c,10)),f=c.e1();f.f1();){var v=f.g1(),d=sr().p1i(),y=v.w4r_1,b=y==null?null:y.h3_1,w;b==null?w=null:w=g().y1u(b);var x=w;d.c1n("note",x??g().c1k_1);var q=v.w4r_1,k=q==null?null:q.t4q_1,A;k==null?A=null:A=g().y1t(k);var D=A;d.c1n("notei",D??g().c1k_1);var B=v.w4r_1,R=B==null?null:B.y4q(),W;R==null?W=null:W=g().y1t(R);var G=W;d.c1n("octave",G??g().c1k_1),d.c1n("volume",g().z1t(v.z4r_1)),d.c1n("beat",g().z1t(v.x4r_1)),d.c1n("duration",g().z1t(v.y4r_1)),h.c1(d)}for(var Q=0,X=h.e1();X.f1();){var rr=X.g1(),tr=Q;Q=tr+1|0;var ir=Ht(tr);s.k1n(ir+1|0,rr)}return s}),n.e4m("play",()=>{var s=this.i4u_1.j4r_1.o4u(r);s.p4u();var u=s,_=Se().l4l();return _.e4m("stop",()=>(u.q4u(),g().f1k_1)),_}),n.o4t("set_instrument",s=>{var u;if(s.k1o()){var _=r.s4a_1,o;_==null?o=null:o=g().y1t(_.e4s_1);var c=o;u=c??g().c1k_1}else{var h=i$(this.i4u_1,s,t),f;if(h==null)return g().c1k_1;f=h;var v=f,d=Sa(t.o4a_1,v),y;if(d==null)return g().c1k_1;y=d;var b=y;r.s4a_1=b,r.t4a_1=b.e4s_1,u=g().f1k_1}return u}),n.q4t("instrument",()=>{var s=r.s4a_1,u=s==null?null:s.e4s_1,_;u==null?_=null:_=g().y1t(u);var o=_;return o??g().c1k_1}),n.e4m("save",()=>{var s=this.i4u_1.i4r_1.x49(0),u;if(s==null)return g().c1k_1;u=s;var _=u,o=this.i4u_1.m4t(),c=un().r4u(o);return this.i4u_1.k4r_1.y4u(_.u4u_1,c),g().f1k_1}),n.e4m("export",()=>{var s=this.i4u_1.j4r_1.f4b(r);return this.i4u_1.k4r_1.z4u(s),g().f1k_1}),n}}p(e,"bar",l,l,l,[1,0,2,3]),q3=e}return q3}var I3;function EO(){if(I3===l){class e extends pr(){static d4v(r,t){return t===l&&(t={}),t.c4v_1=r,this.g2w(t)}e1q(){return F(pr()).e1q.call(this)}f1q(r){var t=this.c4v_1.m4t().p4a_1;if(t.length===0)return g().c1k_1;if(r.m1o()&&We(r.i1p(),0,t.length-1|0),this.c4v_1.l4r_1)throw Xt().nc("An operation is not implemented: K");return g().c1k_1}}p(e,"play",l,l,l,[1,0,2,3]),I3=e}return I3}var $3;function NO(){if($3===l){class e extends pr(){static h4v(r,t){return t===l&&(t={}),t.g4v_1=r,this.g2w(t)}e1q(){return F(pr()).e1q.call(this)}f1q(r){var t=this.g4v_1.m4t().p4a_1;if(t.length===0)return g().c1k_1;if(r.m1o()&&We(r.i1p(),0,t.length-1|0),this.g4v_1.l4r_1)throw Xt().nc("An operation is not implemented: L");return g().c1k_1}}p(e,"loop",l,l,l,[1,0,2,3]),$3=e}return $3}var A3;function LO(){if(A3===l){class e extends pr(){static l4v(r,t){return t===l&&(t={}),t.k4v_1=r,this.g2w(t)}e1q(){return F(pr()).e1q.call(this)}f1q(r){var t=this.k4v_1.m4t().p4a_1;if(t.length===0)return g().c1k_1;var n;r.m1o()?n=We(r.i1p(),0,t.length-1|0):n=0;var a=n,s=this.k4v_1.p4r_1.b3(new(n$())(this.k4v_1.n4r_1,a)),u;return s==null?u=null:(s.q4u(),u=S),u==null?g().c1k_1:g().f1k_1}}p(e,"stop",l,l,l,[1,0,2,3]),A3=e}return A3}var E3;function jO(){if(E3===l){class e extends pr(){static p4v(r,t){return t===l&&(t={}),t.o4v_1=r,this.g2w(t)}e1q(){return F(pr()).e1q.call(this)}f1q(r){var t=this.o4v_1.m4t().q4a_1;if(t.length===0)return g().c1k_1;if(r.m1o()&&We(r.i1p(),0,t.length-1|0),this.o4v_1.l4r_1)throw Xt().nc("An operation is not implemented: M");return g().c1k_1}}p(e,"mplay",l,l,l,[1,0,2,3]),E3=e}return E3}var N3;function MO(){if(N3===l){class e extends pr(){static t4v(r,t){return t===l&&(t={}),t.s4v_1=r,this.g2w(t)}e1q(){return F(pr()).e1q.call(this)}f1q(r){var t=this.s4v_1.m4t().q4a_1;if(t.length===0)return g().c1k_1;if(r.m1o()&&We(r.i1p(),0,t.length-1|0),this.s4v_1.l4r_1)throw Xt().nc("An operation is not implemented: N");return g().c1k_1}}p(e,"mloop",l,l,l,[1,0,2,3]),N3=e}return N3}var L3;function TO(){if(L3===l){class e extends pr(){static x4v(r,t){return t===l&&(t={}),t.w4v_1=r,this.g2w(t)}e1q(){return F(pr()).e1q.call(this)}f1q(r){var t=this.w4v_1.m4t().q4a_1;if(t.length===0)return g().c1k_1;var n;r.m1o()?n=We(r.i1p(),0,t.length-1|0):n=0;var a=n,s=this.w4v_1.q4r_1.b3(new(a$())(this.w4v_1.n4r_1,a)),u;return s==null?u=null:(s.q4u(),u=S),u==null?g().c1k_1:g().f1k_1}}p(e,"mstop",l,l,l,[1,0,2,3]),L3=e}return L3}function i$(e,i,r){var t;if(i.h1o()){var n=i.i1p(),a=r.o4a_1,s;r:{for(var u=0,_=a.length;u<_;){var o=a[u];if(u=u+1|0,(o==null?null:o.e4s_1)===n){s=o;break r}}s=null}var c=s;t=c==null?null:c.e4s_1}else{var h=r.o4a_1,f;r:{for(var v=0,d=h.length;v]";else{r.c1(V(n));var s=n.v1n(),u=J7(s," ",l,l,l,l,o=>cy(o.b1p("nil"),":")+u$(e,n.v1m(o),r));a="table["+u+"]"}t=a}else if(i.f1o()){var _=Ct(0,i.c1q());t="function("+Et(_,", ",l,l,l,l,ZO)+")"}else t=i.toString();return t}function VO(e,i,r,t){var n;return r===l?n=yt().o1():n=r,r=n,u$(e,i,r)}var J3;function YO(){if(J3===l){class e extends Qt(){static j4g(r,t){return t===l&&(t={}),t.i4g_1=r,this.n2q(t)}q1q(r){var t=r.c1q(),n=Yt(1,t),a=Et(n," ",l,l,l,l,s=>VO(this.i4g_1,r.b1q(s)));return this.i4g_1.m4g_1.n45("🐛",()=>a),g().c1k_1}}p(e,"console",l,l,l,[1,2,0,3]),J3=e}return J3}function ZO(e){return"arg"}var W3;function XO(){if(W3===l){class e extends kr(){static n4g(r){var t=this.l2r();return t.m4g_1=r,t}g1q(r,t){var n=sr().p1i();return n.c1n("console",YO().j4g(this)),t.c1n("debug",n),t.w1m("package").w1m("loaded").c1n("debug",n),n}}p(e,"DebugLib",l,l,l,[0,1,2,3]),W3=e}return W3}var H3;function QO(){if(H3===l){class e extends kr(){static e4l(){return this.l2r()}g1q(r,t){var n=sr().p1i(),a=ow(C(97),C(122)),s=a.xl_1,u=a.yl_1;if(s<=u)do{var _=new(J())(s);s=cw(s,1);var o=_.g2_1,c=ye(o,C(97));n.c1n(Lr(o),Ft().y1t(jb().i3_1+c|0))}while(!E(_,new(J())(u)));var h=ow(C(48),C(57)),f=h.xl_1,v=h.yl_1;if(f<=v)do{var d=new(J())(f);f=cw(f,1);var y=d.g2_1,b=ye(y,C(48));n.c1n(Lr(y),Ft().y1t(Lb().i3_1+b|0))}while(!E(d,new(J())(v)));return n.c1n("up",Ft().y1t(Ab().i3_1)),n.c1n("down",Ft().y1t(Nb().i3_1)),n.c1n("right",Ft().y1t(Eb().i3_1)),n.c1n("left",Ft().y1t($b().i3_1)),n.c1n("space",Ft().y1t(Ib().i3_1)),n.c1n("enter",Ft().y1t(Sb().i3_1)),n.c1n("shift",Ft().y1t(zb().i3_1)),n.c1n("ctrl",Ft().y1t(_a().i3_1)),n.c1n("alt",Ft().y1t(qb().i3_1)),n.c1n("delete",Ft().y1t(xb().i3_1)),t.c1n("keys",n),t.w1m("package").w1m("loaded").c1n("keys",n),n}}p(e,"KeysLib",e.e4l,l,l,[0,1,2,3]),H3=e}return H3}function V3(e,i){return i*i*i*(i*(i*6-15)+10)}function Bt(e,i){return(i+1|0)&255}function Te(e,i,r,t,n){var a=i&15,s=a<8?r:t,u;a<4?u=t:a===12||a===14?u=r:u=n;var _=u;return((a&1)===0?s:-s)+((a&2)===0?_:-_)}function Qe(e,i,r,t){return i+t*(r-i)}var Y3;function rR(){if(Y3===l){class e extends pr(){static f4p(r,t){return t===l&&(t={}),t.e4p_1=r,this.g2w(t)}f1q(r){var t;return r.q1o()>=0?t=g().h1k_1:t=o$().g4p_1,t}}p(e,"sign",l,l,l,[1,0,2,3]),Y3=e}return Y3}var Z3;function tR(){if(Z3===l){class e extends kr(){static k4p(r,t){return t===l&&(t={}),t.j4p_1=r,this.l2r(t)}g1q(r,t){var n=r.q1o(),a=t.q1o(),s=Math.atan2(n,a);return g().z1t(s)}}p(e,"atan2",l,l,l,[0,1,2,3]),Z3=e}return Z3}var X3;function eR(){if(X3===l){class e extends a1(){static o4p(r,t){return t===l&&(t={}),t.n4p_1=r,this.s35(t)}h1q(r,t,n){var a;r.q1o()>t.q1o()?a=r:a=t;var s=a,u;s.q1o()0){var s=an().zk(1,n.n1n()+1|0);a=n.l1(s)}else a=g().c1k_1;t=a}else{var u;if(r.h1o())u=g().y1t(an().q1(Ni(r.s1o())));else{var _=g(),o=an(),c=r.q1o(),h=Math.abs(c);u=_.z1t(o.cl(h))}t=u}return t}g1q(r,t){if(t.k1o())return this.f1q(r);var n=r.s1o(),a=t.s1o(),s;return n===a?s=g().y1t(n):s=g().y1t(an().zk(n,a)),s}}p(e,"rnd",l,l,l,[0,1,2,3]),t4=e}return t4}var e4;function iR(){if(e4===l){class e extends kr(){static f4q(r,t){return t===l&&(t={}),t.e4q_1=r,this.l2r(t)}g1q(r,t){var n=r.w1m("x").s1o(),a=r.w1m("y").s1o(),s=r.w1m("width").s1o(),u=r.w1m("height").s1o(),_=t.w1m("x").s1o(),o=t.w1m("y").s1o(),c=t.w1m("width").s1o(),h=t.w1m("height").s1o();return g().u26(n<(_+c|0)&&(n+s|0)>_&&a<(o+h|0)&&(a+u|0)>o)}}p(e,"roverlap",l,l,l,[0,1,2,3]),e4=e}return e4}var n4;function sR(){if(n4===l){class e extends a1(){static k4q(r,t,n){n===l&&(n={}),n.j4q_1=r;var a=this.s35(n),s=W7(e1(Yt(0,255)),Ug(t)),u=a,_=N().p1(),o=0;if(o<512)do{var c=o;o=o+1|0,_.c1(s.l1(c&255))}while(o<512);return u.i4q_1=_,a}l4q(r,t,n){var a=Math.floor(r),s=Br(a)&255,u=Math.floor(t),_=Br(u)&255,o=Math.floor(n),c=Br(o)&255,h=r-Math.floor(r),f=t-Math.floor(t),v=n-Math.floor(n),d=V3(this,h),y=V3(this,f),b=V3(this,v),w=this.i4q_1.l1(this.i4q_1.l1(this.i4q_1.l1(s)+_|0)+c|0),x=this.i4q_1.l1(this.i4q_1.l1(this.i4q_1.l1(s)+Bt(this,_)|0)+c|0),q=this.i4q_1.l1(this.i4q_1.l1(this.i4q_1.l1(s)+_|0)+Bt(this,c)|0),k=this.i4q_1.l1(this.i4q_1.l1(this.i4q_1.l1(s)+Bt(this,_)|0)+Bt(this,c)|0),A=this.i4q_1.l1(this.i4q_1.l1(this.i4q_1.l1(Bt(this,s))+_|0)+c|0),D=this.i4q_1.l1(this.i4q_1.l1(this.i4q_1.l1(Bt(this,s))+Bt(this,_)|0)+c|0),B=this.i4q_1.l1(this.i4q_1.l1(this.i4q_1.l1(Bt(this,s))+_|0)+Bt(this,c)|0),R=this.i4q_1.l1(this.i4q_1.l1(this.i4q_1.l1(Bt(this,s))+Bt(this,_)|0)+Bt(this,c)|0),W=Qe(this,Te(this,w,h,f,v),Te(this,A,h-1,f,v),d),G=Qe(this,Te(this,x,h,f-1,v),Te(this,D,h-1,f-1,v),d),Q=Qe(this,W,G,y),X=Qe(this,Te(this,q,h,f,v-1),Te(this,B,h-1,f,v-1),d),rr=Qe(this,Te(this,k,h,f-1,v-1),Te(this,R,h-1,f-1,v-1),d),tr=Qe(this,X,rr,y);return(Qe(this,Q,tr,b)+1)/2}h1q(r,t,n){return g().z1t(this.l4q(r.q1o(),t.q1o(),n.q1o()))}}p(e,"perlin",l,l,l,[0,1,2,3]),n4=e}return n4}var a4;function lR(){if(a4===l){class e{constructor(){ed=this,this.g4p_1=g().y1t(-1)}}ar(e),a4=e}return a4}var ed;function o$(){return ed===l&&new(lR()),ed}var i4;function uR(){if(i4===l){class e extends hA(){static o4q(){return o$(),this.c2z()}g1q(r,t){var n=super.g1q(r,t);return n.c1n("rnd",aR().b4q(this)),n.c1n("clamp",eR().o4p(this)),n.c1n("dst",nR().t4p(this)),n.c1n("dst2",_$().x4p(this)),n.c1n("sign",rR().f4p(this)),n.c1n("atan2",tR().k4p(this)),n.c1n("roverlap",iR().f4q(this)),n.c1n("perlin",sR().k4q(this,an().al())),n}}p(e,"MathLib",e.o4q,l,l,[0,1,2,3]),i4=e}return i4}var s4;function _R(){if(s4===l){class e extends kr(){static e51(){return this.l2r()}g1q(r,t){var n=wt.f51(r,t),a=n.l1(0),s=n.l1(1),u;a.k1o()?u=g().g1k_1:u=a;var _=u,o;s.k1o()?o=g().g1k_1:o=s;var c=o;return wt.g51(_,c)}f1q(r){return super.f1q(r)}}p(e,"create",e.e51,l,l,[0,1,2,3]),s4=e}return s4}var l4;function oR(){if(l4===l){class e extends Qt(){static j51(){return this.n2q()}q1q(r){var t=wt.k51(r),n=t.l1(0),a=t.l1(1),s=t.l1(2),u=t.l1(3);return wt.g51(g().z1t(n.q1o()+s.q1o()),g().z1t(a.q1o()+u.q1o()))}g1q(r,t){return super.g1q(r,t)}s2q(r,t,n,a){return super.s2q(r,t,n,a)}}p(e,"add",e.j51,l,l,[1,2,0,3]),l4=e}return l4}var u4;function cR(){if(u4===l){class e extends Qt(){static n51(){return this.n2q()}q1q(r){var t=wt.k51(r),n=t.l1(0),a=t.l1(1),s=t.l1(2),u=t.l1(3);return wt.g51(g().z1t(n.q1o()-s.q1o()),g().z1t(a.q1o()-u.q1o()))}g1q(r,t){return super.g1q(r,t)}s2q(r,t,n,a){return super.s2q(r,t,n,a)}}p(e,"sub",e.n51,l,l,[1,2,0,3]),u4=e}return u4}var _4;function hR(){if(_4===l){class e extends gr(){static q51(){return this.p2r()}q1q(r){var t=wt.k51(r),n=t.l1(0),a=t.l1(1),s=t.l1(2),u=t.l1(3);return g().z1t(n.q1o()*s.q1o()+a.q1o()*u.q1o())}g1q(r,t){return super.g1q(r,t)}s2q(r,t,n,a){return super.s2q(r,t,n,a)}}p(e,"dot",e.q51,l,l,[0,1,2,3]),_4=e}return _4}var o4;function fR(){if(o4===l){class e extends Qt(){static t51(){return this.n2q()}q1q(r){var t=wt.k51(r),n=t.l1(0),a=t.l1(1),s=g(),u=n.q1o()*n.q1o()+a.q1o()*a.q1o(),_=Math.sqrt(u);return s.z1t(_)}g1q(r,t){return super.g1q(r,t)}f1q(r){return super.f1q(r)}}p(e,"mag",e.t51,l,l,[1,2,0,3]),o4=e}return o4}var c4;function vR(){if(c4===l){class e extends Qt(){static w51(){return this.n2q()}q1q(r){var t=wt.k51(r),n=t.l1(0),a=t.l1(1),s=n.q1o()*n.q1o()+a.q1o()*a.q1o(),u=Math.sqrt(s),_;return u!==0?_=wt.g51(g().z1t(n.q1o()/u),g().z1t(a.q1o()/u)):_=wt.g51(g().y1t(0),g().y1t(0)),_}g1q(r,t){return super.g1q(r,t)}f1q(r){return super.f1q(r)}}p(e,"nor",e.w51,l,l,[1,2,0,3]),c4=e}return c4}var h4;function pR(){if(h4===l){class e extends Qt(){static z51(){return this.n2q()}q1q(r){var t=wt.k51(r),n=t.l1(0),a=t.l1(1),s=t.l1(2),u=t.l1(3);return g().z1t(n.q1o()*u.q1o()-a.q1o()*s.q1o())}g1q(r,t){return super.g1q(r,t)}s2q(r,t,n,a){return super.s2q(r,t,n,a)}}p(e,"crs",e.z51,l,l,[1,2,0,3]),h4=e}return h4}var f4;function dR(){if(f4===l){class e extends Qt(){static c52(){return this.n2q()}q1q(r){var t=wt.k51(r),n=t.l1(0),a=t.l1(1),s=t.l1(2);return wt.g51(g().z1t(n.q1o()*s.q1o()),g().z1t(a.q1o()*s.q1o()))}h1q(r,t,n){return super.h1q(r,t,n)}g1q(r,t){return super.g1q(r,t)}}p(e,"scl",e.c52,l,l,[1,2,0,3]),f4=e}return f4}var v4;function mR(){if(v4===l){class e{f51(r,t){var n;return r.n1m()?n=Rr([r.w1m("x"),r.w1m("y")]):n=Rr([r,t]),n}k51(r){for(var t=1,n=N().p1(),a=r.b1q(t);t<=r.c1q();)a.n1m()?(n.c1(a.w1m("x")),n.c1(a.w1m("y")),t=t+1|0):(r.c1q()-t|0)>=0&&(n.c1(a),t=t+1|0,n.c1(r.b1q(t)),t=t+1|0),a=r.b1q(t);return n}g51(r,t){var n=sr().p1i();return n.c1n("x",r),n.c1n("y",t),n}}ar(e),v4=e}return v4}var wt,p4;function wR(){if(p4===l){class e extends kr(){static f52(){return this.l2r()}g1q(r,t){var n=sr().p1i();return n.c1n("create",_R().e51()),n.c1n("add",oR().j51()),n.c1n("sub",cR().n51()),n.c1n("dot",hR().q51()),n.c1n("crs",pR().z51()),n.c1n("mag",fR().t51()),n.c1n("nor",vR().w51()),n.c1n("scl",dR().c52()),t.c1n("vec2",n),t.w1m("package").w1m("loaded").c1n("vec2",n),n}}p(e,"Vec2Lib",e.f52,l,l,[0,1,2,3]),p4=e}return p4}wt=new(mR());function Nt(e,i){return Math.pow(e,i)}function ct(e,i,r){return e+(i-e)*this.n4j(r)}var d4;function ht(){if(d4===l){class e{}Ar(e,"Interpolation"),d4=e}return d4}var m4;function vi(){if(m4===l){class e{constructor(r){this.o52_1=r}n4j(r){var t;return r<=.5?t=Nt(r*2,this.o52_1)/2:t=Nt((r-1)*2,this.o52_1)/((this.o52_1%2|0)===0?-2:2)+1,t}toString(){return"pow"+this.o52_1}}F(e).o4j=ct,p(e,"PowInterpolation",l,l,[ht()]),m4=e}return m4}var w4;function pi(){if(w4===l){class e{constructor(r){this.p52_1=r}n4j(r){return Nt(r,this.p52_1)}toString(){return"powIn"+this.p52_1}}F(e).o4j=ct,p(e,"PowInInterpolation",l,l,[ht()]),w4=e}return w4}var g4;function di(){if(g4===l){class e{constructor(r){this.q52_1=r}n4j(r){return Nt(r-1,this.q52_1)*((this.q52_1%2|0)===0?-1:1)+1}toString(){return"powOut"+this.q52_1}}F(e).o4j=ct,p(e,"PowOutInterpolation",l,l,[ht()]),g4=e}return g4}var y4;function c$(){if(y4===l){class e{n4j(r){var t=r*3.141592653589793;return(1-Math.cos(t))/2}toString(){return"sine"}}F(e).o4j=ct,p(e,"SineInterpolation",c$,l,[ht()]),y4=e}return y4}var b4;function h$(){if(b4===l){class e{n4j(r){var t=r*1.5707964;return 1-Math.cos(t)}toString(){return"sineIn"}}F(e).o4j=ct,p(e,"SineInInterpolation",h$,l,[ht()]),b4=e}return b4}var k4;function f$(){if(k4===l){class e{n4j(r){var t=r*1.5707964;return Math.sin(t)}toString(){return"sineOut"}}F(e).o4j=ct,p(e,"SineOutInterpolation",f$,l,[ht()]),k4=e}return k4}var C4;function v$(){if(C4===l){class e{n4j(r){var t=r;if(t<=.5){t=t*2;var n=1-t*t;return(1-Math.sqrt(n))/2}t=t-1,t=t*2;var a=1-t*t;return(Math.sqrt(a)+1)/2}toString(){return"circle"}}F(e).o4j=ct,p(e,"CircleInterpolation",v$,l,[ht()]),C4=e}return C4}var x4;function p$(){if(x4===l){class e{n4j(r){var t=1-r*r;return 1-Math.sqrt(t)}toString(){return"circleIn"}}F(e).o4j=ct,p(e,"CircleInInterpolation",p$,l,[ht()]),x4=e}return x4}var S4;function d$(){if(S4===l){class e{n4j(r){var t=r;t=t-1;var n=1-t*t;return Math.sqrt(n)}toString(){return"circleOut"}}F(e).o4j=ct,p(e,"CircleOutInterpolation",d$,l,[ht()]),S4=e}return S4}var z4;function Pm(){if(z4===l){class e{constructor(r,t,n,a){this.r52_1=r,this.s52_1=t,this.t52_1=a,this.u52_1=n*3.141592653589793*((n%2|0)===0?1:-1)}n4j(r){var t=r;if(t<=.5){t=t*2;var n=Nt(this.r52_1,this.s52_1*(t-1)),a=t*this.u52_1;return n*Math.sin(a)*this.t52_1/2}t=1-t,t=t*2;var s=Nt(this.r52_1,this.s52_1*(t-1)),u=t*this.u52_1;return 1-s*Math.sin(u)*this.t52_1/2}toString(){return"elastic"}}F(e).o4j=ct,p(e,"ElasticInterpolation",l,l,[ht()]),z4=e}return z4}var q4;function gR(){if(q4===l){class e extends Pm(){n4j(r){var t;if(r>=.99)t=1;else{var n=Nt(this.r52_1,this.s52_1*(r-1)),a=r*this.u52_1;t=n*Math.sin(a)*this.t52_1}return t}toString(){return"elasticIn"}}p(e,"ElasticInInterpolation"),q4=e}return q4}var I4;function yR(){if(I4===l){class e extends Pm(){n4j(r){var t=r;if(t===0)return 0;t=1-t;var n=Nt(this.r52_1,this.s52_1*(t-1)),a=t*this.u52_1;return 1-n*Math.sin(a)*this.t52_1}toString(){return"elasticOut"}}p(e,"ElasticOutInterpolation"),I4=e}return I4}var $4;function m$(){if($4===l){class e{n4j(r){return r}toString(){return"linear"}}F(e).o4j=ct,p(e,"LinearInterpolation",m$,l,[ht()]),$4=e}return $4}var A4;function Us(){if(A4===l){class e{constructor(r,t){this.d53_1=r,this.e53_1=t,this.f53_1=Nt(this.d53_1,-this.e53_1),this.g53_1=1/(1-this.f53_1)}n4j(r){var t;return r<=.5?t=(Nt(this.d53_1,this.e53_1*(r*2-1))-this.f53_1)*this.g53_1/2:t=(2-(Nt(this.d53_1,-this.e53_1*(r*2-1))-this.f53_1)*this.g53_1)/2,t}toString(){return"exp"+Br(this.e53_1)}}F(e).o4j=ct,p(e,"ExpInterpolation",l,l,[ht()]),A4=e}return A4}var E4;function Ig(){if(E4===l){class e extends Us(){n4j(r){return(Nt(this.d53_1,this.e53_1*(r-1))-this.f53_1)*this.g53_1}toString(){return"expIn"+Br(this.e53_1)}}p(e,"ExpInInterpolation"),E4=e}return E4}var N4;function $g(){if(N4===l){class e extends Us(){n4j(r){return 1-(Nt(this.d53_1,-this.e53_1*r)-this.f53_1)*this.g53_1}toString(){return"expOut"+Br(this.e53_1)}}p(e,"ExpOutInterpolation"),N4=e}return N4}function Ag(e,i){var r=i+e.p53_1[0]/2;return r5){var t="bounces cannot be < 2 or > 5: "+r;throw H().u($(t))}switch(this.p53_1=new Float32Array(r),this.q53_1=new Float32Array(r),this.q53_1[0]=1,r){case 2:this.p53_1[0]=.6,this.p53_1[1]=.4,this.q53_1[1]=.33;break;case 3:this.p53_1[0]=.4,this.p53_1[1]=.4,this.p53_1[2]=.2,this.q53_1[1]=.33,this.q53_1[2]=.1;break;case 4:this.p53_1[0]=.34,this.p53_1[1]=.34,this.p53_1[2]=.2,this.p53_1[3]=.15,this.q53_1[1]=.26,this.q53_1[2]=.11,this.q53_1[3]=.03;break;case 5:this.p53_1[0]=.3,this.p53_1[1]=.3,this.p53_1[2]=.2,this.p53_1[3]=.1,this.p53_1[4]=.1,this.q53_1[1]=.45,this.q53_1[2]=.3,this.q53_1[3]=.15,this.q53_1[4]=.06;break}var n=this.p53_1;n[0]=n[0]*2}n4j(r){var t=r;if(t===1)return 1;t=t+this.p53_1[0]/2;var n=0,a=0,s=0,u=this.p53_1.length;r:for(;sn.c1c(s,u);return a.$arity=1,a}function*YR(e,i,r){var t=e.c5i_1,n=e.d5i_1.b49_1.c54(i),a=t.l1a(n,r);return a===O()&&(a=yield a),S}function*ZR(e,i,r){var t=QR(i,e.f5i_1),n=e.e5i_1.j1a(new($1())(t),r);return n===O()&&(n=yield n),S}var Z4;function XR(){if(Z4===l){class e{constructor(r,t){this.c5i_1=r,this.d5i_1=t}c1c(r,t){return er(YR.bind(l,this,r),t)}oc(r,t){return this.c1c(r==null||r!=null?r:m(),t)}}at(e,l,l,[1]),Z4=e}return Z4}function QR(e,i){var r=new(XR())(e,i),t=(n,a)=>r.c1c(n,a);return t.$arity=1,t}function*rU(e,i,r){var t=e.g5i_1,n=ma().i5i(Zt(i)),a=t.l1a(n,r);return a===O()&&(a=yield a),S}function*tU(e,i,r){var t=nU(i),n=e.j5i_1.j1a(new($1())(t),r);return n===O()&&(n=yield n),S}var X4;function eU(){if(X4===l){class e{constructor(r){this.g5i_1=r}c1c(r,t){return er(rU.bind(l,this,r),t)}oc(r,t){return this.c1c(r==null||r!=null?r:m(),t)}}at(e,l,l,[1]),X4=e}return X4}function nU(e){var i=new(eU())(e),r=(t,n)=>i.c1c(t,n);return r.$arity=1,r}function aU(e){return e.y4l_1}function*iU(e,i,r){var t=e.k5i_1,n=SU(e.l5i_1,e.m5i_1,i,r);n===O()&&(n=yield n);var a=T(i,n),s=t.l1a(a,r);return s===O()&&(s=yield s),S}function*sU(e,i,r){var t=uU(i,e.o5i_1,e.p5i_1),n=e.n5i_1.j1a(new($1())(t),r);return n===O()&&(n=yield n),S}var Q4;function lU(){if(Q4===l){class e{constructor(r,t,n){this.k5i_1=r,this.l5i_1=t,this.m5i_1=n}c1c(r,t){return er(iU.bind(l,this,r),t)}oc(r,t){return this.c1c(r==null||r!=null?r:m(),t)}}at(e,l,l,[1]),Q4=e}return Q4}function uU(e,i,r){var t=new(lU())(e,i,r),n=(a,s)=>t.c1c(a,s);return n.$arity=1,n}function*_U(e,i,r){var t=e.q5i_1,n=i.zd(),a=i.ae(),s=e.r5i_1._v;e.r5i_1._v=s+1|0;var u=new(GI())(s,e.s5i_1,e.t5i_1,TI(),!1,n,a),_=t.l1a(u,r);return _===O()&&(_=yield _),S}function*oU(e,i,r){var t=hU(i,e.v5i_1,e.w5i_1,e.x5i_1),n=e.u5i_1.j1a(new($1())(t),r);return n===O()&&(n=yield n),S}var r5;function cU(){if(r5===l){class e{constructor(r,t,n,a){this.q5i_1=r,this.r5i_1=t,this.s5i_1=n,this.t5i_1=a}c1c(r,t){return er(_U.bind(l,this,r),t)}oc(r,t){return this.c1c(r==null||r!=null?r:m(),t)}}at(e,l,l,[1]),r5=e}return r5}function hU(e,i,r,t){var n=new(cU())(e,i,r,t),a=(s,u)=>n.c1c(s,u);return a.$arity=1,a}function*fU(e,i,r){var t=e.y5i_1,n=e.z5i_1._v;e.z5i_1._v=n+1|0;var a=e.a5j_1.g49_1,s=e.a5j_1.d49_1,u=e.a5j_1.e49_1,_=e.a5j_1.b49_1,o=e.a5j_1.h49_1,c=e.a5j_1.c49_1,h=new(ri())(n,e.b5j_1,e.c5j_1,a,s,u,c,_,o,e.d5j_1);h.q44_1=i;var f=t.l1a(h,r);return f===O()&&(f=yield f),S}function*vU(e,i,r){var t=dU(i,e.f5j_1,e.g5j_1,e.h5j_1,e.i5j_1,e.j5j_1),n=e.e5j_1.j1a(new(kU())(t),r);return n===O()&&(n=yield n),S}var t5;function pU(){if(t5===l){class e{constructor(r,t,n,a,s,u){this.y5i_1=r,this.z5i_1=t,this.a5j_1=n,this.b5j_1=a,this.c5j_1=s,this.d5j_1=u}c1c(r,t){return er(fU.bind(l,this,r),t)}oc(r,t){return this.c1c(r==null||r!=null?r:m(),t)}}at(e,l,l,[1]),t5=e}return t5}function dU(e,i,r,t,n,a){var s=new(pU())(e,i,r,t,n,a),u=(_,o)=>s.c1c(_,o);return u.$arity=1,u}function*mU(e,i,r){var t=e.k5j_1,n=g$(e.l5j_1,i.y53_1,i.z53_1,i.a54_1),a=e.m5j_1._v;e.m5j_1._v=a+1|0;var s=new(Jn())(a,e.n5j_1,e.o5j_1,e.p5j_1,n,i.z53_1,i.a54_1),u=t.l1a(s,r);return u===O()&&(u=yield u),S}function*wU(e,i,r){var t=yU(i,e.r5j_1,e.s5j_1,e.t5j_1,e.u5j_1,e.v5j_1),n=e.q5j_1.j1a(new(CU())(t),r);return n===O()&&(n=yield n),S}var e5;function gU(){if(e5===l){class e{constructor(r,t,n,a,s,u){this.k5j_1=r,this.l5j_1=t,this.m5j_1=n,this.n5j_1=a,this.o5j_1=s,this.p5j_1=u}c1c(r,t){return er(mU.bind(l,this,r),t)}oc(r,t){return this.c1c(r==null||r!=null?r:m(),t)}}at(e,l,l,[1]),e5=e}return e5}function yU(e,i,r,t,n,a){var s=new(gU())(e,i,r,t,n,a),u=(_,o)=>s.c1c(_,o);return u.$arity=1,u}function n5(e,i,r,t){var n={_v:0},a=e.a49_1.h4a(e.b49_1.b54(r,!e.i49_1.d2(t))),s=new(FU())(a,n,e,i,r,t);return Ki(s,PU(e,r))}function Ng(e,i,r,t){var n={_v:0},a=e.a49_1.h4a(e.b49_1.d54(r,!e.i49_1.d2(t))),s=new(BU())(a,e,n,i,r,t);return Ki(s,RU(e,r,t))}function g$(e,i,r,t){var n=new(Mm())(r,t),a=Ct(0,r),s=a.v1_1,u=a.w1_1;if(s<=u)do{var _=s;s=s+1|0;var o=_,c=Ct(0,t),h=c.v1_1,f=c.w1_1;if(h<=f)do{var v=h;h=h+1|0;var d=v,y=Eg(o+Eg(d,r)|0,4),b=e.g49_1.n47(),w=new Int8Array([i[y+0|0],i[y+1|0],i[y+2|0],i[y+3|0]]),x=b.a4c(w);n.a4d(o,d,new Int32Array([x]))}while(v!==f)}while(_!==u);return n}var a5;function bU(){if(a5===l){class e{constructor(r){this.w5j_1=r}l1a(r,t){return this.w5j_1(r,t)}o3(){return this.w5j_1}equals(r){var t;if(r!=null&&j(r,ie())){var n;r!=null&&j(r,et())?n=E(this.o3(),r.o3()):n=!1,t=n}else t=!1;return t}hashCode(){return V(this.o3())}}p(e,"sam$kotlinx_coroutines_flow_FlowCollector$0",l,l,[ie(),et()],[1]),a5=e}return a5}var i5;function $1(){if(i5===l){class e{constructor(r){this.x5j_1=r}l1a(r,t){return this.x5j_1(r,t)}o3(){return this.x5j_1}equals(r){var t;if(r!=null&&j(r,ie())){var n;r!=null&&j(r,et())?n=E(this.o3(),r.o3()):n=!1,t=n}else t=!1;return t}hashCode(){return V(this.o3())}}p(e,"sam$kotlinx_coroutines_flow_FlowCollector$0",l,l,[ie(),et()],[1]),i5=e}return i5}var s5;function kU(){if(s5===l){class e{constructor(r){this.y5j_1=r}l1a(r,t){return this.y5j_1(r,t)}o3(){return this.y5j_1}equals(r){var t;if(r!=null&&j(r,ie())){var n;r!=null&&j(r,et())?n=E(this.o3(),r.o3()):n=!1,t=n}else t=!1;return t}hashCode(){return V(this.o3())}}p(e,"sam$kotlinx_coroutines_flow_FlowCollector$0",l,l,[ie(),et()],[1]),s5=e}return s5}var l5;function CU(){if(l5===l){class e{constructor(r){this.z5j_1=r}l1a(r,t){return this.z5j_1(r,t)}o3(){return this.z5j_1}equals(r){var t;if(r!=null&&j(r,ie())){var n;r!=null&&j(r,et())?n=E(this.o3(),r.o3()):n=!1,t=n}else t=!1;return t}hashCode(){return V(this.o3())}}p(e,"sam$kotlinx_coroutines_flow_FlowCollector$0",l,l,[ie(),et()],[1]),l5=e}return l5}function*xU(e,i,r,t){for(var n=r.o4n_1,a=N().p1(),s=n.e1();s.f1();){var u=s.g1(),_=u.c4m_1;ga(a,_)}for(var o=N().p1(),c=a.e1();c.f1();){var h=c.g1(),f;h instanceof Ea()?f=h.v5k_1:h instanceof La()||h instanceof Aa()?f=null:h instanceof Na()?f=h.i5k_1:gt();var v=f;v==null||o.c1(v)}for(var d=N().d1(yr(o,10)),y=o.e1();y.f1();){var b=y.g1(),w=e.b49_1.e54(b),x,q=w.c4a(t);q===O()&&(q=yield q),q?x=w:x=null;var k=x,A;if(k==null)A=null;else{var D=k.d4a(t);D===O()&&(D=yield D),A=D}var B=T(b,A);d.c1(B)}for(var R=N().p1(),W=d.e1();W.f1();){var G=W.g1();G.yd_1!=null&&R.c1(G)}for(var Q=xt(iy(yr(R,10)),16),X=zr().wa(Q),rr=R.e1();rr.f1();){var tr=rr.g1(),ir=tr.zd(),dr=tr.ae(),cr=g$(e,nr(dr).y53_1,dr.z53_1,dr.a54_1),mr=new(Jn())(0,0,"__level-"+i,Tm(),cr,cr.u4c_1,cr.v4c_1),Dr=T(ir,mr);X.f3(Dr.xd_1,Dr.yd_1)}return X}function SU(e,i,r,t){return er(xU.bind(l,e,i,r),t)}var u5;function zU(){if(u5===l){class e{constructor(r,t,n,a){this.y5h_1=r,this.z5h_1=t,this.a5i_1=n,this.b5i_1=a}m1a(r,t){return er(WR.bind(l,this,r),t)}j1a(r,t){return this.m1a(r,t)}}p(e,l,l,l,[He()],[1]),u5=e}return u5}var _5;function qU(){if(_5===l){class e{constructor(r,t){this.a5l_1=r,this.b5l_1=t}c5l(r,t){this.a5l_1.h49_1.n45("RESOURCE_FACTORY",()=>"Loading sound '"+this.b5l_1+"'")}oc(r,t){return this.c5l(r instanceof S1()?r:m(),t)}}at(e,l,l,[1]),_5=e}return _5}function IU(e,i){var r=new(qU())(e,i),t=(n,a)=>r.c5l(n,a);return t.$arity=1,t}var o5;function $U(){if(o5===l){class e{constructor(r,t){this.e5i_1=r,this.f5i_1=t}m1a(r,t){return er(ZR.bind(l,this,r),t)}j1a(r,t){return this.m1a(r,t)}}p(e,l,l,l,[He()],[1]),o5=e}return o5}var c5;function AU(){if(c5===l){class e{constructor(r){this.d5l_1=r}e5l(r,t){return this.d5l_1.a49_1.h4a(r)}oc(r,t){return this.e5l(r!=null&&j(r,l1())?r:m(),t)}}at(e,l,l,[1]),c5=e}return c5}function EU(e){var i=new(AU())(e),r=(t,n)=>i.e5l(t,n);return r.$arity=1,r}var h5;function NU(){if(h5===l){class e{constructor(r){this.j5i_1=r}m1a(r,t){return er(tU.bind(l,this,r),t)}j1a(r,t){return this.m1a(r,t)}}p(e,l,l,l,[He()],[1]),h5=e}return h5}var f5;function LU(){if(f5===l){class e{constructor(r){this.f5l_1=r}g5l(r,t){this.f5l_1.h49_1.n45("RESOURCE_FACTORY",()=>{var n="Loading world "+r.m4n_1+" with levels ";return n+Et(r.o4n_1,", ",l,l,l,l,aU)})}oc(r,t){return this.g5l(r instanceof Ps()?r:m(),t)}}at(e,l,l,[1]),f5=e}return f5}function jU(e){var i=new(LU())(e),r=(t,n)=>i.g5l(t,n);return r.$arity=1,r}var v5;function MU(){if(v5===l){class e{constructor(r,t,n){this.n5i_1=r,this.o5i_1=t,this.p5i_1=n}m1a(r,t){return er(sU.bind(l,this,r),t)}j1a(r,t){return this.m1a(r,t)}}p(e,l,l,l,[He()],[1]),v5=e}return v5}var p5;function TU(){if(p5===l){class e{constructor(r,t,n,a){this.u5i_1=r,this.v5i_1=t,this.w5i_1=n,this.x5i_1=a}m1a(r,t){return er(oU.bind(l,this,r),t)}j1a(r,t){return this.m1a(r,t)}}p(e,l,l,l,[He()],[1]),p5=e}return p5}var d5;function FU(){if(d5===l){class e{constructor(r,t,n,a,s,u){this.e5j_1=r,this.f5j_1=t,this.g5j_1=n,this.h5j_1=a,this.i5j_1=s,this.j5j_1=u}m1a(r,t){return er(vU.bind(l,this,r),t)}j1a(r,t){return this.m1a(r,t)}}p(e,l,l,l,[He()],[1]),d5=e}return d5}var m5;function DU(){if(m5===l){class e{constructor(r,t){this.h5l_1=r,this.i5l_1=t}j5l(r,t){this.h5l_1.h49_1.n45("RESOURCE_FACTORY",()=>"Loading script '"+this.i5l_1+"'")}oc(r,t){return this.j5l(r instanceof ri()?r:m(),t)}}at(e,l,l,[1]),m5=e}return m5}function PU(e,i){var r=new(DU())(e,i),t=(n,a)=>r.j5l(n,a);return t.$arity=1,t}var w5;function BU(){if(w5===l){class e{constructor(r,t,n,a,s,u){this.q5j_1=r,this.r5j_1=t,this.s5j_1=n,this.t5j_1=a,this.u5j_1=s,this.v5j_1=u}m1a(r,t){return er(wU.bind(l,this,r),t)}j1a(r,t){return this.m1a(r,t)}}p(e,l,l,l,[He()],[1]),w5=e}return w5}var g5;function OU(){if(g5===l){class e{constructor(r,t,n){this.k5l_1=r,this.l5l_1=t,this.m5l_1=n}n5l(r,t){this.k5l_1.h49_1.n45("RESOURCE_FACTORY",()=>"Loading spritesheet '"+this.l5l_1+"' ("+this.m5l_1.toString()+")")}oc(r,t){return this.n5l(r instanceof Jn()?r:m(),t)}}at(e,l,l,[1]),g5=e}return g5}function RU(e,i,r){var t=new(OU())(e,i,r),n=(a,s)=>t.n5l(a,s);return n.$arity=1,n}var y5;function UU(){if(y5===l){class e{constructor(r,t,n,a,s,u,_,o){this.a49_1=r,this.b49_1=t,this.c49_1=n,this.d49_1=a,this.e49_1=s,this.f49_1=u,this.g49_1=_,this.h49_1=o,this.i49_1=md([Fs(),Ds(),pg()])}m49(r,t){var n={_v:0},a=this.a49_1.h4a(this.b49_1.f54(t,this.f49_1)),s=new(zU())(a,n,r,t);return Ki(s,IU(this,t))}l49(r,t){var n={_v:0},a=iA(t),s=new($U())(a,this),u=py(s,l,EU(this)),_=new(NU())(u),o=Ki(_,jU(this)),c=new(MU())(o,this,t);return new(TU())(c,n,r,t)}j49(r,t){return n5(this,r,t,GD())}o49(r){return n5(this,0,r,Ds())}n49(r){return n5(this,0,r,Fs())}k49(r,t){return Ng(this,r,t,Tm())}p49(r){return Ng(this,0,r,pg())}}p(e,"ResourceFactory",l,l,l,[3]),y5=e}return y5}function*KU(e,i,r){var t=Q7(e.s47_1),n=i.u47();if(e.s47_1.u2(n),t==null){Lg(e,i);var a=e.p47_1.l18(i,r);a===O()&&(a=yield a)}else if(e.s47_1.m1()){e.q47_1.c1(i);var s=GU(e,e.q47_1);e.q47_1.v2();for(var u=s.e1();u.f1();){var _=u.g1();Lg(e,_);var o=e.p47_1.l18(_,r);o===O()&&(o=yield o)}}else e.s47_1.m1()||e.q47_1.c1(i);return S}function Lg(e,i){var r=i.u47(),t=e.r47_1,n=t.b3(r),a;if(n==null){var s=zr().va();t.f3(r,s),a=s}else a=n;var u=a,_=u.b3(i.v47()),o=i.v47();u.f3(o,i),i.w47(_!=null)}function GU(e,i){var r=N().p1();if(r.i1(i),r.h1()>1){var t=(a,s)=>{var u=e.t47_1.s2(a.u47()),_=u===-1?e.t47_1.h1():u,o=e.t47_1.s2(s.u47()),c=o===-1?e.t47_1.h1():o;return ja(_,c)},n=new(JU())(t);rA(r,n)}return r}var b5;function JU(){if(b5===l){class e{constructor(r){this.x47_1=r}hh(r,t){return this.x47_1(r,t)}compare(r,t){return this.hh(r,t)}o3(){return this.x47_1}equals(r){var t;if(r!=null&&j(r,ae())){var n;r!=null&&j(r,et())?n=E(this.o3(),r.o3()):n=!1,t=n}else t=!1;return t}hashCode(){return V(this.o3())}}p(e,"sam$kotlin_Comparator$0",l,l,[ae(),et()]),b5=e}return b5}var k5;function WU(){if(k5===l){class e{constructor(r){this.p47_1=r;var t=this;t.q47_1=N().p1();var n=this;n.r47_1=zr().va(),this.s47_1=X7([Fs(),Ds()]),this.t47_1=Rr([Fs(),Ds()])}y47(r,t){return er(KU.bind(l,this,r),t)}l1a(r,t){return this.y47(r!=null&&j(r,Va())?r:m(),t)}}p(e,"GameResourceCollector",l,l,[ie()],[1]),k5=e}return k5}function*HU(e,i,r){var t=_A(e.z47_1.u43_1),n=py(t,128,YU()).j1a(e.z47_1.y43_1,r);return n===O()&&(n=yield n),S}var C5;function VU(){if(C5===l){class e{a48(r,t){return r}oc(r,t){return this.a48(r!=null&&j(r,He())?r:m(),t)}}at(e,l,l,[1]),C5=e}return C5}function YU(){var e=new(VU()),i=(r,t)=>e.a48(r,t);return i.$arity=1,i}function*ZU(e,i){r:for(;;){var r=e.x43_1.p18();if(lA(r))break r;var t=uA(r),n;if(t==null)continue r;n=t;var a=n;if(e.z43_1.u2(a.b48()),a.e48()){var s=e.d48(a,i);s===O()&&(s=yield s)}else{var u=e.c48(a,i);u===O()&&(u=yield u)}}return S}function*XU(e,i,r){e.l43_1.g48("GAME_ENGINE",()=>"Loaded "+i.b48()+" "+i.u47().toString()+" (version: "+i.f48()+")");var t=y$(e,i,r);if(t===O()&&(t=yield t),e.t43_1=e.t43_1-1|0,e.l43_1.n45("GAME_ENGINE",()=>"Remaining resources to load: "+e.t43_1+". ("+Et(e.z43_1,", ")+")"),e.t43_1===0){e.l43_1.n45("GAME_ENGINE",fK);var n=nr(e.m43_1[0]).h48(r);n===O()&&(n=yield n)}return S}function*QU(e,i,r){e.l43_1.g48("GAME_ENGINE",()=>"Reload "+i.b48()+" "+i.u47().toString()+" (version: "+i.f48()+")");var t=y$(e,i,r);return t===O()&&(t=yield t),S}function*rK(e,i,r){switch(i.u47().i3_1){case 0:var t=oK(e,i,r);t===O()&&(t=yield t);break;case 1:var n=uK(e,i,r);n===O()&&(n=yield n);break;case 2:var a=sK(e,i,r);a===O()&&(a=yield a);break;case 3:aK(e,i);break;case 4:nK(e,i);break;case 5:eK(e,i);break;case 6:tK(e,i);break;case 7:break;default:gt();break}return S}function y$(e,i,r){return er(rK.bind(l,e,i),r)}function tK(e,i){var r=i.v47();e.p43_1[r]=i instanceof S1()?i:m()}function eK(e,i){for(var r=i instanceof GI()?i:m(),t=r.o48_1.e3().e1();t.f1();){var n=t.g1(),a=n.x2(),s=n.y2(),u=s,_=e.o43_1[i.j48_1],o=_==null?null:_.o48_1.b3(a);u.w48_1=o==null?null:o.w48_1}if(e.o43_1[i.j48_1]=r,e.v43_1>0){var c=e.m43_1[e.v43_1];c==null||(c.p44_1=!0)}e.w43_1.i1(r.o48_1.d3())}function nK(e,i){var r=i instanceof Jn()?i:m(),t=r,n=e.n43_1[i.q48_1];t.w48_1=n==null?null:n.w48_1,e.n43_1[i.q48_1]=r,e.w43_1.c1(r)}function aK(e,i){var r=i instanceof Jn()?i:m(),t=r,n=e.q43_1;t.w48_1=n==null?null:n.w48_1,e.q43_1=r,e.w43_1.c1(r)}function*iK(e,i,r){var t=e;t.s43_1=i instanceof ri()?i:m();var n=e.s43_1;n==null||(n.o44_1=e);var a=e.s43_1;if(a!=null){var s=a.j45(r);s===O()&&(s=yield s)}return S}function sK(e,i,r){return er(iK.bind(l,e,i),r)}function*lK(e,i,r){i instanceof ri()||m(),i.o44_1=e;try{var t;if(i.p44_1){var n=i.z48(r);n===O()&&(n=yield n),t=!n}else t=!1;if(t)return S}catch(u){if(u instanceof fn()){var a=u;throw C1(a,Zt(i.q44_1))}else throw u}if(e.m43_1[i.d44_1]=i,e.v43_1===i.d44_1)e.r43_1=i;else if(e.v43_1>0){var s=e.r43_1;s==null||(s.p44_1=!0)}return S}function uK(e,i,r){return er(lK.bind(l,e,i),r)}function*_K(e,i,r){var t=i instanceof ri()?i:m();t.o44_1=e;var n=t.j45(r);return n===O()&&(n=yield n),e.m43_1[0]=t,e.r43_1=t,e.v43_1=0,S}function oK(e,i,r){return er(_K.bind(l,e,i),r)}function x5(e,i,r){return i.length===0?null:i[r%i.length|0]}var S5;function cK(){if(S5===l){class e{constructor(r){this.z47_1=r}b1b(r,t){return er(HU.bind(l,this,r),t)}oc(r,t){return this.b1b(r!=null&&j(r,kd())?r:m(),t)}}at(e,l,l,[1]),S5=e}return S5}function hK(e){var i=new(cK())(e),r=(t,n)=>i.b1b(t,n);return r.$arity=1,r}function fK(){return"All resources are loaded. Notify the boot script."}var z5;function vK(){if(z5===l){class e{constructor(r,t,n,a){this.l43_1=a,this.q43_1=null,this.r43_1=null,this.s43_1=null,this.t43_1=0,this.v43_1=0;var s=this;s.w43_1=N().p1(),this.x43_1=sA(2147483647),this.y43_1=new(WU())(this.x43_1);var u=this;u.z43_1=yt().o1();for(var _=t.d47_1,o=N().d1(yr(_,10)),c=0,h=_.e1();h.f1();){var f=h.g1(),v=c;c=v+1|0;var d=Ht(v),y=r.j49(d+1|0,f);o.c1(y)}for(var b=o,w=this,x=0,q=b.h1()+1|0,k=Array(q);x"Number of resources to load: "+this.t43_1);var E1=yd(n.q49());bd(E1,l,l,hK(this))}r49(){return this.q43_1}a44(r){return er(ZU.bind(l,this),r)}c48(r,t){return er(XU.bind(l,this,r),t)}d48(r,t){return er(QU.bind(l,this,r),t)}m45(r){var t=this.m43_1[this.v43_1];return this.v43_1=1+(r%this.m43_1.length|0)|0,this.r43_1=this.m43_1[this.v43_1],T(t,nr(this.r43_1))}s49(r){return x5(this,this.n43_1,r)}t49(r){var t=this.n43_1,n;r:{for(var a=0,s=t.length;a=0){var o=zK(e,_,r);o===O()&&(o=yield o)}else if(_.p44_1){var c=xK(e,_,r);c===O()&&(c=yield c)}if(e.a43_1=e.a43_1+i,e.a43_1>=.016666668){e.i43_1.y44("game_update"),e.z44().a45();var h=yK(e,xe(e).r43_1,r);h===O()&&(h=yield h);var f=wK(e,r);f===O()&&(f=yield f),e.a43_1=e.a43_1-.016666668;var v=e.b43_1;e.b43_1=tn(v,$5());var d=kK(e,r);d===O()&&(d=yield d);var y=e.c43_1;if(y!=null){var b=LK(e,y,r);b===O()&&(b=yield b)}e.z44().b1h();var w=e.i43_1.b45("game_update");EK(e,w)}return S}function*mK(e,i){var r=xe(e).s43_1;if(r!=null){var t=r.c45(i);t===O()&&(t=yield t)}return S}function wK(e,i){return er(mK.bind(l,e),i)}function*gK(e,i,r){var t=e,n;try{if(i!=null){var a=i.c45(r);a===O()&&(a=yield a)}n=!1}catch(o){var s;if(o instanceof bm()){var u=o;if(!e.z42_1){var _=A1(e,e,u,r);_===O()&&(_=yield _)}s=!0}else throw o;n=s}return t.z42_1=n,S}function yK(e,i,r){return er(gK.bind(l,e,i),r)}function*bK(e,i){if(e.f45().g45(_a(),Tb())){var r=Ln(e,"recording GIF","#00FF00",l,i);r===O()&&(r=yield r),e.v42_1.a45()}else if(e.f45().g45(_a(),Fb())){var t=Ln(e,"screenshot PNG","#00FF00",l,i);t===O()&&(t=yield t),e.v42_1.h45()}else if(e.f45().g45(_a(),Mb())){e.i43_1.e45(!e.i43_1.d45());var n;e.i43_1.d45()?n="enable the profiler (Ctrl+P to disabled)":n="disabled the profiler";var a=n,s=Ln(e,a,"#00FF00",l,i);s===O()&&(s=yield s)}return S}function kK(e,i){return er(bK.bind(l,e),i)}function*CK(e,i,r){var t=AK(e,r);t===O()&&(t=yield t);try{var n=i.i45(r);n===O()&&(n=yield n);var a=n,s=i.j45(r);s===O()&&(s=yield s);var u=i.k45(a,r);u===O()&&(u=yield u);var _=e.y42_1;_?.l45(i),e.z42_1=!1}catch(h){if(h instanceof fn()){var o=h,c=A1(e,e,C1(o,Zt(i.q44_1)),r);c===O()&&(c=yield c)}else throw h}return S}function xK(e,i,r){return er(CK.bind(l,e,i),r)}function*SK(e,i,r){var t=xe(e).m45(i.m44_1),n=t.zd(),a=t.ae();try{var s=i.i45(r);s===O()&&(s=yield s);var u=s;e.x42_1.n45("GAME_ENGINE",()=>"Stop "+i.e44_1+" to switch the next game script "+a.e44_1);var _=a.j45(r);_===O()&&(_=yield _);var o=a.k45(u,r);o===O()&&(o=yield o);var c=e.y42_1;c?.o45(n,a)}catch(v){if(v instanceof fn()){var h=v,f=A1(e,e,C1(h,Zt(i.q44_1)),r);f===O()&&(f=yield f)}else throw v}return S}function zK(e,i,r){return er(SK.bind(l,e,i),r)}function*qK(e,i,r,t){i.x42_1.w45("TINY",()=>{var s="line "+r.s45_1+":"+r.u45_1+" <-- the 🐞 is around here ("+r.message+")";return"The line "+r.s45_1+" trigger an execution error ("+r.message+"). "+("Please fix the script "+r.r45_1+`! -`)+s});var n="error line "+r.s45_1+":"+r.u45_1+" ("+r.message+")",a=b$(i,n,"#FF0000",!0,t);return a===O()&&(a=yield a),S}function A1(e,i,r,t){return er(qK.bind(l,e,i,r),t)}function*IK(e,i,r,t,n){var a=xe(e).s43_1;if(a!=null){var s=a.x45("popup",[g().y1t(0),g().y1u(i),g().y1u(r),g().u26(t)],n);s===O()&&(s=yield s)}return S}function b$(e,i,r,t,n){return er(IK.bind(l,e,i,r,t),n)}function Ln(e,i,r,t,n,a){return t=t===l?!1:t,b$(e,i,r,t,n)}function*$K(e,i){var r=xe(e).s43_1;if(r!=null){var t=r.x45("clear",[],i);t===O()&&(t=yield t)}return S}function AK(e,i){return er($K.bind(l,e),i)}function EK(e,i){var r;if(e.i43_1.d45()){var t=e.b43_1;r=tA(t,bt(60))===0n}else r=!1;if(r){var n=e.i43_1.y45(60);n!=null&&e.x42_1.n45("PERFORMANCE",()=>{var a=Fe((Br(n.a46_1*10)/10).toString(),6),s=Fe((Br(n.z45_1*100)/100).toString(),6),u=Fe((Br(i*100)/100).toString(),6),_=n.b46_1,o=ze(_)/1024,c=Fe((Br(o/1024*10)/10).toString(),6),h=Fe(n.g46_1.toString(),6),f=Fe(n.h46_1.toString(),6),v=Fe(n.l46_1.toString(),6);return` -┌─────────────────┬────────┐ -`+("│ FPS │ "+a+` │ -`)+("│ Frame Time │ "+s+`ms │ -`)+("│ Update Time │ "+u+`ms │ -`)+("│ Memory │ "+c+`MB │ -`)+("│ Draw Calls │ "+h+` │ -`)+("│ Read Pixels │ "+f+` │ -`)+("│ Draw On Screen │ "+v+` │ -`)+"└─────────────────┴────────┘"})}}function*NK(e,i,r){if(!e.i43_1.d45())return S;if(i.a46_1<30){var t=Ln(e,"LOW FPS: "+i.a46_1,"#FF0000",l,r);t===O()&&(t=yield t)}if(i.c46_1>1048576n){var n=i.c46_1,a=hw(n,bt(1024)),s=hw(a,bt(1024)),u=Ln(e,"HIGH ALLOC: "+s.toString()+"MB","#FFAA00",l,r);u===O()&&(u=yield u)}if(i.z45_1>16.67){var _=Ln(e,"Frame: "+i.z45_1+"ms","#AAAA00",l,r);_===O()&&(_=yield _)}return S}function LK(e,i,r){return er(NK.bind(l,e,i),r)}var q5;function jK(){if(q5===l){class e{constructor(){this.m46_1=.016666668}}ar(e),q5=e}return q5}var I5;function MK(){if(I5===l){class e{constructor(r,t,n,a,s){s=s===l?null:s,this.u42_1=r,this.v42_1=t,this.w42_1=n,this.x42_1=a,this.y42_1=s,this.z42_1=!1,this.a43_1=0,this.b43_1=0n,this.c43_1=null,this.i43_1=this.v42_1.n46()}f45(){var r=this.d43_1;if(r!=null)return r;st("inputHandler")}z44(){var r=this.e43_1;if(r!=null)return r;st("inputManager")}o46(){var r=this.f43_1;if(r!=null)return r;st("soundManager")}p46(){var r=this.v42_1.q46();this.d43_1=this.v42_1.r46(),this.e43_1=this.v42_1.s46(),this.f43_1=this.v42_1.t46(this.f45());var t=this.v42_1.u46(r);this.h43_1=new(KD())(t,this.u42_1,this.i43_1),Ei(this).v46(r);var n=new(h9())(this.o46()),a=this,s=this.w42_1,u=this.v42_1,_=this.f45(),o=this.x42_1,c=this.u42_1,h=Ei(this),f=this.o46();a.g43_1=new(UU())(s,u,_,h,n,f,c,o),this.j43_1=new(vK())(pK(this),this.u42_1,this.v42_1,this.x42_1),this.v42_1.w46(this)}x46(r,t){return er(dK.bind(l,this,r),t)}y46(){this.i43_1.y44("draw"),Ei(this).y46(),this.i43_1.b45("draw"),this.c43_1=this.i43_1.z46()}}p(e,"GameEngine",l,l,l,[1,0,2,3]),I5=e}return I5}new(jK());function TK(e,i){return e.appendChild(nr(e.ownerDocument).createTextNode(i)),e}var jg=Math.imul;function FK(){var e=window.location.protocol+"//"+window.location.host+window.location.pathname;return e=sa(e,0,hy(e,C(47))),eA(e,"/")&&Og(e,1),e}function DK(){var e=FK(),i=document.getElementsByTagName("tiny-game");PK(e,i)}function PK(e,i){if(i.length===0)throw H().u("No has been found in the current page. Check that the page including your javascript gamehas a least one tag to render the game in.");if(xa(e,"file://"))throw k$(i,OK),H().u("Tiny can't run without a webserver.Please run a webserver to serve the files so you can acess it through http://localhost instead of file://some/path.");BK(i,(r,t)=>{var n=nr(t.getAttribute("id")),a=t.getAttribute("width"),s=a==null?null:nn(a),u=s??128,_=t.getAttribute("height"),o=_==null?null:nn(_),c=o??128,h=t.getAttribute("zoom"),f=h==null?null:nn(h),v=f??1,d=t.getAttribute("mouse"),y=d==null?null:nA(d),b=y??!1,w=t.getAttribute("spritew"),x=w==null?null:nn(w),q=x??16,k=t.getAttribute("spriteh"),A=k==null?null:nn(k),D=A??16,B=t.getElementsByTagName("tiny-script"),R=ii(mi(B,RK)),W=t.getElementsByTagName("tiny-level"),G=ii(mi(W,UK)),Q=t.getElementsByTagName("tiny-sound"),X=ii(mi(Q,KK)),rr=t.getElementsByTagName("tiny-spritesheet"),tr=ii(mi(rr,GK)),ir=t.getElementsByTagName("tiny-colors")[0],dr=ir==null?null:ir.getAttribute("name"),cr=dr==null?null:wd(dr,[","]),mr=cr==null?null:e1(cr),Dr=mr??ot(),Ir=document.createElement("canvas");Ir.setAttribute("width",jg(u,v).toString()),Ir.setAttribute("height",jg(c,v).toString()),Ir.setAttribute("tabindex","1"),b&&Ir.setAttribute("style","cursor: none;"),t.appendChild(Ir);var Or;Dr.m1()?Or=Rr(["#FFFFFF","#000000"]):Or=Dr;var Yr=Or,Gr=new(my())(u,c,Yr,R,tr,G,X,v,l,T(0,0),T(q,D),b),Er=new(IA())("game-"+r);return Er.n45("TINY-JS",()=>"Boot the game using the URL '"+e+"'."),new(MK())(Gr,new(XF())(Ir instanceof HTMLCanvasElement?Ir:m(),Gr,n,e),new(cI()),Er).p46(),S})}function mi(e,i){var r=N().p1();return k$(e,t=>(r.c1(i(t)),S)),r}function k$(e,i){var r=Ct(0,e.length),t=r.v1_1,n=r.w1_1;if(t<=n)do{var a=t;t=t+1|0;var s=e[a];s!=null&&i(s)}while(a!==n)}function BK(e,i){var r=Ct(0,e.length),t=r.v1_1,n=r.w1_1;if(t<=n)do{var a=t;t=t+1|0;var s=a,u=e[s];u!=null&&i(s,u)}while(a!==n)}function OK(e){var i=document.createElement("h1");return TK(i,"🚨 You're accessing the page without a webserver (ie: file:// as URL). Tiny can't run without a webserver. Please start a webserver to serve HTML pages and access it through a valid URL (ie: http://localhost) 🚨"),e.appendChild(i),S}function RK(e){return e.getAttribute("name")}function UK(e){return e.getAttribute("name")}function KK(e){return e.getAttribute("name")}function GK(e){return e.getAttribute("name")}function JK(){DK()}JK(); diff --git a/tiny-doc/src/docs/asciidoc/tiny-sfx-editor.adoc b/tiny-doc/src/docs/asciidoc/tiny-sfx-editor.adoc new file mode 100644 index 00000000..f8e2991a --- /dev/null +++ b/tiny-doc/src/docs/asciidoc/tiny-sfx-editor.adoc @@ -0,0 +1,11 @@ +== Tiny Sfx Editor + +`🧸 Tiny` is bundle with a small sfx editor, that you can start using the command `tiny-cli sfx`, within your game directory. + +This editor can design an instrument and the notes played by this instrument, that generate a sfx. + +The editor can be tested below: + +++++ + +++++ diff --git a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/engine/GameEngine.kt b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/engine/GameEngine.kt index 66478f09..bbeef9d2 100644 --- a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/engine/GameEngine.kt +++ b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/engine/GameEngine.kt @@ -99,6 +99,7 @@ class GameEngine( if (currentGameScript.exited >= 0) { exitCurrentGameScript(currentGameScript) } else if (currentGameScript.reload) { + soundManager.stopAll() reloadCurrentGameScript(currentGameScript) } diff --git a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/engine/GameOptions.kt b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/engine/GameOptions.kt index b49dc7c1..ef6dd2c3 100644 --- a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/engine/GameOptions.kt +++ b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/engine/GameOptions.kt @@ -13,7 +13,7 @@ data class GameOptions( val gameScripts: List, val spriteSheets: List, val gameLevels: List = emptyList(), - val sounds: List = emptyList(), + val sound: String? = null, val zoom: Int = 2, val record: Seconds = 8f, val gutter: Pair = 10 to 10, diff --git a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/engine/GameResourceProcessor.kt b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/engine/GameResourceProcessor.kt index e2803c8d..fd19fdcc 100644 --- a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/engine/GameResourceProcessor.kt +++ b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/engine/GameResourceProcessor.kt @@ -3,6 +3,7 @@ package com.github.minigdx.tiny.engine import com.github.minigdx.tiny.log.Logger import com.github.minigdx.tiny.lua.toTinyException import com.github.minigdx.tiny.platform.Platform +import com.github.minigdx.tiny.platform.SoundData import com.github.minigdx.tiny.resources.GameLevel import com.github.minigdx.tiny.resources.GameResource import com.github.minigdx.tiny.resources.GameScript @@ -80,16 +81,18 @@ class GameResourceProcessor( } this.levels = Array(gameLevels.size) { null } - val sounds = gameOptions.sounds.mapIndexed { index, sound -> - resourceFactory.soundEffect(index, sound) + val sounds = gameOptions.sound?.let { sound -> + resourceFactory.soundEffect(0, sound) + } + this.sounds = Array(1) { + Sound(0, 0, "default-sound", SoundData.DEFAULT_EMPTY) } - this.sounds = Array(sounds.size) { null } resources = listOf( resourceFactory.bootscript("_boot.lua"), resourceFactory.enginescript("_engine.lua"), resourceFactory.bootSpritesheet("_boot.png"), - ) + gameScripts + spriteSheets + gameLevels + sounds + ) + gameScripts + spriteSheets + gameLevels + listOfNotNull(sounds) toBeLoaded.addAll( setOf("_boot.lua", "_engine.lua", "_boot.png"), @@ -97,7 +100,7 @@ class GameResourceProcessor( toBeLoaded.addAll(gameOptions.gameLevels) toBeLoaded.addAll(gameOptions.gameScripts) toBeLoaded.addAll(gameOptions.spriteSheets) - toBeLoaded.addAll(gameOptions.sounds) + gameOptions.sound?.let { toBeLoaded.add(it) } numberOfResources = resources.size logger.debug("GAME_ENGINE") { "Number of resources to load: $numberOfResources" } diff --git a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/graphic/Clipper.kt b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/graphic/Clipper.kt index 3c70d4f4..65aaf09b 100644 --- a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/graphic/Clipper.kt +++ b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/graphic/Clipper.kt @@ -7,26 +7,45 @@ import kotlin.math.min /** * Limit the part of the screen that can be drawn. */ -class Clipper(private val width: Pixel, private val height: Pixel) { +class Clipper(private val screenWidth: Pixel, private val screenHeight: Pixel) { var left = 0 private set - var right = width + var right = screenWidth private set var top = 0 private set - var bottom = height + var bottom = screenHeight private set + var width = screenWidth + private set + + var height = screenHeight + private set + + internal var updated: Boolean = true + fun set( x: Pixel, y: Pixel, width: Pixel, height: Pixel, - ) { + ): Clipper { + // Left corner of the screen area left = max(0, min(x, x + width)) - right = min(max(x, x + width), this.width) + // Right corner of the screen area + right = min(max(x, x + width), this.screenWidth) + // Top corner of the screen area (bottom of the screen) top = max(0, min(y, y + height)) - bottom = min(max(y, y + height), this.height) + // Bottom corner of the screen area + bottom = min(max(y, y + height), this.screenHeight) + + this.width = right - left + this.height = bottom - top + + updated = true + + return this } fun isIn( @@ -38,15 +57,30 @@ class Clipper(private val width: Pixel, private val height: Pixel) { fun reset() { left = 0 - right = width + right = screenWidth top = 0 - bottom = height + bottom = screenHeight + + width = screenWidth + height = screenHeight + + updated = true } override fun equals(other: Any?): Boolean { val o = other as? Clipper ?: return false - return width == o.width && height == o.height && + return screenWidth == o.screenWidth && screenHeight == o.screenHeight && left == o.left && right == o.right && top == o.top && bottom == o.bottom } + + override fun hashCode(): Int { + var result = screenWidth + result = 31 * result + screenHeight + result = 31 * result + left + result = 31 * result + right + result = 31 * result + top + result = 31 * result + bottom + return result + } } diff --git a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/graphic/FrameBuffer.kt b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/graphic/FrameBuffer.kt deleted file mode 100644 index 9a8982fe..00000000 --- a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/graphic/FrameBuffer.kt +++ /dev/null @@ -1,255 +0,0 @@ -package com.github.minigdx.tiny.graphic - -import com.github.minigdx.tiny.ColorIndex -import com.github.minigdx.tiny.Pixel -import kotlin.math.max -import kotlin.math.min - -class Blender(internal val gamePalette: ColorPalette) { - internal var switch: Array = Array(gamePalette.size) { index -> index } - - internal var dithering: Int = 0xFFFF - - internal val hasDithering: Boolean - get() { - return dithering != 0xFFFF - } - - fun dither(pattern: Int): Int { - val prec = dithering - dithering = pattern and 0xFFFF - return prec - } - - fun pal() { - switch = Array(gamePalette.size) { index -> index } - } - - fun pal( - source: ColorIndex, - target: ColorIndex, - ) { - switch[gamePalette.check(source)] = gamePalette.check(target) - } - - fun mix( - colors: ByteArray, - x: Pixel, - y: Pixel, - transparency: Array?, - ): ByteArray? { - fun dither(pattern: Int): Boolean { - val a = x % 4 - val b = (y % 4) * 4 - - return (pattern shr (15 - (a + b))) and 0x01 == 0x01 - } - - val color = gamePalette.check(colors[0].toInt()) - colors[0] = switch[color].toByte() - // Return null if transparent - if (transparency == null && gamePalette.isTransparent(colors[0].toInt())) return null - return if (!dither(dithering)) { - null - } else { - colors - } - } -} - -class Camera() { - var x = 0 - internal set - var y = 0 - internal set - - fun set( - x: Int, - y: Int, - ) { - this.x = x - this.y = y - } - - fun cx(x: Int): Int { - return x - this.x - } - - fun cy(y: Int): Int { - return y - this.y - } -} - -class FrameBuffer( - val width: Pixel, - val height: Pixel, - val gamePalette: ColorPalette, -) { - internal val colorIndexBuffer: PixelArray = PixelArray(width, height, PixelFormat.INDEX) - - internal val clipper: Clipper = Clipper(width, height) - - internal val blender = Blender(gamePalette) - - internal val camera = Camera() - - private var tmp = ByteArray(1) { 0 } - - private val transparency = arrayOf(0) - - fun pixel( - x: Pixel, - y: Pixel, - ): ColorIndex { - val cx = camera.cx(x) - val cy = camera.cy(y) - return colorIndexBuffer.getOne(cx, cy) - } - - fun pixel( - x: Pixel, - y: Pixel, - colorIndex: ColorIndex, - ) { - val cx = camera.cx(x) - val cy = camera.cy(y) - if (!clipper.isIn(cx, cy)) return - - tmp[0] = gamePalette.check(colorIndex).toByte() - val index = blender.mix(tmp, cx, cy, transparency) ?: return - colorIndexBuffer.set(cx, cy, index[0].toInt()) - } - - fun fill( - startX: Pixel, - endX: Pixel, - y: Pixel, - colorIndex: ColorIndex, - ) { - val cy = camera.cy(y) - if (cy !in clipper.top..clipper.bottom - 1) return - - val leftX = min(startX, endX) - val rightX = max(startX, endX) - // fill outside the screen? - val left = max(camera.cx(leftX), clipper.left) - val right = min(camera.cx(rightX), clipper.right) - - // nothing to do because out of the screen or no pixel. - if (left == right || left >= clipper.right || right < clipper.left) { - return - } - val color = gamePalette.check(colorIndex) - - // can't optimise if there is some dithering - if (blender.hasDithering) { - // pixel use the clipper and the camera. - // the coordinates need to be the non-translated one - // as it will be translated by pixel if needed. - (startX..endX).forEach { x -> - pixel(x, y, colorIndex) - } - } else { - tmp[0] = color.toByte() - val targetColor = blender.mix(tmp, 0, 0, transparency) ?: return - colorIndexBuffer.fill(left, right, cy, targetColor[0]) - } - } - - /** - * Clear the framebuffer and set the same color on each pixel. - */ - fun clear(clearIndex: ColorIndex = ColorPalette.TRANSPARENT_INDEX) { - val colorIndex = gamePalette.check(clearIndex) - colorIndexBuffer.reset(colorIndex) - } - - fun copyFrom( - /** - * Source to copy. - */ - source: PixelArray, - /** - * X coordinate where the data will be copied in this frame buffer - */ - dstX: Pixel = 0, - /** - * Y coordinate where the data will be copied in this frame buffer - */ - dstY: Pixel = 0, - /** - * X coordinate where the data will be consumed in the source. - */ - sourceX: Pixel = 0, - /** - * Y coordinate where the data will be consumed in the source. - */ - sourceY: Pixel = 0, - /** - * Width of the fragment to copy - */ - width: Pixel = this.width, - /** - * Height of the fragment to copy - */ - height: Pixel = this.height, - /** - * Flip horizontally - */ - reverseX: Boolean = false, - /** - * Flip vertically - */ - reverseY: Boolean = false, - /** - * Blend function - */ - blender: (ByteArray, Pixel, Pixel) -> ByteArray = { colors, _, _ -> colors }, - ) { - val cx = camera.cx(dstX) - val cy = camera.cy(dstY) - - val clippedX = max(cx, clipper.left) - val clippedWidthLeft = width - (clippedX - cx) - val clippedWidth = min(cx + clippedWidthLeft, clipper.right) - cx - - val clippedY = max(cy, clipper.top) - val clippedHeightTop = height - (clippedY - cy) - val clippedHeight = min(cy + clippedHeightTop, clipper.bottom) - cy - - colorIndexBuffer.copyFrom( - source, - clippedX, - clippedY, - sourceX + width - clippedWidthLeft, - sourceY + height - clippedHeightTop, - clippedWidth, - clippedHeight, - reverseX, reverseY, - ) { c, x, y -> this.blender.mix(blender(c, x, y), x, y, null) } - } - - /** - * Create a buffer using the colorIndexBuffer as reference. - */ - fun generateBuffer(): ByteArray { - return this.colorIndexBuffer.pixels - } - - /** - * Fast copy another frame buffer into this frame buffer. - * It's a raw copy of each element. - */ - fun fastCopyFrom(frameBuffer: FrameBuffer) { - // Copying into itself. So there is nothing to do. - if (frameBuffer == this) { - return - } - frameBuffer.colorIndexBuffer.pixels.copyInto( - colorIndexBuffer.pixels, - 0, - 0, - colorIndexBuffer.size, - ) - } -} diff --git a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/graphic/FrameBufferParameters.kt b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/graphic/FrameBufferParameters.kt new file mode 100644 index 00000000..28b42d4d --- /dev/null +++ b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/graphic/FrameBufferParameters.kt @@ -0,0 +1,119 @@ +package com.github.minigdx.tiny.graphic + +import com.github.minigdx.tiny.ColorIndex +import com.github.minigdx.tiny.Pixel + +class Blender(internal val gamePalette: ColorPalette) { + private var switch: Array = Array(gamePalette.size) { index -> index } + + private var cachedPaletteReference: Array? = null + + internal var dithering: Int = 0xFFFF + + internal val hasDithering: Boolean + get() { + return dithering != 0xFFFF + } + + fun palette(): Array { + fun cache(): Array { + val copyOf = switch.copyOf() + cachedPaletteReference = copyOf + return copyOf + } + return cachedPaletteReference ?: cache() + } + + fun dither(pattern: Int): Int { + val prec = dithering + dithering = pattern and 0xFFFF + return prec + } + + fun pal() { + cachedPaletteReference = null + switch = Array(gamePalette.size) { index -> index } + } + + fun pal( + source: ColorIndex, + target: ColorIndex, + ) { + cachedPaletteReference = null + switch[gamePalette.check(source)] = gamePalette.check(target) + } + + fun mix( + colors: ByteArray, + x: Pixel, + y: Pixel, + transparency: Array?, + ): ByteArray? { + fun dither(pattern: Int): Boolean { + val a = x % 4 + val b = (y % 4) * 4 + + return (pattern shr (15 - (a + b))) and 0x01 == 0x01 + } + + val color = gamePalette.check(colors[0].toInt()) + colors[0] = switch[color].toByte() + // Return null if transparent + if (transparency == null && gamePalette.isTransparent(colors[0].toInt())) return null + return if (!dither(dithering)) { + null + } else { + colors + } + } +} + +class Camera() { + var x = 0 + internal set + var y = 0 + internal set + + fun set( + x: Int, + y: Int, + ) { + this.x = x + this.y = y + } + + fun cx(x: Int): Int { + return x - this.x + } + + fun cy(y: Int): Int { + return y - this.y + } +} + +class FrameBufferParameters( + val width: Pixel, + val height: Pixel, + val gamePalette: ColorPalette, +) { + internal val clipper: Clipper = Clipper(width, height) + + internal val blender = Blender(gamePalette) + + internal val camera = Camera() + + private var currentClipper: Clipper? = null + + fun clipper(): Clipper { + val currentInstance = currentClipper + val result = if (clipper.updated || currentInstance == null) { + clipper.updated = false + val newInstance = Clipper(width, height).set(clipper.left, clipper.top, clipper.width, clipper.height) + currentClipper = newInstance + newInstance + } else { + currentInstance + } + return result + } +} diff --git a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/input/internal/ObjectPool.kt b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/input/internal/ObjectPool.kt index ddc3927c..dfec7e35 100644 --- a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/input/internal/ObjectPool.kt +++ b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/input/internal/ObjectPool.kt @@ -21,9 +21,11 @@ abstract class ObjectPool(private val size: Int) { return result } - fun free(obj: T) { - destroyInstance(obj) - pool.add(obj) + fun free(vararg objs: T) { + objs.forEach { obj -> + destroyInstance(obj) + pool.add(obj) + } } fun free(objs: Iterable) { diff --git a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/CtrlLib.kt b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/CtrlLib.kt index 659154b8..0916b3c7 100644 --- a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/CtrlLib.kt +++ b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/CtrlLib.kt @@ -54,7 +54,7 @@ class CtrlLib( @TinyCall("Get the mouse coordinate and draw a sprite on those coordinates.") override fun call( - @TinyArg("sprN") arg: LuaValue, + @TinyArg("sprN", type = LuaType.NUMBER) arg: LuaValue, ): LuaValue { val pos = inputHandler.currentTouch @@ -86,7 +86,7 @@ class CtrlLib( @TinyCall("Is the key was pressed?") override fun call( - @TinyArg("key") arg: LuaValue, + @TinyArg("key", type = LuaType.NUMBER) arg: LuaValue, ): LuaValue { val int = arg.checkint() if (int >= values.size || int < 0) return BFALSE @@ -104,7 +104,7 @@ class CtrlLib( inner class pressing : OneArgFunction() { @TinyCall("Is the key is still pressed?") override fun call( - @TinyArg("key") arg: LuaValue, + @TinyArg("key", type = LuaType.NUMBER) arg: LuaValue, ): LuaValue { val values = Key.values() val int = arg.checkint() @@ -129,7 +129,7 @@ class CtrlLib( inner class touched : OneArgFunction() { @TinyCall("Is the screen was touched or mouse button was pressed?") override fun call( - @TinyArg("touch") arg: LuaValue, + @TinyArg("touch", type = LuaType.NUMBER) arg: LuaValue, ): LuaValue { val values = TouchSignal.values() val int = arg.checkint() diff --git a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/DebugLib.kt b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/DebugLib.kt index 6d6347bb..db357bf1 100644 --- a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/DebugLib.kt +++ b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/DebugLib.kt @@ -1,5 +1,6 @@ package com.github.minigdx.tiny.lua +import com.github.mingdx.tiny.doc.LuaType import com.github.mingdx.tiny.doc.TinyArg import com.github.mingdx.tiny.doc.TinyCall import com.github.mingdx.tiny.doc.TinyFunction @@ -54,7 +55,7 @@ class DebugLib(private val logger: Logger) : TwoArgFunction() { internal inner class console : VarArgFunction() { @TinyCall("Log a message into the console.") override fun invoke( - @TinyArg("str") args: Varargs, + @TinyArg("str", type = LuaType.ANY) args: Varargs, ): Varargs { val nbArgs = args.narg() val message = (1..nbArgs).joinToString(" ") { diff --git a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/FloppyLib.kt b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/FloppyLib.kt index 25b32d76..9a8cfb84 100644 --- a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/FloppyLib.kt +++ b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/FloppyLib.kt @@ -1,5 +1,6 @@ package com.github.minigdx.tiny.lua +import com.github.mingdx.tiny.doc.LuaType import com.github.mingdx.tiny.doc.TinyArg import com.github.mingdx.tiny.doc.TinyCall import com.github.mingdx.tiny.doc.TinyFunction @@ -50,8 +51,8 @@ class FloppyLib( internal inner class put : TwoArgFunction() { @TinyCall("Save the content into the file name.") override fun call( - @TinyArg("name") arg1: LuaValue, - @TinyArg("content") arg2: LuaValue, + @TinyArg("name", type = LuaType.STRING) arg1: LuaValue, + @TinyArg("content", type = LuaType.ANY) arg2: LuaValue, ): LuaValue { val filename = arg1.checkjstring() ?: return NIL val jsonElement = luaValueToJson(arg2, mutableSetOf()) @@ -65,7 +66,7 @@ class FloppyLib( internal inner class get : OneArgFunction() { @TinyCall("Load and get the content of the file name") override fun call( - @TinyArg("name") arg: LuaValue, + @TinyArg("name", type = LuaType.STRING) arg: LuaValue, ): LuaValue { val filename = arg.checkjstring() ?: return NIL val content = platform.getFromHome(filename) ?: return NIL diff --git a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/GfxLib.kt b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/GfxLib.kt index 411558c0..ffa0441e 100644 --- a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/GfxLib.kt +++ b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/GfxLib.kt @@ -1,5 +1,6 @@ package com.github.minigdx.tiny.lua +import com.github.mingdx.tiny.doc.LuaType import com.github.mingdx.tiny.doc.TinyArg import com.github.mingdx.tiny.doc.TinyCall import com.github.mingdx.tiny.doc.TinyFunction @@ -81,7 +82,7 @@ class GfxLib( @TinyCall("Switch to another draw mode. Return the previous mode.") override fun call( - @TinyArg("mode") a: LuaValue, + @TinyArg("mode", type = LuaType.NUMBER) a: LuaValue, ): LuaValue { val before = current val index = a.checkint() @@ -105,7 +106,7 @@ class GfxLib( @TinyCall("Clear the screen with a color.") override fun call( - @TinyArg("color") arg: LuaValue, + @TinyArg("color", type = LuaType.NUMBER) arg: LuaValue, ): LuaValue { val color = if (arg.isnil()) { valueOf("#000000").checkColorIndex() @@ -123,9 +124,9 @@ class GfxLib( internal inner class pset : ThreeArgFunction() { @TinyCall("set the color index at the coordinate (x,y).") override fun call( - @TinyArg("x") arg1: LuaValue, - @TinyArg("y") arg2: LuaValue, - @TinyArg("color") arg3: LuaValue, + @TinyArg("x", type = LuaType.NUMBER) arg1: LuaValue, + @TinyArg("y", type = LuaType.NUMBER) arg2: LuaValue, + @TinyArg("color", type = LuaType.NUMBER) arg3: LuaValue, ): LuaValue { virtualFrameBuffer.drawPoint( arg1.toint(), @@ -140,8 +141,8 @@ class GfxLib( internal inner class pget : TwoArgFunction() { @TinyCall("get the color index at the coordinate (x,y).") override fun call( - @TinyArg("x") arg1: LuaValue, - @TinyArg("y") arg2: LuaValue, + @TinyArg("x", type = LuaType.NUMBER) arg1: LuaValue, + @TinyArg("y", type = LuaType.NUMBER) arg2: LuaValue, ): LuaValue { val x = min(max(0, arg1.checkint()), gameOptions.width - 1) val y = min(max(0, arg2.checkint()), gameOptions.height - 1) @@ -165,7 +166,7 @@ class GfxLib( inner class toSheet : LibFunction() { @TinyCall("Copy the current frame buffer to an new or existing sheet index.") override fun call( - @TinyArg("sheet") a: LuaValue, + @TinyArg("sheet", type = LuaType.ANY) a: LuaValue, ): LuaValue { val (index, name) = getIndexAndName(a) @@ -234,8 +235,8 @@ class GfxLib( @TinyCall("Set game camera to the position x, y.") override fun call( - @TinyArg("x") arg1: LuaValue, - @TinyArg("y") arg2: LuaValue, + @TinyArg("x", type = LuaType.NUMBER) arg1: LuaValue, + @TinyArg("y", type = LuaType.NUMBER) arg2: LuaValue, ): LuaValue { val previous = coordinates() virtualFrameBuffer.setCamera(arg1.toint(), arg2.toint()) @@ -267,7 +268,7 @@ class GfxLib( @TinyCall("Apply dithering pattern. The previous dithering pattern is returned.") override fun call( - @TinyArg("pattern", "Dither pattern. For example: 0xA5A5 or 0x3030") a: LuaValue, + @TinyArg("pattern", "Dither pattern. For example: 0xA5A5 or 0x3030", type = LuaType.NUMBER) a: LuaValue, ): LuaValue { val actual = virtualFrameBuffer.dithering(a.checkint()) return valueOf(actual) @@ -287,10 +288,10 @@ class GfxLib( @TinyCall("Clip and limit the drawing area.") override fun call( - @TinyArg("x") a: LuaValue, - @TinyArg("y") b: LuaValue, - @TinyArg("width") c: LuaValue, - @TinyArg("height") d: LuaValue, + @TinyArg("x", type = LuaType.NUMBER) a: LuaValue, + @TinyArg("y", type = LuaType.NUMBER) b: LuaValue, + @TinyArg("width", type = LuaType.NUMBER) c: LuaValue, + @TinyArg("height", type = LuaType.NUMBER) d: LuaValue, ): LuaValue { virtualFrameBuffer.setClip(a.checkint(), b.checkint(), c.checkint(), d.checkint()) return NONE diff --git a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/JuiceLib.kt b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/JuiceLib.kt index c3c4a43e..b1e56d85 100644 --- a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/JuiceLib.kt +++ b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/JuiceLib.kt @@ -1,5 +1,6 @@ package com.github.minigdx.tiny.lua +import com.github.mingdx.tiny.doc.LuaType import com.github.mingdx.tiny.doc.TinyArg import com.github.mingdx.tiny.doc.TinyCall import com.github.mingdx.tiny.doc.TinyFunction @@ -67,20 +68,21 @@ class JuiceLib : TwoArgFunction() { inner class InterpolationLib(private val interpolation: Interpolation) : LibFunction() { @TinyCall("Give a percentage (progress) of the interpolation") override fun call( - @TinyArg("progress") a: LuaValue, + @TinyArg("progress", type = LuaType.NUMBER) a: LuaValue, ): LuaValue { return valueOf(interpolation.interpolate(a.tofloat()).toDouble()) } @TinyCall("Interpolate the value given a start and an end value.") override fun call( - @TinyArg("start") a: LuaValue, - @TinyArg("end") b: LuaValue, + @TinyArg("start", type = LuaType.NUMBER) a: LuaValue, + @TinyArg("end", type = LuaType.NUMBER) b: LuaValue, @TinyArg( "progress", "Progress value. " + "Needs to be between 0 (start of the interpolation) " + "and 1 (end of the interpolation)", + type = LuaType.NUMBER, ) c: LuaValue, ): LuaValue { diff --git a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/MapLib.kt b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/MapLib.kt index 2f42a807..7b37ff7d 100644 --- a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/MapLib.kt +++ b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/MapLib.kt @@ -1,5 +1,6 @@ package com.github.minigdx.tiny.lua +import com.github.mingdx.tiny.doc.LuaType import com.github.mingdx.tiny.doc.TinyArg import com.github.mingdx.tiny.doc.TinyCall import com.github.mingdx.tiny.doc.TinyFunction @@ -96,7 +97,7 @@ class MapLib( "Return the previous index level or NIL if the new level is invalid.", ) override fun call( - @TinyArg("level") a: LuaValue, + @TinyArg("level", type = LuaType.ANY) a: LuaValue, ): LuaValue { // The parameter is an index. Let's check if the index is valid. if (a.isint()) { @@ -136,7 +137,7 @@ class MapLib( "The layer in the front is 0.", ) override fun call( - @TinyArg("layer_index") arg: LuaValue, + @TinyArg("layer_index", type = LuaType.ANY) arg: LuaValue, ): LuaValue { val level = activeLevel() @@ -195,7 +196,7 @@ class MapLib( @TinyCall("Convert the cell coordinates from a table {cx,cy} into screen coordinates as a table {x,y}.") override fun call( - @TinyArg("cell") arg: LuaValue, + @TinyArg("cell", type = LuaType.TABLE) arg: LuaValue, ): LuaValue = super.call(arg) } @@ -225,7 +226,7 @@ class MapLib( @TinyCall("Convert the coordinates from a table {x,y} into cell coordinates as a table {cx,cy}.") override fun call( - @TinyArg("coordinates") arg: LuaValue, + @TinyArg("coordinates", type = LuaType.TABLE) arg: LuaValue, ) = super.call(arg) } @@ -233,8 +234,8 @@ class MapLib( inner class cflag : LibFunction() { @TinyCall("Get the flag from the tile at the coordinate cx,cy.") override fun call( - @TinyArg("cx") a: LuaValue, - @TinyArg("cy") b: LuaValue, + @TinyArg("cx", type = LuaType.NUMBER) a: LuaValue, + @TinyArg("cy", type = LuaType.NUMBER) b: LuaValue, ): LuaValue { val level = activeLevel() ?: return NIL return getCell(level.layerInstances.asSequence(), a.checkint(), b.checkint()) @@ -242,9 +243,9 @@ class MapLib( @TinyCall("Get the flag from the tile at the coordinate cx,cy from a specific layer.") override fun call( - @TinyArg("cx") a: LuaValue, - @TinyArg("cy") b: LuaValue, - @TinyArg("layer") c: LuaValue, + @TinyArg("cx", type = LuaType.NUMBER) a: LuaValue, + @TinyArg("cy", type = LuaType.NUMBER) b: LuaValue, + @TinyArg("layer", type = LuaType.ANY) c: LuaValue, ): LuaValue { val level = activeLevel() ?: return NIL val layer = layerIndex(c) ?: return NIL @@ -256,8 +257,8 @@ class MapLib( inner class flag : LibFunction() { @TinyCall("Get the flag from the tile at the coordinate x,y.") override fun call( - @TinyArg("x") a: LuaValue, - @TinyArg("y") b: LuaValue, + @TinyArg("x", type = LuaType.NUMBER) a: LuaValue, + @TinyArg("y", type = LuaType.NUMBER) b: LuaValue, ): LuaValue { val level = activeLevel() ?: return NIL @@ -274,9 +275,9 @@ class MapLib( @TinyCall("Get the flag from the tile at the coordinate x,y from a specific layer.") override fun call( - @TinyArg("x") a: LuaValue, - @TinyArg("y") b: LuaValue, - @TinyArg("layer") c: LuaValue, + @TinyArg("x", type = LuaType.NUMBER) a: LuaValue, + @TinyArg("y", type = LuaType.NUMBER) b: LuaValue, + @TinyArg("layer", type = LuaType.ANY) c: LuaValue, ): LuaValue { val level = activeLevel() ?: return NIL val layer = layerIndex(c) ?: return NIL @@ -466,7 +467,7 @@ entity.fields -- access custom field of the entity description = "Draw the layer with the name or the index on the screen.", ) override fun call( - @TinyArg("index") a: LuaValue, + @TinyArg("index", type = LuaType.ANY) a: LuaValue, ): LuaValue { val layerIndex = layerIndex(a) ?: return NIL if (!isActiveLayer(layerIndex)) { diff --git a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/MathLib.kt b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/MathLib.kt index ed6165bc..a1faea5a 100644 --- a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/MathLib.kt +++ b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/MathLib.kt @@ -1,5 +1,6 @@ package com.github.minigdx.tiny.lua +import com.github.mingdx.tiny.doc.LuaType import com.github.mingdx.tiny.doc.TinyArg import com.github.mingdx.tiny.doc.TinyCall import com.github.mingdx.tiny.doc.TinyFunction @@ -41,7 +42,7 @@ class MathLib : org.luaj.vm2.lib.MathLib() { internal inner class sign : OneArgFunction() { @TinyCall("Return the sign of the number.") override fun call( - @TinyArg("number") arg: LuaValue, + @TinyArg("number", type = LuaType.NUMBER) arg: LuaValue, ): LuaValue { return if (arg.todouble() >= 0) { ONE @@ -57,8 +58,8 @@ class MathLib : org.luaj.vm2.lib.MathLib() { internal inner class atan2 : TwoArgFunction() { @TinyCall("Calculate the angle for the point (x, y). Please note the argument order: y then x.") override fun call( - @TinyArg("y") arg1: LuaValue, - @TinyArg("x") arg2: LuaValue, + @TinyArg("y", type = LuaType.NUMBER) arg1: LuaValue, + @TinyArg("x", type = LuaType.NUMBER) arg2: LuaValue, ): LuaValue { val y = arg1.todouble() val x = arg2.todouble() @@ -73,9 +74,9 @@ class MathLib : org.luaj.vm2.lib.MathLib() { internal inner class clamp : ThreeArgFunction() { @TinyCall("Clamp the value between a and b. If a is greater than b, then b will be returned.") override fun call( - @TinyArg("a", "The minimum value.") arg1: LuaValue, - @TinyArg("value", "The value to be clamped.") arg2: LuaValue, - @TinyArg("b", "The maximum value.") arg3: LuaValue, + @TinyArg("a", "The minimum value.", type = LuaType.NUMBER) arg1: LuaValue, + @TinyArg("value", "The value to be clamped.", type = LuaType.NUMBER) arg2: LuaValue, + @TinyArg("b", "The maximum value.", type = LuaType.NUMBER) arg3: LuaValue, ): LuaValue { val max = if (arg1.todouble() > arg2.todouble()) { @@ -101,10 +102,10 @@ class MathLib : org.luaj.vm2.lib.MathLib() { description = "Distance between (x1, y1) and (x2, y2).", ) override fun call( - @TinyArg("x1") a: LuaValue, - @TinyArg("y1") b: LuaValue, - @TinyArg("x2") c: LuaValue, - @TinyArg("y2") d: LuaValue, + @TinyArg("x1", type = LuaType.NUMBER) a: LuaValue, + @TinyArg("y1", type = LuaType.NUMBER) b: LuaValue, + @TinyArg("x2", type = LuaType.NUMBER) c: LuaValue, + @TinyArg("y2", type = LuaType.NUMBER) d: LuaValue, ): LuaValue { val luaValue = dst2.call(a, b, c, d) return valueOf(sqrt(luaValue.todouble())) @@ -121,10 +122,10 @@ class MathLib : org.luaj.vm2.lib.MathLib() { description = "Distance not squared between (x1, y1) and (x2, y2).", ) override fun call( - @TinyArg("x1") a: LuaValue, - @TinyArg("y1") b: LuaValue, - @TinyArg("x2") c: LuaValue, - @TinyArg("y2") d: LuaValue, + @TinyArg("x1", type = LuaType.NUMBER) a: LuaValue, + @TinyArg("y1", type = LuaType.NUMBER) b: LuaValue, + @TinyArg("x2", type = LuaType.NUMBER) c: LuaValue, + @TinyArg("y2", type = LuaType.NUMBER) d: LuaValue, ): LuaValue { val xDiff = c.todouble() - a.todouble() val yDiff = d.todouble() - b.todouble() @@ -144,7 +145,7 @@ class MathLib : org.luaj.vm2.lib.MathLib() { "If a table is passed, it'll return a random element of the table.", ) override fun call( - @TinyArg("until") arg: LuaValue, + @TinyArg("until", type = LuaType.ANY) arg: LuaValue, ): LuaValue { if (arg.isnil()) return call() return if (arg.istable()) { @@ -166,8 +167,8 @@ class MathLib : org.luaj.vm2.lib.MathLib() { @TinyCall("Generate a random value between a and b.") override fun call( - @TinyArg("a") arg1: LuaValue, - @TinyArg("b") arg2: LuaValue, + @TinyArg("a", type = LuaType.NUMBER) arg1: LuaValue, + @TinyArg("b", type = LuaType.NUMBER) arg2: LuaValue, ): LuaValue { if (arg2.isnil()) { return call(arg1) @@ -186,8 +187,8 @@ class MathLib : org.luaj.vm2.lib.MathLib() { inner class roverlap() : TwoArgFunction() { @TinyCall("Check if the rectangle rect1 overlaps with the rectangle rect2.") override fun call( - @TinyArg("rect1", "Rectangle as a table {x, y, with, height}.") arg1: LuaValue, - @TinyArg("rect2", "Rectangle as a table {x, y, with, height}.") arg2: LuaValue, + @TinyArg("rect1", "Rectangle as a table {x, y, with, height}.", type = LuaType.TABLE) arg1: LuaValue, + @TinyArg("rect2", "Rectangle as a table {x, y, with, height}.", type = LuaType.TABLE) arg2: LuaValue, ): LuaValue { val ax = arg1["x"].toint() val ay = arg1["y"].toint() @@ -291,9 +292,9 @@ class MathLib : org.luaj.vm2.lib.MathLib() { @TinyCall("Generate a random value regarding the parameters x,y and z.") override fun call( - @TinyArg("x", description = "A value between 0.0 and 1.0.") arg1: LuaValue, - @TinyArg("y", description = "A value between 0.0 and 1.0.") arg2: LuaValue, - @TinyArg("z", description = "A value between 0.0 and 1.0.") arg3: LuaValue, + @TinyArg("x", description = "A value between 0.0 and 1.0.", type = LuaType.NUMBER) arg1: LuaValue, + @TinyArg("y", description = "A value between 0.0 and 1.0.", type = LuaType.NUMBER) arg2: LuaValue, + @TinyArg("z", description = "A value between 0.0 and 1.0.", type = LuaType.NUMBER) arg3: LuaValue, ): LuaValue { return valueOf(noise(arg1.todouble(), arg2.todouble(), arg3.todouble())) } diff --git a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/NotesLib.kt b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/NotesLib.kt index 56b7d0b8..655407df 100644 --- a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/NotesLib.kt +++ b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/NotesLib.kt @@ -1,5 +1,6 @@ package com.github.minigdx.tiny.lua +import com.github.mingdx.tiny.doc.LuaType import com.github.mingdx.tiny.doc.TinyArg import com.github.mingdx.tiny.doc.TinyCall import com.github.mingdx.tiny.doc.TinyFunction @@ -240,7 +241,7 @@ class NotesLib : TwoArgFunction() { inner class note : OneArgFunction() { @TinyCall("Get the name of a note regarding the note index (ie: C0 = 0, Cs0 = 1, ...)") override fun call( - @TinyArg("note_index") arg: LuaValue, + @TinyArg("note_index", type = LuaType.NUMBER) arg: LuaValue, ): LuaValue { return valueOf(Note.fromIndex(arg.checkint()).name) } diff --git a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/SfxLib.kt b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/SfxLib.kt index 3d74cf4f..8436b6c9 100644 --- a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/SfxLib.kt +++ b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/SfxLib.kt @@ -1,18 +1,14 @@ package com.github.minigdx.tiny.lua -import com.github.mingdx.tiny.doc.TinyArg import com.github.mingdx.tiny.doc.TinyCall import com.github.mingdx.tiny.doc.TinyFunction import com.github.mingdx.tiny.doc.TinyLib import com.github.minigdx.tiny.engine.GameResourceAccess +import com.github.minigdx.tiny.lua.sfx.InstrumentLuaWrapper +import com.github.minigdx.tiny.lua.sfx.SfxLuaWrapper import com.github.minigdx.tiny.platform.Platform import com.github.minigdx.tiny.sound.Instrument import com.github.minigdx.tiny.sound.Music -import com.github.minigdx.tiny.sound.MusicalBar -import com.github.minigdx.tiny.sound.MusicalSequence -import com.github.minigdx.tiny.sound.SoundHandler -import com.github.minigdx.tiny.sound.Sweep -import com.github.minigdx.tiny.sound.Vibrato import com.github.minigdx.tiny.sound.VirtualSoundBoard import org.luaj.vm2.LuaTable import org.luaj.vm2.LuaValue @@ -21,52 +17,9 @@ import org.luaj.vm2.lib.OneArgFunction import org.luaj.vm2.lib.TwoArgFunction import org.luaj.vm2.lib.ZeroArgFunction -/** - * - * envelope(attack, delay, substain, release) - * instrument(List, envelope) - * - * note (pitch, duration) - * bars (List, instrument) - * track (List) - * sequence(List) - * music(List`. -WARNING: Because of browser behaviour, a sound can *only* be played only after the first -user interaction. - -Avoid to start a music or a sound at the beginning of the game. -Before it, force the player to hit a key or click by adding an interactive menu -or by starting the sound as soon as the player is moving. -""", + """TODO""", ) class SfxLib( private val resourceAccess: GameResourceAccess, @@ -80,268 +33,30 @@ class SfxLib( arg2: LuaValue, ): LuaValue { val ctrl = LuaTable() - ctrl.set("play", play()) - ctrl.set("loop", loop()) - ctrl.set("stop", stop()) - - ctrl.set("mplay", mplay()) - ctrl.set("mloop", mloop()) - ctrl.set("mstop", mstop()) - - ctrl.set("music", music()) ctrl.set("instrument", instrument()) - ctrl.set("bar", bar()) - ctrl.set("track", track()) + ctrl.set("sfx", sfx()) - ctrl.set("load", load()) ctrl.set("save", save()) - ctrl.set("export", export()) - arg2.set("sfx", ctrl) arg2.get("package").get("loaded").set("sfx", ctrl) return ctrl } - private data class SoundKey(val soundIndex: Int, val barIndex: Int) - - private data class SequenceKey(val soundIndex: Int, val sequenceIndex: Int) - - private var currentMusic: Music? = null - private var currentSound: Int = 0 - private var currentSequence: Int = 0 - - private val handlers = mutableMapOf() - private val sequenceHandlers = mutableMapOf() - // Cache for instrument Lua wrappers private val instrumentWrapperCache = mutableMapOf() - private var lastMusicVersion = 0 - - fun getCurrentMusic(): Music { - fun findCurrentMusic(): Music { - val defaultMusic = resourceAccess.findSound(0)?.data?.music ?: Music() - currentMusic = defaultMusic - invalidateInstrumentCache() - return defaultMusic - } - return currentMusic ?: findCurrentMusic() - } - private fun invalidateInstrumentCache() { - instrumentWrapperCache.clear() - lastMusicVersion++ - } - - inner class export : ZeroArgFunction() { + @TinyFunction("Save the actual music in the current sfx file.") + inner class save : ZeroArgFunction() { + @TinyCall("Save the actual music in the current sfx file.") override fun call(): LuaValue { - // FIXME: - TODO("E") - /* - val music = getCurrentMusic() - val sequence = music.sequences.getOrNull(currentSequence) - sequence?.run { resourceAccess.exportAsSound(sequence) } - - return NIL - - */ - } - } - - @TinyFunction("Save the actual music using the filename.") - inner class save : OneArgFunction() { - @TinyCall("Save the actual music using the filename") - override fun call( - @TinyArg("filename") arg: LuaValue, - ): LuaValue { - // FIXME: - TODO("F") - /* - val music = getCurrentMusic() - val content = Json.encodeToString(music) - resourceAccess.save(arg.checkjstring()!!, content) - return NONE - - */ - } - } - - @TinyFunction("Load the actual SFX sound as the actual music.") - inner class load : OneArgFunction() { - @TinyCall("Load the actual SFX sound as the actual music using filename or its index") - override fun call( - @TinyArg("filename") arg: LuaValue, - ): LuaValue { - // FIXME: - TODO() - /* - val sound = if (arg.isint()) { - resourceAccess.sound(arg.checkint()) - } else { - resourceAccess.sound(arg.checkjstring()!!) - } - return if (sound == null) { - valueOf(currentSound) - } else { - val soundIndex = currentSound - currentMusic = sound.data.music - currentSound = sound.index - // Clear cache when music changes - invalidateInstrumentCache() - valueOf(soundIndex) - } - - */ - } - } - - inner class music() : OneArgFunction() { - override fun call(arg: LuaValue): LuaValue { - // FIXME: - TODO("G") - /* - val music = getCurrentMusic() - val index = arg.checkint().coerceIn(0, music.sequences.size) - val sequence = music.sequences.getOrNull(index) ?: return NIL - resourceAccess.play(sequence) - return NONE - - */ - } - } - - @TinyFunction("Access track using its index or its name.") - inner class track : OneArgFunction() { - private fun getTrack( - music: Music, - index: Int, - ): MusicalSequence.Track? { - return music.sequences - .getOrNull(currentSequence) - ?.tracks - ?.getOrNull(index) - } - - @TinyCall("Access instrument using its index or its name.") - override fun call(arg: LuaValue): LuaValue { - val music = getCurrentMusic() - val index = arg.asTrackIndex(music) ?: return NIL - return getTrack(music, index) - ?.toLua() - ?: NIL - } - - fun MusicalSequence.Track.toLua(): LuaValue { - val obj = WrapperLuaTable() - - obj.function1("play") { - // FIXME: - TODO("H") - /* - resourceAccess.play(this) - NONE - - */ - } - - obj.wrap( - "volume", - { valueOf(this.volume.toDouble()) }, - { this.volume = it.optdouble(0.0).toFloat() }, - ) - - obj.wrap("beats") { - val result = LuaTable() - this.beats.map { b -> - val note = b.note - WrapperLuaTable().apply { - this.wrap("note") { - note?.note?.let { valueOf(it) } ?: NIL - } - this.wrap( - "notei", - { - when { - b.isOffNote -> valueOf(-1) // Special value for note off - note?.index != null -> valueOf(note.index) - else -> NIL - } - }, - { arg -> - when { - arg.isnil() -> { - // Set to repeat previous note (null) - b.note = null - b.isOffNote = false - } + val soundFile = resourceAccess.findSound(0) ?: return NIL - arg.checkint() == -1 -> { - // Set to note off (silence) - b.note = null - b.isOffNote = true - } + val content = soundFile.data.music.serialize() + platform.saveIntoGameDirectory(soundFile.name, content) - else -> { - // Set to specific note - val noteIndex = arg.checkint() - b.note = Note.fromIndex(noteIndex.coerceIn(Note.C0.index..Note.B8.index) - 1) - b.isOffNote = false - } - } - }, - ) - this.wrap( - "octave", - { - note?.octave?.let { valueOf(it) } ?: NIL - }, - { arg -> - b.note = if (arg.isnil() || note == null) { - Note.C5 - } else { - Note.fromName(note.note + arg.checkint().coerceIn(0, 8)) - } - }, - ) - this.wrap( - "volume", - { - valueOf(b.volume.toDouble() * 255.0) - }, - { b.volume = it.tofloat().coerceIn(0f, 255f) / 255f }, - ) - this.wrap( - "mode", - { - if (b.isRepeating) valueOf(1) else valueOf(0) - }, - { b.isRepeating = it.checkint() >= 1 }, - ) - this.wrap( - "instrument", - { - b.instrumentIndex?.let { valueOf(it) } ?: NIL - }, - { arg -> - b.instrumentIndex = if (arg.isnil()) { - null - } else { - if (arg.checkint() < 0) { - null - } else { - arg.checkint().coerceIn(0, 7) - } - } - }, - ) - } - }.forEachIndexed { index, value -> - result.insert(index + 1, value) - } - result - } - return obj + return NONE } } @@ -349,15 +64,18 @@ class SfxLib( inner class instrument : LibFunction() { @TinyCall("Access instrument using its index or its name.") override fun call(a: LuaValue): LuaValue { - val music = getCurrentMusic() + val music = resourceAccess.findSound(0)?.data?.music ?: return NIL + val index = a.asInstrumentIndex(music) ?: return NIL // Check cache first return instrumentWrapperCache[index] // Check music - ?: music.instruments.getOrNull(index)?.toLua()?.also { - // Cache the result of [toLua]. - instrumentWrapperCache[index] = it + ?: music.instruments.getOrNull(index)?.let { instrument -> + createInstrumentWrapper(music, instrument).also { + // Cache the wrapper + instrumentWrapperCache[index] = it + } } // Give up ?: NIL @@ -372,503 +90,37 @@ class SfxLib( b: LuaValue, ): LuaValue { val instrument = call(a) + val music = resourceAccess.findSound(0)?.data?.music ?: return NIL return if (instrument == NIL && b.optboolean(false)) { val index = a.toint() val newInstrument = Instrument(index) - getCurrentMusic().instruments[index] = newInstrument + music.instruments[index] = newInstrument // Clear cache for this index since we're creating new instrument instrumentWrapperCache.remove(index) - newInstrument.toLua() + createInstrumentWrapper(music, newInstrument) } else { instrument } } - fun Instrument.toLua(): LuaValue { - val obj = WrapperLuaTable() - - obj.wrap( - "index", - { valueOf(this.index) }, - ) - obj.wrap("all") { - val luaTable = LuaTable() - getCurrentMusic().instruments.mapNotNull { it?.index }.forEach { - luaTable.insert(0, valueOf(it)) - } - luaTable - } - obj.wrap( - "name", - { this.name?.let { valueOf(it) } ?: NIL }, - { this.name = it.optjstring(null) }, - ) - obj.wrap( - "wave", - { valueOf(this.wave.name) }, - { - this.wave = it.checkjstring() - ?.let { Instrument.WaveType.valueOf(it) } - ?: Instrument.WaveType.SINE - }, - ) - obj.wrap( - "attack", - { valueOf(this.attack.toDouble()) }, - { this.attack = it.optdouble(0.0).toFloat() }, - ) - obj.wrap( - "decay", - { valueOf(this.decay.toDouble()) }, - { this.decay = it.optdouble(0.0).toFloat() }, - ) - obj.wrap( - "sustain", - { valueOf(this.sustain.toDouble()) }, - { this.sustain = it.optdouble(0.0).toFloat() }, - ) - obj.wrap( - "release", - { valueOf(this.release.toDouble()) }, - { this.release = it.optdouble(0.0).toFloat() }, - ) - obj.wrap("sweep") { - // FIXME: to be cached - val sweep = WrapperLuaTable() - sweep.wrap( - "active", - { - val value = this.modulations[0].active - valueOf(value) - }, - { - val newValue = it.optboolean(false) - this.modulations[0].active = newValue - }, - ) - sweep.wrap( - "acceleration", - { valueOf((this.modulations[0] as Sweep).acceleration.toDouble()) }, - { (this.modulations[0] as Sweep).acceleration = it.optdouble(0.0).toFloat() }, - ) - sweep.wrap( - "sweep", - { valueOf((this.modulations[0] as Sweep).sweep.toDouble()) }, - { (this.modulations[0] as Sweep).sweep = it.optdouble(0.0).toFloat() }, - ) - sweep - } - obj.wrap("vibrato") { - // FIXME: to be cached - val vibrato = WrapperLuaTable() - vibrato.wrap( - "active", - { - val value = this.modulations[1].active - valueOf(value) - }, - { - val newValue = it.optboolean(false) - this.modulations[1].active = newValue - }, - ) - vibrato.wrap( - "frequency", - { valueOf((this.modulations[1] as Vibrato).vibratoFrequency.toDouble()) }, - { (this.modulations[1] as Vibrato).vibratoFrequency = it.optdouble(0.0).toFloat() }, - ) - vibrato.wrap( - "depth", - { valueOf((this.modulations[1] as Vibrato).depth.toDouble()) }, - { (this.modulations[1] as Vibrato).depth = it.optdouble(0.0).toFloat() }, - ) - vibrato - } - - obj.function1("noteOn") { noteName -> - val note = Note.fromName(noteName.tojstring()) - soundBoard.noteOn(note, this) - NONE - } - - obj.function1("noteOff") { noteName -> - val note = Note.fromName(noteName.tojstring()) - soundBoard.noteOff(note) - NONE - } - - obj.wrap("harmonics") { - WrapperLuaTable().apply { - (0 until this@toLua.harmonics.size).forEach { index -> - wrap( - "${index + 1}", - { valueOf(this@toLua.harmonics[index].toDouble()) }, - { this@toLua.harmonics[index] = it.tofloat() }, - ) - } - } - } - - // Cache the wrapper before returning - instrumentWrapperCache[index] = obj - return obj + private fun createInstrumentWrapper( + music: Music, + instrument: Instrument, + ): InstrumentLuaWrapper { + return InstrumentLuaWrapper(music, instrument, soundBoard) } } @TinyFunction("Access sfx using its index or its name.") - inner class bar : OneArgFunction() { + inner class sfx : OneArgFunction() { @TinyCall("Access sfx using its index or its name.") override fun call(arg: LuaValue): LuaValue { - val music = getCurrentMusic() + val sound = resourceAccess.findSound(0) ?: return NIL + val index = arg.checkint() - return music.musicalBars + return sound.data.music.musicalBars .getOrNull(index) - ?.toLua(music) ?: NIL - } - - fun MusicalBar.toLua(music: Music): LuaValue { - val obj = WrapperLuaTable() - - obj.wrap( - "index", - { valueOf(this.index) }, - ) - - obj.wrap( - "all", - { - val luaTable = LuaTable() - getCurrentMusic().musicalBars.map { it.index }.forEach { - luaTable.insert(0, valueOf(it)) - } - luaTable - }, - ) - - obj.wrap( - "bpm", - { valueOf(this.tempo) }, - { this.tempo = it.checkint() }, - ) - - obj.function1("set_volume") { arg -> - val beat = arg["beat"].todouble().toFloat() - val volume = arg["volume"].todouble().toFloat() - - this.setVolume(beat, volume) - - NONE - } - - obj.function1("set_note") { arg -> - val beat = arg["beat"].todouble().toFloat() - val note = Note.fromName(arg["note"].tojstring()) - val duration = arg["duration"].todouble().toFloat() - val uniqueOnBeat = arg["unique"].optboolean(false) - - this.setNote(note, beat, duration, uniqueOnBeat) - - NONE - } - - obj.function1("remove_note") { arg -> - val beat = arg["beat"].todouble().toFloat() - val note = Note.fromName(arg["note"].tojstring()) - - this.removeNote(note, beat) - - NONE - } - - obj.function1("note_data") { arg -> - val note = Note.fromName(arg.tojstring()) - - LuaTable().apply { - this.set("note", valueOf(note.name)) - this.set("notei", valueOf(note.index)) - this.set("octave", valueOf(note.octave)) - } - } - - obj.wrap("notes") { - val result = LuaTable() - this.beats.sortedBy { it.beat } - .map { - LuaTable().apply { - this.set("note", it.note?.name?.let { valueOf(it) } ?: NIL) - this.set("notei", it.note?.index?.let { valueOf(it) } ?: NIL) - this.set("octave", it.note?.octave?.let { valueOf(it) } ?: NIL) - this.set("volume", valueOf(it.volume.toDouble())) - this.set("beat", valueOf(it.beat.toDouble())) - this.set("duration", valueOf(it.duration.toDouble())) - } - }.forEachIndexed { index, value -> - result.insert(index + 1, value) - } - result - } - - obj.function0("play") { - val handler = soundBoard.prepare(this).also { it.play() } - val result = WrapperLuaTable() - result.function0("stop") { - handler.stop() - NONE - } - result - } - - obj.function1("set_instrument") { arg -> - if (arg.isnil()) { - this.instrument?.let { valueOf(it.index) } ?: NIL - } else { - // Set the instrument for the bar. - val index = arg.asInstrumentIndex(music) ?: return@function1 NIL - val instrument = music.instruments.getOrNull(index) ?: return@function1 NIL - this.instrument = instrument - this.instrumentIndex = instrument.index - NONE - } - } - obj.wrap("instrument") { - this.instrument?.index?.let { valueOf(it) } ?: NIL - } - - obj.function0("save") { - val sound = resourceAccess.findSound(0) ?: return@function0 NIL - val currentMusic = getCurrentMusic() - val data = Music.serialize(currentMusic) - - platform.saveIntoGameDirectory( - sound.name, - data, - ) - NONE - } - - obj.function0("export") { - val sound = soundBoard.convert(this) - platform.saveWave(sound) - NONE - } - - return obj - } - } - - @TinyFunction( - "Play the bar by it's index of the current sound. " + - "The index of a bar of the current music.", - ) - inner class play : OneArgFunction() { - @TinyCall("Play the sound at the index 0.") - override fun call(): LuaValue = super.call() - - @TinyCall("Play the sound by it's index.") - override fun call( - @TinyArg("sound") arg: LuaValue, - ): LuaValue { - val bars = getCurrentMusic().musicalBars - if (bars.isEmpty()) return NIL - - val index = if (arg.isnumber()) { - arg.checkint().coerceIn(0, bars.size - 1) - } else { - 0 - } - - if (playSound) { - // FIXME: - TODO("K") - /* - val soundData = resourceAccess.sound(currentSound)?.data - val sfx = soundData?.musicalBars?.getOrNull(index) ?: return NIL - - val handler = soundData.soundManager.createSoundHandler(sfx, sfx.size.toLong()) - handlers[SoundKey(currentSound, index)] = handler - handler.play() - - return NONE - - */ - } else { - return NIL - } - } - } - - @TinyFunction( - "Loop the bar by it's index of the current sound. " + - "The index of a bar of the current music.", - ) - inner class loop : OneArgFunction() { - @TinyCall("Loop the sound at the index 0.") - override fun call(): LuaValue = super.call() - - @TinyCall("Loop the sound by it's index.") - override fun call( - @TinyArg("sound") arg: LuaValue, - ): LuaValue { - val bars = getCurrentMusic().musicalBars - if (bars.isEmpty()) return NIL - - val index = if (arg.isnumber()) { - arg.checkint().coerceIn(0, bars.size - 1) - } else { - 0 - } - - if (playSound) { - // FIXME: - TODO("L") - /* - val soundData = resourceAccess.sound(currentSound)?.data - val sfx = soundData?.musicalBars?.getOrNull(index) ?: return NIL - - val handler = soundData.soundManager.createSoundHandler(sfx, sfx.size.toLong()) - handlers[SoundKey(currentSound, index)] = handler - handler.loop() - - return NONE - - */ - } else { - return NIL - } - } - } - - @TinyFunction( - "Stop the bar by it's index of the current sound. " + - "The index of a bar of the current music.", - ) - inner class stop : OneArgFunction() { - @TinyCall("Stop the sound at the index 0.") - override fun call(): LuaValue = super.call() - - @TinyCall("Stop the sound by it's index.") - override fun call( - @TinyArg("sound") arg: LuaValue, - ): LuaValue { - val bars = getCurrentMusic().musicalBars - if (bars.isEmpty()) return NIL - - val index = if (arg.isnumber()) { - arg.checkint().coerceIn(0, bars.size - 1) - } else { - 0 - } - - handlers[SoundKey(currentSound, index)]?.stop() ?: return NIL - return NONE - } - } - - @TinyFunction( - "Play the sequence by it's index of the current sound. " + - "The index of a sequence of the current music.", - ) - inner class mplay : OneArgFunction() { - @TinyCall("Play the sequence at the index 0.") - override fun call(): LuaValue = super.call() - - @TinyCall("Play the sequence by it's index.") - override fun call( - @TinyArg("sequence") arg: LuaValue, - ): LuaValue { - val sequences = getCurrentMusic().sequences - if (sequences.isEmpty()) return NIL - - val index = if (arg.isnumber()) { - arg.checkint().coerceIn(0, sequences.size - 1) - } else { - 0 - } - - if (playSound) { - // FIXME: - TODO("M") - /* - val soundData = resourceAccess.sound(currentSound)?.data - val sfx = soundData?.musicalSequences?.getOrNull(index) ?: return NIL - - val handler = soundData.soundManager.createSoundHandler(sfx, sfx.size.toLong()) - sequenceHandlers[SequenceKey(currentSound, index)] = handler - handler.play() - - return NONE - - */ - } else { - return NIL - } - } - } - - @TinyFunction( - "Loop the sequence by it's index of the current sound. " + - "The index of a sequence of the current music.", - ) - inner class mloop : OneArgFunction() { - @TinyCall("Loop the sequence at the index 0.") - override fun call(): LuaValue = super.call() - - @TinyCall("Loop the sequence by it's index.") - override fun call( - @TinyArg("sequence") arg: LuaValue, - ): LuaValue { - val sequences = getCurrentMusic().sequences - if (sequences.isEmpty()) return NIL - - val index = if (arg.isnumber()) { - arg.checkint().coerceIn(0, sequences.size - 1) - } else { - 0 - } - - if (playSound) { - // FIXME: - TODO("N") - /* - val soundData = resourceAccess.sound(currentSound)?.data - val sfx = soundData?.musicalSequences?.getOrNull(index) ?: return NIL - - val handler = soundData.soundManager.createSoundHandler(sfx, sfx.size.toLong()) - sequenceHandlers[SequenceKey(currentSound, index)] = handler - handler.loop() - - return NONE - - */ - } else { - return NIL - } - } - } - - @TinyFunction( - "Stop the sequence by it's index of the current sound. " + - "The index of a sequence of the current music.", - ) - inner class mstop : OneArgFunction() { - @TinyCall("Stop the sequence at the index 0.") - override fun call(): LuaValue = super.call() - - @TinyCall("Stop the sequence by it's index.") - override fun call( - @TinyArg("sequence") arg: LuaValue, - ): LuaValue { - val sequences = getCurrentMusic().sequences - if (sequences.isEmpty()) return NIL - - val index = if (arg.isnumber()) { - arg.checkint().coerceIn(0, sequences.size - 1) - } else { - 0 - } - - sequenceHandlers[SequenceKey(currentSound, index)]?.stop() ?: return NIL - return NONE + ?.let { SfxLuaWrapper(sound, it, soundBoard, platform) } ?: NIL } } @@ -884,8 +136,4 @@ class SfxLib( ?.index } } - - private fun LuaValue.asTrackIndex(music: Music): Int { - return this.checkint() % music.sequences[currentSequence].tracks.size - } } diff --git a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/ShapeLib.kt b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/ShapeLib.kt index baf29555..aade6249 100644 --- a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/ShapeLib.kt +++ b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/ShapeLib.kt @@ -1,5 +1,6 @@ package com.github.minigdx.tiny.lua +import com.github.mingdx.tiny.doc.LuaType import com.github.mingdx.tiny.doc.TinyArg import com.github.mingdx.tiny.doc.TinyArgs import com.github.mingdx.tiny.doc.TinyCall @@ -101,7 +102,10 @@ class ShapeLib( internal inner class rect : LibFunction() { @TinyCall("Draw a rectangle.") override fun invoke( - @TinyArgs(["x", "y", "width", "height", "color"]) args: Varargs, + @TinyArgs( + names = ["x", "y", "width", "height", "color"], + types = [LuaType.NUMBER, LuaType.NUMBER, LuaType.NUMBER, LuaType.NUMBER, LuaType.NUMBER], + ) args: Varargs, ): Varargs { val (x, y, width, height, color) = shape.rectArgs(args) ?: return NIL @@ -136,7 +140,10 @@ class ShapeLib( // cornerX: Int, cornerY: Int, width: Int, height: Int, color: Int @TinyCall("Draw a filled rectangle.") override fun invoke( - @TinyArgs(["x", "y", "width", "height", "color"]) args: Varargs, + @TinyArgs( + names = ["x", "y", "width", "height", "color"], + types = [LuaType.NUMBER, LuaType.NUMBER, LuaType.NUMBER, LuaType.NUMBER, LuaType.NUMBER], + ) args: Varargs, ): Varargs { val (x, y, width, height, color) = shape.rectArgs(args) ?: return NIL @@ -190,7 +197,10 @@ class ShapeLib( internal inner class line : LibFunction() { @TinyCall("Draw a line.") override fun invoke( - @TinyArgs(["x0", "y0", "x1", "y1", "color"]) + @TinyArgs( + names = ["x0", "y0", "x1", "y1", "color"], + types = [LuaType.NUMBER, LuaType.NUMBER, LuaType.NUMBER, LuaType.NUMBER, LuaType.NUMBER], + ) args: Varargs, ): Varargs { return when (args.narg()) { @@ -341,70 +351,63 @@ class ShapeLib( 0xEFBF, 0xEFFF, 0xFFFF, - ).map { v -> valueOf(v) } - - private val rectf = rectf() - - // private val dither = GfxLib(resourceAccess, gameOptions).dither() + ) @TinyCall("Draw a gradient using dithering, only from color c1 to color c2.") override fun invoke( @TinyArgs(["x", "y", "width", "height", "color1", "color2", "is_horizontal"]) args: Varargs, ): Varargs { - // FIXME: - TODO("O") - /* - if (args.narg() < 6) throw LuaError("Expected 6 args") - - val x = args.checkint(1) - val y = args.checkint(2) - val width = args.checkint(3) - val height = args.checkint(4) - - val color2 = args.arg(6).checkColorIndex() - - val isHorizontal = args.optboolean(7, false) - - // Draw the background color - rectf.invoke(arrayOf(args.arg(1), args.arg(2), args.arg(3), args.arg(4), args.arg(5))) - - val previous = dither.call() - dithering.forEachIndexed { index, pattern -> - if (isHorizontal) { - val xx = x + width * index / dithering.size - val xx2 = x + width * (index + 1) / dithering.size - dither.call(pattern) - rectf.invoke( - arrayOf( - valueOf(xx), - valueOf(y), - valueOf(xx2 - xx), - valueOf(height), - valueOf(color2), - ), - ) - } else { - val yy = y + height * index / dithering.size - val yy2 = y + height * (index + 1) / dithering.size - dither.call(pattern) - rectf.invoke( - arrayOf( - valueOf(x), - valueOf(yy), - valueOf(width), - valueOf(yy2 - yy), - valueOf(color2), - ), - ) - } - } - dither.call(previous) - - resourceAccess.addOp(FrameBufferOperation) - - return NIL - - */ + if (args.narg() < 6) throw LuaError("Expected 6 args") + + val x = args.checkint(1) + val y = args.checkint(2) + val width = args.checkint(3) + val height = args.checkint(4) + + val color2 = args.arg(6).checkColorIndex() + + val isHorizontal = args.optboolean(7, false) + + // Draw the background color + virtualFrameBuffer.drawRect( + args.arg(1).checkint(), + args.arg(2).checkint(), + args.arg(3).checkint(), + args.arg(4).checkint(), + args.arg(5).checkint(), + filled = true, + ) + + val previous = virtualFrameBuffer.dithering(0xFFFF) + dithering.forEachIndexed { index, pattern -> + if (isHorizontal) { + val xx = x + width * index / dithering.size + val xx2 = x + width * (index + 1) / dithering.size + virtualFrameBuffer.dithering(pattern) + virtualFrameBuffer.drawRect( + xx, + y, + xx2 - xx, + height, + color2, + filled = true, + ) + } else { + val yy = y + height * index / dithering.size + val yy2 = y + height * (index + 1) / dithering.size + virtualFrameBuffer.dithering(pattern) + virtualFrameBuffer.drawRect( + x, + yy, + width, + yy2 - yy, + color2, + filled = true, + ) + } + } + virtualFrameBuffer.dithering(previous) + return NIL } } } diff --git a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/SoundLib.kt b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/SoundLib.kt new file mode 100644 index 00000000..e563956c --- /dev/null +++ b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/SoundLib.kt @@ -0,0 +1,182 @@ +package com.github.minigdx.tiny.lua + +import com.github.mingdx.tiny.doc.LuaType +import com.github.mingdx.tiny.doc.TinyArg +import com.github.mingdx.tiny.doc.TinyCall +import com.github.mingdx.tiny.doc.TinyFunction +import com.github.mingdx.tiny.doc.TinyLib +import com.github.minigdx.tiny.engine.GameResourceAccess +import com.github.minigdx.tiny.sound.Instrument +import com.github.minigdx.tiny.sound.MusicalBar +import com.github.minigdx.tiny.sound.MusicalSequence +import com.github.minigdx.tiny.sound.VirtualSoundBoard +import org.luaj.vm2.LuaTable +import org.luaj.vm2.LuaValue +import org.luaj.vm2.lib.TwoArgFunction + +@TinyLib( + "sound", + """Sound API to play/loop/stop a sound. +A sound can be created using the sound editor, using the command line `tiny-cli sfx `. + +WARNING: Because of browser behaviour, a sound can *only* be played only after the first +user interaction. + +Avoid to start a music or a sound at the beginning of the game. +Before it, force the player to hit a key or click by adding an interactive menu +or by starting the sound as soon as the player is moving. +""", +) +class SoundLib( + private val resourceAccess: GameResourceAccess, + private val soundBoard: VirtualSoundBoard, + // When validating the script, don't play sound + private val playSound: Boolean = true, +) : TwoArgFunction() { + override fun call( + arg1: LuaValue, + arg2: LuaValue, + ): LuaValue { + val ctrl = LuaTable() + + ctrl.set("sfx", sfx()) + // TODO later :P + // ctrl.set("music", music()) + ctrl.set("note", note()) + + arg2.set("sound", ctrl) + arg2.get("package").get("loaded").set("sound", ctrl) + return ctrl + } + + @TinyFunction("Play a sfx.") + inner class sfx() : TwoArgFunction() { + @TinyCall("Play a sfx at sfx_index. The sfx can be looped.") + override fun call( + @TinyArg("sfx_index", type = LuaType.NUMBER) + arg1: LuaValue, + @TinyArg("loop", type = LuaType.BOOLEAN) + arg2: LuaValue, + ): LuaValue { + val loop = arg2.optboolean(false) + val sfx = getSfx(arg1.checkint()) + + val result = WrapperLuaTable() + if (playSound && sfx != null) { + val handler = soundBoard.prepare(sfx) + + result.function0("stop") { + handler.stop() + NONE + } + + if (loop) { + handler.loop() + } else { + handler.play() + } + } else { + result.function0("stop") { + NONE + } + } + return result + } + } + + @TinyFunction("Play a music") + inner class music() : TwoArgFunction() { + @TinyCall("Play the music at the index music_index. The music can be looped.") + override fun call( + @TinyArg("music_index", type = LuaType.NUMBER) + arg1: LuaValue, + @TinyArg("loop", type = LuaType.BOOLEAN) + arg2: LuaValue, + ): LuaValue { + val loop = arg2.optboolean(false) + val music = getMusic(arg1.checkint()) + val result = WrapperLuaTable() + if (playSound && music != null) { + val handler = soundBoard.prepare(music) + result.function0("stop") { + handler.stop() + NONE + } + + if (loop) { + handler.loop() + } else { + handler.play() + } + } else { + result.function0("stop") { + NONE + } + } + + return result + } + } + + @TinyFunction("Play a note by an instrument until it's stopped", example = NOTE_EXAMPLE) + inner class note() : TwoArgFunction() { + @TinyCall("Play the note note_name using the instrument at instrument_index") + override fun call( + @TinyArg("note_name", type = LuaType.STRING) + arg1: LuaValue, + @TinyArg("instrument_index", type = LuaType.NUMBER) + arg2: LuaValue, + ): LuaValue { + val note = Note.fromName(arg1.checkjstring()!!) + val instrumentIndex = arg2.optint(0) + val result = WrapperLuaTable() + result.function0("stop") { + soundBoard.noteOff(note) + NONE + } + val instrument = getInstrument(instrumentIndex) + if (playSound && instrument != null) { + soundBoard.noteOn(note, instrument) + } + return result + } + } + + private fun getInstrument(index: Int): Instrument? { + val instruments = resourceAccess.findSound(0) + ?.data + ?.music + ?.instruments ?: return null + return if (index in 0 until instruments.size) { + instruments[index] + } else { + null + } + } + + private fun getSfx(index: Int): MusicalBar? { + val sfx = resourceAccess.findSound(0) + ?.data + ?.music + ?.musicalBars ?: return null + + return if (index in 0 until sfx.size) { + sfx[index] + } else { + null + } + } + + private fun getMusic(index: Int): MusicalSequence? { + val music = resourceAccess.findSound(0) + ?.data + ?.music + ?.sequences ?: return null + + return if (index in 0 until music.size) { + music[index] + } else { + null + } + } +} diff --git a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/SoundLibExamples.kt b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/SoundLibExamples.kt new file mode 100644 index 00000000..aa9c6fcc --- /dev/null +++ b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/SoundLibExamples.kt @@ -0,0 +1,51 @@ +package com.github.minigdx.tiny.lua + +//language=Lua +const val NOTE_EXAMPLE = """ +function _init() + keys = { + {note="E4", x=57, y=100, w=16, h=50}, + {note="Fs4", x=75, y=100, w=16, h=50}, + {note="Gs4", x=93, y=100, w=16, h=50}, + {note="A4", x=111, y=100, w=16, h=50}, + {note="B4", x=129, y=100, w=16, h=50}, + {note="Cs5", x=147, y=100, w=16, h=50}, + {note="Ds5", x=165, y=100, w=16, h=50}, + {note="E5", x=183, y=100, w=16, h=50} + } + active_notes = {} +end + +function _update() + local touch = ctrl.touching(0) + + for i, key in ipairs(keys) do + if in_bounds(touch, key) then + active_notes[i] = active_notes[i] or sound.note(key.note, 1) + else + active_notes[i] = active_notes[i] and active_notes[i].stop() + end + end +end + +function _draw() + gfx.cls() + print("E MAJOR SCALE", 57, 84, 15) + print("Click keys to play", 57, 92, 14) + + for i, key in ipairs(keys) do + if active_notes[i] then + shape.rectf(key.x, key.y, key.w, key.h, 15) + else + shape.rect(key.x, key.y, key.w, key.h, 14) + end + end + local pos = ctrl.touch() + shape.circlef(pos.x, pos.y, 2, 2) +end + +function in_bounds(touch, key) + return touch and touch.x >= key.x and touch.x < key.x + key.w and + touch.y >= key.y and touch.y < key.y + key.h +end +""" diff --git a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/SprLib.kt b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/SprLib.kt index 182fd744..9206915e 100644 --- a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/SprLib.kt +++ b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/SprLib.kt @@ -83,9 +83,9 @@ class SprLib( private inner class pset : ThreeArgFunction() { @TinyCall("Set the color index at the coordinate (x,y) in the current spritesheet.") override fun call( - @TinyArg("x") arg1: LuaValue, - @TinyArg("y") arg2: LuaValue, - @TinyArg("color") arg3: LuaValue, + @TinyArg("x", type = LuaType.NUMBER) arg1: LuaValue, + @TinyArg("y", type = LuaType.NUMBER) arg2: LuaValue, + @TinyArg("color", type = LuaType.NUMBER) arg3: LuaValue, ): LuaValue { val x = arg1.checkint() val y = arg2.checkint() @@ -115,7 +115,7 @@ class SprLib( @TinyCall("Switch to the N spritesheet") override fun call( - @TinyArg("spritesheetN") arg: LuaValue, + @TinyArg("spritesheetN", type = LuaType.ANY) arg: LuaValue, ): LuaValue { val previousSpriteSheet = currentSpritesheet currentSpritesheet = if (arg.isnil()) { @@ -143,18 +143,18 @@ class SprLib( @TinyCall("Draw the full spritesheet at coordinate (x, y)") override fun call( - @TinyArg("x") a: LuaValue, - @TinyArg("y") b: LuaValue, + @TinyArg("x", type = LuaType.NUMBER) a: LuaValue, + @TinyArg("y", type = LuaType.NUMBER) b: LuaValue, ): LuaValue { return invoke(varargsOf(arrayOf(a, b, NIL, NIL, NIL, NIL, NIL, NIL))).arg1() } @TinyCall("Draw the full spritesheet at coordinate (x, y) from the sprite (sprX, sprY)") override fun call( - @TinyArg("x") a: LuaValue, - @TinyArg("y") b: LuaValue, - @TinyArg("sprX") c: LuaValue, - @TinyArg("sprY") d: LuaValue, + @TinyArg("x", type = LuaType.NUMBER) a: LuaValue, + @TinyArg("y", type = LuaType.NUMBER) b: LuaValue, + @TinyArg("sprX", type = LuaType.NUMBER) c: LuaValue, + @TinyArg("sprY", type = LuaType.NUMBER) d: LuaValue, ): LuaValue { return invoke(varargsOf(arrayOf(a, b, c, d, NIL, NIL, NIL, NIL))).arg1() } @@ -162,27 +162,27 @@ class SprLib( @TinyCall("Draw a fragment from the spritesheet at the coordinate (x, y) from the sprite (sprX, sprY) with the width and height.") override fun invoke( @TinyArgs( - arrayOf( - "x", - "y", - "sprX", - "sprY", - "width", - "height", - "flipX", - "flipY", - ), - documentations = - arrayOf( - "screen x coordinate to draw the sprite (default 0)", - "screen y coordinate to draw the sprite (default 0)", - "x coordinate from the spritesheet (default 0)", - "y coordinate from the spritesheet (default 0)", - "width of the spritesheet to copy (default width of the spritesheet)", - "height of the spritesheet to copy (default height of the spritesheet)", - "flip on the x axis (default: false)", - "flip on the y axis (default: false)", - ), + ["x", "y", "sprX", "sprY", "width", "height", "flipX", "flipY"], + documentations = [ + "screen x coordinate to draw the sprite (default 0)", + "screen y coordinate to draw the sprite (default 0)", + "x coordinate from the spritesheet (default 0)", + "y coordinate from the spritesheet (default 0)", + "width of the spritesheet to copy (default width of the spritesheet)", + "height of the spritesheet to copy (default height of the spritesheet)", + "flip on the x axis (default: false)", + "flip on the y axis (default: false)", + ], + types = [ + LuaType.NUMBER, + LuaType.NUMBER, + LuaType.NUMBER, + LuaType.NUMBER, + LuaType.NUMBER, + LuaType.NUMBER, + LuaType.BOOLEAN, + LuaType.BOOLEAN, + ], ) args: Varargs, ): Varargs { val spritesheet = resourceAccess.findSpritesheet(currentSpritesheet) ?: return NIL @@ -228,7 +228,10 @@ class SprLib( @TinyCall("Draw a sprite and allow flip on x or y axis.") override fun invoke( - @TinyArgs(["sprN", "x", "y", "flipX", "flipY"]) args: Varargs, + @TinyArgs( + names = ["sprN", "x", "y", "flipX", "flipY"], + types = [LuaType.NUMBER, LuaType.NUMBER, LuaType.NUMBER, LuaType.BOOLEAN, LuaType.BOOLEAN], + ) args: Varargs, ): Varargs { if (args.narg() < 1) return NIL val sprN = args.arg(1).checkint() diff --git a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/StdLib.kt b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/StdLib.kt index db8b9a6a..4cdc41a6 100644 --- a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/StdLib.kt +++ b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/StdLib.kt @@ -1,5 +1,6 @@ package com.github.minigdx.tiny.lua +import com.github.mingdx.tiny.doc.LuaType import com.github.mingdx.tiny.doc.TinyArg import com.github.mingdx.tiny.doc.TinyArgs import com.github.mingdx.tiny.doc.TinyCall @@ -43,15 +44,15 @@ class StdLib( inner class new : TwoArgFunction() { @TinyCall("Create new instance of class.") override fun call( - @TinyArg("class") arg: LuaValue, + @TinyArg("class", type = LuaType.TABLE) arg: LuaValue, ): LuaValue { return super.call(arg) } @TinyCall("Create new instance of class using default values.") override fun call( - @TinyArg("class") arg1: LuaValue, - @TinyArg("default") arg2: LuaValue, + @TinyArg("class", type = LuaType.TABLE) arg1: LuaValue, + @TinyArg("default", type = LuaType.TABLE) arg2: LuaValue, ): LuaValue { val default = if (arg2.istable()) { @@ -88,8 +89,8 @@ class StdLib( inner class merge : TwoArgFunction() { @TinyCall("Merge source into dest.") override fun call( - @TinyArg("source") arg1: LuaValue, - @TinyArg("dest") arg2: LuaValue, + @TinyArg("source", type = LuaType.TABLE) arg1: LuaValue, + @TinyArg("dest", type = LuaType.TABLE) arg2: LuaValue, ): LuaValue { return if (arg1.istable() and arg2.istable()) { arg1 as LuaTable @@ -114,8 +115,8 @@ class StdLib( inner class append : TwoArgFunction() { @TinyCall("Copy source into dest.") override fun call( - @TinyArg("source") arg1: LuaValue, - @TinyArg("dest") arg2: LuaValue, + @TinyArg("source", type = LuaType.TABLE) arg1: LuaValue, + @TinyArg("dest", type = LuaType.TABLE) arg2: LuaValue, ): LuaValue { return if (arg1.istable() and arg2.istable()) { arg1 as LuaTable @@ -141,7 +142,7 @@ class StdLib( internal inner class all : VarArgFunction() { @TinyCall("Iterate over the values of the table") override fun invoke( - @TinyArgs(["table"]) args: Varargs, + @TinyArgs(names = ["table"], types = [LuaType.TABLE]) args: Varargs, ): Varargs { val iterator = object : VarArgFunction() { @@ -179,7 +180,7 @@ class StdLib( internal inner class rpairs : VarArgFunction() { @TinyCall("Iterate over the values of the table") override fun invoke( - @TinyArgs(["table"]) args: Varargs, + @TinyArgs(names = ["table"], types = [LuaType.TABLE]) args: Varargs, ): Varargs { val iterator = object : VarArgFunction() { @@ -208,7 +209,7 @@ class StdLib( description = "print on the screen a string at (0,0) with a default color.", ) override fun call( - @TinyArg("str") a: LuaValue, + @TinyArg("str", type = LuaType.STRING) a: LuaValue, ): LuaValue { return call(a, valueOf(0), valueOf(0), valueOf("#FFFFFF")) } @@ -217,9 +218,9 @@ class StdLib( description = "print on the screen a string with a default color.", ) override fun call( - @TinyArg("str") a: LuaValue, - @TinyArg("x") b: LuaValue, - @TinyArg("y") c: LuaValue, + @TinyArg("str", type = LuaType.STRING) a: LuaValue, + @TinyArg("x", type = LuaType.NUMBER) b: LuaValue, + @TinyArg("y", type = LuaType.NUMBER) c: LuaValue, ): LuaValue { return call(a, b, c, valueOf("#FFFFFF")) } @@ -228,10 +229,10 @@ class StdLib( description = "print on the screen a string with a specific color.", ) override fun call( - @TinyArg("str") a: LuaValue, - @TinyArg("x") b: LuaValue, - @TinyArg("y") c: LuaValue, - @TinyArg("color") d: LuaValue, + @TinyArg("str", type = LuaType.STRING) a: LuaValue, + @TinyArg("x", type = LuaType.NUMBER) b: LuaValue, + @TinyArg("y", type = LuaType.NUMBER) c: LuaValue, + @TinyArg("color", type = LuaType.ANY) d: LuaValue, ): LuaValue { val spritesheet = resourceAccess.bootSpritesheet ?: return NONE val str = a.tojstring() diff --git a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/TinyLib.kt b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/TinyLib.kt index 04e6bc6a..36fe3487 100644 --- a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/TinyLib.kt +++ b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/TinyLib.kt @@ -1,5 +1,6 @@ package com.github.minigdx.tiny.lua +import com.github.mingdx.tiny.doc.LuaType import com.github.mingdx.tiny.doc.TinyArg import com.github.mingdx.tiny.doc.TinyCall import com.github.mingdx.tiny.doc.TinyFunction @@ -75,7 +76,7 @@ class TinyLib( internal inner class exit : OneArgFunction() { @TinyCall("Exit the actual script to switch to another one.") override fun call( - @TinyArg("scriptIndex") arg: LuaValue, + @TinyArg("scriptIndex", type = LuaType.ANY) arg: LuaValue, ): LuaValue { if (arg.isint()) { throw Exit(arg.toint()) diff --git a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/Vec2Lib.kt b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/Vec2Lib.kt index fd36b6b7..64b21fd3 100644 --- a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/Vec2Lib.kt +++ b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/Vec2Lib.kt @@ -1,5 +1,6 @@ package com.github.minigdx.tiny.lua +import com.github.mingdx.tiny.doc.LuaType import com.github.mingdx.tiny.doc.TinyArg import com.github.mingdx.tiny.doc.TinyCall import com.github.mingdx.tiny.doc.TinyFunction @@ -35,8 +36,8 @@ class Vec2Lib : TwoArgFunction() { class create : TwoArgFunction() { @TinyCall("Create a vector 2 as a table { x, y }.") override fun call( - @TinyArg("x") arg1: LuaValue, - @TinyArg("y") arg2: LuaValue, + @TinyArg("x", type = LuaType.NUMBER) arg1: LuaValue, + @TinyArg("y", type = LuaType.NUMBER) arg2: LuaValue, ): LuaValue { val (x, y) = extract(arg1, arg2) val defaultX = @@ -57,7 +58,7 @@ class Vec2Lib : TwoArgFunction() { @TinyCall("Create a vector 2 as a table { x, y } using another vector 2.") override fun call( - @TinyArg("vec2") arg: LuaValue, + @TinyArg("vec2", type = LuaType.TABLE) arg: LuaValue, ): LuaValue = super.call(arg) } @@ -73,16 +74,16 @@ class Vec2Lib : TwoArgFunction() { @TinyCall("Add a vector 2 {x, y} to another vector 2 {x, y}") override fun call( - @TinyArg("v1", "vector 2 as a table {x, y}") arg1: LuaValue, - @TinyArg("v2", "vector 2 as a table {x, y}") arg2: LuaValue, + @TinyArg("v1", "vector 2 as a table {x, y}", type = LuaType.TABLE) arg1: LuaValue, + @TinyArg("v2", "vector 2 as a table {x, y}", type = LuaType.TABLE) arg2: LuaValue, ): LuaValue = super.call(arg1, arg2) @TinyCall("Add a destructured vector 2 to another destructured vector 2") override fun call( - @TinyArg("x1") a: LuaValue, - @TinyArg("y1") b: LuaValue, - @TinyArg("x2") c: LuaValue, - @TinyArg("y2") d: LuaValue, + @TinyArg("x1", type = LuaType.NUMBER) a: LuaValue, + @TinyArg("y1", type = LuaType.NUMBER) b: LuaValue, + @TinyArg("x2", type = LuaType.NUMBER) c: LuaValue, + @TinyArg("y2", type = LuaType.NUMBER) d: LuaValue, ): LuaValue = super.call(a, b, c, d) } @@ -98,16 +99,16 @@ class Vec2Lib : TwoArgFunction() { @TinyCall("Subtract a vector 2 {x, y} from another vector 2 {x, y}") override fun call( - @TinyArg("v1", "vector 2 as a table {x, y}") arg1: LuaValue, - @TinyArg("v2", "vector 2 as a table {x, y}") arg2: LuaValue, + @TinyArg("v1", "vector 2 as a table {x, y}", type = LuaType.TABLE) arg1: LuaValue, + @TinyArg("v2", "vector 2 as a table {x, y}", type = LuaType.TABLE) arg2: LuaValue, ): LuaValue = super.call(arg1, arg2) @TinyCall("Subtract a destructured vector 2 from another destructured vector 2") override fun call( - @TinyArg("x1") a: LuaValue, - @TinyArg("y1") b: LuaValue, - @TinyArg("x2") c: LuaValue, - @TinyArg("y2") d: LuaValue, + @TinyArg("x1", type = LuaType.NUMBER) a: LuaValue, + @TinyArg("y1", type = LuaType.NUMBER) b: LuaValue, + @TinyArg("x2", type = LuaType.NUMBER) c: LuaValue, + @TinyArg("y2", type = LuaType.NUMBER) d: LuaValue, ): LuaValue = super.call(a, b, c, d) } @@ -120,16 +121,16 @@ class Vec2Lib : TwoArgFunction() { @TinyCall("Dot product between a vector 2 {x, y} and another vector 2 {x, y}") override fun call( - @TinyArg("v1", "vector 2 as a table {x, y}") a: LuaValue, - @TinyArg("v2", "vector 2 as a table {x, y}") b: LuaValue, + @TinyArg("v1", "vector 2 as a table {x, y}", type = LuaType.TABLE) a: LuaValue, + @TinyArg("v2", "vector 2 as a table {x, y}", type = LuaType.TABLE) b: LuaValue, ): LuaValue = super.call(a, b) @TinyCall("Dot product between a destructured vector 2 and another destructured vector 2") override fun call( - @TinyArg("x1") a: LuaValue, - @TinyArg("y1") b: LuaValue, - @TinyArg("x2") c: LuaValue, - @TinyArg("y2") d: LuaValue, + @TinyArg("x1", type = LuaType.NUMBER) a: LuaValue, + @TinyArg("y1", type = LuaType.NUMBER) b: LuaValue, + @TinyArg("x2", type = LuaType.NUMBER) c: LuaValue, + @TinyArg("y2", type = LuaType.NUMBER) d: LuaValue, ): LuaValue = super.call(a, b, c, d) } @@ -142,13 +143,13 @@ class Vec2Lib : TwoArgFunction() { @TinyCall("Calculate the magnitude (length) of a vector 2 {x, y}") override fun call( - @TinyArg("x") arg1: LuaValue, - @TinyArg("y") arg2: LuaValue, + @TinyArg("x", type = LuaType.NUMBER) arg1: LuaValue, + @TinyArg("y", type = LuaType.NUMBER) arg2: LuaValue, ): LuaValue = super.call(arg1, arg2) @TinyCall("Calculate the magnitude (length) of a vector 2 {x, y}") override fun call( - @TinyArg("v1", "vector 2 as a table {x, y}") arg: LuaValue, + @TinyArg("v1", "vector 2 as a table {x, y}", type = LuaType.TABLE) arg: LuaValue, ): LuaValue = super.call(arg) } @@ -166,13 +167,13 @@ class Vec2Lib : TwoArgFunction() { @TinyCall("Normalize a vector 2 {x, y}") override fun call( - @TinyArg("x") arg1: LuaValue, - @TinyArg("y") arg2: LuaValue, + @TinyArg("x", type = LuaType.NUMBER) arg1: LuaValue, + @TinyArg("y", type = LuaType.NUMBER) arg2: LuaValue, ): LuaValue = super.call(arg1, arg2) @TinyCall("Normalize a vector 2 {x, y}") override fun call( - @TinyArg("v1", "vector 2 as a table {x, y}") arg: LuaValue, + @TinyArg("v1", "vector 2 as a table {x, y}", type = LuaType.TABLE) arg: LuaValue, ): LuaValue = super.call(arg) } @@ -187,16 +188,16 @@ class Vec2Lib : TwoArgFunction() { @TinyCall("Cross product between a vector 2 {x, y} and another vector 2 {x, y}") override fun call( - @TinyArg("v1", "vector 2 as a table {x, y}") arg1: LuaValue, - @TinyArg("v2", "vector 2 as a table {x, y}") arg2: LuaValue, + @TinyArg("v1", "vector 2 as a table {x, y}", type = LuaType.TABLE) arg1: LuaValue, + @TinyArg("v2", "vector 2 as a table {x, y}", type = LuaType.TABLE) arg2: LuaValue, ): LuaValue = super.call(arg1, arg2) @TinyCall("Cross product between a destructured vector 2 and another destructured vector 2") override fun call( - @TinyArg("x1") a: LuaValue, - @TinyArg("y1") b: LuaValue, - @TinyArg("x2") c: LuaValue, - @TinyArg("y2") d: LuaValue, + @TinyArg("x1", type = LuaType.NUMBER) a: LuaValue, + @TinyArg("y1", type = LuaType.NUMBER) b: LuaValue, + @TinyArg("x2", type = LuaType.NUMBER) c: LuaValue, + @TinyArg("y2", type = LuaType.NUMBER) d: LuaValue, ): LuaValue = super.call(a, b, c, d) } @@ -209,15 +210,15 @@ class Vec2Lib : TwoArgFunction() { @TinyCall("Scale a vector 2 {x, y} using the factor scl") override fun call( - @TinyArg("x") arg1: LuaValue, - @TinyArg("y") arg2: LuaValue, - @TinyArg("scl") arg3: LuaValue, + @TinyArg("x", type = LuaType.NUMBER) arg1: LuaValue, + @TinyArg("y", type = LuaType.NUMBER) arg2: LuaValue, + @TinyArg("scl", type = LuaType.NUMBER) arg3: LuaValue, ): LuaValue = super.call(arg1, arg2, arg3) @TinyCall("Scale a vector 2 {x, y} using the factor scl") override fun call( - @TinyArg("v1", "vector 2 as a table {x, y}") arg1: LuaValue, - @TinyArg("scl") arg2: LuaValue, + @TinyArg("v1", "vector 2 as a table {x, y}", type = LuaType.TABLE) arg1: LuaValue, + @TinyArg("scl", type = LuaType.NUMBER) arg2: LuaValue, ): LuaValue = super.call(arg1, arg2) } diff --git a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/Vec2LibExamples.kt b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/Vec2LibExamples.kt index b074d191..c56a0820 100644 --- a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/Vec2LibExamples.kt +++ b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/Vec2LibExamples.kt @@ -8,7 +8,7 @@ function _init() local v1 = vec2.create(32, 38) local v2 = vec2.create(20, 2) - gfx.cls() + gfx.cls(1) print("v1", 2, 15, 10) shape.line(0, 0, v1.x, v1.y, 10) print("v2", 23, 3, 9) @@ -31,7 +31,7 @@ function _init() local v1 = vec2.create(32, 38) local v2 = vec2.create(20, 2) - gfx.cls() + gfx.cls(1) print("v1", 18, 15, 10) shape.line(0, 0, v1.x, v1.y, 10) print("v2", 23, 3, 9) @@ -54,7 +54,7 @@ function _init() local v1 = vec2.create(32, 38) local v2 = vec2.scl(v1, 2) - gfx.cls() + gfx.cls(1) print("v1 scaled", 8, 60, 11) gfx.dither(0xAAAA) shape.line(0, 0, v2.x, v2.y, 11) @@ -83,7 +83,7 @@ function _update() local scl = vec2.scl(v1, dot) - gfx.cls() + gfx.cls(1) local scaledv1 = vec2.scl(v1, 64) local scaledv2 = vec2.scl(v2, 64) @@ -102,7 +102,7 @@ end //language=Lua const val VECTOR_NOR = """ function _update() - gfx.cls() + gfx.cls(1) local v0 = vec2.create(43, 64) local v1 = vec2.nor(v0) diff --git a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/WrapperLuaTable.kt b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/WrapperLuaTable.kt index aa912694..d1245033 100644 --- a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/WrapperLuaTable.kt +++ b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/WrapperLuaTable.kt @@ -13,7 +13,7 @@ typealias Setter = (LuaValue) -> Unit /** * LuaTable that give convenient methods to "wrap" a Kotlin object */ -class WrapperLuaTable : LuaTable() { +open class WrapperLuaTable : LuaTable() { private val getters: MutableMap = mutableMapOf() private val setters: MutableMap = mutableMapOf() diff --git a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/sfx/InstrumentLuaWrapper.kt b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/sfx/InstrumentLuaWrapper.kt new file mode 100644 index 00000000..3aa5d976 --- /dev/null +++ b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/sfx/InstrumentLuaWrapper.kt @@ -0,0 +1,147 @@ +package com.github.minigdx.tiny.lua.sfx + +import com.github.minigdx.tiny.lua.Note +import com.github.minigdx.tiny.lua.WrapperLuaTable +import com.github.minigdx.tiny.sound.Instrument +import com.github.minigdx.tiny.sound.Music +import com.github.minigdx.tiny.sound.Sweep +import com.github.minigdx.tiny.sound.Vibrato +import com.github.minigdx.tiny.sound.VirtualSoundBoard +import org.luaj.vm2.LuaTable + +class InstrumentLuaWrapper( + private val music: Music, + private val instrument: Instrument, + private val soundBoard: VirtualSoundBoard, +) : WrapperLuaTable() { + init { + wrap( + "index", + { valueOf(instrument.index) }, + ) + + wrap("all") { + val luaTable = LuaTable() + music.instruments.mapNotNull { it?.index }.forEach { + luaTable.insert(0, valueOf(it)) + } + luaTable + } + + wrap( + "name", + { instrument.name?.let { valueOf(it) } ?: NIL }, + { instrument.name = it.optjstring(null) }, + ) + + wrap( + "wave", + { valueOf(instrument.wave.name) }, + { + instrument.wave = it.checkjstring() + ?.let { Instrument.WaveType.valueOf(it) } + ?: Instrument.WaveType.SINE + }, + ) + + wrap( + "attack", + { valueOf(instrument.attack.toDouble()) }, + { instrument.attack = it.optdouble(0.0).toFloat() }, + ) + + wrap( + "decay", + { valueOf(instrument.decay.toDouble()) }, + { instrument.decay = it.optdouble(0.0).toFloat() }, + ) + + wrap( + "sustain", + { valueOf(instrument.sustain.toDouble()) }, + { instrument.sustain = it.optdouble(0.0).toFloat() }, + ) + + wrap( + "release", + { valueOf(instrument.release.toDouble()) }, + { instrument.release = it.optdouble(0.0).toFloat() }, + ) + + wrap("sweep") { + val sweep = WrapperLuaTable() + sweep.wrap( + "active", + { + val value = instrument.modulations[0].active + valueOf(value) + }, + { + val newValue = it.optboolean(false) + instrument.modulations[0].active = newValue + }, + ) + sweep.wrap( + "acceleration", + { valueOf((instrument.modulations[0] as Sweep).acceleration.toDouble()) }, + { (instrument.modulations[0] as Sweep).acceleration = it.optdouble(0.0).toFloat() }, + ) + sweep.wrap( + "sweep", + { valueOf((instrument.modulations[0] as Sweep).sweep.toDouble()) }, + { (instrument.modulations[0] as Sweep).sweep = it.optdouble(0.0).toFloat() }, + ) + sweep + } + + wrap("vibrato") { + val vibrato = WrapperLuaTable() + vibrato.wrap( + "active", + { + val value = instrument.modulations[1].active + valueOf(value) + }, + { + val newValue = it.optboolean(false) + instrument.modulations[1].active = newValue + }, + ) + vibrato.wrap( + "frequency", + { valueOf((instrument.modulations[1] as Vibrato).vibratoFrequency.toDouble()) }, + { (instrument.modulations[1] as Vibrato).vibratoFrequency = it.optdouble(0.0).toFloat() }, + ) + vibrato.wrap( + "depth", + { valueOf((instrument.modulations[1] as Vibrato).depth.toDouble()) }, + { (instrument.modulations[1] as Vibrato).depth = it.optdouble(0.0).toFloat() }, + ) + vibrato + } + + function1("note_on") { noteName -> + val note = Note.fromName(noteName.tojstring()) + soundBoard.noteOn(note, instrument) + NONE + } + + function1("note_off") { noteName -> + val note = Note.fromName(noteName.tojstring()) + soundBoard.noteOff(note) + NONE + } + + wrap("harmonics") { + WrapperLuaTable().apply { + (0 until instrument.harmonics.size).forEach { index -> + wrap( + "${index + 1}", + { valueOf(instrument.harmonics[index].toDouble()) }, + { instrument.harmonics[index] = it.tofloat() }, + ) + } + } + } + } +} diff --git a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/sfx/SfxLuaWrapper.kt b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/sfx/SfxLuaWrapper.kt new file mode 100644 index 00000000..e736d60d --- /dev/null +++ b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/sfx/SfxLuaWrapper.kt @@ -0,0 +1,129 @@ +package com.github.minigdx.tiny.lua.sfx + +import com.github.minigdx.tiny.lua.Note +import com.github.minigdx.tiny.lua.WrapperLuaTable +import com.github.minigdx.tiny.platform.Platform +import com.github.minigdx.tiny.resources.Sound +import com.github.minigdx.tiny.sound.MusicalBar +import com.github.minigdx.tiny.sound.VirtualSoundBoard +import org.luaj.vm2.LuaTable + +class SfxLuaWrapper( + private val origin: Sound, + private val sfx: MusicalBar, + private val soundBoard: VirtualSoundBoard, + private val platform: Platform, +) : WrapperLuaTable() { + init { + wrap( + "index", + { valueOf(sfx.index) }, + ) + + wrap( + "all", + { + val luaTable = LuaTable() + origin.data.music.musicalBars.map { it.index }.forEach { + luaTable.insert(0, valueOf(it)) + } + luaTable + }, + ) + + wrap( + "bpm", + { valueOf(sfx.tempo) }, + { sfx.tempo = it.checkint() }, + ) + + function1("set_volume") { arg -> + val beat = arg["beat"].todouble().toFloat() + val volume = arg["volume"].todouble().toFloat() + + sfx.setVolume(beat, volume) + + NONE + } + + function1("set_note") { arg -> + val beat = arg["beat"].todouble().toFloat() + val note = Note.Companion.fromName(arg["note"].tojstring()) + val duration = arg["duration"].todouble().toFloat() + val uniqueOnBeat = arg["unique"].optboolean(false) + + sfx.setNote(note, beat, duration, uniqueOnBeat) + + NONE + } + + function1("remove_note") { arg -> + val beat = arg["beat"].todouble().toFloat() + val note = Note.Companion.fromName(arg["note"].tojstring()) + + sfx.removeNote(note, beat) + + NONE + } + + function1("note_data") { arg -> + val note = Note.Companion.fromName(arg.tojstring()) + + LuaTable().apply { + this.set("note", valueOf(note.name)) + this.set("notei", valueOf(note.index)) + this.set("octave", valueOf(note.octave)) + } + } + + wrap("notes") { + val result = LuaTable() + sfx.beats.sortedBy { it.beat } + .map { + LuaTable().apply { + this.set("note", it.note?.name?.let { valueOf(it) } ?: NIL) + this.set("notei", it.note?.index?.let { valueOf(it) } ?: NIL) + this.set("octave", it.note?.octave?.let { valueOf(it) } ?: NIL) + this.set("volume", valueOf(it.volume.toDouble())) + this.set("beat", valueOf(it.beat.toDouble())) + this.set("duration", valueOf(it.duration.toDouble())) + } + }.forEachIndexed { index, value -> + result.insert(index + 1, value) + } + result + } + + function0("play") { + val handler = soundBoard.prepare(sfx).also { it.play() } + val result = WrapperLuaTable() + result.function0("stop") { + handler.stop() + NONE + } + result + } + + function1("set_instrument") { arg -> + if (arg.isnil()) { + sfx.instrument?.let { valueOf(it.index) } ?: NIL + } else { + val index = arg.checkint() + val instrument = origin.data.music.instruments.getOrNull(index) ?: return@function1 NIL + sfx.instrument = instrument + sfx.instrumentIndex = instrument.index + NONE + } + } + + wrap("instrument") { + sfx.instrument?.index?.let { valueOf(it) } ?: NIL + } + + function0("export") { + val sound = soundBoard.convert(sfx) + platform.saveWave(sound) + NONE + } + } +} diff --git a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/platform/ImageData.kt b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/platform/ImageData.kt new file mode 100644 index 00000000..0051dbb7 --- /dev/null +++ b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/platform/ImageData.kt @@ -0,0 +1,12 @@ +package com.github.minigdx.tiny.platform + +import com.github.minigdx.tiny.Pixel + +class ImageData( + // Array of byte of RGBA color + val data: ByteArray, + // Width of the Image + val width: Pixel, + // Height of the Image + val height: Pixel, +) diff --git a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/platform/Platform.kt b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/platform/Platform.kt index b71c9cf4..edc829a6 100644 --- a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/platform/Platform.kt +++ b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/platform/Platform.kt @@ -1,37 +1,15 @@ package com.github.minigdx.tiny.platform import com.danielgergely.kgl.Kgl -import com.github.minigdx.tiny.Pixel import com.github.minigdx.tiny.engine.GameLoop import com.github.minigdx.tiny.engine.GameOptions import com.github.minigdx.tiny.file.SourceStream import com.github.minigdx.tiny.input.InputHandler import com.github.minigdx.tiny.input.InputManager import com.github.minigdx.tiny.platform.performance.PerformanceMonitor -import com.github.minigdx.tiny.sound.Music import com.github.minigdx.tiny.sound.SoundManager import kotlinx.coroutines.CoroutineDispatcher -class ImageData( - // Array of byte of RGBA color - val data: ByteArray, - // Width of the Image - val width: Pixel, - // Height of the Image - val height: Pixel, -) - -class SoundData( - // Name of the file. - val name: String, - // Deserialized data of the file. - val music: Music, - // Ready to play musical bars. (sfx) - val musicalBars: List, - // Ready to play musical sequences (music) - val musicalSequences: List = emptyList(), -) - interface Platform { /** * Game Option from the game. diff --git a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/platform/SoundData.kt b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/platform/SoundData.kt new file mode 100644 index 00000000..6d3ced8d --- /dev/null +++ b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/platform/SoundData.kt @@ -0,0 +1,32 @@ +package com.github.minigdx.tiny.platform + +import com.github.minigdx.tiny.lua.Note +import com.github.minigdx.tiny.sound.Music + +class SoundData( + // Name of the file. + val name: String, + // Deserialized data of the file. + val music: Music, + // Ready to play musical bars. (sfx) + val musicalBars: List, + // Ready to play musical sequences (music) + val musicalSequences: List = emptyList(), +) { + companion object { + val DEFAULT_EMPTY = SoundData( + "default", + Music(), + emptyList(), + ) + + val DEFAULT_SFX = SoundData( + "default", + Music().apply { + musicalBars[0].setNote(Note.E4, 0f, 0.5f) + musicalBars[0].setNote(Note.G4, 1f, 0.5f) + }, + emptyList(), + ) + } +} diff --git a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/render/DefaultVirtualFrameBuffer.kt b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/render/DefaultVirtualFrameBuffer.kt index 2578a2fb..7c8ef024 100644 --- a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/render/DefaultVirtualFrameBuffer.kt +++ b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/render/DefaultVirtualFrameBuffer.kt @@ -35,8 +35,9 @@ import com.danielgergely.kgl.Kgl import com.github.minigdx.tiny.ColorIndex import com.github.minigdx.tiny.Pixel import com.github.minigdx.tiny.engine.GameOptions -import com.github.minigdx.tiny.graphic.FrameBuffer +import com.github.minigdx.tiny.graphic.FrameBufferParameters import com.github.minigdx.tiny.graphic.PixelFormat +import com.github.minigdx.tiny.input.internal.ObjectPool import com.github.minigdx.tiny.platform.DrawingMode import com.github.minigdx.tiny.platform.WindowManager import com.github.minigdx.tiny.platform.performance.PerformanceMonitor @@ -53,6 +54,9 @@ import com.github.minigdx.tiny.render.gl.OpenGLFrame import com.github.minigdx.tiny.render.gl.PrimitiveBatchStage import com.github.minigdx.tiny.render.gl.SpriteBatchStage import com.github.minigdx.tiny.resources.SpriteSheet +import kotlin.math.abs +import kotlin.math.max +import kotlin.math.min class DefaultVirtualFrameBuffer( private val kgl: Kgl, @@ -77,12 +81,12 @@ class DefaultVirtualFrameBuffer( ) private val primitiveBatchManager = BatchManager( - keyGenerator = { PrimitiveKey }, + keyGenerator = { PrimitiveKey() }, instanceGenerator = { PrimitiveInstance() }, batchGenerator = { PrimitiveBatch() }, ) - private val primitiveBuffer = FrameBuffer( + private val parameters = FrameBufferParameters( gameOptions.width, gameOptions.height, gameOptions.colors(), @@ -90,6 +94,16 @@ class DefaultVirtualFrameBuffer( private val monocolors = createFontPalettes() + private val boundingBoxPool = object : ObjectPool(100) { + override fun newInstance(): BoundingBox { + return BoundingBox(0, 0, 0, 0) + } + + override fun destroyInstance(obj: BoundingBox) { + obj.reset() + } + } + override fun init(windowManager: WindowManager) { spriteBatchStage.init() primitiveBatchStage.init() @@ -164,16 +178,18 @@ class DefaultVirtualFrameBuffer( destinationY: Pixel, flipX: Boolean, flipY: Boolean, - ) { + ) = isInFrame(destinationX, destinationY, sourceWidth, sourceHeight) { invalidateCachedReadFrame() updateDepthIndex(source) + + val palColor = parameters.blender.palette()[color] + val key = spriteBatchManager.createKey() key.set( source, - primitiveBuffer.blender.dithering, - monocolors[color], - primitiveBuffer.camera, - primitiveBuffer.clipper, + parameters.blender.dithering, + monocolors[palColor], + parameters.clipper(), ) val instance = spriteBatchManager.createInstance() instance.set( @@ -181,8 +197,8 @@ class DefaultVirtualFrameBuffer( sourceY, sourceWidth, sourceHeight, - destinationX, - destinationY, + destinationX - parameters.camera.x, + destinationY - parameters.camera.y, flipX, flipY, currentDepth, @@ -200,17 +216,15 @@ class DefaultVirtualFrameBuffer( destinationY: Pixel, flipX: Boolean, flipY: Boolean, - ) { + ) = isInFrame(destinationX, destinationY, sourceWidth, sourceHeight) { invalidateCachedReadFrame() updateDepthIndex(source) val key = spriteBatchManager.createKey() key.set( source, - primitiveBuffer.blender.dithering, - // TODO: changing pal might not be working as the array is the same. - primitiveBuffer.blender.switch, - primitiveBuffer.camera, - primitiveBuffer.clipper, + parameters.blender.dithering, + parameters.blender.palette(), + parameters.clipper(), ) val instance = spriteBatchManager.createInstance() instance.set( @@ -218,8 +232,8 @@ class DefaultVirtualFrameBuffer( sourceY, sourceWidth, sourceHeight, - destinationX, - destinationY, + destinationX - parameters.camera.x, + destinationY - parameters.camera.y, flipX, flipY, currentDepth, @@ -232,20 +246,20 @@ class DefaultVirtualFrameBuffer( y: Pixel, width: Pixel, height: Pixel, - colorIndex: ColorIndex, + color: ColorIndex, filled: Boolean, - ) { + ) = isInFrame(x, y, width, height) { invalidateCachedReadFrame() updateDepthIndex(null) - val key = primitiveBatchManager.createKey() + val key = primitiveBatchManager.createKey().set(parameters.clipper()) val instance = primitiveBatchManager.createInstance().setRect( - x, - y, + x - parameters.camera.x, + y - parameters.camera.y, width, height, filled = filled, - color = colorIndex, - dither = primitiveBuffer.blender.dithering, + color = parameters.blender.palette()[color], + dither = parameters.blender.dithering, depth = currentDepth, ) primitiveBatchManager.submit(key, instance) @@ -256,18 +270,23 @@ class DefaultVirtualFrameBuffer( y1: Pixel, x2: Pixel, y2: Pixel, - colorIndex: ColorIndex, + color: ColorIndex, + ) = isInFrame( + x = min(x1, x2), + y = min(y1, y2), + width = abs(x2 - x1) + 1, + height = abs(y2 - y1) + 1, ) { invalidateCachedReadFrame() updateDepthIndex(null) - val key = primitiveBatchManager.createKey() + val key = primitiveBatchManager.createKey().set(parameters.clipper()) val instance = primitiveBatchManager.createInstance().setLine( - x1, - y1, - x2, - y2, - color = colorIndex, - dither = primitiveBuffer.blender.dithering, + x1 - parameters.camera.x, + y1 - parameters.camera.y, + x2 - parameters.camera.x, + y2 - parameters.camera.y, + color = parameters.blender.palette()[color], + dither = parameters.blender.dithering, depth = currentDepth, ) primitiveBatchManager.submit(key, instance) @@ -279,17 +298,17 @@ class DefaultVirtualFrameBuffer( radius: Pixel, color: ColorIndex, filled: Boolean, - ) { + ) = isInFrame(centerX - radius, centerY - radius, radius * 2, radius * 2) { invalidateCachedReadFrame() updateDepthIndex(null) - val key = primitiveBatchManager.createKey() + val key = primitiveBatchManager.createKey().set(parameters.clipper()) val instance = primitiveBatchManager.createInstance().setCircle( - centerX, - centerY, + centerX - parameters.camera.x, + centerY - parameters.camera.y, radius, filled = filled, - color = color, - dither = primitiveBuffer.blender.dithering, + color = parameters.blender.palette()[color], + dither = parameters.blender.dithering, depth = currentDepth, ) primitiveBatchManager.submit(key, instance) @@ -299,15 +318,15 @@ class DefaultVirtualFrameBuffer( x: Pixel, y: Pixel, color: ColorIndex, - ) { + ) = isInFrame(x, y, 1, 1) { invalidateCachedReadFrame() updateDepthIndex(null) - val key = primitiveBatchManager.createKey() + val key = primitiveBatchManager.createKey().set(parameters.clipper()) val instance = primitiveBatchManager.createInstance().setPoint( - x, - y, - color = color, - dither = primitiveBuffer.blender.dithering, + x - parameters.camera.x, + y - parameters.camera.y, + color = parameters.blender.palette()[color], + dither = parameters.blender.dithering, depth = currentDepth, ) primitiveBatchManager.submit(key, instance) @@ -323,22 +342,33 @@ class DefaultVirtualFrameBuffer( color: ColorIndex, filled: Boolean, ) { - invalidateCachedReadFrame() - updateDepthIndex(null) - val key = primitiveBatchManager.createKey() - val instance = primitiveBatchManager.createInstance().setTriangle( - x1, - y1, - x2, - y2, - x3, - y3, - color, - primitiveBuffer.blender.dithering, - filled, - depth = currentDepth, - ) - primitiveBatchManager.submit(key, instance) + val x = min(min(x1, x2), x3) + val y = min(min(y1, y2), y3) + val width = max(max(x1, x2), x3) - x + val height = max(max(y1, y2), y3) - y + isInFrame( + x = x, + y = y, + width = width, + height = height, + ) { + invalidateCachedReadFrame() + updateDepthIndex(null) + val key = primitiveBatchManager.createKey().set(parameters.clipper()) + val instance = primitiveBatchManager.createInstance().setTriangle( + x1 - parameters.camera.x, + y1 - parameters.camera.y, + x2 - parameters.camera.x, + y2 - parameters.camera.y, + x3 - parameters.camera.x, + y3 - parameters.camera.y, + parameters.blender.palette()[color], + parameters.blender.dithering, + filled, + depth = currentDepth, + ) + primitiveBatchManager.submit(key, instance) + } } private fun renderAllInFrameBuffer() { @@ -407,8 +437,8 @@ class DefaultVirtualFrameBuffer( } override fun dithering(dither: Int): Int { - val actual = primitiveBuffer.blender.dithering - primitiveBuffer.blender.dithering = dither + val actual = parameters.blender.dithering + parameters.blender.dithering = dither return actual } @@ -440,29 +470,29 @@ class DefaultVirtualFrameBuffer( } override fun resetPalette() { - primitiveBuffer.blender.pal() + parameters.blender.pal() } override fun swapPalette( source: Int, target: Int, ) { - primitiveBuffer.blender.pal(source, target) + parameters.blender.pal(source, target) } override fun setCamera( x: Int, y: Int, ) { - primitiveBuffer.camera.set(x, y) + parameters.camera.set(x, y) } override fun getCamera(): Pair { - return primitiveBuffer.camera.x to primitiveBuffer.camera.y + return parameters.camera.x to parameters.camera.y } override fun resetCamera() { - primitiveBuffer.camera.set(0, 0) + parameters.camera.set(0, 0) } override fun setClip( @@ -471,11 +501,11 @@ class DefaultVirtualFrameBuffer( width: Int, height: Int, ) { - primitiveBuffer.clipper.set(x, y, width, height) + parameters.clipper.set(x, y, width, height) } override fun resetClip() { - primitiveBuffer.clipper.reset() + parameters.clipper.reset() } override fun setDrawMode(mode: DrawingMode) { @@ -540,6 +570,90 @@ class DefaultVirtualFrameBuffer( kgl.bindFramebuffer(GL_FRAMEBUFFER, null) } + /** + * perform the action if the entity describe by the bounding box (x, y, width, height) + * is in the clip zone of the camera. + * + * Do nothing otherwise. + */ + private fun isInFrame( + x: Int, + y: Int, + width: Int, + height: Int, + action: () -> Unit, + ) { + val obj = boundingBoxPool.obtain().set(x, y, width, height) + val camera = boundingBoxPool.obtain().set( + x = parameters.camera.x, + y = parameters.camera.y, + width = gameOptions.width, + height = gameOptions.height, + ) + val clipper = boundingBoxPool.obtain().set( + x = parameters.clipper.left, + y = parameters.clipper.top, + width = parameters.clipper.width, + height = parameters.clipper.height, + ) + + val drawingZone = boundingBoxPool.obtain() + + intersection(camera, clipper, drawingZone) + + if (overlap(obj, drawingZone)) { + action() + } + + boundingBoxPool.free(obj, camera, clipper, drawingZone) + } + + data class BoundingBox(var x: Int, var y: Int, var width: Int, var height: Int) { + fun reset() { + set(0, 0, 0, 0) + } + + fun set( + x: Int, + y: Int, + width: Int, + height: Int, + ): BoundingBox { + this.x = x + this.y = y + this.width = width + this.height = height + return this + } + } + + private fun intersection( + a: BoundingBox, + b: BoundingBox, + result: BoundingBox, + ) { + val x1 = maxOf(a.x, b.x) + val y1 = maxOf(a.y, b.y) + val x2 = minOf(a.x + a.width, b.x + b.width) + val y2 = minOf(a.y + a.height, b.y + b.height) + + result.x = x1 + result.y = y1 + result.width = maxOf(0, x2 - x1) + result.height = maxOf(0, y2 - y1) + } + + private fun overlap( + a: BoundingBox, + b: BoundingBox, + ): Boolean { + val result = boundingBoxPool.obtain() + intersection(a, b, result) + val isOverlap = result.width > 0 && result.height > 0 + boundingBoxPool.free(result) + return isOverlap + } + companion object { private const val DEPTH_STEP = 0.0001f } diff --git a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/render/VirtualFrameBuffer.kt b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/render/VirtualFrameBuffer.kt index fddc727b..7859c266 100644 --- a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/render/VirtualFrameBuffer.kt +++ b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/render/VirtualFrameBuffer.kt @@ -61,7 +61,7 @@ interface VirtualFrameBuffer { y: Pixel, width: Pixel, height: Pixel, - colorIndex: ColorIndex, + color: ColorIndex, filled: Boolean, ) @@ -73,7 +73,7 @@ interface VirtualFrameBuffer { y1: Pixel, x2: Pixel, y2: Pixel, - colorIndex: ColorIndex, + color: ColorIndex, ) /** diff --git a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/render/batch/PrimitiveInstance.kt b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/render/batch/PrimitiveInstance.kt index 72db1214..85e0ffa8 100644 --- a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/render/batch/PrimitiveInstance.kt +++ b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/render/batch/PrimitiveInstance.kt @@ -55,21 +55,30 @@ class PrimitiveInstance( type = 1 // Find the most left x coordinate meshX = min(min(x1, x2), x3) - // Find the most botton coordinate + // Find the topmost y coordinate (minimum y value) meshY = min(min(y1, y2), y3) - meshWidth = max(max(x1, x2), x3) - meshX - meshHeight = max(max(y1, y2), y3) - meshY + meshWidth = max(max(x1, x2), x3) - meshX + 1 + meshHeight = max(max(y1, y2), y3) - meshY + 1 - // Set the edges the lines are always from left to right - val (a, b, c) = listOf(x1 to y1, x2 to y2, x3 to y3).sortedBy { it.first } + // The shader creates three edges from vertices: p0→p1, p0→p2, p1→p2 + // We need to arrange the original triangle vertices (v1, v2, v3) as (p0, p1, p2) + // such that all three shader edges go from left to right - // Set the triangle inside the mesh - parameters[0] = a.first - parameters[1] = a.second - parameters[2] = b.first - parameters[3] = b.second - parameters[4] = c.first - parameters[5] = c.second + // Sort vertices by x-coordinate to get leftmost, middle, rightmost + val sortedVertices = listOf(x1 to y1, x2 to y2, x3 to y3).sortedBy { it.first } + val left = sortedVertices[0] + val middle = sortedVertices[1] + val right = sortedVertices[2] + + // Assign p0=leftmost ensures p0→p1 and p0→p2 go left-to-right + // Assign p1=middle, p2=right ensures p1→p2 goes left-to-right + // All three shader edges (p0→p1, p0→p2, p1→p2) now go left-to-right + parameters[0] = left.first + parameters[1] = left.second + parameters[2] = middle.first + parameters[3] = middle.second + parameters[4] = right.first + parameters[5] = right.second this.filled = filled this.color = color diff --git a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/render/batch/PrimitiveKey.kt b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/render/batch/PrimitiveKey.kt index 8cc198c7..288b0579 100644 --- a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/render/batch/PrimitiveKey.kt +++ b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/render/batch/PrimitiveKey.kt @@ -1,5 +1,25 @@ package com.github.minigdx.tiny.render.batch -object PrimitiveKey : BatchKey { - override fun reset() = Unit +import com.github.minigdx.tiny.graphic.Clipper + +class PrimitiveKey(var clipper: Clipper? = null) : BatchKey { + override fun reset() { + clipper = null + } + + override fun equals(other: Any?): Boolean { + if (this === other) return true + if (other !is SpriteBatchKey) return false + return clipper == other.clipper + } + + override fun hashCode(): Int { + val result = clipper.hashCode() + return result + } + + fun set(clipper: Clipper): PrimitiveKey { + this.clipper = clipper + return this + } } diff --git a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/render/batch/SpriteBatchKey.kt b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/render/batch/SpriteBatchKey.kt index d901a805..0c0a19a2 100644 --- a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/render/batch/SpriteBatchKey.kt +++ b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/render/batch/SpriteBatchKey.kt @@ -1,7 +1,6 @@ package com.github.minigdx.tiny.render.batch import com.github.minigdx.tiny.ColorIndex -import com.github.minigdx.tiny.graphic.Camera import com.github.minigdx.tiny.graphic.Clipper import com.github.minigdx.tiny.resources.SpriteSheet @@ -15,7 +14,6 @@ class SpriteBatchKey( var _spriteSheet: SpriteSheet? = null, var dither: Int = 0, var palette: Array = emptyArray(), - var camera: Camera? = null, var clipper: Clipper? = null, ) : BatchKey { val spriteSheet: SpriteSheet @@ -25,15 +23,12 @@ class SpriteBatchKey( spriteSheet: SpriteSheet, dither: Int, palette: Array, - camera: Camera?, - clipper: Clipper?, + clipper: Clipper, ): SpriteBatchKey { this._spriteSheet = spriteSheet this.dither = dither this.palette = palette - this.camera = camera this.clipper = clipper - return this } @@ -41,7 +36,6 @@ class SpriteBatchKey( this._spriteSheet = null this.dither = 0 this.palette = emptyArray() - this.camera = null this.clipper = null } @@ -51,7 +45,6 @@ class SpriteBatchKey( return _spriteSheet == other._spriteSheet && dither == other.dither && palette.contentEquals(other.palette) && - camera == other.camera && clipper == other.clipper } @@ -59,8 +52,7 @@ class SpriteBatchKey( var result = dither result = 31 * result + (_spriteSheet?.hashCode() ?: 0) result = 31 * result + palette.contentHashCode() - result = 31 * result + (camera?.hashCode() ?: 0) - result = 31 * result + (clipper?.hashCode() ?: 0) + result = 31 * result + clipper.hashCode() return result } } diff --git a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/render/gl/PrimitiveBatchStage.kt b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/render/gl/PrimitiveBatchStage.kt index 6dcaee19..3701c3bc 100644 --- a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/render/gl/PrimitiveBatchStage.kt +++ b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/render/gl/PrimitiveBatchStage.kt @@ -1,5 +1,6 @@ package com.github.minigdx.tiny.render.gl +import com.danielgergely.kgl.GL_SCISSOR_TEST import com.danielgergely.kgl.GL_TRIANGLES import com.danielgergely.kgl.Kgl import com.github.minigdx.tiny.engine.GameOptions @@ -49,6 +50,9 @@ class PrimitiveBatchStage( fragmentShader.paletteColors.applyRGBA(colorPaletteBuffer, 256, 256) } + + // Enable scissor test to restrict drawing area + program.enable(GL_SCISSOR_TEST) } fun execute( @@ -78,13 +82,24 @@ class PrimitiveBatchStage( vertexShader.aShadeParams56.apply(batch.parameters56) } + val clipper = key.clipper!! + + val scissorX = clipper.left + val scissorY = gameOptions.height - clipper.bottom + val scissorWidth = clipper.width + val scissorHeight = clipper.height + + program.scissor(scissorX, scissorY, scissorWidth, scissorHeight) + program.bind() program.drawArraysInstanced(GL_TRIANGLES, 0, 6, batch.parametersIndex) performanceMonitor.drawCall(6) program.unbind() } - override fun endStage() = Unit + override fun endStage() { + program.disable(GL_SCISSOR_TEST) + } class VShader : VertexShader(VERTEX_SHADER) { val aShapeType = diff --git a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/render/gl/SpriteBatchStage.kt b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/render/gl/SpriteBatchStage.kt index bb4f9ccd..bf242302 100644 --- a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/render/gl/SpriteBatchStage.kt +++ b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/render/gl/SpriteBatchStage.kt @@ -1,5 +1,6 @@ package com.github.minigdx.tiny.render.gl +import com.danielgergely.kgl.GL_SCISSOR_TEST import com.danielgergely.kgl.GL_TRIANGLES import com.danielgergely.kgl.Kgl import com.github.minigdx.tiny.engine.GameOptions @@ -42,12 +43,23 @@ class SpriteBatchStage( override fun startStage() { program.use() + // Enable scissor test to restrict drawing area + program.enable(GL_SCISSOR_TEST) } fun execute( key: SpriteBatchKey, batch: SpriteBatch, ) { + val clipper = key.clipper!! + + val scissorX = clipper.left + val scissorY = gameOptions.height - clipper.bottom + val scissorWidth = clipper.width + val scissorHeight = clipper.height + + program.scissor(scissorX, scissorY, scissorWidth, scissorHeight) + val colorsSwitch = key.palette val colorPaletteBuffer = ByteArray(256 * 256 * PixelFormat.RGBA) var pos = 0 @@ -90,7 +102,10 @@ class SpriteBatchStage( program.unbind() } - override fun endStage() = Unit + override fun endStage() { + // Disable scissor test after rendering + program.disable(GL_SCISSOR_TEST) + } class VShader : VertexShader(VERTEX_SHADER) { val aPos = inVec3("a_pos") // position of the sprite in the viewport diff --git a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/resources/GameScript.kt b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/resources/GameScript.kt index 52bf7c88..48c02b1c 100644 --- a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/resources/GameScript.kt +++ b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/resources/GameScript.kt @@ -16,6 +16,7 @@ import com.github.minigdx.tiny.lua.MathLib import com.github.minigdx.tiny.lua.NotesLib import com.github.minigdx.tiny.lua.SfxLib import com.github.minigdx.tiny.lua.ShapeLib +import com.github.minigdx.tiny.lua.SoundLib import com.github.minigdx.tiny.lua.SprLib import com.github.minigdx.tiny.lua.StdLib import com.github.minigdx.tiny.lua.TinyBaseLib @@ -95,6 +96,7 @@ class GameScript( load(GfxLib(resourceAccess, gameOptions, virtualFrameBuffer)) load(CtrlLib(inputHandler, sprLib)) load(SfxLib(resourceAccess, virtualSoundBoard, platform, playSound = !forValidation)) + load(SoundLib(resourceAccess, virtualSoundBoard, playSound = !forValidation)) load(ShapeLib(gameOptions, virtualFrameBuffer)) load(DebugLib(logger)) load(KeysLib()) diff --git a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/sound/Music.kt b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/sound/Music.kt index c7d51633..4d875fb6 100644 --- a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/sound/Music.kt +++ b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/sound/Music.kt @@ -34,6 +34,10 @@ class Music( MusicalSequence(it) }, ) { + fun serialize(): String { + return serialize(this) + } + companion object { private val json = Json { ignoreUnknownKeys = true } diff --git a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/sound/SoundHandler.kt b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/sound/SoundHandler.kt index a299160a..ae0a7b08 100644 --- a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/sound/SoundHandler.kt +++ b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/sound/SoundHandler.kt @@ -1,7 +1,5 @@ package com.github.minigdx.tiny.sound -import com.github.minigdx.tiny.Sample -import com.github.minigdx.tiny.sound.SoundManager.Companion.SAMPLE_RATE import com.github.minigdx.tiny.util.FloatData import kotlin.math.min @@ -42,50 +40,9 @@ class BufferedChunkGenerator(private val data: FloatArray) : ChunkGenerator { override fun generateChunk(samples: Int): FloatData { chunk.copyFrom(data, position, position + samples) position = min(position + samples, data.size) - return chunk - } -} - -class RealTimeChunkGenerator(private val generator: (progress: Sample, samples: Int) -> FloatArray) : ChunkGenerator { - private var position: Sample = 0 - - // Up to 4 seconds - private val chunk = FloatData(SAMPLE_RATE) - - override fun generateChunk(samples: Int): FloatData { - val data = generator.invoke(position, samples).also { - position += samples - } - - chunk.copyFrom(data, 0, samples) - return chunk - } -} - -class SequencedChunkGenerator(data: Sequence) : ChunkGenerator { - private var position: Int = 0 - private var currentChunk: FloatArray = floatArrayOf() - - private val iterator = data.iterator() - - // Up to 4 seconds - private val chunk = FloatData(SAMPLE_RATE * 4) - - override fun generateChunk(samples: Int): FloatData { - if (iterator.hasNext()) { - currentChunk = iterator.next() + if (chunk.size == 0) { position = 0 - } else { - if (position >= currentChunk.size) { - currentChunk = floatArrayOf() - position = 0 - } } - - chunk.copyFrom(currentChunk, position, position + samples) - - position += samples - return chunk } } diff --git a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/sound/SoundManager.kt b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/sound/SoundManager.kt index 3165631e..5b5ca11a 100644 --- a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/sound/SoundManager.kt +++ b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/sound/SoundManager.kt @@ -25,10 +25,6 @@ class DefaultSoundBoard(private val soundManager: SoundManager) : VirtualSoundBo return soundManager.createSoundHandler(buffer) } - override fun prepare(chunkGenerator: ChunkGenerator): SoundHandler { - return soundManager.createSoundHandler(chunkGenerator) - } - override fun convert(bar: MusicalBar): FloatArray { val buffer = soundManager.convert(bar) return buffer @@ -56,10 +52,6 @@ abstract class SoundManager { */ abstract fun createSoundHandler(buffer: FloatArray): SoundHandler - abstract fun createSoundHandler(buffer: Sequence): SoundHandler - - abstract fun createSoundHandler(chunkGenerator: ChunkGenerator): SoundHandler - /** * Convert the MusicBar into a playable sound. */ @@ -239,23 +231,21 @@ abstract class SoundManager { val attackEndSample = min(attackSamples, releaseStartSample) val decayEndSample = min(attackEndSample + decaySamples, releaseStartSample) - // FIXME: le changement de niveau sonore pourrait ne pas être linéaire. (cf juice) - val multiplier = - if (currentSample < attackEndSample) { - // Attack: going from 0 to 1.0 - currentSample.toFloat() / attackSamples - } else if (currentSample < decayEndSample) { - // Decay: going from 1.0 to sustain level - val decayProgress = (currentSample - attackEndSample) / decaySamples - 1.0f - decayProgress * (1.0f - sustainLevel) - } else if (currentSample < releaseStartSample) { - // Sustain level - sustainLevel - } else { - // Release: going from sustain to 0f - val releaseProgress = (currentSample - releaseStartSample) / releaseSamples - sustainLevel * (1.0f - min(1.0f, releaseProgress)) - } + val multiplier = if (currentSample < attackEndSample) { + // Attack: going from 0 to 1.0 + currentSample.toFloat() / attackSamples + } else if (currentSample < decayEndSample) { + // Decay: going from 1.0 to sustain level + val decayProgress = (currentSample - attackEndSample) / decaySamples + 1.0f - decayProgress * (1.0f - sustainLevel) + } else if (currentSample < releaseStartSample) { + // Sustain level + sustainLevel + } else { + // Release: going from sustain to 0f + val releaseProgress = (currentSample - releaseStartSample) / releaseSamples + sustainLevel * (1.0f - min(1.0f, releaseProgress)) + } return max(0.0f, min(1.0f, multiplier)) } @@ -267,6 +257,22 @@ abstract class SoundManager { abstract fun noteOff(note: Note) + private val currentHandlers = mutableListOf() + + fun stopAll() { + val toBeRemoved = currentHandlers.toList() + toBeRemoved.forEach { it.stop() } + currentHandlers.clear() + } + + internal fun addSoundHandler(handler: SoundHandler) { + currentHandlers.add(handler) + } + + internal fun removeSoundHandler(handler: SoundHandler) { + currentHandlers.remove(handler) + } + companion object { const val SAMPLE_RATE = 44100 const val MASTER_VOLUME = 0.5f diff --git a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/sound/VirtualSoundBoard.kt b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/sound/VirtualSoundBoard.kt index 1fbb5e29..39bce05c 100644 --- a/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/sound/VirtualSoundBoard.kt +++ b/tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/sound/VirtualSoundBoard.kt @@ -18,8 +18,6 @@ interface VirtualSoundBoard { */ fun prepare(track: MusicalSequence.Track): SoundHandler - fun prepare(chunkGenerator: ChunkGenerator): SoundHandler - fun convert(bar: MusicalBar): FloatArray fun noteOn( diff --git a/tiny-engine/src/commonTest/kotlin/com/github/minigdx/tiny/platform/test/HeadlessPlatform.kt b/tiny-engine/src/commonTest/kotlin/com/github/minigdx/tiny/platform/test/HeadlessPlatform.kt index 80014e85..e3eb8d6a 100644 --- a/tiny-engine/src/commonTest/kotlin/com/github/minigdx/tiny/platform/test/HeadlessPlatform.kt +++ b/tiny-engine/src/commonTest/kotlin/com/github/minigdx/tiny/platform/test/HeadlessPlatform.kt @@ -1,13 +1,10 @@ package com.github.minigdx.tiny.platform.test import com.danielgergely.kgl.Kgl -import com.github.minigdx.tiny.ColorIndex -import com.github.minigdx.tiny.Pixel import com.github.minigdx.tiny.engine.GameLoop import com.github.minigdx.tiny.engine.GameOptions import com.github.minigdx.tiny.file.SourceStream -import com.github.minigdx.tiny.graphic.FrameBuffer -import com.github.minigdx.tiny.graphic.PixelArray +import com.github.minigdx.tiny.graphic.FrameBufferParameters import com.github.minigdx.tiny.input.InputHandler import com.github.minigdx.tiny.input.InputManager import com.github.minigdx.tiny.lua.Note @@ -17,8 +14,6 @@ import com.github.minigdx.tiny.platform.SoundData import com.github.minigdx.tiny.platform.WindowManager import com.github.minigdx.tiny.platform.performance.PerformanceMetrics import com.github.minigdx.tiny.platform.performance.PerformanceMonitor -import com.github.minigdx.tiny.render.RenderFrame -import com.github.minigdx.tiny.sound.ChunkGenerator import com.github.minigdx.tiny.sound.Instrument import com.github.minigdx.tiny.sound.SoundHandler import com.github.minigdx.tiny.sound.SoundManager @@ -63,7 +58,7 @@ class HeadlessPlatform( ) : Platform { private val input = VirtualInputHandler() - val frames: MutableFixedSizeList = MutableFixedSizeList(frames) + val frames: MutableFixedSizeList = MutableFixedSizeList(frames) private var gameLoop: GameLoop? = null @@ -131,14 +126,6 @@ class HeadlessPlatform( } } - override fun createSoundHandler(buffer: Sequence): SoundHandler { - TODO("Not yet implemented") - } - - override fun createSoundHandler(chunkGenerator: ChunkGenerator): SoundHandler { - TODO("Not yet implemented") - } - override fun noteOn( note: Note, instrument: Instrument, @@ -186,26 +173,6 @@ class HeadlessPlatform( TODO("Not yet implemented") } - fun saveAnimation(name: String) = toGif(name, frames) - - class FrameBufferFrame(frameBuffer: FrameBuffer) : RenderFrame { - private val frameBuffer = - FrameBuffer(frameBuffer.width, frameBuffer.height, frameBuffer.gamePalette).apply { - this.fastCopyFrom(frameBuffer) - } - - override fun copyInto(pixelArray: PixelArray) { - pixelArray.copyFrom(frameBuffer.colorIndexBuffer) - } - - override fun getPixel( - x: Pixel, - y: Pixel, - ): ColorIndex { - return frameBuffer.pixel(x, y) - } - } - override fun saveIntoHome( name: String, content: String, diff --git a/tiny-engine/src/commonTest/kotlin/com/github/minigdx/tiny/platform/test/TestHelper.kt b/tiny-engine/src/commonTest/kotlin/com/github/minigdx/tiny/platform/test/TestHelper.kt deleted file mode 100644 index 8a797a97..00000000 --- a/tiny-engine/src/commonTest/kotlin/com/github/minigdx/tiny/platform/test/TestHelper.kt +++ /dev/null @@ -1,82 +0,0 @@ -package com.github.minigdx.tiny.platform.test - -import com.github.minigdx.tiny.engine.GameEngine -import com.github.minigdx.tiny.engine.GameOptions -import com.github.minigdx.tiny.file.CommonVirtualFileSystem -import com.github.minigdx.tiny.graphic.FrameBuffer -import com.github.minigdx.tiny.log.StdOutLogger -import com.github.minigdx.tiny.platform.ImageData -import kotlinx.coroutines.CoroutineScope -import kotlinx.coroutines.Dispatchers -import kotlinx.coroutines.ExperimentalCoroutinesApi -import kotlinx.coroutines.async -import kotlin.test.assertEquals - -expect fun toGif( - name: String, - animation: List, -) - -object TestHelper { - fun assertEquals( - expected: String, - current: FrameBuffer, - ) { - assertEquals(expected.trim(), current.colorIndexBuffer.toString().trim()) - } - - fun test( - name: String, - script: String, - block: suspend (platform: HeadlessPlatform) -> Unit, - ) { - test(name, script, 10 to 10, block) - } - - val testScope = CoroutineScope(Dispatchers.Unconfined) - - @OptIn(ExperimentalCoroutinesApi::class) - fun test( - name: String, - script: String, - size: Pair, - block: suspend (platform: HeadlessPlatform) -> Unit, - ) { - val colors = - listOf( - "#000000", - "#FFFFFF", - "#FF0000", - ) - - val resources = - mapOf( - "game.lua" to script, - "_boot.lua" to "tiny.exit(0)", - "_engine.lua" to "", - "_boot.png" to ImageData(ByteArray(0), 0, 0), - ) - - val (w, h) = size - val gameOptions = GameOptions(w, h, colors, listOf("game.lua"), emptyList()) - val platform = HeadlessPlatform(gameOptions, resources) - - GameEngine( - gameOptions = gameOptions, - platform = platform, - vfs = CommonVirtualFileSystem(), - logger = StdOutLogger("test"), - ).main() - - val result = - CoroutineScope(Dispatchers.Unconfined).async { - block(platform) - } - - platform.saveAnimation(name) - - if (result.isCancelled) { - throw result.getCompletionExceptionOrNull()!! - } - } -} diff --git a/tiny-engine/src/commonTest/kotlin/com/github/minigdx/tiny/sound/SoundManagerTest.kt b/tiny-engine/src/commonTest/kotlin/com/github/minigdx/tiny/sound/SoundManagerTest.kt index caa02db3..8f372fde 100644 --- a/tiny-engine/src/commonTest/kotlin/com/github/minigdx/tiny/sound/SoundManagerTest.kt +++ b/tiny-engine/src/commonTest/kotlin/com/github/minigdx/tiny/sound/SoundManagerTest.kt @@ -30,14 +30,6 @@ class SoundManagerTest { } } - override fun createSoundHandler(buffer: Sequence): SoundHandler { - TODO("Not yet implemented") - } - - override fun createSoundHandler(chunkGenerator: ChunkGenerator): SoundHandler { - TODO("Not yet implemented") - } - override fun noteOn( note: Note, instrument: Instrument, diff --git a/tiny-engine/src/commonTest/kotlin/integration/CoroutineTest.kt b/tiny-engine/src/commonTest/kotlin/integration/CoroutineTest.kt deleted file mode 100644 index f8d837c5..00000000 --- a/tiny-engine/src/commonTest/kotlin/integration/CoroutineTest.kt +++ /dev/null @@ -1,64 +0,0 @@ -package integration - -import com.github.minigdx.tiny.platform.test.TestHelper -import kotlin.test.Ignore -import kotlin.test.Test - -@Ignore -class CoroutineTest { - //language=Lua - val clsScript = - """ - local co = coroutine.create(function() - gfx.cls(2) - coroutine.yield() - gfx.cls(1) - coroutine.yield() - - end) - - function _draw() - coroutine.resume(co) - end - """.trimIndent() - - @Test - fun cls() = - TestHelper.test("cls", clsScript) { platform -> - platform.advance() - - TestHelper.assertEquals( - """ -2222222222 -2222222222 -2222222222 -2222222222 -2222222222 -2222222222 -2222222222 -2222222222 -2222222222 -2222222222 -""", - platform.frames.last(), - ) - - platform.advance() - - TestHelper.assertEquals( - """ -1111111111 -1111111111 -1111111111 -1111111111 -1111111111 -1111111111 -1111111111 -1111111111 -1111111111 -1111111111 -""", - platform.frames.last(), - ) - } -} diff --git a/tiny-engine/src/commonTest/kotlin/integration/GfxTest.kt b/tiny-engine/src/commonTest/kotlin/integration/GfxTest.kt deleted file mode 100644 index 44d5c94d..00000000 --- a/tiny-engine/src/commonTest/kotlin/integration/GfxTest.kt +++ /dev/null @@ -1,39 +0,0 @@ -package integration - -import com.github.minigdx.tiny.platform.test.TestHelper.assertEquals -import com.github.minigdx.tiny.platform.test.TestHelper.test -import kotlin.test.Ignore -import kotlin.test.Test -import kotlin.test.assertEquals - -@Ignore -class GfxTest { - val clsScript = - """ - function _draw() - gfx.cls(2) - end - """.trimIndent() - - @Test - fun cls() = - test("cls", clsScript) { platform -> - platform.advance() - - assertEquals( - """ -2222222222 -2222222222 -2222222222 -2222222222 -2222222222 -2222222222 -2222222222 -2222222222 -2222222222 -2222222222 -""", - platform.frames.last(), - ) - } -} diff --git a/tiny-engine/src/commonTest/kotlin/integration/ShapeTest.kt b/tiny-engine/src/commonTest/kotlin/integration/ShapeTest.kt deleted file mode 100644 index e628042f..00000000 --- a/tiny-engine/src/commonTest/kotlin/integration/ShapeTest.kt +++ /dev/null @@ -1,133 +0,0 @@ -package integration - -import com.github.minigdx.tiny.platform.test.TestHelper -import com.github.minigdx.tiny.platform.test.TestHelper.test -import kotlin.test.Ignore -import kotlin.test.Test - -@Ignore -class ShapeTest { - //language=Lua - private val circlefScript = - """ - function _draw() - gfx.cls(1) - shape.circlef(5, 5, 3, 2) - end - """.trimIndent() - - @Test - fun circlef() = - test("circlef", circlefScript) { platform -> - platform.advance() - - TestHelper.assertEquals( - """ -1111111111 -1111111111 -1111222111 -1112222211 -1122222221 -1122222221 -1122222221 -1112222211 -1111222111 -1111111111 -""", - platform.frames.last(), - ) - } - - //language=Lua - private val trianglefScript = - """ - function _draw() - gfx.cls(1) - shape.trianglef(0, 0, 0, 10, 10, 0, 2) - end - """.trimIndent() - - @Test - fun trianglef() = - test("trianglef", trianglefScript) { platform -> - platform.advance() - - TestHelper.assertEquals( - """ -2222222222 -2222222221 -2222222211 -2222222111 -2222221111 -2222211111 -2222111111 -2221111111 -2211111111 -2111111111 -""", - platform.frames.last(), - ) - } - - //language=Lua - private val rectfScript = - """ - function _draw() - gfx.cls(1) - shape.rectf(0, 0, 5, 10, 2) - end - """.trimIndent() - - @Test - fun rectf() = - test("rectf", rectfScript) { platform -> - platform.advance() - - TestHelper.assertEquals( - """ -2222211111 -2222211111 -2222211111 -2222211111 -2222211111 -2222211111 -2222211111 -2222211111 -2222211111 -2222211111 -""", - platform.frames.last(), - ) - } - - //language=Lua - private val gradientScript = - """ - function _draw() - gfx.cls(1) - shape.gradient(0, 0, 5, 10, 2, 3) - end - """.trimIndent() - - @Test - fun gradient() = - test("gradient", gradientScript) { platform -> - platform.advance() - - TestHelper.assertEquals( - """ -2222211111 -2322231111 -2232211111 -2323231111 -3232311111 -3323331111 -3232311111 -3333331111 -3332331111 -3333311111 -""", - platform.frames.last(), - ) - } -} diff --git a/tiny-engine/src/jsMain/kotlin/com/github/minigdx/tiny/Main.kt b/tiny-engine/src/jsMain/kotlin/com/github/minigdx/tiny/Main.kt index dce23de6..6456000c 100644 --- a/tiny-engine/src/jsMain/kotlin/com/github/minigdx/tiny/Main.kt +++ b/tiny-engine/src/jsMain/kotlin/com/github/minigdx/tiny/Main.kt @@ -110,7 +110,7 @@ fun setupGames( gameScripts = scripts, spriteSheets = spritesheets, gameLevels = levels, - sounds = sounds, + sound = sounds.firstOrNull(), zoom = gameZoom, gutter = 0 to 0, spriteSize = sprWidth to sprHeight, diff --git a/tiny-engine/src/jsMain/kotlin/com/github/minigdx/tiny/platform/webgl/SynthesizerProcessor.kt b/tiny-engine/src/jsMain/kotlin/com/github/minigdx/tiny/platform/webgl/SynthesizerProcessor.kt index 68f3dd77..afb8b2d1 100644 --- a/tiny-engine/src/jsMain/kotlin/com/github/minigdx/tiny/platform/webgl/SynthesizerProcessor.kt +++ b/tiny-engine/src/jsMain/kotlin/com/github/minigdx/tiny/platform/webgl/SynthesizerProcessor.kt @@ -1,12 +1,12 @@ package com.github.minigdx.tiny.platform.webgl +import com.github.minigdx.tiny.log.StdOutLogger import com.github.minigdx.tiny.lua.Note import com.github.minigdx.tiny.sound.Instrument import com.github.minigdx.tiny.sound.InstrumentPlayer import js.array.ReadonlyArray import js.objects.ReadonlyRecord import js.typedarrays.Float32Array -import kotlinx.serialization.decodeFromString import kotlinx.serialization.json.Json import web.audio.AudioParamName import web.audio.AudioWorkletProcessor @@ -16,19 +16,17 @@ import web.events.EventHandler class SynthesizerProcessor : AudioWorkletProcessor() { private var currentInstrumentPlayer: InstrumentPlayer? = null + private val logger = StdOutLogger("SynthesizerProcessor") + init { - println("SynthesizerProcessor initialized!") port.onmessage = EventHandler { event -> val data = event.data.unsafeCast() val type = data.type as? String - println("EVENT RECEIVED - Type: $type, Data: $data") when (type) { "noteOn" -> { val note = data.note as? Int - val frequency = data.frequency as? Double val instrumentJson = data.instrument as? String - println("Note ON: note=$note, frequency=$frequency Hz") if (instrumentJson != null && note != null) { try { @@ -38,21 +36,19 @@ class SynthesizerProcessor : AudioWorkletProcessor() { // Create new player and start note currentInstrumentPlayer = InstrumentPlayer(instrument) currentInstrumentPlayer?.noteOn(Note.entries[note]) - println("Created InstrumentPlayer and started note") } catch (e: Exception) { - println("Error deserializing instrument: ${e.message}") + logger.error("AUDIO", e) { "Error while processing audio" } } } } "noteOff" -> { val note = data.note as? Int - println("Note OFF: note=$note") if (note != null) { currentInstrumentPlayer?.noteOff(Note.entries[note]) } } else -> { - println("Unknown message type: $type") + logger.error("AUDIO") { "Unknown type: $type" } } } } @@ -64,7 +60,7 @@ class SynthesizerProcessor : AudioWorkletProcessor() { parameters: ReadonlyRecord>, ): Boolean { // Get the first output channel (mono output) - val output = outputs[0]?.get(0) ?: return true + val output = outputs[0][0] // Generate audio samples val player = currentInstrumentPlayer diff --git a/tiny-engine/src/jsMain/kotlin/com/github/minigdx/tiny/platform/webgl/WebSoundHandler.kt b/tiny-engine/src/jsMain/kotlin/com/github/minigdx/tiny/platform/webgl/WebSoundHandler.kt index 5f2892b4..c5b8bf2d 100644 --- a/tiny-engine/src/jsMain/kotlin/com/github/minigdx/tiny/platform/webgl/WebSoundHandler.kt +++ b/tiny-engine/src/jsMain/kotlin/com/github/minigdx/tiny/platform/webgl/WebSoundHandler.kt @@ -1,6 +1,5 @@ package com.github.minigdx.tiny.platform.webgl -import com.github.minigdx.tiny.sound.BufferedChunkGenerator import com.github.minigdx.tiny.sound.ChunkGenerator import com.github.minigdx.tiny.sound.SoundHandler import com.github.minigdx.tiny.util.FloatData @@ -8,30 +7,21 @@ import web.audio.AudioBufferSourceNode class WebSoundHandler( private val chunkGenerator: ChunkGenerator, - private val soundMananger: WebSoundManager, + private val soundManager: WebSoundManager, ) : SoundHandler { private var audioNode: AudioBufferSourceNode? = null - constructor( - data: FloatArray, - soundMananger: WebSoundManager, - ) : this( - BufferedChunkGenerator(data), - soundMananger, - ) - override fun play() { - // FIXME: replace - // audioNode = soundMananger.playSfxBuffer(data) + audioNode = soundManager.playChunkGenerator(chunkGenerator) } override fun loop() { - // FIXME: replace - // audioNode = soundMananger.playSfxBuffer(data, loop = true) + audioNode = soundManager.playChunkGenerator(chunkGenerator, loop = true) } override fun stop() { audioNode?.stop() + soundManager.removeSoundHandler(this) } override fun nextChunk(samples: Int): FloatData { diff --git a/tiny-engine/src/jsMain/kotlin/com/github/minigdx/tiny/platform/webgl/WebSoundManager.kt b/tiny-engine/src/jsMain/kotlin/com/github/minigdx/tiny/platform/webgl/WebSoundManager.kt index d2c0d972..9dded803 100644 --- a/tiny-engine/src/jsMain/kotlin/com/github/minigdx/tiny/platform/webgl/WebSoundManager.kt +++ b/tiny-engine/src/jsMain/kotlin/com/github/minigdx/tiny/platform/webgl/WebSoundManager.kt @@ -2,6 +2,7 @@ package com.github.minigdx.tiny.platform.webgl import com.github.minigdx.tiny.input.InputHandler import com.github.minigdx.tiny.lua.Note +import com.github.minigdx.tiny.sound.BufferedChunkGenerator import com.github.minigdx.tiny.sound.ChunkGenerator import com.github.minigdx.tiny.sound.Instrument import com.github.minigdx.tiny.sound.InstrumentPlayer @@ -11,7 +12,6 @@ import com.github.minigdx.tiny.util.MutableFixedSizeList import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.launch -import kotlinx.serialization.encodeToString import kotlinx.serialization.json.Json import web.audio.AudioContext import web.audio.AudioContextState @@ -36,25 +36,20 @@ class WebSoundManager : SoundManager() { override fun initSoundManager(inputHandler: InputHandler) { audioContext = AudioContext() - println("INIT audio context " + audioContext.state) audioContext.onstatechange = EventHandler { - println("audio context " + audioContext.state) // See: https://developer.mozilla.org/en-US/docs/Web/API/BaseAudioContext/state#resuming_interrupted_play_states_in_ios_safari // Resume the audio context if interrupted, only on iOS if (audioContext.state != AudioContextState.running) { audioContext.resumeAsync() - } else { - ready = true } + // Note: ready flag is set in initializeAudioWorklet() after audioWorkletNode is initialized } if (audioContext.state != AudioContextState.running) { inputHandler.onFirstUserInteraction { - println("FIRST USER audio context " + audioContext.state) audioContext.resumeAsync() initializeAudioWorklet() } } else { - println("FIRST USER audio context " + audioContext.state) initializeAudioWorklet() } } @@ -66,16 +61,10 @@ class WebSoundManager : SoundManager() { soundContext.launch { // Load the bundled worklet from Vite assets - println("Loading audio worklet module...") val result = audioContext.audioWorklet.addModule(SynthesizerAudioWorklet) - println("Audio worklet module loaded successfully $result") - - println("Creating AudioWorkletNode for SynthesizerProcessor") audioWorkletNode = AudioWorkletNode(audioContext, AudioWorkletProcessorName("SynthesizerProcessor")) val destinationNode = audioContext.destination - println("Connecting worklet to destination node: $destinationNode") audioWorkletNode.connect(destinationNode) - println("Audio worklet ready!") ready = true } } @@ -84,7 +73,6 @@ class WebSoundManager : SoundManager() { note: Note, instrument: Instrument, ) { - println("noteOn is ready + $ready") if (!ready) return // Get or create instrument player for this note @@ -98,7 +86,6 @@ class WebSoundManager : SoundManager() { val frequency = noteToFrequency(note) val instrumentJson = Json.encodeToString(instrument) - println("Prepare to post message to worklet") audioWorkletNode.port.postMessage( json( "type" to "noteOn", @@ -131,20 +118,91 @@ class WebSoundManager : SoundManager() { ) } - override fun createSoundHandler(buffer: FloatArray): SoundHandler { - TODO() - } + /** + * Play audio data from a ChunkGenerator using standard Web Audio API nodes. + * This method extracts all audio data from the generator, creates an AudioBuffer, + * and plays it using an AudioBufferSourceNode (bypassing the AudioWorklet). + * + * @param chunkGenerator The generator containing the audio sample data + * @param loop Whether to loop the audio playback + * @return AudioBufferSourceNode that can be used to control playback (e.g., stop()) + * @throws IllegalStateException if the AudioContext is not ready + * @throws IllegalArgumentException if the ChunkGenerator produces no audio data + */ + fun playChunkGenerator( + chunkGenerator: ChunkGenerator, + loop: Boolean = false, + ): web.audio.AudioBufferSourceNode { + if (!ready) { + throw IllegalStateException("AudioContext is not ready") + } + + // Extract all audio data from the chunk generator + val audioData = mutableListOf() + val chunkSizeToRequest = 2205 // ~50ms at 44.1kHz (SAMPLE_RATE * 0.05) + + // Generate chunks until we've extracted all data + var continueReading = true + while (continueReading) { + val chunk = chunkGenerator.generateChunk(chunkSizeToRequest) + + if (chunk.size == 0) { + // No more data available + continueReading = false + } else { + // Copy chunk data to our accumulator + for (i in 0 until chunk.size) { + audioData.add(chunk[i]) + } + + // If we got less than requested, we're likely at the end + if (chunk.size < chunkSizeToRequest) { + continueReading = false + } + } + } - override fun createSoundHandler(buffer: Sequence): SoundHandler { - TODO("Not yet implemented") + if (audioData.isEmpty()) { + throw IllegalArgumentException("ChunkGenerator produced no audio data") + } + + // Create AudioBuffer + val sampleCount = audioData.size + val audioBuffer = audioContext.createBuffer( + // Mono + numberOfChannels = 1, + length = sampleCount, + // 44.1 kHz + sampleRate = SAMPLE_RATE.toFloat(), + ) + + // Get the channel data and copy our float samples + val channelData = audioBuffer.getChannelData(0) + for (i in 0 until sampleCount) { + channelData[i] = audioData[i] + } + + // Create buffer source node + val sourceNode = audioContext.createBufferSource() + sourceNode.buffer = audioBuffer + sourceNode.loop = loop + + // Connect directly to destination (bypass AudioWorklet) + sourceNode.connect(audioContext.destination) + + // Start playback immediately + sourceNode.start() + + return sourceNode } - override fun createSoundHandler(chunkGenerator: ChunkGenerator): SoundHandler { - TODO("Not yet implemented") + override fun createSoundHandler(buffer: FloatArray): SoundHandler { + val handler = WebSoundHandler(BufferedChunkGenerator(buffer), this) + addSoundHandler(handler) + return handler } companion object { - private const val BUFFER = 4096 // Larger buffer for better stability private const val MAX_INSTRUMENTS = 8 } } diff --git a/tiny-engine/src/jsTest/kotlin/com/github/minigdx/tiny/platform/test/TestHelper.js.kt b/tiny-engine/src/jsTest/kotlin/com/github/minigdx/tiny/platform/test/TestHelper.js.kt deleted file mode 100644 index c9fb3127..00000000 --- a/tiny-engine/src/jsTest/kotlin/com/github/minigdx/tiny/platform/test/TestHelper.js.kt +++ /dev/null @@ -1,8 +0,0 @@ -package com.github.minigdx.tiny.platform.test - -import com.github.minigdx.tiny.graphic.FrameBuffer - -actual fun toGif( - name: String, - animation: List, -) = Unit diff --git a/tiny-engine/src/jvmMain/kotlin/com/github/minigdx/tiny/sound/JavaSoundHandler.kt b/tiny-engine/src/jvmMain/kotlin/com/github/minigdx/tiny/sound/JavaSoundHandler.kt index c1d7c585..e3f180bb 100644 --- a/tiny-engine/src/jvmMain/kotlin/com/github/minigdx/tiny/sound/JavaSoundHandler.kt +++ b/tiny-engine/src/jvmMain/kotlin/com/github/minigdx/tiny/sound/JavaSoundHandler.kt @@ -5,13 +5,15 @@ import com.github.minigdx.tiny.util.FloatData class JavaSoundHandler( val chunkGenerator: ChunkGenerator, private val mixerGateway: MixerGateway, + private val soundManager: SoundManager, ) : SoundHandler { /** * Legacy constructor */ - constructor(data: FloatArray, mixerGateway: MixerGateway) : this( + constructor(data: FloatArray, mixerGateway: MixerGateway, soundManager: SoundManager) : this( BufferedChunkGenerator(data), mixerGateway, + soundManager, ) var loop: Boolean = false @@ -29,12 +31,15 @@ class JavaSoundHandler( override fun stop() { stop = true + soundManager.removeSoundHandler(this) } override fun nextChunk(samples: Int): FloatData { val chunk = chunkGenerator.generateChunk(samples) if (chunk.size == 0) { - stop() + if (!loop) { + stop() + } } return chunk } diff --git a/tiny-engine/src/jvmMain/kotlin/com/github/minigdx/tiny/sound/JavaSoundManager.kt b/tiny-engine/src/jvmMain/kotlin/com/github/minigdx/tiny/sound/JavaSoundManager.kt index 23a52369..ce6286c5 100644 --- a/tiny-engine/src/jvmMain/kotlin/com/github/minigdx/tiny/sound/JavaSoundManager.kt +++ b/tiny-engine/src/jvmMain/kotlin/com/github/minigdx/tiny/sound/JavaSoundManager.kt @@ -180,23 +180,18 @@ class JavaSoundManager : SoundManager() { } override fun createSoundHandler(buffer: FloatArray): SoundHandler { - return JavaSoundHandler( + val handler = JavaSoundHandler( data = buffer, mixerGateway = mixer, + this, ) - } - - override fun createSoundHandler(buffer: Sequence): SoundHandler { - return JavaSoundHandler(SequencedChunkGenerator(buffer), mixerGateway = mixer) - } - - override fun createSoundHandler(chunkGenerator: ChunkGenerator): SoundHandler { - return JavaSoundHandler(chunkGenerator, mixerGateway = mixer) + addSoundHandler(handler) + return handler } override fun destroy() { soundPort.alive = false - mixer.add(JavaSoundHandler(FloatArray(0), mixer)) // unlock the sound port + mixer.add(JavaSoundHandler(FloatArray(0), mixer, this)) // unlock the sound port mixer.alive = false } } diff --git a/tiny-engine/src/jvmTest/kotlin/com/github/minigdx/tiny/platform/test/TestHelper.jvm.kt b/tiny-engine/src/jvmTest/kotlin/com/github/minigdx/tiny/platform/test/TestHelper.jvm.kt deleted file mode 100644 index 6b5b84bd..00000000 --- a/tiny-engine/src/jvmTest/kotlin/com/github/minigdx/tiny/platform/test/TestHelper.jvm.kt +++ /dev/null @@ -1,43 +0,0 @@ -package com.github.minigdx.tiny.platform.test - -import com.github.minigdx.tiny.graphic.FrameBuffer -import com.squareup.gifencoder.FastGifEncoder -import com.squareup.gifencoder.ImageOptions -import java.io.FileOutputStream -import java.util.concurrent.TimeUnit - -actual fun toGif( - name: String, - animation: List, -) { - val options = - ImageOptions().apply { - this.setDelay(20, TimeUnit.MILLISECONDS) - } - FileOutputStream("build/test-results/jvmTest/$name.gif").use { out -> - val reference = animation.first() - - fun convert(data: ByteArray): IntArray { - val result = IntArray(data.size) - val colorPalette = reference.gamePalette - data.forEachIndexed { index, byte -> - result[index] = colorPalette.getRGAasInt(byte.toInt()) - } - return result - } - - val encoder = - FastGifEncoder( - out, - reference.width, - reference.height, - 0, - reference.gamePalette, - ) - - animation.forEach { img -> - encoder.addImage(convert(img.generateBuffer()), reference.width, options) - } - encoder.finishEncoding() - } -} diff --git a/tiny-sample/_tiny.json b/tiny-sample/_tiny.json index c04db15e..d8d4d998 100644 --- a/tiny-sample/_tiny.json +++ b/tiny-sample/_tiny.json @@ -34,5 +34,6 @@ ], "spritesheets": [ "game.png" - ] + ], + "sound": "default-sound.sfx" } diff --git a/tiny-sample/default-sound.sfx b/tiny-sample/default-sound.sfx new file mode 100644 index 00000000..48997785 --- /dev/null +++ b/tiny-sample/default-sound.sfx @@ -0,0 +1 @@ +{"instruments":[{"index":0,"name":"clarinet","wave":"NOISE","attack":0.01,"decay":0.0375,"sustain":0.76875,"release":0.03125,"harmonics":[1.1,0.3,0.031,0.039,0.345,0.29,0.0119],"modulations":[{"type":"com.github.minigdx.tiny.sound.Sweep","sweep":880.0,"acceleration":1.0},{"type":"com.github.minigdx.tiny.sound.Vibrato","vibratoFrequency":0.0,"depth":0.0}]},{"index":1,"name":"violon","attack":0.1,"decay":0.1,"sustain":0.9,"release":0.05,"harmonics":[1.0,0.65,0.7,0.55,0.45,0.35,0.3],"modulations":[{"type":"com.github.minigdx.tiny.sound.Sweep","sweep":880.0,"acceleration":1.0},{"type":"com.github.minigdx.tiny.sound.Vibrato","vibratoFrequency":0.0,"depth":0.0}]},{"index":2,"name":"obos","wave":"SAW_TOOTH","attack":0.1,"decay":0.1,"sustain":0.9,"release":0.05,"harmonics":[1.0,0.05,0.01],"modulations":[{"type":"com.github.minigdx.tiny.sound.Sweep","sweep":880.0,"acceleration":1.0},{"type":"com.github.minigdx.tiny.sound.Vibrato","vibratoFrequency":0.0,"depth":0.0}]},{"index":3,"name":"drum","wave":"NOISE","attack":0.1,"decay":0.1,"sustain":0.9,"release":0.05,"harmonics":[1.0],"modulations":[{"type":"com.github.minigdx.tiny.sound.Sweep","sweep":880.0,"acceleration":1.0},{"type":"com.github.minigdx.tiny.sound.Vibrato","vibratoFrequency":0.0,"depth":0.0}]},{"index":4,"name":"custom1","wave":"TRIANGLE","attack":0.0062500015,"decay":0.1,"sustain":0.9,"harmonics":[1.0,0.05,0.01],"modulations":[{"type":"com.github.minigdx.tiny.sound.Sweep","sweep":880.0,"acceleration":1.0},{"type":"com.github.minigdx.tiny.sound.Vibrato","vibratoFrequency":0.0,"depth":0.0}]},{"index":5,"name":"custom2","wave":"SAW_TOOTH","attack":0.1,"decay":0.1,"sustain":0.9,"release":0.05,"harmonics":[1.0,0.05,0.01],"modulations":[{"type":"com.github.minigdx.tiny.sound.Sweep","sweep":880.0,"acceleration":1.0},{"type":"com.github.minigdx.tiny.sound.Vibrato","vibratoFrequency":0.0,"depth":0.0}]},{"index":6,"name":"custom3","wave":"TRIANGLE","attack":0.1,"decay":0.1,"sustain":0.9,"release":0.05,"harmonics":[1.0,0.05,0.01],"modulations":[{"type":"com.github.minigdx.tiny.sound.Sweep","sweep":880.0,"acceleration":1.0},{"type":"com.github.minigdx.tiny.sound.Vibrato","vibratoFrequency":0.0,"depth":0.0}]},{"index":7,"name":"custom4","wave":"SQUARE","attack":0.1,"decay":0.1,"sustain":0.9,"release":0.05,"harmonics":[1.0,0.05,0.01],"modulations":[{"type":"com.github.minigdx.tiny.sound.Sweep","sweep":880.0,"acceleration":1.0},{"type":"com.github.minigdx.tiny.sound.Vibrato","vibratoFrequency":0.0,"depth":0.0}]},null,null,null,null,null,null,null,null],"musicalBars":[{"index":0,"instrumentIndex":4,"tempo":420,"beats":[{"note":"E4","beat":0.0,"duration":0.5,"volume":1.0},{"note":"G4","beat":1.0,"duration":0.5,"volume":1.0}]},{"instrumentIndex":0,"beats":[{"note":"Cs3","beat":0.0,"duration":0.5,"volume":1.0}]},{"index":2,"instrumentIndex":0},{"index":3,"instrumentIndex":0},{"index":4,"instrumentIndex":0},{"index":5,"instrumentIndex":0},{"index":6,"instrumentIndex":0},{"index":7,"instrumentIndex":0},{"index":8,"instrumentIndex":0},{"index":9,"instrumentIndex":0},{"index":10,"instrumentIndex":0},{"index":11,"instrumentIndex":0},{"index":12,"instrumentIndex":0},{"index":13,"instrumentIndex":0},{"index":14,"instrumentIndex":0},{"index":15,"instrumentIndex":0},{"index":16,"instrumentIndex":0},{"index":17,"instrumentIndex":0},{"index":18,"instrumentIndex":0},{"index":19,"instrumentIndex":0},{"index":20,"instrumentIndex":0},{"index":21,"instrumentIndex":0},{"index":22,"instrumentIndex":0},{"index":23,"instrumentIndex":0},{"index":24,"instrumentIndex":0},{"index":25,"instrumentIndex":0},{"index":26,"instrumentIndex":0},{"index":27,"instrumentIndex":0},{"index":28,"instrumentIndex":0},{"index":29,"instrumentIndex":0},{"index":30,"instrumentIndex":0},{"index":31,"instrumentIndex":0}],"sequences":[{"index":0,"tracks":[{"instrumentIndex":0,"beats":[{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0}]},{"index":1,"instrumentIndex":0,"beats":[{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0}]},{"index":2,"instrumentIndex":0,"beats":[{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0}]},{"index":3,"instrumentIndex":0,"beats":[{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0}]}]},{"index":1,"tracks":[{"instrumentIndex":0,"beats":[{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0}]},{"index":1,"instrumentIndex":0,"beats":[{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0}]},{"index":2,"instrumentIndex":0,"beats":[{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0}]},{"index":3,"instrumentIndex":0,"beats":[{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0}]}]},{"index":2,"tracks":[{"instrumentIndex":0,"beats":[{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0}]},{"index":1,"instrumentIndex":0,"beats":[{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0}]},{"index":2,"instrumentIndex":0,"beats":[{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0}]},{"index":3,"instrumentIndex":0,"beats":[{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0}]}]},{"index":3,"tracks":[{"instrumentIndex":0,"beats":[{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0}]},{"index":1,"instrumentIndex":0,"beats":[{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0}]},{"index":2,"instrumentIndex":0,"beats":[{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0}]},{"index":3,"instrumentIndex":0,"beats":[{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0}]}]},{"index":4,"tracks":[{"instrumentIndex":0,"beats":[{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0}]},{"index":1,"instrumentIndex":0,"beats":[{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0}]},{"index":2,"instrumentIndex":0,"beats":[{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0}]},{"index":3,"instrumentIndex":0,"beats":[{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0}]}]},{"index":5,"tracks":[{"instrumentIndex":0,"beats":[{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0}]},{"index":1,"instrumentIndex":0,"beats":[{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0}]},{"index":2,"instrumentIndex":0,"beats":[{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0}]},{"index":3,"instrumentIndex":0,"beats":[{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0}]}]},{"index":6,"tracks":[{"instrumentIndex":0,"beats":[{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0}]},{"index":1,"instrumentIndex":0,"beats":[{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0}]},{"index":2,"instrumentIndex":0,"beats":[{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0}]},{"index":3,"instrumentIndex":0,"beats":[{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0}]}]},{"index":7,"tracks":[{"instrumentIndex":0,"beats":[{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0}]},{"index":1,"instrumentIndex":0,"beats":[{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0}]},{"index":2,"instrumentIndex":0,"beats":[{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0}]},{"index":3,"instrumentIndex":0,"beats":[{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0},{"note":null,"beat":0.0,"duration":1.0,"volume":1.0},{"note":null,"beat":1.0,"duration":1.0,"volume":1.0},{"note":null,"beat":2.0,"duration":1.0,"volume":1.0},{"note":null,"beat":3.0,"duration":1.0,"volume":1.0},{"note":null,"beat":4.0,"duration":1.0,"volume":1.0},{"note":null,"beat":5.0,"duration":1.0,"volume":1.0},{"note":null,"beat":6.0,"duration":1.0,"volume":1.0},{"note":null,"beat":7.0,"duration":1.0,"volume":1.0},{"note":null,"beat":8.0,"duration":1.0,"volume":1.0},{"note":null,"beat":9.0,"duration":1.0,"volume":1.0},{"note":null,"beat":10.0,"duration":1.0,"volume":1.0},{"note":null,"beat":11.0,"duration":1.0,"volume":1.0},{"note":null,"beat":12.0,"duration":1.0,"volume":1.0},{"note":null,"beat":13.0,"duration":1.0,"volume":1.0},{"note":null,"beat":14.0,"duration":1.0,"volume":1.0},{"note":null,"beat":15.0,"duration":1.0,"volume":1.0},{"note":null,"beat":16.0,"duration":1.0,"volume":1.0},{"note":null,"beat":17.0,"duration":1.0,"volume":1.0},{"note":null,"beat":18.0,"duration":1.0,"volume":1.0},{"note":null,"beat":19.0,"duration":1.0,"volume":1.0},{"note":null,"beat":20.0,"duration":1.0,"volume":1.0},{"note":null,"beat":21.0,"duration":1.0,"volume":1.0},{"note":null,"beat":22.0,"duration":1.0,"volume":1.0},{"note":null,"beat":23.0,"duration":1.0,"volume":1.0},{"note":null,"beat":24.0,"duration":1.0,"volume":1.0},{"note":null,"beat":25.0,"duration":1.0,"volume":1.0},{"note":null,"beat":26.0,"duration":1.0,"volume":1.0},{"note":null,"beat":27.0,"duration":1.0,"volume":1.0},{"note":null,"beat":28.0,"duration":1.0,"volume":1.0},{"note":null,"beat":29.0,"duration":1.0,"volume":1.0},{"note":null,"beat":30.0,"duration":1.0,"volume":1.0},{"note":null,"beat":31.0,"duration":1.0,"volume":1.0},{"note":null,"beat":32.0,"duration":1.0,"volume":1.0}]}]}]} \ No newline at end of file diff --git a/tiny-sample/pong.lua b/tiny-sample/pong.lua index be49dc75..9b3e8b1c 100644 --- a/tiny-sample/pong.lua +++ b/tiny-sample/pong.lua @@ -195,7 +195,7 @@ Brick.update = function(self) if collisionX or collisionY then self.hit = 6 - + sound.sfx(1) table.insert(particles, new(Particle, { x = self.x, @@ -299,6 +299,8 @@ Ball.update = function(self) if collision then self.speed.y = -self.speed.y self.accept_move_y = false + sound.sfx(0) + end end