Hi AudiOishi,
if you are OK with Python you can have a look into my implementation here:
https://github.com/dimentorium/Prese...aper/preset.py
Basicall it works the following:
Decoding
- Decode with base 64
- Then you have the following content
4 Bytes: VST ID
4 Bytes: Reaper Magic Number
4 Bytes: Number of Inputs
8 Bytes by Number of inputs: Input Mask
4 Bytes: Number of outputs
8 Bytes by Number of outputs: output Mask
4 Bytes: Something I don't know
8 Bytes: seems to be the end 01 00 00 00 00 00 10 00
- Then starts the binary VST chunk for the instrument
- Then the last line is some reaper information I do not understand, might be program name or so
Encoding
- Create the header information, split to line length 210 bytes, encode
- Load the chunk data, split to line length 210 bytes, encode
- Create the footer information, split to line length 210 bytes, encode
- Put all data in the rpp
The lines have a max size but belong together; if information is longer than max size they are split on multiple lines. I managed to programmatically save and change the chunk, and also to directly load chunks from FXP or NKSF files but it is a bit unstable.
Hope this helps. Or just take a look into my code