Could we have the option to load soul files (and not only soulpatches) soon?
How are things managed in the case of multiple soul files?
I see in this example that “
ElecBass1.soul” uses some processors defined in another file (
TX81Z.soul). Does that work only because
ElecBass1.soulpatch references both files? Would we need a kind of
import TX81Z.soul; directive in
ElecBass1.soul if we could compile it directly?
We’ll most likely need a “latency” parameter in the soulpatch descriptions. is that planned?
a small typo in the doc of soul_patch_library.h :
and there is also a superfluous ‘.’ after ‘class’ in the same comment
The reason for the patch file is to resolve the sorts of questions you are raising about what would happen if you were able to load soul files directly, such as, how does it know to expect multiple files. Also, the patch format supports concepts like externals and makes that much easier to use.
If you look here: https://github.com/soul-lang/SOUL/blob/master/source/modules/soul_core/compiler/soul_Compiler.h you’ll see what actually goes on. For a patch with multiple source files, ‘addCode’ is called multiple times on the same compiler instance, then ‘link’ returns a Program which is used to generate the IR. If instead of calling it multiple times, you concated the soul files together and passed that in, it would be identical, so the order the files are submitted, or how processors/graphs are split across files is irrelevant (no need to forward declare for example).
Latency - I presume you are referring to lookahead latency, for delay compensation? Yes, that’s planned. The syntax is hazy, but I expect it to be a property of each processor, so that if you construct a graph, the correct compensation can be applied between branches of the graph, and an overall delay can be expressed to the hosting code to allow it to do the right thing.
I’ll check those typos.
Oh, and one more thing. With the command line soul command you can play single soul files. It actually uses the ‘build’ method listed in the Compiler class.