<div><div style="font-size:inherit"><div dir="auto" style="font-size:inherit;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgba(0,0,0,0);border-color:rgb(0,0,0);color:rgb(0,0,0)">Yes, I tried to make the format simple and straight forward so someone in the future could easily read it. But I don’t handle different versions yet, at this point things are still changing and sometimes (when I add or remove some knob from a module, for example) I need to manually convert all examples to the new format and save it again. Also, I didn’t use ReferenceStream to serialize the modules because they typically have state (instance variables) that are only used at runtime and I didn’t want to persist that, I only need to persist the position of each knob and this is easy to implement in general in the class Module (>>asJsonWithBuffers: and >>readFromJson:buffers:).</div><div dir="auto" style="font-size:inherit;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgba(0,0,0,0);border-color:rgb(0,0,0);color:rgb(0,0,0)"><br></div><div dir="auto" style="font-size:inherit;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgba(0,0,0,0);border-color:rgb(0,0,0);color:rgb(0,0,0)">I do include all samples in the .song files, not only notes. The .mod files that traditional trackers used also included the samples (as opposed to .mid MIDI files that only included notes), and this ensures that they sound correctly any time you play them because they don’t depend on which samples are loaded in the tracker.</div></div><br></div><div dir="auto">How about you? Why did you choose to use ReferenceStream for DrGeo? Does it give you any problem when you add or remove instance variables?</div><div dir="auto"><br></div><div dir="auto"><br></div><div><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Sat, Apr 18, 2026 at 14:48 Hilaire Fernandes <<a href="mailto:hfern@free.fr">hfern@free.fr</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><u></u>
<div text="#000000" bgcolor="#FFFFFF">
<p><font size="4" style="color:rgb(0,0,0)">Interesting. I saw the binary data at the
beginning of the file, but I did not realize there is Json data
at the tail. Did you think about the evolution of the format,
regarding long term compatibility?</font></p></div><div text="#000000" bgcolor="#FFFFFF">
<div>Le 14/04/2026 à 11:59, Luciano
Notarfrancesco a écrit :<br>
</div>
<blockquote type="cite">
<div dir="auto">No, I’m just using a mix of JSON and binary
buffers in a single file. Most of the modules only need to store
the settings (the position of each knob for example, it’s just a
Dictionary name -> value), with the exception of Sample,
Multisample and Wavetable that need to store also buffers
(Float32Arrays). The .song or .patch files (that store a whole
song a a single instrument respectively) are self-contained,
they contain all the samples used too, not only the notes.</div>
</blockquote>
<pre cols="72" style="font-family:monospace">--
<a href="http://mamot.fr/@drgeo" target="_blank" style="font-family:monospace">http://mamot.fr/@drgeo</a></pre>
</div>
</blockquote></div></div>