• Hi and welcome to the Studio One User Forum!

    Please note that this is an independent, user-driven forum and is not endorsed by, affiliated with, or maintained by PreSonus. Learn more in the Welcome thread!

Studio One and program changes

brmichael

New member
Hi there,

Studio One 7.2.2 still has an annoying bug I reported to Studio One support months ago. This bug still hasn't been fixed yet, and I feel a little ignored :(

The bug affects plugins with programs selectable via MIDI Program Change. If the plugin has 128 programs, everything is ok. MIDI Program Change #1 selects the first program in the plugin, #2 the second and so on.

However, if the plugin has less than 128 programs, things get messed up. As an example I take Dexed (DX7 emulator), which has only 32 programs. A VST host is supposed to retrieve the correct number of programs from the plugin. Studio One however doesn't do so, it simply assumes that every plugin has 128 programs, which is incorrect in case of Dexed. As a result, MIDI Program Changes #1...#3 all select program #1 in Dexed. Program Changes #4...#6 all select program #2 and so on.

This definitely is a malfunction in Studio One's handling of MIDI Program Change events, no other DAW I worked with behaves this way (which also proves that Dexed works correctly). I hope this will get fixed one day.

Regards

Michael
 
Last edited:
Hi Lukas,

thanks for your quick response.

I can send MIDI program changes with my master keyboards (Yamaha KX88 and Nektar LX61+).

Dexed is a VST3 plugin. Let's see if I can post links here: https://asb2m10.github.io/dexed/

I'm not able to create a screen capture, but screenshots. The first one shows an incoming program change event #1 (as program changes are zero-based, the event is C0 00 00). This one selects program #1 in Dexed, which is correct:
Studio One Dexed Prog 1.png
The relevant byte in the program change event and the selected program in Dexed are marked with red boxes.

The second one shows an incoming program change event #2 (C0 01 00). It's supposed to select program #2 in Dexed, but it selects program #1, which is not correct:
Studio One Dexed Prog 2.png

The third one shows an incoming program change event #4 (C0 03 00). It selects program #2 in Dexed, which also is not correct:
Studio One Dexed Prog 4.png

When I first noticed the problem, also automation was affected. At least this seems to be fixed. When automating program changes with Dexed, Studio One provides the correct number of steps (32), each one corresponding with the correct Dexed program #. So at the moment the problem only exists when handling incoming MIDI program changes.

Regards

Michael
 
Last edited:
Thanks for the screenshots and repro steps. I'll take a look at it later.

Studio One 7.2.2 still has an annoying bug I reported to Studio One months ago. This bug still hasn't been fixed yet, and I feel a little ignored :(
Just out of interest: How do you know it's a bug inside Studio One?

Program change numbers are always between 0 and 127. Regardless of whether it's 80s MIDI files, VST2 or VST3. If this plug-in only uses 32 values (and then scales them up to the 0-127 range), I'm not sure that approach conforms to the VST specification. In that case, it would be clear that the issue hasn't been addressed, since it would actually be a plug-in issue. But I'm not familiar with VST3 internals so this would be something developers have to take a look at.
 
Last edited:
I assume that it's a bug inside Studio One, because Dexed works correctly in other DAWs.

Besides that, I have experience in developping VST3 plugins. I know that there is a VST API function provided by the plugin, which the host can use to retrieve the number of programs a plugin supports. When testing one of my plugins that supported only 64 programs with Studio One, I noticed that Studio One doesn't pass program changes properly to the plugin. With my plugin, program #1 was selected by program changes #1 and #2, program #2 was selected by program change #3 and #4 and so on. The problem did not occur on any other DAW I tested my plugin with. For further investigation, I tested Studio One (and other DAWs) with another plugin that supports less than 128 programs, namely Dexed. The results were similar and they proved that there must be something wrong in the way Studio One handles program change events.

On my plugin, I solved this by simply increasing the number of programs my plugin supports to 128. But of course I can't do this with plugins that were developped by someone else.

To explain what's going on: all parameters on a VST plugin are controlled by the host by passing floating point values ranging from 0.0 to 1.0. That includes program select, where 1.0 represents the highest program number available on the plugin. As the highest program number not always is the same, the host must use variable conversion factors to calculate the correct floating point value from an incoming MIDI program change event. The correct conversion factor is 1/128 for a plugin that supports 128 programs and 1/32 for a plugin like Dexed with only 32 programs.

When using 1/128, program change #32 is converted into 0.25 (32 is a quarter of 128). On a plugin with 128 programs this value will select the correct program #32. However, on a plugin with only 32 programs, 0.25 will select program #8, which is obviously incorrect. That's why a host has to retrieve the number of programs available with a particular plugin in order to calculate the correct conversion factor. As mentioned, plugins provide a VST API function for this purpose which the host has to call before evaluating any program change events. For some reason, Studio One does this right when calculating automation steps for program change, but it fails when processing incoming MIDI program change events.

I know that program change events only are 0...127 (max. 128 programs). But they have to be interpreted differently, according to the number of programs a plugin supports. If a host does this correctly, it will never pass values greater than 1.0 to the plugin, regardless how many programs the plugin supports. And I know that this conforms to VST specification. If not, the getProgramListCount() (class member of EditControllerEx1) VST API function wouldn't be there and Dexed would behave the same in any DAW.

Regards,

Michael
 
Last edited:
I assume that it's a bug inside Studio One, because Dexed works correctly in other DAWs.
This alone wouldn't be a reason. Other DAWs (especially Cubase) have made efforts to fix or work around plug-in bugs, even allowing poorly coded SynthEdit plug-ins to run without major issues.

But since you're familiar with VST3 and the related APIs, I would just assume right on this one. Thanks for elaborating.
 
Back
Top