brummer10 / guitarix

guitarix virtual versatile amplification for Jack/Linux
236 stars 24 forks source link

Assign "Controller MIDI" + "Send Midi Feedback" = Serious error when changing presets. #85

Closed fernando-inf closed 2 years ago

fernando-inf commented 2 years ago

Hi, I'm going to bring up the problem I raised in the "reddit" forum here, because I think it's very serious for those of us who want to use our MIDI Pedalboard with MIDI Input on Guitarix.

The problem arises under the following conditions: 1- Create in a single Bank more than one preset with the same effects, but with different scenes each (A-B-C-D) 2- Assign a MIDI CC to each effect. 3- Enable "Send Midi Feedback".

In this way the problem arises that can be seen in the video. When changing preset, the effects are not activated correctly, or are not deactivated.

I am attaching a ZIP with two Banks, one has MIDI CC assigned and the other does not.

Guitarix version: 0.42.1 Compiled from github on 08/30/2021, using the command dpkg-buildpackage -rfakeroot -b

Operating System: Debian 11.

REDDIT: https://www.reddit.com/r/Guitarix/comments/onm96e/comportamiento_err%C3%B3neo_en_el_cambio_de_preset_al/ VIDEO: https://youtu.be/jP89_SVtqVo BANKs: BANK-24.gx.zip

brummer10 commented 2 years ago

Hi fernando

Okay, now I got it. Indeed a serious issue. I've pushed a fix for it to the repository, please checkout and let me know if that fix the issue for you as well.
regards hermann

fernando-inf commented 2 years ago

Hi Brummer, thanks for the help. I just compiled Guitarix again and this problem has been solved. I had big headaches for a couple of months, but finally it's okay.

I will continue to report improvements to Guitarix. I have detected a noise when going to a preset that has "JCM 800 Preamp", when combined with other effects (Amp Impulse, Tonestack, Convolver). The same for "Amp Impulse", it has a noise when moving the "Level" but I have to determine well under what conditions the problem occurs. I will inform you soon.

I also want to highlight a request I made in REDDIT about the sound cut when an effect is turned off and on, perhaps it can be replaced by an effect overlay instead of a cut. I think that this sound cut really affects a live performance as it is very noticeable.

guitarix-corte

Greetings, thank you!

brummer10 commented 2 years ago

You may want to play with the ramp time yourself and let me know your findings. The sequence is set in trunk/src/gx_head/engine/gx_engine_audio.cpp line 51.

void ProcessingChainBase::set_samplerate(int samplerate) {
    steps_down = 4 * (256 * samplerate) / 48000;
    steps_up = steps_down;
    //steps_down = (64 * samplerate) / 48000;
    //steps_up = 4 * steps_down;
    steps_up_dead = 0;
}

simply lower the value for steps_down will lower the time gap between on/off switches.

fernando-inf commented 2 years ago

Hi Brummer, okay, I'll modify the code to find a better way to turn effects on and off. Thank you for always being attentive. Greetings.

fernando-inf commented 2 years ago

Hello, I download and compiled Guitarix yesterday again, and I have noticed that this problem has been reborn (#85). Until the version of 09/26/2021 it worked fine.

brummer10 commented 2 years ago

Ups, yea, it was a wrongly committed experiment.

fernando-inf commented 2 years ago

Hi, thanks, I download Guitarix today and it's fixed again.

simply lower the value for steps_down will lower the time gap between on/off switches.

I've changed the "steps_down" values and as it gets closer to "0" it starts to make a noise when activating and deactivating the effects. The noise is similar to plugging and unplugging the guitar, it is not very loud, but it is not good. Likewise there is always a drop in decibels (In the preset change there is a strange audio cut with steps_down = 0). Conclusion, for security reasons, it is better to leave it as it is in the original code.

On/off effects:

Guitarix-RAMP-on-off-effects

Change Presets:

Guitarix-RAMP-change-presets

fernando-inf commented 2 years ago

Regarding the audio cut (on/off effects, or changing presets), I will leave these MOD-HOST code lines here, to see if someone wants to advance with this in Guitarix.

In Mod-host there is no audio cut, use another method that I think is in that part of the code (I am not a programmer), maybe I should open another separate report (Issues), but at the moment I leave it here:

MOD-HOST BYPASS (line 1856): https://github.com/moddevices/mod-host/blob/93b71533134cb5c319bdf7b5bdc187b36826c44c/src/effects.c#l1856

GUITARIX Ramp (line 51): https://github.com/brummer10/Guitarix/Blob/Ad14A628B7574BABF1F15C826A5D23E4DD908C13/trunk/src/gx_head/engine/gx_engine_audio.cpp#l51

brummer10 commented 2 years ago

You misunderstood some basic concepts here. The MOD HOST is a single plugin host. So every plugin use a single instance of the MOD HOST. What makes it appear to you as a so called Pedalboard is the MOD UI. In the MOD every plugin have to take care itself to ramp up and down when switched on and of. See here for example: https://github.com/brummer10/GxSupersonic.lv2/blob/83e25bfd2eccac4f518471bfaf5fe120da19cf26/plugin/gx_supersonic.cpp#L195 This means, switching a single plugin on and of in the MOD, you may noticed less the ramping, because only the single plug is ramping, while the other plugs still work. But, as soon you switch a preset (Pedalboard) you will noticed a huge time-gap, much larger then we've with guitarix.

fernando-inf commented 2 years ago

You misunderstood some basic concepts here. The MOD HOST is a single plugin host. So every plugin use a single instance of the MOD HOST. What makes it appear to you as a so called Pedalboard is the MOD UI. In the MOD every plugin have to take care itself to ramp up and down when switched on and of. See here for example: https://github.com/brummer10/GxSupersonic.lv2/blob/83e25bfd2eccac4f518471bfaf5fe120da19cf26/plugin/gx_supersonic.cpp#L195 This means, switching a single plugin on and of in the MOD, you may noticed less the ramping, because only the single plug is ramping, while the other plugs still work. But, as soon you switch a preset (Pedalboard) you will noticed a huge time-gap, much larger then we've with guitarix.

Hello, if you are right, I am not well documented yet, I have not studied the code well. I will come back to this topic when I have more knowledge about programming. I chose wrongly my University career, when I finish what I am studying now, I will enroll in the Programming career. I think the main topic of this "Issue #85" is resolved so it could be closed right now. greetings.

brummer10 commented 2 years ago

You are welcome.