mirror of
https://github.com/vsariola/sointu.git
synced 2026-03-01 03:23:17 -05:00
feat: save only the units and comment to instrument/preset files
This commit is contained in:
parent
f3bb0001cd
commit
4cb9308af3
@ -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
|
||||
|
||||
Reference in New Issue
Block a user