Bit of background, I’m currently writing a converter from Renoise to our PC 64k Synth called Wavesabre. Made really good progress so far converting pattern data to midi events and so on. I’m using RenoiseSong63.xsd which I put through xsd.exe to produce a C# class file so I can quickly and easilty deserialize the song file into objects. However there is a bit of a blocking issue. It seems using this method, automations cannot be linked to the correct device on the track.
So, starting at the actual automation data in the XML, you can see this related to DeviceIndex 1 / ParamIndex 1.
<Envelope>
<DeviceIndex>1</DeviceIndex>
<ParameterIndex>1</ParameterIndex>
<Envelope>
<PlayMode>Linear</PlayMode>
<Length>16384</Length>
<ValueQuantum>0.0</ValueQuantum>
<Polarity>Unipolar</Polarity>
<Points>
<Point>0,0.545454562</Point>
<Point>2048,0.545454562</Point>
<Point>2304,0.159090906</Point>
<Point>7936,0.170454547</Point>
<Point>8192,0.715909064</Point>
<Point>16383,0.0</Point>
</Points>
</Envelope>
On the track, the devices are listed in order…
<Devices>
<TrackMixerDevice type="TrackMixerDevice">
<AudioPluginDevice type="AudioPluginDevice">
<InstrumentAutomationDevice type="InstrumentAutomationDevice">
</Devices>
So we know that the above automation goes to param 1 on the AudioPluginDevice. However this index is only ever inferred in the XML, when it gets deserialized, the index is lost. Instead you end with devices grouped by type.
Is this the fault of the XSD or the class file that has been generated for it? and does anyone know how I can change it so that I can get devices indexed.
This also appears to be an issue with some other object collections, like the tracks for example.
Any help would be greatly appreciated.