Summary
HighTideLight's precise AST parsing and coordinate mapping system is working correctly, but reveals several algorithmic
challenges in mapping SuperDirt audio events to source code tokens for advanced TidalCycles patterns.
Current Status
- ✅ AST parsing: Perfect precision with exact token coordinates
- ✅ Basic patterns: Simple patterns like "bd sn hh" work correctly
- ✅ OSC communication: Reliable data flow between Neovim and SuperCollider
- ❌ Complex patterns: Multiple edge cases need algorithmic solutions
Issues Identified
- Duplicate Sound Events with Missing Indices
Pattern: d4 $ sound "cp cp cp cp cp"
Expected: Sequential highlighting of all 5 cp tokensActual: Highlights indices 0,1,3,4 but consistently skips index 2
Analysis: SuperDirt appears to not generate audio events for certain pattern positions, possibly due to voice allocation
limits or timing conflicts
- Multi-Parameter Instrument Patterns
Pattern: d1 $ s "superpiano" # n "[c5 e5 b4 c5 d5]"
Expected: Highlight individual notes (c5, e5, etc.) when they play
Actual: Only highlights instrument name (superpiano)Analysis: Need algorithm to map instrument+parameter combinations to
correct source tokens
- Positional Token Conflicts
Pattern: Multiple note tokens at same source position (chords/arpeggiation)
Issue: When multiple tokens share coordinates, current algorithm only selects one
Need: Multi-token highlighting or priority-based selection system
- Semantic Mapping Challenges
Issue: SuperDirt reports sound='superpiano' but actual note being played is c5
Need: Context-aware mapping that understands instrument/parameter relationships
Technical Details
- Source maps correctly parse all tokens with precise coordinates
- OSC communication captures all SuperDirt audio events accurately
- Current cycle-based token selection works for simple cases
- Missing events appear to be SuperDirt-side limitations, not parsing issues
Future Algorithm Requirements
- Multi-layer highlighting: Simultaneous instrument + parameter visualization
- Context-aware token selection: Semantic understanding of TidalCycles syntax
- Fallback highlighting: Show expected-but-missing events differently
- Priority-based mapping: Handle conflicts when multiple tokens could match
- Advanced pattern support: Polyrhythms, transformations, effects chains
Impact
These issues prevent accurate visualization of complex TidalCycles patterns, limiting the plugin's usefulness for
advanced live coding workflows. The foundational precision is excellent - need sophisticated matching algorithms for
production readiness.
Summary
HighTideLight's precise AST parsing and coordinate mapping system is working correctly, but reveals several algorithmic
challenges in mapping SuperDirt audio events to source code tokens for advanced TidalCycles patterns.
Current Status
Issues Identified
Pattern: d4 $ sound "cp cp cp cp cp"
Expected: Sequential highlighting of all 5 cp tokensActual: Highlights indices 0,1,3,4 but consistently skips index 2
Analysis: SuperDirt appears to not generate audio events for certain pattern positions, possibly due to voice allocation
limits or timing conflicts
Pattern: d1 $ s "superpiano" # n "[c5 e5 b4 c5 d5]"
Expected: Highlight individual notes (c5, e5, etc.) when they play
Actual: Only highlights instrument name (superpiano)Analysis: Need algorithm to map instrument+parameter combinations to
correct source tokens
Pattern: Multiple note tokens at same source position (chords/arpeggiation)
Issue: When multiple tokens share coordinates, current algorithm only selects one
Need: Multi-token highlighting or priority-based selection system
Issue: SuperDirt reports sound='superpiano' but actual note being played is c5
Need: Context-aware mapping that understands instrument/parameter relationships
Technical Details
Future Algorithm Requirements
Impact
These issues prevent accurate visualization of complex TidalCycles patterns, limiting the plugin's usefulness for
advanced live coding workflows. The foundational precision is excellent - need sophisticated matching algorithms for
production readiness.