Author Topic: Bassmidi does not support CC94/UserFx on channel 10 anymore in GM/GS mode  (Read 262 times)

Falcosoft

  • Posts: 167
Hi,
A user reported that he cannot use User effects (BASS_MIDI_CHAN_USERFX) on drum channels in case of new versions of Bassmidi. I have checked and the problem really exists.
More precisely user DSP effects work on all cannels in XG mode but in GM/GS mode they only work on melodic channels but not on drum channels. It does not matter what effect value is set by CC 94 messages it is not applied to drum channels. The last version of Bassmidi that I have and works correctly is 2.4.12.1
Thanks in advance.
 
« Last Edit: 4 Feb '24 - 12:37 by Falcosoft »

Ian @ un4seen

  • Administrator
  • Posts: 25725
The issue there is that MIDI_EVENT_DRUM_USERFX (NRPN 1Fxx) defaults to 0 for all keys in GM/GS mode. As far as I recall, that was done because it's what Roland does? The BASS_MIDI_NODRUMPARAM flag will prevent that, but it will also disable the standard MIDI_EVENT_DRUM_REVERB/CHORUS settings too. Perhaps a new flag is needed to only disable the USERFX=0 default? Alternatively, you can set all keys to 127 (max) like this:

Code: [Select]
for (int key = 0; key < 128; key++)
BASS_MIDI_StreamEvent(handle, chan, MIDI_EVENT_DRUM_USERFX, MAKEWORD(key, 127));

Falcosoft

  • Posts: 167
The issue there is that MIDI_EVENT_DRUM_USERFX (NRPN 1Fxx) defaults to 0 for all keys in GM/GS mode. As far as I recall, that was done because it's what Roland does? The BASS_MIDI_NODRUMPARAM flag will prevent that, but it will also disable the standard MIDI_EVENT_DRUM_REVERB/CHORUS settings too. Perhaps a new flag is needed to only disable the USERFX=0 default?...

Hi,
Based on SC-VA Roland does not do anything like that with EFX/Insertion effects. You can assign EFX/Insertion effects to any channels regardless they are drum channels or not. This is true even in case of GM mode not only in case of GS. In this regard it works just the same way as Chorus and Reverb: they are not disabled on drum channels in GM mode either.
But this kind of disabling is true for default CC94/Delay effect. CC94/Delay is really not applied to Drum channels. But I would argue that Bassmidi should not replicate this since Bassmidi has no default Delay Effect assigned to CC94. So I strongly think that in case of Bassmidi CC94 is more analogous to Roland EFX/Insertion effects that are custom DSP effects the same way as in case of Bassmidi.
The only thing I remember is that GS specific Controllers (71-78) had to be disabled in GM mode to prevent some bugs. I do not remember any issues that would require this kind of change with User Fx.

@Edit:
Quote
Alternatively, you can set all keys to 127 (max) like this:

for (int key = 0; key < 128; key++)
   BASS_MIDI_StreamEvent(handle, chan, MIDI_EVENT_DRUM_USERFX, MAKEWORD(key, 127));

It seems MIDI_EVENT_DRUM_USERFX values are set to default off by any GM/GM2/GS etc. reset and even by simple Program Change messages (in case of drum channels). So you would have to intercept any kind of reset and Program Change messages sent by Midi Input/Midi files to prevent User Fx to be disabled on drum channels. Not the most elegant way to restore a feature that worked perfectly once, I would say.
BTW, Has this breaking change been documented somewhere?
Thanks in advance.
« Last Edit: 5 Feb '24 - 19:31 by Falcosoft »

Ian @ un4seen

  • Administrator
  • Posts: 25725
Based on SC-VA Roland does not do anything like that with EFX/Insertion effects. You can assign EFX/Insertion effects to any channels regardless they are drum channels or not. This is true even in case of GM mode not only in case of GS. In this regard it works just the same way as Chorus and Reverb: they are not disabled on drum channels in GM mode either.

I believe chorus is actually disabled on all drum keys by default too in GM/GS mode, just like delay is. Each key also has its own default reverb level, ie. they're not all 127 (max). These defaults are all disabled (replaced with 127) by the BASS_MIDI_NODRUMPARAM flag.

But this kind of disabling is true for default CC94/Delay effect. CC94/Delay is really not applied to Drum channels. But I would argue that Bassmidi should not replicate this since Bassmidi has no default Delay Effect assigned to CC94. So I strongly think that in case of Bassmidi CC94 is more analogous to Roland EFX/Insertion effects that are custom DSP effects the same way as in case of Bassmidi.

Although BASSMIDI doesn't implement Roland's delay effect, it could be that a user implements it and expects the CC94 and NRPN 1Fxx defaults to match Roland's.

It seems MIDI_EVENT_DRUM_USERFX values are set to default off by any GM/GM2/GS etc. reset and even by simple Program Change messages (in case of drum channels). So you would have to intercept any kind of reset and Program Change messages sent by Midi Input/Midi files to prevent User Fx to be disabled on drum channels. Not the most elegant way to restore a feature that worked perfectly once, I would say.

Yes, a drum channel's key settings (including reverb/chorus/etc) are reset by MIDI_EVENT_SYSTEM and MIDI_EVENT_PROGRAM (and MIDI_EVENT_DRUMS) events. "Worked perfectly" depends on how you look at it :) ... It was perfect for you, but it didn't perfectly match what Roland does to the NRPN 1Fxx settings. I agree that having to (re)apply MIDI_EVENT_DRUM_USERFX settings isn't good. I think another flag is needed. Perhaps something like a BASS_MIDI_DRUMUSERFULL flag that always sets MIDI_EVENT_DRUM_USERFX to 127 would work for you?

Falcosoft

  • Posts: 167
....
Yes, a drum channel's key settings (including reverb/chorus/etc) are reset by MIDI_EVENT_SYSTEM and MIDI_EVENT_PROGRAM (and MIDI_EVENT_DRUMS) events. "Worked perfectly" depends on how you look at it :) ... It was perfect for you, but it didn't perfectly match what Roland does to the NRPN 1Fxx settings. I agree that having to (re)apply MIDI_EVENT_DRUM_USERFX settings isn't good. I think another flag is needed. Perhaps something like a BASS_MIDI_DRUMUSERFULL flag that always sets MIDI_EVENT_DRUM_USERFX to 127 would work for you?

Actually it was not me, but one of my users :). I have just checked and confirmed the problem:
https://www.vogons.org/viewtopic.php?p=1231467#p1231467

I think he is the author of ColomboGMGS2. (https://www.deviantart.com/colombogmgs2).

Quote
Although BASSMIDI doesn't implement Roland's delay effect, it could be that a user implements it and expects the CC94 and NRPN 1Fxx defaults to match Roland's.
Based on the bug report it seems in practice it's just the opposite. User(s) used it and do not understand what happened and why. Moreover it's rather easy to disable the effect on drum channels by setting CC#94 to 0. And you could do this with the old versions of Bassmidi and any Midi software that can send controllers easily. Unfortunately this is not so easy the other way around currently.

In case of Bassmidi CC#94 was "UserFx" from the beginning and was actually the only easy way to assign custom DSP effects to any channels. Roland never worked this way. In case of Roland CC#94 is fixed to Delay. Delay is not the best effect for drums so disbaling it is understandable.
But I still do not understand why Bassmidi should replicate Roland's behavior in this case (by default!). Delay is only one possible user effects from the million other ones and now none of them can be applied for drums. Contrary it was always easy to disable any effects on drum channels. So I feel a net loss with this change,

But , yes a flag like the above mentioned would be a more friendly solution.
If you would be so kind, please compile a non-SSE x86 version of the fixed Bassmidi library for me (this will be the last occasion I ask something like this , I promise).
 
« Last Edit: 7 Feb '24 - 17:18 by Falcosoft »

Ian @ un4seen

  • Administrator
  • Posts: 25725
Here's an update that adds a BASS_MIDI_NODRUMPARAMUSER flag to set the default MIDI_EVENT_DRUM_USERFX level to 127 in all modes (like BASS_MIDI_NODRUMPARAM but not affecting reverb/chorus):

   www.un4seen.com/stuff/bassmidi.zip
   www.un4seen.com/stuff/bassmidi-nosse.zip

This update also adds the option of using key=255 with MIDI_EVENT_DRUM_xxx events to apply the value to all keys, making it possible to set all keys to any wanted value in a single BASS_MIDI_StreamEvent call.

Let me know if you have any trouble with it.

Falcosoft

  • Posts: 167
Here's an update that adds a BASS_MIDI_NODRUMPARAMUSER flag to set the default MIDI_EVENT_DRUM_USERFX level to 127 in all modes (like BASS_MIDI_NODRUMPARAM but not affecting reverb/chorus):

   www.un4seen.com/stuff/bassmidi.zip
   www.un4seen.com/stuff/bassmidi-nosse.zip

This update also adds the option of using key=255 with MIDI_EVENT_DRUM_xxx events to apply the value to all keys, making it possible to set all keys to any wanted value in a single BASS_MIDI_StreamEvent call.

Let me know if you have any trouble with it.

Thank you very much, it works perfectly.