AuburnSounds / Dplug

Make VST2 / VST3 / AU / AAX / CLAP / LV2 / FLP plug-ins for Linux/macOS/Windows, using D.
https://dplug.org/
Other
490 stars 32 forks source link

Preset-bank immutability #524

Open p0nce opened 3 years ago

p0nce commented 3 years ago

Currently in VST2 (and possibly AU), changing parameters and switching between presets modify presets in memory. Doesn't affect user sessions.

Because of Studio One calling setProgram after setting a bank chunk, I wasn't able to make the preset bank immutable. It is a life quality enhancement, since factory presets being modified is not a superb user experience.

Can not be done until all plugins are converted to chunks. Blocked by legacyVST2Chunks.

p0nce commented 3 years ago

A fellow framework developer has the following solution:

what I and others do is ignore setProgram calls that happen immediately after chunk loading I have a cutoff of a few hundred millisecs

you don't even really need a timer just grab a clock of decent resolution when you load a chunk and then when you get a setProgram, just discard it if it happened within a few hundred ms of the chunk load

which would probably allow to have an immutable in-memory presets. Hosts to test: Cubase , Studio One

p0nce commented 3 years ago

Reported by one user:

Hi. I just got P2 and immediately ran into a bug. If I load a preset then go back to Default preset it doesn’t reset to default. Same thing if I load P2, make some changes then go to Default preset it does not reset. Extremely annoying.