Hello. I’m a beginner programmer with loads of Sylenth1 FXB files on my PC. I came up with an idea to try to make my life easier by not having to scour through hundreds of banks for a single preset - a FXB previewer.
I used C# for this as I’m not really familiar with C++ (just downloaded the VST3 SDK to try it out). I encoded a sample FXB as a text, put it in a string and had it print out to the console. My problem is that the oscillator, FX and filter parameters are encoded as well and the final string is a mess. Here’s an image:
Underlined in red: LennarDigital’s file header (?)
Underlined in blue: preset name (which I want to keep)
Underlined in yellow: osc/FX/filter parameters (which I want to discard from the string)
My goal is this:
What I want to achieve is:
- Read the FXB file
- Encode it to ASCII (or a similar format)
- Delete the parameters, keep the preset names
- Display the preset names from the final string
Here’s the C# code I wrote:
byte arr = File.ReadAllBytes(Properties.Resources.pointer); /* pointer is a string in the solution's resources I used to point to the external FXB file for testing */ System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding(); string fstr = enc.GetString(arr); Console.Write(fstr); Console.ReadKey();
I used various methods to get rid of the “???”, “&I&I” and other random nonsense, but at almost always ended up deleting characters from the preset name as well.
I’m at a total loss. Can anyone guide me to the right path?