ryukau / VSTPlugins

Uhhyou Plugins VST 3 repository.
https://ryukau.github.io/VSTPlugins/
GNU General Public License v3.0
327 stars 12 forks source link

CubicPadSynth Patch scrambles when I hit "Play" in Reaper #45

Closed maxxatgit closed 1 year ago

maxxatgit commented 1 year ago

I found a strange bug... I'm using Reaper 6.81, Ubuntu 22.04.3, and CubicPadSynth 0.1.23. When I select the "Artifact" preset, it sounds normal. But after I hit play in Reaper, it seems to scramble the patch. It begins to sound almost like a bell. I cannot reset the patch. I have to delete the plugin instance and add it again before I can select any patch.

There does not have to be any MIDI notes in the track, an empty track will still scramble it. When it gets scrambled, I can still edit some parameters, like the pitch octave, and the envelope attack, but it still does not sound anything like the selected patch. Selecting different patches after it's scrambled still outputs the strange bell sound.

It doesn't happen when I have not selected a patch, the default state does not get scrambled.

Testing further, many presets get scrambled: Honesty, Bell, Flap, I don't want to go through all of them, but I know the default state is stable. To test if it's the patch, or just the action of selecting a patch, I saved the default state as a patch, selected the "Artifact" patch, then selected the default patch again. I pressed play, and the default patch did not scramble.

This does not happen with Clang Cymbal, FDN Cymbal, or Generic Drum. I'll test more plugins tomorrow.

CubicPadSynth sounds great! I hope this is an easy bug to fix!

ryukau commented 1 year ago

Did you press the "Refersh Table" button after loading a preset? If you didn't, it's probably an intended behaviour. CubicPadSynth automatically press "Refresh Table" internally when resetting, and REAPER resets plugins at the start of a playback. (I fully admit this is a bad design. 😔)

The video below demonstrates the intended sound of "Artifact" preset. If you heard a totally different sound that's not in the video, there's most likely a bug. Let me know which is the case.

Timestamps:

https://github.com/ryukau/VSTPlugins/assets/6243462/b2c255c8-959f-4b75-90c1-abc375e5b111

maxxatgit commented 1 year ago

OK, it is the intended behavior. It's funny, I really like the sound of Artifact before refreshing the table....

I have to go back and listen to the presets correctly.... :^)

Thanks again!

maxxatgit commented 1 year ago

Is it possible to call the Refresh Table routine automatically, after loading a new patch?

ryukau commented 1 year ago

OK, it is the intended behavior. It's funny, I really like the sound of Artifact before refreshing the table....

To get that sound, you can reset all the parameters in Wavetable tab to default. Ctrl + Mouse Left can be used. Below is a preset of it.

Artifact_WithDefaultWavetable.zip

Is it possible to call the Refresh Table routine automatically, after loading a new patch?

I still have no idea how to do this properly. When I was developing, I searched that if VST 3 provides an event like onPresetLoad, but I couldn't find it. My understanding is that VST 3 preset is sent to a plugin by plain parameter changes. So a plugin can't know if the parameter changes are triggered by loading a preset or not.

maxxatgit commented 1 year ago

Many thanks for all that you do!