Make bars navigable and editable with _meta export
Navigation: - SubObjects: bar → voice (with chevron when offsets exist) → offsets - PaneCP shortView handles voice and offset types FO pane: - Bar: editable beats_per_minute, stress_pattern (serialized as groups string), upper/lower stress bounds and tempo shape via ShapeEditor; sets bar.isDirty on change - Voice: read-only name, articles, motifs, offset count - Offset: read-only tick, stem notes and clusters as label strings (note re-serialization deferred) Export: - exporter.patchScore() now accepts optional bars[] parameter - Splits rawScoreText by \n---\n; instruments patched in header, dirty bar _meta blocks regenerated, voice note lines kept verbatim - ast-parser buildBar() adds isDirty:false - PaneCP passes scoreModel.bars to patchScore
This commit is contained in:
@@ -51,7 +51,14 @@ export const PaneSubObjects = {
|
||||
}
|
||||
if (node.type === 'bar') {
|
||||
return Object.entries(node.voices).map(([name, v]) => ({
|
||||
kind: 'voice', node: v, label: name,
|
||||
kind: 'voice', node: v, label: name, hasChildren: v.offsets.length > 0,
|
||||
}));
|
||||
}
|
||||
if (node.type === 'voice') {
|
||||
return node.offsets.map((o, idx) => ({
|
||||
kind: 'offset', node: o,
|
||||
label: `tick ${o.tick ?? idx}`,
|
||||
hasChildren: false,
|
||||
}));
|
||||
}
|
||||
return [];
|
||||
|
||||
Reference in New Issue
Block a user