@karaplay/file-coder 1.5.0 β†’ 1.5.2

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/DEMO_ENHANCED.md CHANGED
@@ -1,168 +1,241 @@
1
- # ✨ Demo Enhanced with EMK Analysis & Comparison
2
-
3
- ## 🎯 New Features Added
4
-
5
- ### 1. **EMK File Analysis** (Before Conversion)
6
- When you select an EMK file, it now automatically analyzes:
7
- - βœ… Title and Artist (Thai encoding)
8
- - βœ… Format type (ZXIO or MThd)
9
- - βœ… **Original Tempo** (BPM)
10
- - βœ… **Original Duration** (seconds and minutes)
11
- - βœ… PPQ (Ticks per beat)
12
- - βœ… Number of tracks
13
- - βœ… Number of notes
14
- - βœ… Lyric and cursor data size
15
-
16
- ### 2. **Comparison Table** (EMK vs KAR)
17
- After conversion, see a detailed comparison:
18
- - πŸ“Š Format changes
19
- - πŸ“Š Tempo ratio (e.g., 2.78x for ZXIO, 4x for MThd)
20
- - πŸ“Š Duration changes
21
- - πŸ“Š Tempo verification (βœ… or ⚠️)
22
- - πŸ“Š Track and note count
23
- - πŸ“Š Visual indicators for increases/decreases
24
-
25
- ## πŸš€ How to Use
26
-
27
- ### Step 1: Open Demo
28
- ```
29
- http://localhost:3000/demo-simple.html
30
- ```
1
+ # Demo Page Enhanced - MIDI Player
31
2
 
32
- ### Step 2: Select EMK File
33
- - Click on any EMK file
34
- - **Wait for automatic analysis** (1-2 seconds)
35
- - See original EMK info displayed
3
+ **Date:** 2026-01-13
4
+ **Version:** v1.5.0 with MIDI Player
36
5
 
37
- ### Step 3: Convert to KAR
38
- - Click "Convert to KAR"
39
- - Wait for conversion
40
- - See converted KAR info
6
+ ## 🎡 New Feature: MIDI Player
41
7
 
42
- ### Step 4: View Comparison Table
43
- - Automatically displays after conversion
44
- - Compare original vs converted values
45
- - Verify tempo ratio is correct
8
+ ### Added to `demo-simple.html`
46
9
 
47
- ### Step 5: Download & Test
48
- - Click "Download KAR" to save file
49
- - Test with external karaoke player
10
+ #### 1. **UI Components**
11
+ - ▢️ **Play Button** - Start MIDI playback
12
+ - ⏸️ **Pause Button** - Pause playback (currently restarts on resume)
13
+ - ⏹️ **Stop Button** - Stop and reset playback
14
+ - **Progress Bar** - Visual playback progress
15
+ - **Time Display** - Current time / Total duration
16
+ - **Status Display** - Shows player state and messages
50
17
 
51
- ## πŸ“Š Sample Comparison Table
18
+ #### 2. **Libraries Used**
19
+ ```html
20
+ <!-- MIDI Parser -->
21
+ <script src="https://cdn.jsdelivr.net/npm/midi-parser-js@4.0.4/src/main.min.js"></script>
22
+
23
+ <!-- Soundfont Player for audio synthesis -->
24
+ <script src="https://cdn.jsdelivr.net/npm/soundfont-player@0.12.0/dist/soundfont-player.min.js"></script>
25
+ ```
52
26
 
27
+ #### 3. **Features**
28
+ - βœ… **Auto-initialize** - Loads instrument on first play
29
+ - βœ… **Parse MIDI** - Converts base64 KAR data to playable MIDI
30
+ - βœ… **Tempo-aware** - Respects MIDI tempo events
31
+ - βœ… **Real-time progress** - Updates every 100ms
32
+ - βœ… **Multi-track support** - Plays all MIDI tracks simultaneously
33
+ - βœ… **Note scheduling** - Uses Web Audio API for precise timing
34
+ - βœ… **Piano soundfont** - Uses Acoustic Grand Piano (MusyngKite)
35
+
36
+ #### 4. **How It Works**
37
+
38
+ **Step 1: Initialization**
39
+ ```javascript
40
+ await initMidiPlayer();
41
+ // Creates AudioContext
42
+ // Loads soundfont from: https://gleitz.github.io/midi-js-soundfonts/
53
43
  ```
54
- β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
55
- β”‚ Property β”‚ Original EMK β”‚ Converted KAR β”‚ Change β”‚
56
- β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
57
- β”‚ Format β”‚ ZXIO β”‚ ZXIO β”‚ Same β”‚
58
- β”‚ Tempo (BPM) β”‚ 64.00 β”‚ 178.09 β”‚ Γ—2.78 (increase)β”‚
59
- β”‚ Duration (seconds) β”‚ 351.56 β”‚ 126.34 β”‚ Γ—0.36 (decrease)β”‚
60
- β”‚ Duration (minutes) β”‚ 5.86 β”‚ 2.11 β”‚ 64.1% shorter β”‚
61
- β”‚ PPQ β”‚ 96 β”‚ Same β”‚ Unchanged β”‚
62
- β”‚ Tracks β”‚ 25 β”‚ Same + Karaoke β”‚ +1 (lyrics) β”‚
63
- β”‚ Notes β”‚ 6313 β”‚ 6313 β”‚ Same β”‚
64
- β”‚ Tempo Ratio β”‚ - β”‚ 2.78x β”‚ βœ… Correct β”‚
65
- β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
44
+
45
+ **Step 2: Parse MIDI**
46
+ ```javascript
47
+ parseMidiData(base64Data);
48
+ // Decodes base64 β†’ Uint8Array
49
+ // Parses with MidiParser.js
50
+ // Extracts tempo, PPQ, notes
66
51
  ```
67
52
 
68
- ## 🎯 What to Verify
53
+ **Step 3: Schedule Notes**
54
+ ```javascript
55
+ // Converts ticks to seconds
56
+ ticksToSeconds(ticks, tempo, ppq);
57
+
58
+ // Schedules note events
59
+ instrument.play(midiNote, scheduleTime, options);
60
+ ```
69
61
 
70
- ### ZXIO Format (001.emk, failed01.emk)
71
- **Original EMK:**
72
- - Tempo: 64 BPM
73
- - Duration: ~5.86 minutes (351 seconds)
62
+ **Step 4: Playback Control**
63
+ ```javascript
64
+ playMidi() // Start playback
65
+ pauseMidi() // Stop all notes
66
+ stopMidi() // Reset to beginning
67
+ ```
74
68
 
75
- **Converted KAR:**
76
- - Tempo: **178.09 BPM** (2.78x)
77
- - Duration: **~2.11 minutes** (126 seconds)
78
- - Tempo Ratio: βœ… **Correct (2.78x)**
69
+ ## 🎯 Usage
79
70
 
80
- ### MThd Format (Z2510001.emk)
81
- **Original EMK:**
82
- - Tempo: 67 BPM
83
- - Duration: Variable
71
+ ### 1. Convert EMK to KAR
72
+ 1. Select an EMK file from the list
73
+ 2. Click "πŸ”„ Convert to KAR"
74
+ 3. Wait for conversion to complete
84
75
 
85
- **Converted KAR:**
86
- - Tempo: **268 BPM** (4x)
87
- - Duration: Adjusted proportionally
88
- - Tempo Ratio: βœ… **Correct (4x)**
76
+ ### 2. Play Converted KAR
77
+ 1. After successful conversion, MIDI Player appears
78
+ 2. Click "▢️ Play" to start playback
79
+ 3. Use "⏸️ Pause" or "⏹️ Stop" to control playback
89
80
 
90
- ## πŸ” New API Endpoint
81
+ ### 3. Monitor Playback
82
+ - **Progress Bar** - Shows current position
83
+ - **Time Display** - Shows current time / total duration
84
+ - **Status** - Shows player state (Playing, Paused, Stopped)
91
85
 
92
- ### POST `/api/analyze-emk`
93
- Analyze EMK file before conversion
86
+ ## πŸ”§ Technical Details
94
87
 
95
- **Request:**
96
- ```json
97
- {
98
- "filename": "001.emk"
99
- }
88
+ ### MIDI Processing
89
+
90
+ **Tempo Calculation:**
91
+ ```javascript
92
+ microsecondsPerBeat = (data[0] << 16) | (data[1] << 8) | data[2];
100
93
  ```
101
94
 
102
- **Response:**
103
- ```json
104
- {
105
- "success": true,
106
- "emkInfo": {
107
- "format": "ZXIO",
108
- "title": "ΰΈ„ΰΈ™ΰΈΰΈ£ΰΈ°ΰΈˆΰΈ­ΰΈ",
109
- "artist": "ΰΈšΰΈΈΰΉŠΰΈ„ ΰΈ¨ΰΈΈΰΈ ΰΈΰΈ²ΰΈΰΈˆΰΈ™ΰΉŒ",
110
- "tempo": "64.00",
111
- "duration": "351.56",
112
- "durationMinutes": "5.86",
113
- "ppq": 96,
114
- "tracks": 25,
115
- "notes": 6313,
116
- "hasLyrics": 3456,
117
- "hasCursor": 3742
118
- }
119
- }
95
+ **Time Conversion:**
96
+ ```javascript
97
+ seconds = (ticks Γ— microsecondsPerBeat) / (ppq Γ— 1000000)
120
98
  ```
121
99
 
122
- ## πŸ“ˆ Visual Indicators
100
+ **Note Events:**
101
+ - **Type 9 (Note On):** data[0] = note, data[1] = velocity
102
+ - **Type 8 (Note Off):** data[0] = note
103
+ - **Type 255, Meta 81:** Set Tempo event
104
+
105
+ ### Audio Synthesis
106
+
107
+ **Soundfont:**
108
+ - Source: `https://gleitz.github.io/midi-js-soundfonts/`
109
+ - Format: MusyngKite (high quality)
110
+ - Instrument: Acoustic Grand Piano
111
+
112
+ **Web Audio API:**
113
+ - Uses `AudioContext` for precise timing
114
+ - Schedules notes in advance
115
+ - Supports dynamic gain (velocity)
123
116
 
124
- ### Tempo Ratio Status
125
- - βœ… **Correct (2.78x)** - ZXIO format with correct tempo
126
- - βœ… **Correct (~4x)** - MThd format with correct tempo
127
- - ⚠️ **Unexpected** - Tempo ratio doesn't match expected value
117
+ ## πŸ“Š Testing
128
118
 
129
- ### Change Indicators
130
- - 🟑 **Yellow badge** - Increase (tempo, duration)
131
- - 🟒 **Green badge** - Decrease (expected for ZXIO duration)
132
- - βšͺ **Gray badge** - Same/Unchanged
119
+ ### Test File: `001_original_emk.emk`
120
+
121
+ **Expected Results:**
122
+ ```
123
+ Format: ZXIO
124
+ Tempo: 79 BPM
125
+ Duration: 4:43 (283 seconds)
126
+ Tracks: 25
127
+ Notes: 6313
128
+ ```
133
129
 
134
- ## πŸŽ‰ Benefits
130
+ **Playback:**
131
+ - βœ… Should play piano notes
132
+ - βœ… Should follow correct tempo (79 BPM)
133
+ - βœ… Should complete in ~4:43
134
+ - βœ… Progress bar should update smoothly
135
+ - βœ… Time display should increment correctly
135
136
 
136
- ### For Testing
137
- 1. **Before/After Comparison** - See exact changes from conversion
138
- 2. **Tempo Verification** - Confirm correct ratio is applied
139
- 3. **Duration Accuracy** - Verify music length is correct
140
- 4. **Format Detection** - Ensure ZXIO vs MThd is identified correctly
137
+ ## πŸ› Known Limitations
141
138
 
142
- ### For Documentation
143
- 1. **Clear Evidence** - Shows conversion works correctly
144
- 2. **Ratio Validation** - Proves 2.78x (ZXIO) and 4x (MThd) formulas
145
- 3. **Quality Assurance** - Demonstrates accurate metadata preservation
139
+ 1. **Pause/Resume**
140
+ - Currently restarts playback from beginning
141
+ - Full resume from pause position requires state tracking
146
142
 
147
- ### For Debugging
148
- 1. **Original Values** - Reference point for troubleshooting
149
- 2. **Detailed Metrics** - Track count, note count, PPQ
150
- 3. **Format Info** - Identify which conversion path was used
143
+ 2. **Instrument**
144
+ - Only uses piano soundfont
145
+ - Does not respect MIDI program changes (instrument selection)
151
146
 
152
- ## πŸš€ Ready to Test!
147
+ 3. **Performance**
148
+ - Large MIDI files (>10,000 notes) may cause lag
149
+ - All notes are scheduled at once
153
150
 
154
- **Server is running at:**
151
+ 4. **Browser Support**
152
+ - Requires Web Audio API support
153
+ - Tested on Chrome, Firefox, Safari
154
+
155
+ ## πŸš€ Future Improvements
156
+
157
+ 1. **Lyrics Display**
158
+ - Show synchronized lyrics during playback
159
+ - Highlight current lyric line
160
+
161
+ 2. **Multiple Instruments**
162
+ - Load different soundfonts per track
163
+ - Respect MIDI program changes
164
+
165
+ 3. **Better Pause**
166
+ - Resume from exact pause position
167
+ - Maintain note states
168
+
169
+ 4. **Visualization**
170
+ - Piano roll display
171
+ - Waveform visualization
172
+ - Spectrum analyzer
173
+
174
+ 5. **Playback Controls**
175
+ - Speed control (0.5x, 1x, 2x)
176
+ - Volume control
177
+ - Seek bar (click to jump)
178
+
179
+ ## πŸ“ Code Structure
180
+
181
+ ```
182
+ demo-simple.html
183
+ β”œβ”€β”€ UI Components
184
+ β”‚ β”œβ”€β”€ Play/Pause/Stop buttons
185
+ β”‚ β”œβ”€β”€ Progress bar
186
+ β”‚ β”œβ”€β”€ Time display
187
+ β”‚ └── Status panel
188
+ β”‚
189
+ β”œβ”€β”€ MIDI Player Object
190
+ β”‚ β”œβ”€β”€ ac: AudioContext
191
+ β”‚ β”œβ”€β”€ instrument: Soundfont instance
192
+ β”‚ β”œβ”€β”€ midiData: Parsed MIDI
193
+ β”‚ └── State: isPlaying, isPaused, etc.
194
+ β”‚
195
+ └── Functions
196
+ β”œβ”€β”€ initMidiPlayer() - Initialize audio
197
+ β”œβ”€β”€ parseMidiData() - Parse MIDI from base64
198
+ β”œβ”€β”€ playMidi() - Start playback
199
+ β”œβ”€β”€ pauseMidi() - Pause playback
200
+ β”œβ”€β”€ stopMidi() - Stop playback
201
+ └── ticksToSeconds() - Convert MIDI ticks to time
155
202
  ```
156
- http://localhost:3000/demo-simple.html
203
+
204
+ ## βœ… Verification
205
+
206
+ ### Server Running
207
+ ```bash
208
+ npm run demo
209
+ # Server: http://localhost:3000
210
+ # Demo: http://localhost:3000/demo-simple.html
157
211
  ```
158
212
 
159
- **Try it now:**
160
- 1. Select **001.emk** (ZXIO format)
161
- 2. See original info: 64 BPM, 5.86 minutes
162
- 3. Convert to KAR
163
- 4. See comparison: 178.09 BPM, 2.11 minutes
164
- 5. Verify: βœ… Tempo Ratio 2.78x Correct!
213
+ ### Test Conversion
214
+ 1. Open: `http://localhost:3000/demo-simple.html`
215
+ 2. Select: `001_original_emk.emk`
216
+ 3. Click: "πŸ”„ Convert to KAR"
217
+ 4. Verify: Tempo = 79 BPM, Duration = 4:43
218
+
219
+ ### Test Playback
220
+ 1. Click: "▢️ Play"
221
+ 2. Verify: Piano notes play
222
+ 3. Verify: Progress bar moves
223
+ 4. Verify: Time display updates
224
+ 5. Click: "⏹️ Stop"
225
+ 6. Verify: Playback stops, progress resets
165
226
 
166
227
  ---
167
228
 
168
- **Perfect for demonstrating v1.4.9 fixes! 🎀✨**
229
+ ## 🎊 Status: βœ… Complete
230
+
231
+ **Demo Page Features:**
232
+ - βœ… EMK file list
233
+ - βœ… File selection
234
+ - βœ… EMK analysis (before conversion)
235
+ - βœ… EMK to KAR conversion
236
+ - βœ… Metadata display
237
+ - βœ… Comparison table (EMK vs KAR)
238
+ - βœ… KAR file download
239
+ - βœ… **MIDI Player** (NEW!)
240
+
241
+ **Ready for testing and demonstration!** πŸŽ‰
@@ -0,0 +1,317 @@
1
+ # πŸ“š Documentation Index
2
+
3
+ **@karaplay/file-coder v1.5.1+**
4
+ Complete guide to EMK/KAR conversion and testing
5
+
6
+ ---
7
+
8
+ ## πŸš€ Getting Started
9
+
10
+ ### For Users
11
+
12
+ 1. **[README.md](./README.md)** ⭐ START HERE
13
+ - Installation and quick start
14
+ - Main API documentation
15
+ - Features and examples
16
+ - Browser/Server usage
17
+
18
+ 2. **[BROWSER_API.md](./BROWSER_API.md)**
19
+ - Client-side conversion guide
20
+ - Next.js integration
21
+ - Browser examples
22
+
23
+ ---
24
+
25
+ ## 🎡 Song Conversion
26
+
27
+ ### Main Workflow
28
+
29
+ 3. **[EMK_TO_KAR_WORKFLOW.md](./EMK_TO_KAR_WORKFLOW.md)**
30
+ - Complete EMK β†’ KAR pipeline
31
+ - Step-by-step guide
32
+ - Advanced options
33
+
34
+ 4. **[HOWTOEMKTONCN.md](./HOWTOEMKTONCN.md)**
35
+ - EMK to NCN conversion
36
+ - Technical details
37
+
38
+ ---
39
+
40
+ ## ⏱️ Tempo & Duration
41
+
42
+ ### Understanding Tempo
43
+
44
+ 5. **[TEMPO_TRICKS_SUMMARY.md](./TEMPO_TRICKS_SUMMARY.md)** ⭐ BEST PRACTICES
45
+ - How to use @tonejs/midi correctly
46
+ - Common pitfalls and solutions
47
+ - ZXIO vs MThd formats
48
+ - Why duration decreases when tempo increases
49
+
50
+ 6. **[WHY_DURATION_DECREASES.md](./WHY_DURATION_DECREASES.md)**
51
+ - Mathematical explanation
52
+ - Tempo-duration relationship
53
+
54
+ ---
55
+
56
+ ## πŸ§ͺ Testing & Validation
57
+
58
+ ### Test Suite
59
+
60
+ 7. **[EMK_TEST_SUITE_README.md](./EMK_TEST_SUITE_README.md)** ⭐ TESTING GUIDE
61
+ - Complete test suite documentation
62
+ - How to run tests
63
+ - Debugging failed tests
64
+ - Best practices
65
+
66
+ 8. **[EMK_SONGS_INFO.md](./EMK_SONGS_INFO.md)**
67
+ - Song information database
68
+ - Expected results for each file
69
+ - Format statistics
70
+ - Verification checklist
71
+
72
+ 9. **[EMK_TEST_SUITE_SUMMARY.txt](./EMK_TEST_SUITE_SUMMARY.txt)**
73
+ - Quick reference summary
74
+ - Test results overview
75
+ - Statistics
76
+
77
+ 10. **[EMK_REFERENCE_DATA.json](./EMK_REFERENCE_DATA.json)**
78
+ - Machine-readable reference data
79
+ - Used by test scripts
80
+ - Auto-generated from conversions
81
+
82
+ ---
83
+
84
+ ## πŸ”§ Technical Details
85
+
86
+ ### Problem Solving
87
+
88
+ 11. **[KAR_FILE_VALIDATION_SOLUTION.md](./KAR_FILE_VALIDATION_SOLUTION.md)**
89
+ - KAR file validation
90
+ - Quality checks
91
+
92
+ 12. **[BROWSER_KAR_CORRUPTION_FIX.md](./BROWSER_KAR_CORRUPTION_FIX.md)**
93
+ - Browser-specific issues
94
+ - Corruption fixes
95
+
96
+ 13. **[BUG_FIX_SUMMARY.md](./BUG_FIX_SUMMARY.md)**
97
+ - Historical bug fixes
98
+ - Solutions applied
99
+
100
+ ---
101
+
102
+ ## 🎭 Demo & Examples
103
+
104
+ ### Live Demo
105
+
106
+ 14. **[DEMO_ENHANCED.md](./DEMO_ENHANCED.md)**
107
+ - Demo page documentation
108
+ - Features and usage
109
+
110
+ 15. **[demo-simple.html](./demo-simple.html)**
111
+ - Live demo page
112
+ - Run: `npm run demo`
113
+ - Browser: http://localhost:3000
114
+
115
+ 16. **[examples/NextJSComponent.tsx](./examples/NextJSComponent.tsx)**
116
+ - React/Next.js example
117
+ - Client-side conversion
118
+
119
+ ---
120
+
121
+ ## πŸ“‹ Release Notes
122
+
123
+ ### Version History
124
+
125
+ 17. **[RELEASE_v1.5.1.md](./RELEASE_v1.5.1.md)** ⭐ LATEST
126
+ - Validation utilities
127
+ - Enhanced documentation
128
+ - Test suite
129
+
130
+ 18. **[RELEASE_v1.5.0.md](./RELEASE_v1.5.0.md)**
131
+ - ZXIO tempo fix (1.24x)
132
+ - Duration accuracy improvements
133
+
134
+ 19. **[RELEASE_v1.4.9.md](./RELEASE_v1.4.9.md)**
135
+ - ZXIO format support improvements
136
+
137
+ 20. **[RELEASE_v1.4.7.md](./RELEASE_v1.4.7.md)**
138
+ - ZXIO "zxio" header support
139
+
140
+ 21. **Previous Releases:**
141
+ - v1.4.0 - v1.4.6: See individual release notes
142
+ - v1.3.0 - v1.3.9: See individual release notes
143
+ - v1.1.1 - v1.2.0: See individual release notes
144
+
145
+ ---
146
+
147
+ ## 🎯 Quick Reference
148
+
149
+ ### Common Tasks
150
+
151
+ | Task | Documentation | Command |
152
+ |------|---------------|---------|
153
+ | **Convert EMK to KAR** | [README.md](./README.md#emk-to-kar-workflow-complete-pipeline) | `convertEmkToKar()` |
154
+ | **Validate KAR file** | [TEMPO_TRICKS_SUMMARY.md](./TEMPO_TRICKS_SUMMARY.md#4-validation-functions) | `validateKarTempo()` |
155
+ | **Run tests** | [EMK_TEST_SUITE_README.md](./EMK_TEST_SUITE_README.md#-quick-start) | `npm run test:emk` |
156
+ | **Fix tempo issues** | [TEMPO_TRICKS_SUMMARY.md](./TEMPO_TRICKS_SUMMARY.md#6-common-pitfalls) | Auto-fixed in v1.5.0+ |
157
+ | **Browser usage** | [BROWSER_API.md](./BROWSER_API.md) | `convertEmkFileToKar()` |
158
+ | **Run demo** | [DEMO_ENHANCED.md](./DEMO_ENHANCED.md) | `npm run demo` |
159
+
160
+ ---
161
+
162
+ ## πŸ” By Topic
163
+
164
+ ### For Developers
165
+
166
+ **Converting Files:**
167
+ - [README.md](./README.md) - Main API
168
+ - [EMK_TO_KAR_WORKFLOW.md](./EMK_TO_KAR_WORKFLOW.md) - Complete workflow
169
+ - [BROWSER_API.md](./BROWSER_API.md) - Client-side
170
+
171
+ **Understanding Tempo:**
172
+ - [TEMPO_TRICKS_SUMMARY.md](./TEMPO_TRICKS_SUMMARY.md) - ⭐ Best practices
173
+ - [WHY_DURATION_DECREASES.md](./WHY_DURATION_DECREASES.md) - Explanation
174
+ - [RELEASE_v1.5.0.md](./RELEASE_v1.5.0.md) - ZXIO fix
175
+
176
+ **Testing:**
177
+ - [EMK_TEST_SUITE_README.md](./EMK_TEST_SUITE_README.md) - ⭐ Complete guide
178
+ - [EMK_SONGS_INFO.md](./EMK_SONGS_INFO.md) - Reference data
179
+ - [EMK_REFERENCE_DATA.json](./EMK_REFERENCE_DATA.json) - Test data
180
+
181
+ ### For QA / Testing
182
+
183
+ **Quality Assurance:**
184
+ - [EMK_TEST_SUITE_README.md](./EMK_TEST_SUITE_README.md) - Test procedures
185
+ - [EMK_SONGS_INFO.md](./EMK_SONGS_INFO.md) - Expected results
186
+ - [KAR_FILE_VALIDATION_SOLUTION.md](./KAR_FILE_VALIDATION_SOLUTION.md) - Validation
187
+
188
+ **Troubleshooting:**
189
+ - [TEMPO_TRICKS_SUMMARY.md](./TEMPO_TRICKS_SUMMARY.md) - Common issues
190
+ - [BUG_FIX_SUMMARY.md](./BUG_FIX_SUMMARY.md) - Known bugs & fixes
191
+ - [EMK_TEST_SUITE_README.md](./EMK_TEST_SUITE_README.md#-debugging-failed-tests) - Debugging
192
+
193
+ ### For End Users
194
+
195
+ **Getting Started:**
196
+ 1. [README.md](./README.md) - Install and basic usage
197
+ 2. [DEMO_ENHANCED.md](./DEMO_ENHANCED.md) - Try the demo
198
+ 3. [examples/NextJSComponent.tsx](./examples/NextJSComponent.tsx) - Code examples
199
+
200
+ **Understanding Results:**
201
+ - [WHY_DURATION_DECREASES.md](./WHY_DURATION_DECREASES.md) - Why duration changes
202
+ - [EMK_SONGS_INFO.md](./EMK_SONGS_INFO.md) - Song information
203
+
204
+ ---
205
+
206
+ ## πŸ“Š Statistics
207
+
208
+ ### Documentation Coverage
209
+
210
+ - **Total Documents:** 21+ files
211
+ - **API Documentation:** 3 files
212
+ - **Technical Guides:** 7 files
213
+ - **Testing Documentation:** 4 files
214
+ - **Release Notes:** 15+ files
215
+ - **Examples:** 2 files
216
+
217
+ ### Lines of Documentation
218
+
219
+ - **README.md:** ~290 lines
220
+ - **Test Suite Docs:** ~1,200 lines
221
+ - **Tempo Guides:** ~500 lines
222
+ - **Release Notes:** ~3,000 lines
223
+ - **Total:** ~5,000+ lines
224
+
225
+ ---
226
+
227
+ ## πŸŽ“ Learning Paths
228
+
229
+ ### Path 1: Basic User (15 minutes)
230
+
231
+ 1. Read [README.md](./README.md) - Quick Start section
232
+ 2. Try the demo: `npm run demo`
233
+ 3. Copy example from [examples/NextJSComponent.tsx](./examples/NextJSComponent.tsx)
234
+
235
+ ### Path 2: Integration Developer (1 hour)
236
+
237
+ 1. [README.md](./README.md) - Full API
238
+ 2. [BROWSER_API.md](./BROWSER_API.md) - Client-side API
239
+ 3. [EMK_TO_KAR_WORKFLOW.md](./EMK_TO_KAR_WORKFLOW.md) - Workflow
240
+ 4. [TEMPO_TRICKS_SUMMARY.md](./TEMPO_TRICKS_SUMMARY.md) - Best practices
241
+
242
+ ### Path 3: Library Contributor (3 hours)
243
+
244
+ 1. [README.md](./README.md) - Overview
245
+ 2. [TEMPO_TRICKS_SUMMARY.md](./TEMPO_TRICKS_SUMMARY.md) - Technical details
246
+ 3. [EMK_TEST_SUITE_README.md](./EMK_TEST_SUITE_README.md) - Testing
247
+ 4. [RELEASE_v1.5.0.md](./RELEASE_v1.5.0.md) - Recent changes
248
+ 5. Source code in `src/`
249
+
250
+ ### Path 4: QA Tester (2 hours)
251
+
252
+ 1. [EMK_TEST_SUITE_README.md](./EMK_TEST_SUITE_README.md) - Test suite
253
+ 2. [EMK_SONGS_INFO.md](./EMK_SONGS_INFO.md) - Expected results
254
+ 3. Run: `npm run test:emk`
255
+ 4. [TEMPO_TRICKS_SUMMARY.md](./TEMPO_TRICKS_SUMMARY.md) - Debugging
256
+
257
+ ---
258
+
259
+ ## πŸ†˜ Getting Help
260
+
261
+ ### If you need to...
262
+
263
+ **Convert a file:**
264
+ β†’ See [README.md](./README.md#emk-to-kar-workflow-complete-pipeline)
265
+
266
+ **Fix tempo issues:**
267
+ β†’ See [TEMPO_TRICKS_SUMMARY.md](./TEMPO_TRICKS_SUMMARY.md#6-common-pitfalls)
268
+
269
+ **Run tests:**
270
+ β†’ See [EMK_TEST_SUITE_README.md](./EMK_TEST_SUITE_README.md#-quick-start)
271
+
272
+ **Understand duration changes:**
273
+ β†’ See [WHY_DURATION_DECREASES.md](./WHY_DURATION_DECREASES.md)
274
+
275
+ **Debug a conversion:**
276
+ β†’ See [EMK_TEST_SUITE_README.md](./EMK_TEST_SUITE_README.md#-debugging-failed-tests)
277
+
278
+ **Use in browser:**
279
+ β†’ See [BROWSER_API.md](./BROWSER_API.md)
280
+
281
+ **Check song info:**
282
+ β†’ See [EMK_SONGS_INFO.md](./EMK_SONGS_INFO.md)
283
+
284
+ ---
285
+
286
+ ## πŸ“ Document Status
287
+
288
+ | Document | Status | Last Updated |
289
+ |----------|--------|--------------|
290
+ | README.md | βœ… Current | 2026-01-13 |
291
+ | TEMPO_TRICKS_SUMMARY.md | βœ… Current | 2026-01-13 |
292
+ | EMK_TEST_SUITE_README.md | βœ… Current | 2026-01-13 |
293
+ | EMK_SONGS_INFO.md | βœ… Current | 2026-01-13 |
294
+ | RELEASE_v1.5.1.md | βœ… Current | 2026-01-13 |
295
+ | Other docs | βœ… Current | Various |
296
+
297
+ ---
298
+
299
+ ## πŸ”— External Resources
300
+
301
+ ### npm Package
302
+
303
+ - **Package:** [@karaplay/file-coder](https://www.npmjs.com/package/@karaplay/file-coder)
304
+ - **Version:** 1.5.1+
305
+ - **License:** ISC
306
+
307
+ ### Dependencies
308
+
309
+ - [@tonejs/midi](https://www.npmjs.com/package/@tonejs/midi) - MIDI parsing (recommended)
310
+ - [karaoke-player](https://www.npmjs.com/package/karaoke-player) - KAR playback
311
+ - [iconv-lite](https://www.npmjs.com/package/iconv-lite) - TIS-620 encoding
312
+
313
+ ---
314
+
315
+ **Last Updated:** 2026-01-13
316
+ **Maintained by:** @karaplay/file-coder team
317
+ **Status:** βœ… Complete and Up-to-Date