playlist-data-engine 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +352 -0
- package/dist/__vite-browser-external-DYxpcVy9.js +4 -0
- package/dist/constants/DefaultClasses.d.ts +46 -0
- package/dist/constants/DefaultClasses.d.ts.map +1 -0
- package/dist/constants/DefaultEnchantments.d.ts +337 -0
- package/dist/constants/DefaultEnchantments.d.ts.map +1 -0
- package/dist/constants/DefaultEnemies.d.ts +83 -0
- package/dist/constants/DefaultEnemies.d.ts.map +1 -0
- package/dist/constants/DefaultEquipment.d.ts +23 -0
- package/dist/constants/DefaultEquipment.d.ts.map +1 -0
- package/dist/constants/DefaultFeatures.d.ts +22 -0
- package/dist/constants/DefaultFeatures.d.ts.map +1 -0
- package/dist/constants/DefaultRaces.d.ts +102 -0
- package/dist/constants/DefaultRaces.d.ts.map +1 -0
- package/dist/constants/DefaultSkills.d.ts +26 -0
- package/dist/constants/DefaultSkills.d.ts.map +1 -0
- package/dist/constants/DefaultSpells.d.ts +41 -0
- package/dist/constants/DefaultSpells.d.ts.map +1 -0
- package/dist/constants/EncounterBalance.d.ts +208 -0
- package/dist/constants/EncounterBalance.d.ts.map +1 -0
- package/dist/constants/EnemyEquipment.d.ts +71 -0
- package/dist/constants/EnemyEquipment.d.ts.map +1 -0
- package/dist/constants/EnemyRarity.d.ts +79 -0
- package/dist/constants/EnemyRarity.d.ts.map +1 -0
- package/dist/constants/EnemyTemplates/Construct.d.ts +63 -0
- package/dist/constants/EnemyTemplates/Construct.d.ts.map +1 -0
- package/dist/constants/EnemyTemplates/Dragon.d.ts +68 -0
- package/dist/constants/EnemyTemplates/Dragon.d.ts.map +1 -0
- package/dist/constants/EnemyTemplates/Elemental.d.ts +64 -0
- package/dist/constants/EnemyTemplates/Elemental.d.ts.map +1 -0
- package/dist/constants/EnemyTemplates/Fiend.d.ts +62 -0
- package/dist/constants/EnemyTemplates/Fiend.d.ts.map +1 -0
- package/dist/constants/EnemyTemplates/Monstrosity.d.ts +63 -0
- package/dist/constants/EnemyTemplates/Monstrosity.d.ts.map +1 -0
- package/dist/constants/EnemyTemplates/Undead.d.ts +61 -0
- package/dist/constants/EnemyTemplates/Undead.d.ts.map +1 -0
- package/dist/constants/ItemTemplates.d.ts +40 -0
- package/dist/constants/ItemTemplates.d.ts.map +1 -0
- package/dist/constants/MagicItems.d.ts +30 -0
- package/dist/constants/MagicItems.d.ts.map +1 -0
- package/dist/constants/SpellSlots.d.ts +30 -0
- package/dist/constants/SpellSlots.d.ts.map +1 -0
- package/dist/constants/StatScaling.d.ts +113 -0
- package/dist/constants/StatScaling.d.ts.map +1 -0
- package/dist/core/analysis/AudioAnalyzer.d.ts +599 -0
- package/dist/core/analysis/AudioAnalyzer.d.ts.map +1 -0
- package/dist/core/analysis/ColorExtractor.d.ts +64 -0
- package/dist/core/analysis/ColorExtractor.d.ts.map +1 -0
- package/dist/core/analysis/EssentiaPitchDetector.d.ts +282 -0
- package/dist/core/analysis/EssentiaPitchDetector.d.ts.map +1 -0
- package/dist/core/analysis/LevelSerializer.d.ts +265 -0
- package/dist/core/analysis/LevelSerializer.d.ts.map +1 -0
- package/dist/core/analysis/MelodyContourAnalyzer.d.ts +283 -0
- package/dist/core/analysis/MelodyContourAnalyzer.d.ts.map +1 -0
- package/dist/core/analysis/MultiBandAnalyzer.d.ts +214 -0
- package/dist/core/analysis/MultiBandAnalyzer.d.ts.map +1 -0
- package/dist/core/analysis/MusicClassifier.d.ts +524 -0
- package/dist/core/analysis/MusicClassifier.d.ts.map +1 -0
- package/dist/core/analysis/PitchAnalyzer.d.ts +266 -0
- package/dist/core/analysis/PitchAnalyzer.d.ts.map +1 -0
- package/dist/core/analysis/PitchDetector.d.ts +251 -0
- package/dist/core/analysis/PitchDetector.d.ts.map +1 -0
- package/dist/core/analysis/SpectrumScanner.d.ts +52 -0
- package/dist/core/analysis/SpectrumScanner.d.ts.map +1 -0
- package/dist/core/analysis/beat/BeatInterpolator.d.ts +477 -0
- package/dist/core/analysis/beat/BeatInterpolator.d.ts.map +1 -0
- package/dist/core/analysis/beat/BeatMapGenerator.d.ts +170 -0
- package/dist/core/analysis/beat/BeatMapGenerator.d.ts.map +1 -0
- package/dist/core/analysis/beat/BeatStream.d.ts +316 -0
- package/dist/core/analysis/beat/BeatStream.d.ts.map +1 -0
- package/dist/core/analysis/beat/BeatSubdivider.d.ts +205 -0
- package/dist/core/analysis/beat/BeatSubdivider.d.ts.map +1 -0
- package/dist/core/analysis/beat/BeatTracker.d.ts +137 -0
- package/dist/core/analysis/beat/BeatTracker.d.ts.map +1 -0
- package/dist/core/analysis/beat/CompositeStreamGenerator.d.ts +180 -0
- package/dist/core/analysis/beat/CompositeStreamGenerator.d.ts.map +1 -0
- package/dist/core/analysis/beat/DensityAnalyzer.d.ts +246 -0
- package/dist/core/analysis/beat/DensityAnalyzer.d.ts.map +1 -0
- package/dist/core/analysis/beat/DifficultyVariantGenerator.d.ts +1082 -0
- package/dist/core/analysis/beat/DifficultyVariantGenerator.d.ts.map +1 -0
- package/dist/core/analysis/beat/GrooveAnalyzer.d.ts +192 -0
- package/dist/core/analysis/beat/GrooveAnalyzer.d.ts.map +1 -0
- package/dist/core/analysis/beat/OnsetStrengthEnvelope.d.ts +133 -0
- package/dist/core/analysis/beat/OnsetStrengthEnvelope.d.ts.map +1 -0
- package/dist/core/analysis/beat/PhraseAnalyzer.d.ts +230 -0
- package/dist/core/analysis/beat/PhraseAnalyzer.d.ts.map +1 -0
- package/dist/core/analysis/beat/RhythmQuantizer.d.ts +399 -0
- package/dist/core/analysis/beat/RhythmQuantizer.d.ts.map +1 -0
- package/dist/core/analysis/beat/RhythmicBalancer.d.ts +262 -0
- package/dist/core/analysis/beat/RhythmicBalancer.d.ts.map +1 -0
- package/dist/core/analysis/beat/StreamScorer.d.ts +275 -0
- package/dist/core/analysis/beat/StreamScorer.d.ts.map +1 -0
- package/dist/core/analysis/beat/TempoAwareQuantizer.d.ts +256 -0
- package/dist/core/analysis/beat/TempoAwareQuantizer.d.ts.map +1 -0
- package/dist/core/analysis/beat/TempoDetector.d.ts +220 -0
- package/dist/core/analysis/beat/TempoDetector.d.ts.map +1 -0
- package/dist/core/analysis/beat/TransientDetector.d.ts +303 -0
- package/dist/core/analysis/beat/TransientDetector.d.ts.map +1 -0
- package/dist/core/analysis/beat/beatKeyHelpers.d.ts +180 -0
- package/dist/core/analysis/beat/beatKeyHelpers.d.ts.map +1 -0
- package/dist/core/analysis/beat/index.d.ts +41 -0
- package/dist/core/analysis/beat/index.d.ts.map +1 -0
- package/dist/core/analysis/beat/utils/audioUtils.d.ts +204 -0
- package/dist/core/analysis/beat/utils/audioUtils.d.ts.map +1 -0
- package/dist/core/analysis/beat/utils/beatInterpolationDebug.d.ts +404 -0
- package/dist/core/analysis/beat/utils/beatInterpolationDebug.d.ts.map +1 -0
- package/dist/core/analysis/beat/utils/subdivideBeatMap.d.ts +61 -0
- package/dist/core/analysis/beat/utils/subdivideBeatMap.d.ts.map +1 -0
- package/dist/core/analysis/beat/utils/unifyBeatMap.d.ts +33 -0
- package/dist/core/analysis/beat/utils/unifyBeatMap.d.ts.map +1 -0
- package/dist/core/analysis/index.d.ts +18 -0
- package/dist/core/analysis/index.d.ts.map +1 -0
- package/dist/core/combat/AI/AICombatRunner.d.ts +108 -0
- package/dist/core/combat/AI/AICombatRunner.d.ts.map +1 -0
- package/dist/core/combat/AI/CombatAI.d.ts +179 -0
- package/dist/core/combat/AI/CombatAI.d.ts.map +1 -0
- package/dist/core/combat/AI/CombatMetricsTracker.d.ts +30 -0
- package/dist/core/combat/AI/CombatMetricsTracker.d.ts.map +1 -0
- package/dist/core/combat/Analysis/BalanceValidator.d.ts +170 -0
- package/dist/core/combat/Analysis/BalanceValidator.d.ts.map +1 -0
- package/dist/core/combat/Analysis/ComparativeAnalyzer.d.ts +231 -0
- package/dist/core/combat/Analysis/ComparativeAnalyzer.d.ts.map +1 -0
- package/dist/core/combat/Analysis/DifficultyCalculator.d.ts +203 -0
- package/dist/core/combat/Analysis/DifficultyCalculator.d.ts.map +1 -0
- package/dist/core/combat/Analysis/ParameterSweep.d.ts +201 -0
- package/dist/core/combat/Analysis/ParameterSweep.d.ts.map +1 -0
- package/dist/core/combat/AttackResolver.d.ts +220 -0
- package/dist/core/combat/AttackResolver.d.ts.map +1 -0
- package/dist/core/combat/CombatEngine.d.ts +388 -0
- package/dist/core/combat/CombatEngine.d.ts.map +1 -0
- package/dist/core/combat/DiceRoller.d.ts +115 -0
- package/dist/core/combat/DiceRoller.d.ts.map +1 -0
- package/dist/core/combat/InitiativeRoller.d.ts +62 -0
- package/dist/core/combat/InitiativeRoller.d.ts.map +1 -0
- package/dist/core/combat/PartyAnalyzer.d.ts +215 -0
- package/dist/core/combat/PartyAnalyzer.d.ts.map +1 -0
- package/dist/core/combat/SeededDiceRoller.d.ts +120 -0
- package/dist/core/combat/SeededDiceRoller.d.ts.map +1 -0
- package/dist/core/combat/Simulation/CombatSimulator.d.ts +366 -0
- package/dist/core/combat/Simulation/CombatSimulator.d.ts.map +1 -0
- package/dist/core/combat/SpellCaster.d.ts +113 -0
- package/dist/core/combat/SpellCaster.d.ts.map +1 -0
- package/dist/core/config/index.d.ts +24 -0
- package/dist/core/config/index.d.ts.map +1 -0
- package/dist/core/config/progressionConfig.d.ts +73 -0
- package/dist/core/config/progressionConfig.d.ts.map +1 -0
- package/dist/core/config/sensorConfig.d.ts +134 -0
- package/dist/core/config/sensorConfig.d.ts.map +1 -0
- package/dist/core/equipment/BoxOpener.d.ts +175 -0
- package/dist/core/equipment/BoxOpener.d.ts.map +1 -0
- package/dist/core/equipment/EquipmentEffectApplier.d.ts +189 -0
- package/dist/core/equipment/EquipmentEffectApplier.d.ts.map +1 -0
- package/dist/core/equipment/EquipmentModifier.d.ts +327 -0
- package/dist/core/equipment/EquipmentModifier.d.ts.map +1 -0
- package/dist/core/equipment/EquipmentSpawnHelper.d.ts +246 -0
- package/dist/core/equipment/EquipmentSpawnHelper.d.ts.map +1 -0
- package/dist/core/equipment/EquipmentValidator.d.ts +173 -0
- package/dist/core/equipment/EquipmentValidator.d.ts.map +1 -0
- package/dist/core/extensions/ExtensionManager.d.ts +517 -0
- package/dist/core/extensions/ExtensionManager.d.ts.map +1 -0
- package/dist/core/extensions/WeightedSelector.d.ts +156 -0
- package/dist/core/extensions/WeightedSelector.d.ts.map +1 -0
- package/dist/core/extensions/index.d.ts +11 -0
- package/dist/core/extensions/index.d.ts.map +1 -0
- package/dist/core/extensions/initializeDefaults.d.ts +170 -0
- package/dist/core/extensions/initializeDefaults.d.ts.map +1 -0
- package/dist/core/features/FeatureEffectApplier.d.ts +102 -0
- package/dist/core/features/FeatureEffectApplier.d.ts.map +1 -0
- package/dist/core/features/FeatureQuery.d.ts +368 -0
- package/dist/core/features/FeatureQuery.d.ts.map +1 -0
- package/dist/core/features/FeatureTypes.d.ts +199 -0
- package/dist/core/features/FeatureTypes.d.ts.map +1 -0
- package/dist/core/features/FeatureValidator.d.ts +149 -0
- package/dist/core/features/FeatureValidator.d.ts.map +1 -0
- package/dist/core/features/index.d.ts +12 -0
- package/dist/core/features/index.d.ts.map +1 -0
- package/dist/core/generation/AbilityScoreCalculator.d.ts +83 -0
- package/dist/core/generation/AbilityScoreCalculator.d.ts.map +1 -0
- package/dist/core/generation/AppearanceGenerator.d.ts +32 -0
- package/dist/core/generation/AppearanceGenerator.d.ts.map +1 -0
- package/dist/core/generation/BeatConverter.d.ts +127 -0
- package/dist/core/generation/BeatConverter.d.ts.map +1 -0
- package/dist/core/generation/ButtonMapper.d.ts +346 -0
- package/dist/core/generation/ButtonMapper.d.ts.map +1 -0
- package/dist/core/generation/ButtonPatternLibrary.d.ts +92 -0
- package/dist/core/generation/ButtonPatternLibrary.d.ts.map +1 -0
- package/dist/core/generation/CRLevelConverter.d.ts +242 -0
- package/dist/core/generation/CRLevelConverter.d.ts.map +1 -0
- package/dist/core/generation/CharacterGenerator.d.ts +194 -0
- package/dist/core/generation/CharacterGenerator.d.ts.map +1 -0
- package/dist/core/generation/ClassSuggester.d.ts +184 -0
- package/dist/core/generation/ClassSuggester.d.ts.map +1 -0
- package/dist/core/generation/EnemyEquipmentGenerator.d.ts +151 -0
- package/dist/core/generation/EnemyEquipmentGenerator.d.ts.map +1 -0
- package/dist/core/generation/EnemyGenerator.d.ts +595 -0
- package/dist/core/generation/EnemyGenerator.d.ts.map +1 -0
- package/dist/core/generation/EquipmentGenerator.d.ts +204 -0
- package/dist/core/generation/EquipmentGenerator.d.ts.map +1 -0
- package/dist/core/generation/LegendaryGenerator.d.ts +213 -0
- package/dist/core/generation/LegendaryGenerator.d.ts.map +1 -0
- package/dist/core/generation/LevelGenerator.d.ts +390 -0
- package/dist/core/generation/LevelGenerator.d.ts.map +1 -0
- package/dist/core/generation/NamingEngine.d.ts +136 -0
- package/dist/core/generation/NamingEngine.d.ts.map +1 -0
- package/dist/core/generation/PitchBeatLinker.d.ts +150 -0
- package/dist/core/generation/PitchBeatLinker.d.ts.map +1 -0
- package/dist/core/generation/RaceSelector.d.ts +58 -0
- package/dist/core/generation/RaceSelector.d.ts.map +1 -0
- package/dist/core/generation/RhythmGenerator.d.ts +597 -0
- package/dist/core/generation/RhythmGenerator.d.ts.map +1 -0
- package/dist/core/generation/SkillAssigner.d.ts +78 -0
- package/dist/core/generation/SkillAssigner.d.ts.map +1 -0
- package/dist/core/generation/SpellManager.d.ts +132 -0
- package/dist/core/generation/SpellManager.d.ts.map +1 -0
- package/dist/core/generation/SpellcastingGenerator.d.ts +255 -0
- package/dist/core/generation/SpellcastingGenerator.d.ts.map +1 -0
- package/dist/core/generation/index.d.ts +41 -0
- package/dist/core/generation/index.d.ts.map +1 -0
- package/dist/core/parser/MetadataExtractor.d.ts +66 -0
- package/dist/core/parser/MetadataExtractor.d.ts.map +1 -0
- package/dist/core/parser/PlaylistParser.d.ts +45 -0
- package/dist/core/parser/PlaylistParser.d.ts.map +1 -0
- package/dist/core/playback/SubdivisionPlaybackController.d.ts +333 -0
- package/dist/core/playback/SubdivisionPlaybackController.d.ts.map +1 -0
- package/dist/core/playback/index.d.ts +5 -0
- package/dist/core/playback/index.d.ts.map +1 -0
- package/dist/core/progression/CharacterUpdater.d.ts +203 -0
- package/dist/core/progression/CharacterUpdater.d.ts.map +1 -0
- package/dist/core/progression/LevelUpProcessor.d.ts +234 -0
- package/dist/core/progression/LevelUpProcessor.d.ts.map +1 -0
- package/dist/core/progression/PrestigeSystem.d.ts +217 -0
- package/dist/core/progression/PrestigeSystem.d.ts.map +1 -0
- package/dist/core/progression/RhythmXPCalculator.d.ts +182 -0
- package/dist/core/progression/RhythmXPCalculator.d.ts.map +1 -0
- package/dist/core/progression/SessionTracker.d.ts +169 -0
- package/dist/core/progression/SessionTracker.d.ts.map +1 -0
- package/dist/core/progression/XPCalculator.d.ts +128 -0
- package/dist/core/progression/XPCalculator.d.ts.map +1 -0
- package/dist/core/progression/stat/StatIncreaseStrategy.d.ts +97 -0
- package/dist/core/progression/stat/StatIncreaseStrategy.d.ts.map +1 -0
- package/dist/core/progression/stat/StatManager.d.ts +179 -0
- package/dist/core/progression/stat/StatManager.d.ts.map +1 -0
- package/dist/core/sensors/EnvironmentalSensors.d.ts +301 -0
- package/dist/core/sensors/EnvironmentalSensors.d.ts.map +1 -0
- package/dist/core/sensors/GamingPlatformSensors.d.ts +162 -0
- package/dist/core/sensors/GamingPlatformSensors.d.ts.map +1 -0
- package/dist/core/sensors/GeolocationProvider.d.ts +156 -0
- package/dist/core/sensors/GeolocationProvider.d.ts.map +1 -0
- package/dist/core/sensors/MotionDetector.d.ts +58 -0
- package/dist/core/sensors/MotionDetector.d.ts.map +1 -0
- package/dist/core/sensors/SteamAPIClient.d.ts +108 -0
- package/dist/core/sensors/SteamAPIClient.d.ts.map +1 -0
- package/dist/core/sensors/WeatherAPIClient.d.ts +360 -0
- package/dist/core/sensors/WeatherAPIClient.d.ts.map +1 -0
- package/dist/core/sensors/schemas/weather.schema.d.ts +144 -0
- package/dist/core/sensors/schemas/weather.schema.d.ts.map +1 -0
- package/dist/core/skills/SkillQuery.d.ts +159 -0
- package/dist/core/skills/SkillQuery.d.ts.map +1 -0
- package/dist/core/skills/SkillTypes.d.ts +233 -0
- package/dist/core/skills/SkillTypes.d.ts.map +1 -0
- package/dist/core/skills/SkillValidator.d.ts +146 -0
- package/dist/core/skills/SkillValidator.d.ts.map +1 -0
- package/dist/core/skills/index.d.ts +11 -0
- package/dist/core/skills/index.d.ts.map +1 -0
- package/dist/core/spells/SpellQuery.d.ts +194 -0
- package/dist/core/spells/SpellQuery.d.ts.map +1 -0
- package/dist/core/spells/SpellTypes.d.ts +71 -0
- package/dist/core/spells/SpellTypes.d.ts.map +1 -0
- package/dist/core/spells/SpellValidator.d.ts +129 -0
- package/dist/core/spells/SpellValidator.d.ts.map +1 -0
- package/dist/core/spells/index.d.ts +11 -0
- package/dist/core/spells/index.d.ts.map +1 -0
- package/dist/core/types/AudioProfile.d.ts +143 -0
- package/dist/core/types/AudioProfile.d.ts.map +1 -0
- package/dist/core/types/BeatMap.d.ts +1825 -0
- package/dist/core/types/BeatMap.d.ts.map +1 -0
- package/dist/core/types/ButtonMapping.d.ts +345 -0
- package/dist/core/types/ButtonMapping.d.ts.map +1 -0
- package/dist/core/types/Character.d.ts +397 -0
- package/dist/core/types/Character.d.ts.map +1 -0
- package/dist/core/types/ChartedBeatMap.d.ts +169 -0
- package/dist/core/types/ChartedBeatMap.d.ts.map +1 -0
- package/dist/core/types/Combat.d.ts +268 -0
- package/dist/core/types/Combat.d.ts.map +1 -0
- package/dist/core/types/CombatAI.d.ts +143 -0
- package/dist/core/types/CombatAI.d.ts.map +1 -0
- package/dist/core/types/Enemy.d.ts +447 -0
- package/dist/core/types/Enemy.d.ts.map +1 -0
- package/dist/core/types/Environmental.d.ts +213 -0
- package/dist/core/types/Environmental.d.ts.map +1 -0
- package/dist/core/types/Equipment.d.ts +309 -0
- package/dist/core/types/Equipment.d.ts.map +1 -0
- package/dist/core/types/ISessionTracker.d.ts +48 -0
- package/dist/core/types/ISessionTracker.d.ts.map +1 -0
- package/dist/core/types/LevelExport.d.ts +366 -0
- package/dist/core/types/LevelExport.d.ts.map +1 -0
- package/dist/core/types/Playlist.d.ts +70 -0
- package/dist/core/types/Playlist.d.ts.map +1 -0
- package/dist/core/types/Prestige.d.ts +94 -0
- package/dist/core/types/Prestige.d.ts.map +1 -0
- package/dist/core/types/Progression.d.ts +214 -0
- package/dist/core/types/Progression.d.ts.map +1 -0
- package/dist/core/types/RhythmXP.d.ts +398 -0
- package/dist/core/types/RhythmXP.d.ts.map +1 -0
- package/dist/core/utils/AbilityConstants.d.ts +31 -0
- package/dist/core/utils/AbilityConstants.d.ts.map +1 -0
- package/dist/core/utils/EffectApplierUtils.d.ts +56 -0
- package/dist/core/utils/EffectApplierUtils.d.ts.map +1 -0
- package/dist/core/utils/ImageValidator.d.ts +66 -0
- package/dist/core/utils/ImageValidator.d.ts.map +1 -0
- package/dist/core/utils/PrerequisiteValidator.d.ts +88 -0
- package/dist/core/utils/PrerequisiteValidator.d.ts.map +1 -0
- package/dist/essentia-wasm.es-BUEnKUts.js +2990 -0
- package/dist/essentia.js-model.es-CGA0xotH.js +306 -0
- package/dist/index.d.ts +176 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/playlist-data-engine.js +124 -0
- package/dist/playlist-data-engine.mjs +49251 -0
- package/dist/utils/EnchantmentLibrary.d.ts +378 -0
- package/dist/utils/EnchantmentLibrary.d.ts.map +1 -0
- package/dist/utils/arweaveGatewayManager.d.ts +485 -0
- package/dist/utils/arweaveGatewayManager.d.ts.map +1 -0
- package/dist/utils/arweaveUtils.d.ts +118 -0
- package/dist/utils/arweaveUtils.d.ts.map +1 -0
- package/dist/utils/constants.d.ts +439 -0
- package/dist/utils/constants.d.ts.map +1 -0
- package/dist/utils/equipmentConstants.d.ts +60 -0
- package/dist/utils/equipmentConstants.d.ts.map +1 -0
- package/dist/utils/hash.d.ts +33 -0
- package/dist/utils/hash.d.ts.map +1 -0
- package/dist/utils/logger.d.ts +192 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/magicItemExamples.d.ts +46 -0
- package/dist/utils/magicItemExamples.d.ts.map +1 -0
- package/dist/utils/playlistUtils.d.ts +149 -0
- package/dist/utils/playlistUtils.d.ts.map +1 -0
- package/dist/utils/random.d.ts +34 -0
- package/dist/utils/random.d.ts.map +1 -0
- package/dist/utils/sensorDashboard.d.ts +60 -0
- package/dist/utils/sensorDashboard.d.ts.map +1 -0
- package/dist/utils/validators.d.ts +189 -0
- package/dist/utils/validators.d.ts.map +1 -0
- package/dist/vite.svg +1 -0
- package/package.json +82 -0
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Button Mapper - Maps pitch analysis to button assignments for rhythm games
|
|
3
|
+
*
|
|
4
|
+
* This is the main entry point for button mapping in the Pitch Detection & Button Mapping pipeline.
|
|
5
|
+
* It takes rhythm generation output and optional pitch analysis, then assigns buttons based on:
|
|
6
|
+
*
|
|
7
|
+
* 1. **Pitch Detection**: Uses melody contour (direction, interval) to determine buttons
|
|
8
|
+
* 2. **Pattern Library**: Falls back to predefined patterns when pitch is unavailable
|
|
9
|
+
* 3. **Probability-Based Blending**: Combines pitch and pattern based on pYIN confidence
|
|
10
|
+
*
|
|
11
|
+
* Supports two controller modes:
|
|
12
|
+
* - **DDR**: 4 directional buttons with circular motion philosophy
|
|
13
|
+
* - **Guitar Hero**: 5 fret buttons with fretboard metaphor
|
|
14
|
+
*
|
|
15
|
+
* Part of the Pitch Detection & Button Mapping pipeline - Phase 2.3
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```typescript
|
|
19
|
+
* const mapper = new ButtonMapper({
|
|
20
|
+
* controllerMode: 'ddr',
|
|
21
|
+
* difficulty: 'medium',
|
|
22
|
+
* pitchInfluenceWeight: 0.8,
|
|
23
|
+
* });
|
|
24
|
+
*
|
|
25
|
+
* // Map with pitch analysis
|
|
26
|
+
* const result = mapper.map(generatedRhythm, 'medium', pitchAnalysis);
|
|
27
|
+
*
|
|
28
|
+
* // Map without pitch (pattern-only)
|
|
29
|
+
* const resultNoPitch = mapper.map(generatedRhythm, 'medium');
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
import type { ButtonMappingConfig, DDRButton, GuitarHeroButton, ButtonPattern } from '../types/ButtonMapping.js';
|
|
33
|
+
import type { GeneratedRhythm, RhythmMetadata } from './RhythmGenerator.js';
|
|
34
|
+
import type { DifficultyVariant, PresetDifficultyLevel } from '../analysis/beat/DifficultyVariantGenerator.js';
|
|
35
|
+
import type { PitchAtBeat, IntervalCategory } from './PitchBeatLinker.js';
|
|
36
|
+
/**
|
|
37
|
+
* Result of mapping buttons to a difficulty variant
|
|
38
|
+
*/
|
|
39
|
+
export interface MappedLevelResult {
|
|
40
|
+
/** The difficulty variant with keys assigned to beats */
|
|
41
|
+
variant: DifficultyVariant;
|
|
42
|
+
/** Original rhythm metadata preserved */
|
|
43
|
+
rhythmMetadata: RhythmMetadata;
|
|
44
|
+
/** Button mapping metadata */
|
|
45
|
+
buttonMetadata: ButtonMappingMetadata;
|
|
46
|
+
/** Per-beat key assignments (beat index → button key) from the ButtonMapper */
|
|
47
|
+
keyAssignments: Map<number, string>;
|
|
48
|
+
/** Per-beat mapping source (beat index → 'pitch' | 'pattern') */
|
|
49
|
+
mappingSources: Map<number, 'pitch' | 'pattern'>;
|
|
50
|
+
/** Per-beat pattern IDs (beat index → pattern ID, undefined for pitch-sourced beats) */
|
|
51
|
+
mappingPatternIds: Map<number, string | undefined>;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Metadata about the button mapping process
|
|
55
|
+
*/
|
|
56
|
+
export interface ButtonMappingMetadata {
|
|
57
|
+
/** Controller mode used for mapping */
|
|
58
|
+
controllerMode: 'ddr' | 'guitar_hero' | 'tap';
|
|
59
|
+
/** All unique keys used in the chart */
|
|
60
|
+
keysUsed: string[];
|
|
61
|
+
/** Number of beats influenced by pitch */
|
|
62
|
+
pitchInfluencedBeats: number;
|
|
63
|
+
/** Number of beats from pattern library */
|
|
64
|
+
patternInfluencedBeats: number;
|
|
65
|
+
/** IDs of patterns used */
|
|
66
|
+
patternsUsed: string[];
|
|
67
|
+
/** Statistics about button distribution */
|
|
68
|
+
buttonDistribution: Map<string, number>;
|
|
69
|
+
/** Direction statistics (if pitch analysis was provided) */
|
|
70
|
+
directionStats?: {
|
|
71
|
+
up: number;
|
|
72
|
+
down: number;
|
|
73
|
+
stable: number;
|
|
74
|
+
none: number;
|
|
75
|
+
};
|
|
76
|
+
/** Interval statistics (if pitch analysis was provided) */
|
|
77
|
+
intervalStats?: {
|
|
78
|
+
unison: number;
|
|
79
|
+
small: number;
|
|
80
|
+
medium: number;
|
|
81
|
+
large: number;
|
|
82
|
+
very_large: number;
|
|
83
|
+
};
|
|
84
|
+
/** Band statistics (if pitch analysis was provided) - which frequency bands pitches came from */
|
|
85
|
+
bandStats?: {
|
|
86
|
+
low: number;
|
|
87
|
+
mid: number;
|
|
88
|
+
high: number;
|
|
89
|
+
};
|
|
90
|
+
/** Pattern placements — groups of consecutive beats sharing the same patternId */
|
|
91
|
+
patternPlacements?: {
|
|
92
|
+
patternId: string;
|
|
93
|
+
startIndex: number;
|
|
94
|
+
length: number;
|
|
95
|
+
}[];
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* A consecutive run of beats that need pattern filling.
|
|
99
|
+
*
|
|
100
|
+
* Identified by scanning pitch classification results: consecutive beats
|
|
101
|
+
* with no pitch-derived key form a single run. Each run records the
|
|
102
|
+
* surrounding context keys for smooth boundary transitions.
|
|
103
|
+
*/
|
|
104
|
+
export interface PatternRun<T extends DDRButton | GuitarHeroButton> {
|
|
105
|
+
/** Start index in the beat array */
|
|
106
|
+
startIndex: number;
|
|
107
|
+
/** End index (exclusive) in the beat array */
|
|
108
|
+
endIndex: number;
|
|
109
|
+
/** Number of beats in this run */
|
|
110
|
+
length: number;
|
|
111
|
+
/** Key from the pitch beat immediately before this run (null if run starts at beat 0) */
|
|
112
|
+
previousKey: T | null;
|
|
113
|
+
/** Key from the pitch beat immediately after this run (null if run ends at last beat) */
|
|
114
|
+
nextKey: T | null;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Result of placing a pattern within a run.
|
|
118
|
+
*
|
|
119
|
+
* Each placement represents a single pattern that was selected and
|
|
120
|
+
* written into a contiguous range of beats within a pattern run.
|
|
121
|
+
*/
|
|
122
|
+
export interface PatternPlacement<T extends DDRButton | GuitarHeroButton> {
|
|
123
|
+
/** The pattern that was placed */
|
|
124
|
+
pattern: ButtonPattern<T>;
|
|
125
|
+
/** Beat index where this pattern starts */
|
|
126
|
+
startIndex: number;
|
|
127
|
+
/** Number of beats actually filled by this pattern */
|
|
128
|
+
filledLength: number;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* DDR Circular Motion Transition Table
|
|
132
|
+
*
|
|
133
|
+
* Determines next button based on: current position + pitch direction + interval size.
|
|
134
|
+
* Follows the natural clockwise flow: up → right → down → left → up
|
|
135
|
+
*/
|
|
136
|
+
declare const DDR_TRANSITIONS: Record<DDRButton, {
|
|
137
|
+
ascending: Record<IntervalCategory, DDRButton>;
|
|
138
|
+
descending: Record<IntervalCategory, DDRButton>;
|
|
139
|
+
stable: DDRButton;
|
|
140
|
+
}>;
|
|
141
|
+
/**
|
|
142
|
+
* Guitar Hero Fret Transition Table (with string wrap)
|
|
143
|
+
*
|
|
144
|
+
* Determines next fret based on: current position + pitch direction + interval size.
|
|
145
|
+
* String wrap: ascending past 5 → wraps to 2-4; descending past 1 → wraps to 4-2
|
|
146
|
+
*/
|
|
147
|
+
declare const GUITAR_HERO_TRANSITIONS: Record<GuitarHeroButton, {
|
|
148
|
+
ascending: Record<IntervalCategory, GuitarHeroButton>;
|
|
149
|
+
descending: Record<IntervalCategory, GuitarHeroButton>;
|
|
150
|
+
stable: GuitarHeroButton;
|
|
151
|
+
}>;
|
|
152
|
+
/**
|
|
153
|
+
* Scan pitch classification results and group consecutive null beats into runs.
|
|
154
|
+
*
|
|
155
|
+
* A "run" is a maximal sequence of consecutive beats that all need pattern filling
|
|
156
|
+
* (i.e., their pitchKey is null). Each run records the surrounding context keys
|
|
157
|
+
* so that pattern selection can produce smooth boundary transitions.
|
|
158
|
+
*
|
|
159
|
+
* @param pitchKeys - Array from classifyBeats; null = needs pattern, non-null = has pitch key
|
|
160
|
+
* @returns Array of PatternRun objects (empty if all beats have pitch keys)
|
|
161
|
+
*/
|
|
162
|
+
export declare function identifyPatternRuns<T extends DDRButton | GuitarHeroButton>(pitchKeys: (T | null)[]): PatternRun<T>[];
|
|
163
|
+
/**
|
|
164
|
+
* Check if a full multi-beat pattern is compatible for placement within a run.
|
|
165
|
+
*
|
|
166
|
+
* Evaluates boundary transitions at both ends of the pattern:
|
|
167
|
+
* - **Entry**: `pattern.keys[0]` must differ from the previous key (no immediate repeat).
|
|
168
|
+
* - **Exit**: `pattern.keys[last]` must allow a smooth transition to the next key.
|
|
169
|
+
* - DDR: last key must be adjacent to or same as next key (uses `DDR_ADJACENT`).
|
|
170
|
+
* - Guitar Hero: last key must be between previous and next, or moving toward next.
|
|
171
|
+
*
|
|
172
|
+
* The pattern must also fit within the remaining space of the run.
|
|
173
|
+
* Difficulty filtering is handled by the caller in `selectPatternForRun()`.
|
|
174
|
+
*
|
|
175
|
+
* @param pattern - The pattern to check
|
|
176
|
+
* @param run - The run this pattern would be placed in
|
|
177
|
+
* @param positionInRun - Offset from the start of the run (0 = start of run)
|
|
178
|
+
* @param previousKey - Key immediately before this pattern (run previousKey or previous pattern's last key)
|
|
179
|
+
* @param nextKey - Key immediately after this pattern (run nextKey, or null if more patterns follow)
|
|
180
|
+
* @returns True if the pattern is compatible with the run boundaries
|
|
181
|
+
*/
|
|
182
|
+
export declare function isPatternRunCompatible<T extends DDRButton | GuitarHeroButton>(pattern: ButtonPattern<T>, run: PatternRun<T>, positionInRun: number, previousKey: T | null, nextKey: T | null): boolean;
|
|
183
|
+
/**
|
|
184
|
+
* Select patterns to fill a pattern run using a greedy largest-first strategy.
|
|
185
|
+
*
|
|
186
|
+
* The algorithm walks through the run left-to-right:
|
|
187
|
+
* 1. Filters patterns by difficulty and sorts by length (largest first).
|
|
188
|
+
* 2. At each position, tries to find a compatible pattern:
|
|
189
|
+
* - **Exact fit**: a pattern whose length equals the remaining space, with
|
|
190
|
+
* the run's `nextKey` used for exit-transition checking.
|
|
191
|
+
* - **Largest fit**: the largest compatible pattern (intermediate placements
|
|
192
|
+
* use `null` for nextKey, so exit transitions are deferred).
|
|
193
|
+
* 3. If no compatible pattern exists at all, the beat is filled via
|
|
194
|
+
* `interpolateButton()` and recorded as a synthetic single-key placement.
|
|
195
|
+
*
|
|
196
|
+
* Variety constraints (applied in order of priority):
|
|
197
|
+
* - Never repeat the same pattern consecutively within a run.
|
|
198
|
+
* - Prefer a different category from the last placed pattern.
|
|
199
|
+
* - Optionally avoid patterns recently used across runs (via `recentlyUsedPatternIds`).
|
|
200
|
+
*
|
|
201
|
+
* @param run - The pattern run to fill
|
|
202
|
+
* @param patternLibrary - All available patterns for the controller mode
|
|
203
|
+
* @param maxDifficulty - Maximum pattern difficulty to consider
|
|
204
|
+
* @param recentlyUsedPatternIds - Optional set of pattern IDs used in recent
|
|
205
|
+
* measures (for cross-run variety). Defaults to no constraint.
|
|
206
|
+
* @returns Array of placements covering every beat in the run
|
|
207
|
+
*/
|
|
208
|
+
export declare function selectPatternForRun<T extends DDRButton | GuitarHeroButton>(run: PatternRun<T>, patternLibrary: ButtonPattern<T>[], maxDifficulty: number, recentlyUsedPatternIds?: Set<string>, randomFn?: () => number): PatternPlacement<T>[];
|
|
209
|
+
/**
|
|
210
|
+
* Write pattern keys and IDs into the final arrays, preserving pitch-derived keys.
|
|
211
|
+
*
|
|
212
|
+
* For each run, each placement writes its pattern's keys sequentially into the
|
|
213
|
+
* output arrays. Beats that already have a pitch-derived key (non-null in
|
|
214
|
+
* `pitchKeys`) are left untouched.
|
|
215
|
+
*
|
|
216
|
+
* @param pitchKeys - Array from classifyBeats; non-null entries are pitch-derived
|
|
217
|
+
* @param runs - Pattern runs from identifyPatternRuns()
|
|
218
|
+
* @param placementsByRun - Pattern placements from selectPatternForRun(), one array per run
|
|
219
|
+
* @returns Object with fully populated keys and patternIds arrays
|
|
220
|
+
*/
|
|
221
|
+
export declare function placePatterns<T extends DDRButton | GuitarHeroButton>(pitchKeys: (T | null)[], runs: PatternRun<T>[], placementsByRun: PatternPlacement<T>[][]): {
|
|
222
|
+
keys: T[];
|
|
223
|
+
patternIds: (string | undefined)[];
|
|
224
|
+
};
|
|
225
|
+
/**
|
|
226
|
+
* Button Mapper
|
|
227
|
+
*
|
|
228
|
+
* Maps pitch analysis to button assignments for rhythm games.
|
|
229
|
+
* Supports DDR (4 directional buttons) and Guitar Hero (5 fret buttons) modes.
|
|
230
|
+
*/
|
|
231
|
+
export declare class ButtonMapper {
|
|
232
|
+
private config;
|
|
233
|
+
/**
|
|
234
|
+
* Create a new ButtonMapper
|
|
235
|
+
*
|
|
236
|
+
* @param config - Configuration options (partial, defaults applied)
|
|
237
|
+
*/
|
|
238
|
+
constructor(config?: Partial<ButtonMappingConfig>);
|
|
239
|
+
/**
|
|
240
|
+
* Generate a deterministic random float for a given context.
|
|
241
|
+
* Uses MurmurHash so the same seed + context always produces the same value.
|
|
242
|
+
* Falls back to Math.random() when no seed is configured.
|
|
243
|
+
*/
|
|
244
|
+
private seededRandom;
|
|
245
|
+
/**
|
|
246
|
+
* Get the current configuration
|
|
247
|
+
*/
|
|
248
|
+
getConfig(): ButtonMappingConfig;
|
|
249
|
+
/**
|
|
250
|
+
* Map buttons for a standalone difficulty variant
|
|
251
|
+
*
|
|
252
|
+
* Takes a difficulty variant directly (e.g., from generateAtDensity()) along with
|
|
253
|
+
* rhythm metadata, then assigns buttons based on pitch direction/interval and
|
|
254
|
+
* pattern library fallback.
|
|
255
|
+
*
|
|
256
|
+
* For 'custom' difficulty variants, pattern selection defaults to 'medium' difficulty.
|
|
257
|
+
*
|
|
258
|
+
* @param variant - The difficulty variant to map (can be preset or 'custom')
|
|
259
|
+
* @param rhythmMetadata - Rhythm metadata from the GeneratedRhythm
|
|
260
|
+
* @param pitchAnalysis - Optional pitch analysis from MelodyContourAnalyzer
|
|
261
|
+
* @returns Mapped level result with button assignments
|
|
262
|
+
*/
|
|
263
|
+
mapVariant(variant: DifficultyVariant, rhythmMetadata: RhythmMetadata, pitchAnalysis?: PitchAtBeat[]): MappedLevelResult;
|
|
264
|
+
/**
|
|
265
|
+
* Main entry point - map buttons for a difficulty variant
|
|
266
|
+
*
|
|
267
|
+
* Takes a generated rhythm and optional pitch analysis, then assigns buttons
|
|
268
|
+
* based on pitch direction/interval and pattern library fallback.
|
|
269
|
+
*
|
|
270
|
+
* @param generatedRhythm - The generated rhythm from RhythmGenerator
|
|
271
|
+
* @param difficulty - Which difficulty variant to map (preset only, not 'custom')
|
|
272
|
+
* @param pitchAnalysis - Optional pitch analysis from MelodyContourAnalyzer
|
|
273
|
+
* @returns Mapped level result with button assignments
|
|
274
|
+
*/
|
|
275
|
+
map(generatedRhythm: GeneratedRhythm, difficulty: PresetDifficultyLevel, pitchAnalysis?: PitchAtBeat[]): MappedLevelResult;
|
|
276
|
+
/**
|
|
277
|
+
* Map buttons for all three difficulty variants
|
|
278
|
+
*
|
|
279
|
+
* @param generatedRhythm - The generated rhythm from RhythmGenerator
|
|
280
|
+
* @param pitchAnalysis - Optional pitch analysis from MelodyContourAnalyzer
|
|
281
|
+
* @returns Object with mapped results for each difficulty
|
|
282
|
+
*/
|
|
283
|
+
mapAll(generatedRhythm: GeneratedRhythm, pitchAnalysis?: PitchAtBeat[]): {
|
|
284
|
+
easy: MappedLevelResult;
|
|
285
|
+
medium: MappedLevelResult;
|
|
286
|
+
hard: MappedLevelResult;
|
|
287
|
+
};
|
|
288
|
+
/**
|
|
289
|
+
* Map buttons for a single difficulty variant using run-based pattern placement.
|
|
290
|
+
*
|
|
291
|
+
* Pipeline:
|
|
292
|
+
* 1. classifyBeats() → pitchKeys, probabilities
|
|
293
|
+
* 2. classifyPitchVsPattern() → boolean classification (pitch vs pattern)
|
|
294
|
+
* 3. Build workingKeys array (null for pattern beats, pitch key for pitch beats)
|
|
295
|
+
* 4. identifyPatternRuns() → runs of consecutive pattern beats
|
|
296
|
+
* 5. selectPatternForRun() per run → pattern placements
|
|
297
|
+
* 6. placePatterns() → final keys + patternIds
|
|
298
|
+
* 7. Build ButtonAssignment[] with proper source/patternId per beat
|
|
299
|
+
* 8. applyConsecutiveLimit() → fix any monotony
|
|
300
|
+
*/
|
|
301
|
+
private mapButtons;
|
|
302
|
+
/**
|
|
303
|
+
* Classify each beat as pitch or pattern based on probability and weight.
|
|
304
|
+
*
|
|
305
|
+
* Uses probability-based blending logic:
|
|
306
|
+
* sorts pitch beats by probability (lowest first), replaces the bottom
|
|
307
|
+
* `(1 - weight)` fraction with patterns. Beats with no pitch data always
|
|
308
|
+
* use patterns regardless of weight.
|
|
309
|
+
*
|
|
310
|
+
* @param pitchKeys - Array from classifyBeats; null = no pitch available
|
|
311
|
+
* @param probabilities - Per-beat pitch probabilities
|
|
312
|
+
* @param weight - pitchInfluenceWeight (0.0 = all pattern, 1.0 = all pitch)
|
|
313
|
+
* @returns Boolean array where true = pitch, false = pattern
|
|
314
|
+
*/
|
|
315
|
+
private classifyPitchVsPattern;
|
|
316
|
+
/**
|
|
317
|
+
* Get maximum pattern difficulty based on game difficulty
|
|
318
|
+
*/
|
|
319
|
+
private getMaxPatternDifficulty;
|
|
320
|
+
/**
|
|
321
|
+
* Apply consecutive same-key limit to prevent monotonous patterns
|
|
322
|
+
*/
|
|
323
|
+
private applyConsecutiveLimit;
|
|
324
|
+
/**
|
|
325
|
+
* Build metadata about the button mapping process
|
|
326
|
+
*/
|
|
327
|
+
private buildMetadata;
|
|
328
|
+
/**
|
|
329
|
+
* Get the DDR transition table (for debugging/visualization)
|
|
330
|
+
*/
|
|
331
|
+
static getDDRTransitions(): typeof DDR_TRANSITIONS;
|
|
332
|
+
/**
|
|
333
|
+
* Get the Guitar Hero transition table (for debugging/visualization)
|
|
334
|
+
*/
|
|
335
|
+
static getGuitarHeroTransitions(): typeof GUITAR_HERO_TRANSITIONS;
|
|
336
|
+
/**
|
|
337
|
+
* Get all available buttons for the current controller mode
|
|
338
|
+
*/
|
|
339
|
+
getAvailableButtons(): (DDRButton | GuitarHeroButton)[];
|
|
340
|
+
/**
|
|
341
|
+
* Check if a button is valid for the current controller mode
|
|
342
|
+
*/
|
|
343
|
+
isValidButton(button: unknown): button is DDRButton | GuitarHeroButton;
|
|
344
|
+
}
|
|
345
|
+
export {};
|
|
346
|
+
//# sourceMappingURL=ButtonMapper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonMapper.d.ts","sourceRoot":"","sources":["../../../src/core/generation/ButtonMapper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,KAAK,EACR,mBAAmB,EACnB,SAAS,EACT,gBAAgB,EAChB,aAAa,EAChB,MAAM,2BAA2B,CAAC;AAUnC,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC5E,OAAO,KAAK,EAAE,iBAAiB,EAAmB,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AAChI,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAkB,MAAM,sBAAsB,CAAC;AAO1F;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAC9B,yDAAyD;IACzD,OAAO,EAAE,iBAAiB,CAAC;IAE3B,yCAAyC;IACzC,cAAc,EAAE,cAAc,CAAC;IAE/B,8BAA8B;IAC9B,cAAc,EAAE,qBAAqB,CAAC;IAEtC,+EAA+E;IAC/E,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEpC,iEAAiE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;;;;;;;;;;;;OAaG;IACH,UAAU,CACN,OAAO,EAAE,iBAAiB,EAC1B,cAAc,EAAE,cAAc,EAC9B,aAAa,CAAC,EAAE,WAAW,EAAE,GAC9B,iBAAiB;IA2BpB;;;;;;;;;;OAUG;IACH,GAAG,CACC,eAAe,EAAE,eAAe,EAChC,UAAU,EAAE,qBAAqB,EACjC,aAAa,CAAC,EAAE,WAAW,EAAE,GAC9B,iBAAiB;IAQpB;;;;;;OAMG;IACH,MAAM,CACF,eAAe,EAAE,eAAe,EAChC,aAAa,CAAC,EAAE,WAAW,EAAE,GAC9B;QACC,IAAI,EAAE,iBAAiB,CAAC;QACxB,MAAM,EAAE,iBAAiB,CAAC;QAC1B,IAAI,EAAE,iBAAiB,CAAC;KAC3B;IAYD;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,UAAU;IAwGlB;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,sBAAsB;IAiD9B;;OAEG;IACH,OAAO,CAAC,uBAAuB;IAU/B;;OAEG;IACH,OAAO,CAAC,qBAAqB;IA+B7B;;OAEG;IACH,OAAO,CAAC,aAAa;IAgGrB;;OAEG;IACH,MAAM,CAAC,iBAAiB,IAAI,OAAO,eAAe;IAIlD;;OAEG;IACH,MAAM,CAAC,wBAAwB,IAAI,OAAO,uBAAuB;IAIjE;;OAEG;IACH,mBAAmB,IAAI,CAAC,SAAS,GAAG,gBAAgB,CAAC,EAAE;IAQvD;;OAEG;IACH,aAAa,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,SAAS,GAAG,gBAAgB;CAOzE"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Button Pattern Library
|
|
3
|
+
*
|
|
4
|
+
* Contains predefined button patterns for DDR and Guitar Hero controller modes.
|
|
5
|
+
* These patterns serve as fallback when pitch detection probability is low or
|
|
6
|
+
* when pitchInfluenceWeight is set to use more pattern-driven mapping.
|
|
7
|
+
*
|
|
8
|
+
* @module ButtonPatternLibrary
|
|
9
|
+
*/
|
|
10
|
+
import type { DDRButton, GuitarHeroButton, ButtonPattern, ButtonPatternCategory, ButtonPatternLibrary, DDRPatternLibrary, GuitarHeroPatternLibrary } from '../types/ButtonMapping.js';
|
|
11
|
+
/**
|
|
12
|
+
* Complete DDR pattern library.
|
|
13
|
+
* Contains all DDR patterns organized by category and difficulty.
|
|
14
|
+
*/
|
|
15
|
+
export declare const DDR_PATTERN_LIBRARY: DDRPatternLibrary;
|
|
16
|
+
/**
|
|
17
|
+
* Complete Guitar Hero pattern library.
|
|
18
|
+
* Contains all Guitar Hero patterns organized by category and difficulty.
|
|
19
|
+
*/
|
|
20
|
+
export declare const GUITAR_HERO_PATTERN_LIBRARY: GuitarHeroPatternLibrary;
|
|
21
|
+
/**
|
|
22
|
+
* Get a pattern library by controller mode.
|
|
23
|
+
*
|
|
24
|
+
* @param mode - The controller mode
|
|
25
|
+
* @returns The appropriate pattern library
|
|
26
|
+
*/
|
|
27
|
+
export declare function getPatternLibrary(mode: 'ddr'): DDRPatternLibrary;
|
|
28
|
+
export declare function getPatternLibrary(mode: 'guitar_hero'): GuitarHeroPatternLibrary;
|
|
29
|
+
/**
|
|
30
|
+
* Get all patterns of a specific category from a library.
|
|
31
|
+
*
|
|
32
|
+
* @param library - The pattern library
|
|
33
|
+
* @param category - The category to filter by
|
|
34
|
+
* @returns Array of patterns in that category
|
|
35
|
+
*/
|
|
36
|
+
export declare function getPatternsByCategory<T extends DDRButton | GuitarHeroButton>(library: ButtonPatternLibrary<T>, category: ButtonPatternCategory): ButtonPattern<T>[];
|
|
37
|
+
/**
|
|
38
|
+
* Get all patterns within a difficulty range.
|
|
39
|
+
*
|
|
40
|
+
* @param library - The pattern library
|
|
41
|
+
* @param minDifficulty - Minimum difficulty (inclusive)
|
|
42
|
+
* @param maxDifficulty - Maximum difficulty (inclusive)
|
|
43
|
+
* @returns Array of patterns in the difficulty range
|
|
44
|
+
*/
|
|
45
|
+
export declare function getPatternsByDifficulty<T extends DDRButton | GuitarHeroButton>(library: ButtonPatternLibrary<T>, minDifficulty?: number, maxDifficulty?: number): ButtonPattern<T>[];
|
|
46
|
+
/**
|
|
47
|
+
* Get patterns that match all required tags.
|
|
48
|
+
*
|
|
49
|
+
* @param library - The pattern library
|
|
50
|
+
* @param requiredTags - Tags that must all be present
|
|
51
|
+
* @returns Array of patterns matching all tags
|
|
52
|
+
*/
|
|
53
|
+
export declare function getPatternsByTags<T extends DDRButton | GuitarHeroButton>(library: ButtonPatternLibrary<T>, requiredTags: string[]): ButtonPattern<T>[];
|
|
54
|
+
/**
|
|
55
|
+
* Get patterns that have a specific key count.
|
|
56
|
+
*
|
|
57
|
+
* @param library - The pattern library
|
|
58
|
+
* @param keyCount - The number of keys in the pattern
|
|
59
|
+
* @returns Array of patterns with that key count
|
|
60
|
+
*/
|
|
61
|
+
export declare function getPatternsByKeyCount<T extends DDRButton | GuitarHeroButton>(library: ButtonPatternLibrary<T>, keyCount: number): ButtonPattern<T>[];
|
|
62
|
+
/**
|
|
63
|
+
* Get a random pattern from a library.
|
|
64
|
+
*
|
|
65
|
+
* @param library - The pattern library
|
|
66
|
+
* @param filter - Optional filter function
|
|
67
|
+
* @returns A random pattern, or undefined if no patterns match
|
|
68
|
+
*/
|
|
69
|
+
export declare function getRandomPattern<T extends DDRButton | GuitarHeroButton>(library: ButtonPatternLibrary<T>, filter?: (pattern: ButtonPattern<T>) => boolean): ButtonPattern<T> | undefined;
|
|
70
|
+
/**
|
|
71
|
+
* Get pattern by ID.
|
|
72
|
+
*
|
|
73
|
+
* @param library - The pattern library
|
|
74
|
+
* @param id - The pattern ID to find
|
|
75
|
+
* @returns The pattern, or undefined if not found
|
|
76
|
+
*/
|
|
77
|
+
export declare function getPatternById<T extends DDRButton | GuitarHeroButton>(library: ButtonPatternLibrary<T>, id: string): ButtonPattern<T> | undefined;
|
|
78
|
+
/**
|
|
79
|
+
* Get statistics about a pattern library.
|
|
80
|
+
*
|
|
81
|
+
* @param library - The pattern library
|
|
82
|
+
* @returns Statistics object
|
|
83
|
+
*/
|
|
84
|
+
export declare function getPatternLibraryStats<T extends DDRButton | GuitarHeroButton>(library: ButtonPatternLibrary<T>): {
|
|
85
|
+
totalPatterns: number;
|
|
86
|
+
byCategory: Record<ButtonPatternCategory, number>;
|
|
87
|
+
byDifficulty: Record<number, number>;
|
|
88
|
+
averageKeyCount: number;
|
|
89
|
+
minKeys: number;
|
|
90
|
+
maxKeys: number;
|
|
91
|
+
};
|
|
92
|
+
//# sourceMappingURL=ButtonPatternLibrary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonPatternLibrary.d.ts","sourceRoot":"","sources":["../../../src/core/generation/ButtonPatternLibrary.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EACR,SAAS,EACT,gBAAgB,EAChB,aAAa,EACb,qBAAqB,EACrB,oBAAoB,EACpB,iBAAiB,EACjB,wBAAwB,EAC3B,MAAM,2BAA2B,CAAC;AAsrCnC;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,iBAAgE,CAAC;AAEnG;;;GAGG;AACH,eAAO,MAAM,2BAA2B,EAAE,wBAGzC,CAAC;AAMF;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,KAAK,GAAG,iBAAiB,CAAC;AAClE,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,aAAa,GAAG,wBAAwB,CAAC;AAKjF;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,SAAS,SAAS,GAAG,gBAAgB,EACxE,OAAO,EAAE,oBAAoB,CAAC,CAAC,CAAC,EAChC,QAAQ,EAAE,qBAAqB,GAChC,aAAa,CAAC,CAAC,CAAC,EAAE,CAEpB;AAED;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,SAAS,GAAG,gBAAgB,EAC1E,OAAO,EAAE,oBAAoB,CAAC,CAAC,CAAC,EAChC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