rewrite mudabox to use JObject semantics for serialization
Closed this issue · 0 comments
bmcfee commented
Currently, muda.save
is a destructive operation: when the jam is serialized, we first pop out the audio buffer jam.sandbox.muda['y']
to avoid serializing the audio. This is obviously bad.
JObject serialization already skips fields that start with _
.
A simple fix here would be the following:
- Modify
jam_pack
to constructmuda
as a JObject (or Sandbox) rather than a dict - Push the audio content down a level, ie,
muda._audio['y']
andmuda._audio['sr']
- Modify all deformation logic accordingly
This way, muda._audio
will be skipped during serialization, and save can be a non-destructive operation.