Simplify: remove dead code and redundancy across vue app
- Delete ObjectBasic (defined, never imported)
- ObjectShort: remove unused node prop
- exporter: export stressorToString; use in patchBarMeta (removes inline duplicate)
- PaneFO: import stressorToString from exporter; extract H4 style constant,
shapeSection() helper, instrOnChange() helper; remove apply param from
makeChangeHandler (was always () => markDirty()); remove unnecessary ?.
on always-initialized arrays (variations, labelSpecs, subvariations)
- PaneSubObjects: explicit hasChildren on all item kinds; bars at score
level get hasChildren based on voices; remove stale kind-list fallback
- ast-parser coerce(): remove unreachable s.trim() check ('' handled above)
- PaneCP: fix post-export synthesisStatus reset to use real field names
This commit is contained in:
@@ -171,10 +171,15 @@ function patchInstrumentHeader(text, instruments) {
|
||||
return result.join('\n');
|
||||
}
|
||||
|
||||
export function stressorToString(s) {
|
||||
if (!s?.groups?.length) return '';
|
||||
return s.groups.map(g => g.join(',')).join(';');
|
||||
}
|
||||
|
||||
function patchBarMeta(doc, bar) {
|
||||
const props = [];
|
||||
if (bar.stressor?.groups?.length)
|
||||
props.push(` stress_pattern: ${bar.stressor.groups.map(g => g.join(',')).join(';')}`);
|
||||
const sp = stressorToString(bar.stressor);
|
||||
if (sp) props.push(` stress_pattern: ${sp}`);
|
||||
if (bar.tempoLevels != null)
|
||||
props.push(` beats_per_minute: ${bar.tempoLevels}`);
|
||||
const ub = serializeShape(bar.upperStressBound);
|
||||
|
||||
Reference in New Issue
Block a user