docs: fix README references and expand migration guide

- Remove reference to deleted README_Shakuhachi.txt
- Expand custom calligraphy symbol migration steps
- Add detailed ManuScript code example for symbol mapping
- Clarify fallback handling for incremental adoption
- Correct line number reference (line 145, not ~145)
This commit is contained in:
Marcus Huntemann committed 2026-10-05 18:55:18 +02:00
1 parent b20d55cf40
commit c5edbe9998
1 file changed
+36 -6
+36 -6
View File
@@ -108,14 +108,44 @@ The reverse plugin normalizes subscripts (strips them) before pitch lookup.
The plugin architecture supports migration from Unicode text to custom calligraphy symbols:
1. **Prepare calligraphy images**: Create SVG or PNG files (ro.svg, tsu.svg, chu_ro.svg, etc.)
2. **Install as Sibelius symbols**: Edit > Symbols > New Symbol, name with prefix `kinko_ro`, `kinko_tsu`, etc.
3. **Modify forward plugin** (line ~145): Replace `bar.AddText()` with `bar.AddSymbol()`
4. **Modify reverse plugin**: Iterate SymbolItem objects instead of Text objects
### Migration Steps
See [README_Shakuhachi.txt](README_Shakuhachi.txt) for detailed migration steps.
1. **Prepare calligraphy images**: Create SVG or PNG files for each symbol:
- `ro.svg`, `tsu.svg`, `re.svg`, `chi.svg`, `ri.svg`, `u.svg`
- `chu_ro.svg`, `dai_ro.svg`, `u_san.svg`, etc.
- Ensure consistent size and baseline alignment
Reference implementation: [shakuhachi-ro](https://github.com/chrisrauh/shakuhachi-ro)
2. **Install as Sibelius symbols**:
- Edit > Symbols > New Symbol
- Import each image
- Name with prefix: `kinko_ro`, `kinko_tsu`, `kinko_chu_ro`, `kinko_u_san`, etc.
3. **Modify forward plugin** (line 145):
- Replace: `text = bar.AddText(position, kinkoChar, "Technique");`
- With: `text = bar.AddSymbol(position, GetSymbolName(kinkoChar));`
- Add symbol name mapping function:
```manuscript
GetSymbolName "(kinkoChar) {
if (kinkoChar = "ロ") { return "kinko_ro"; }
if (kinkoChar = "中ロ") { return "kinko_chu_ro"; }
if (kinkoChar = "大ロ") { return "kinko_dai_ro"; }
if (kinkoChar = "ツ") { return "kinko_tsu"; }
// ... etc for all characters
}"
```
4. **Modify reverse plugin**:
- Change iteration from Text objects to SymbolItem objects
- Reverse lookup: symbol name → Kinko character → pitch
- Add fallback: check `Sibelius.SymbolExists(symbolName)` before AddSymbol
5. **Fallback handling**:
- If symbol not installed, fall back to Unicode text with user warning
- Allows incremental adoption without breaking existing functionality
### Reference Implementation
[shakuhachi-ro](https://github.com/chrisrauh/shakuhachi-ro) - SVG-based rendering with similar modifier/note separation architecture
## Requirements