When working on a personal project, I have a habit of getting distracted and moving onto other interesting things. So I’m quite happy to state that I’m still working on Synth (the synth? I need a better name!)
I’ve been adding the ability to load the synth configuration from an xml file. This allows me, of course, to specify and modify the synth setup without recompiling, allowing me to tweak things nice and quickly. It better pay off, because it’s taken a bit more work than I thought it would to implement well!
At the end of the post, you can see an example of the current setup file. The first chunk specifies the initial layout of the grid. This is useful for quickly testing changes. The next section specifies individual synth components (One thing to notice is that I’ve changed the envelope from a series of values corresponding to ADSR points, to a series of arbitrary points.) The final section specifies, for each note (there are 12 in this synth), which component is at the top of its component ‘tree’ (the rootId) and which components should initiate any sound.
It’s definitely a first pass at the moment. Apart from adding more components I could add delays to the initiators, for example.
Anyway, here’s the current setup:
<?xml version="1.0" encoding="UTF-8" ?>
<synth>
<!-- Grid setup -->
<initialSetup>
<rows>
<row>o...........</row>
<row>............</row>
<row>............</row>
<row>...o........</row>
<row>............</row>
<row>............</row>
<row>......o.....</row>
<row>............</row>
<row>............</row>
<row>.........o..</row>
<row>............</row>
<row>............</row>
</rows>
</initialSetup>
<!-- Components -->
<components>
<component type="oscillator" id="0" oscillatorType="sine" />
<component type="mixer" id="1">
<input id="0" amount="1"/>
</component>
<component type="envelope" id="2" inputId="1">
<point time="0" volume="0.0"/>
<point time="0.1" volume="0.9"/>
<point time="0.2" volume="0.75"/>
<point time="0.8" volume="0.65"/>
<point time="1" volume="0"/>
</component>
</components>
<!-- Systems -->
<triggers>
<trigger triggerId="0" rootId="2" >
<initiator sourceId="0"/>
<initiator sourceId="2"/>
</trigger>
<trigger triggerId="1" rootId="2" >
<initiator sourceId="0"/>
<initiator sourceId="2"/>
</trigger>
<trigger triggerId="2" rootId="2" >
<initiator sourceId="0"/>
<initiator sourceId="2"/>
</trigger>
<trigger triggerId="3" rootId="2" >
<initiator sourceId="0"/>
<initiator sourceId="2"/>
</trigger>
<trigger triggerId="4" rootId="2" >
<initiator sourceId="0"/>
<initiator sourceId="2"/>
</trigger>
<trigger triggerId="5" rootId="2" >
<initiator sourceId="0"/>
<initiator sourceId="2"/>
</trigger>
<trigger triggerId="6" rootId="2" >
<initiator sourceId="0"/>
<initiator sourceId="2"/>
</trigger>
<trigger triggerId="7" rootId="2" >
<initiator sourceId="0"/>
<initiator sourceId="2"/>
</trigger>
<trigger triggerId="8" rootId="2" >
<initiator sourceId="0"/>
<initiator sourceId="2"/>
</trigger>
<trigger triggerId="9" rootId="2" >
<initiator sourceId="0"/>
<initiator sourceId="2"/>
</trigger>
<trigger triggerId="10" rootId="2" >
<initiator sourceId="0"/>
<initiator sourceId="2"/>
</trigger>
<trigger triggerId="11" rootId="2" >
<initiator sourceId="0"/>
<initiator sourceId="2"/>
</trigger>
</triggers>
</synth>