Big VST State help

This forum is for developers of Rack Extensions to discuss the RE SDK, share code, and offer tips to other developers.
User avatar
pongasoft
RE Developer
Posts: 239
Joined: 21 Apr 2016
Location: Las Vegas

Post 24 Jul 2020

I know this is somewhat unrelated to RE development, that being said, I am using Reason to test my VST plugins and running into some performance issues.

One thing I have noticed is that Reason constantly calls the plugin to get its state (which in VST3 translates into the call to Component::getState for the RT and EditController::getState for the GUI). So for example, simply clicking on a toggle will result in Reason calling those 2 methods... For example Maschine 2 calls this method ONLY when the song is saved (which seems to make a lot more sense to me). This could partially explain why VSTs are slow in general with Reason...

That being said, the issue I am bumping into is that my SAM-SPL64 plugin ends up having a sample file being part of the state. Which means that every time Reason calls me, I have to serialize the entire sample to save it in the state. I am doing this because I want the state of my plugin to be self contained. I could instead only save the "location" of the file on the disk which would be a lot faster but then the song in which the plugin is used is no longer self contained.

Of course REs don't have this issue, since samples are handled "natively" by Reason... So I was wondering if you have any advice on how to manage this issue. I am curious how other (VST) sampling devices handle this situation. Are users expecting the sample to be saved with the song or separate? I am not sure there is a right or wrong answer... but if the file becomes too big then I am bumping into issues with the way I am doing things...

Yan

User avatar
jam-s
Posts: 1061
Joined: 17 Apr 2015
Location: Aachen, Germany

Post 24 Jul 2020

As a workaround: You could keep the serialised sample cached in RAM and use it as a static part of the plugin state. Then you only need to serialise the other parameters (like position) on the (frequent) calls.
If you're in Aachen, come and visit us at the Voidspace.

  • Information
  • Who is online

    Users browsing this forum: CommonCrawl [Bot] and 0 guests