feat: save only the units and comment to instrument/preset files

This commit is contained in:
5684185+vsariola@users.noreply.github.com
2026-02-28 20:43:45 +02:00
parent f3bb0001cd
commit 4cb9308af3
154 changed files with 18 additions and 164 deletions

View File

@ -32,9 +32,11 @@ func main() {
return nil
}
tracker.RemoveUnusedUnitParameters(&instr) // remove invalid parameters
instr.Name = "" // we don't need the names in the preset files as they are derived from the file path
instr.NumVoices = 1
outData, err := yaml.Marshal(instr)
instr2 := sointu.Instrument{ // keep only the relevant fields
Comment: instr.Comment,
Units: instr.Units,
}
outData, err := yaml.Marshal(instr2)
if err != nil {
fmt.Fprintf(os.Stderr, "could not marshal the preset file %v: %v\n", path, err)
return nil