Guitarix: No dialog for setting MIDI parameter on mouseclick

All your LV2 and LADSPA goodness and more.

Moderators: MattKingUSA, khz

Post Reply
DisasterArea
Established Member
Posts: 28
Joined: Thu Mar 11, 2021 6:42 pm

Guitarix: No dialog for setting MIDI parameter on mouseclick

Post by DisasterArea »

Hallo,

I run ubuntustudio 20.04 that comes with guitarix 0.39.0 and am new to guitarix. Connections are made, sound comes out, midi comes in and I can switch the presets with my Behringer FCB1010 foot MIDI controller. All seems fine. But following the wiki at
https://sourceforge.net/p/guitarix/wiki ... I_Control/
it is not possible to assign MIDI control to knobs, sliders and so on. The documented screen "guitarix: Set MIDI controller" does not come up.

Does anybody have the same issue and a solution for that?

Regards
Frank
Ubuntu Studio 22.04, Focusrite Scarlett 2i2, NI Komplete Audio 6, Acoustic and E-Guitar, E-Bass, Modular Synth (Cardinal) KORG Nano Control Studio, Novation Launchkey 25
DisasterArea
Established Member
Posts: 28
Joined: Thu Mar 11, 2021 6:42 pm

Re: Guitarix: No dialog for setting MIDI parameter on mouseclick

Post by DisasterArea »

Here are some news on it. Just activated the ubuntustudio backports and did an update. I'm now on guitarix version 0.41.0 and it is still not working. I use gnome desktop.
Ubuntu Studio 22.04, Focusrite Scarlett 2i2, NI Komplete Audio 6, Acoustic and E-Guitar, E-Bass, Modular Synth (Cardinal) KORG Nano Control Studio, Novation Launchkey 25
tramp
Established Member
Posts: 2335
Joined: Mon Jul 01, 2013 8:13 am
Has thanked: 9 times
Been thanked: 454 times

Re: Guitarix: No dialog for setting MIDI parameter on mouseclick

Post by tramp »

Strange, I've never seen ore heard such a bug in guitarix.
Have your mouse a wheel? And do you press on it while your mouse pointer is above the controller you want to connect?
Here this is the Button2.
Here is a little program to verify your mouse button order. We need " Button2" to pop up the midi connect widget in guitarix,
so please copy the code and save it somewhere as grabmouse.c, then compile it with

Code: Select all

gcc grabmouse.c -lX11 -o  grabmouse
run it in a terminal and press your mouse buttons, it will print out the button numbers. As I said we need button2.
press ctrl+c when done to quit the prog.
Now could you verify that it didn't work with mouse button2?

Code: Select all

// gcc grabmouse.c -lX11 -o  grabmouse

#include <stdio.h>
#include <stdlib.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>

int main(int argc, char *argv[])
{
  Display *dpy;
  Window win;
  int scr;
  Atom WM_DELETE_WINDOW;
  XEvent ev;
  int loop;
  int msec = 0;
  int cur_msec = 0;

  /* open connection with the server */
  dpy = XOpenDisplay(NULL);
  if (dpy == NULL) {
    fputs("Cannot open display", stderr);
    exit(1);
  }
  scr = XDefaultScreen(dpy);

  /* create window */
  win = XCreateWindow(dpy, XRootWindow(dpy, scr) , 0, 0, 1, 1, 0,
                      CopyFromParent, InputOnly, CopyFromParent,
                      CopyFromParent, 0);

  /* select kind of events we are interested in */
  XSelectInput(dpy, win, ButtonPressMask);

  /* grab button press on root window */
  XGrabButton(dpy, AnyButton, AnyModifier, DefaultRootWindow(dpy),
               True, ButtonPressMask | ButtonReleaseMask, GrabModeSync, 
               GrabModeAsync, None, None); 
 
  /* connect the close button in the window handle */
  WM_DELETE_WINDOW = XInternAtom(dpy, "WM_DELETE_WINDOW", True);
  XSetWMProtocols(dpy, win, &WM_DELETE_WINDOW, 1);

  fprintf(stderr, "Press ctrl + c to quit\n");  
  /* event loop */
  loop = 1;
  while (loop) {
    XNextEvent(dpy, &ev);
    switch (ev.type)
    {
      case ButtonPress:
        if (!msec) msec = ev.xbutton.time;
        cur_msec = ev.xbutton.time - msec;
        fprintf(stderr,"Button%i Press event received at %i msec\n", 
            ev.xbutton.button, cur_msec);
        msec = ev.xbutton.time;
        XAllowEvents(dpy, ReplayPointer, ev.xbutton.time);
        XSync(dpy, 0);
        break;
      default:
        break;
    }
  }
  XDestroyWindow(dpy, win);
  /* close connection to server */
  XCloseDisplay(dpy);
  return 0;
}
On the road again.
DisasterArea
Established Member
Posts: 28
Joined: Thu Mar 11, 2021 6:42 pm

Re: Guitarix: No dialog for setting MIDI parameter on mouseclick

Post by DisasterArea »

Dear tramp,
I guess you had the right idea to find out. Its really strange, that with my Evoluent mouse the middle button is Button9. :roll:
So I tested another mouse and it worked. Here is the output:

--------------------------------
my@myself:~/Compile/Guitarix$ ./grabmouse
Press ctrl + c to quit
Button9 Press event received at 0 msec
Button2 Press event received at 4576 msec
new
-------------------------------
Button9 output is, when pressing Evoluent mouse, Button2 when pressing Qtronix (FCC DICOTA) Mouse

Here are my mice
Bus 001 Device 026: ID 1a7c:0191 Evoluent VerticalMouse 4 (A vertical right hand mouse -> Button9)
Bus 001 Device 023: ID 05c7:0005 Qtronix Corp. (normal, horizontal mouse -> Button2)
Bus 001 Device 027: ID 1a7c:0192 Evoluent (Verticla mouse left hand ->Button9)

Strange, that with Qtronix, your code also produces the word "new" after each scan.
I tested the Qtronix mouse with guitarix and it worked. :D

Thanks very very much. So crasy how, now I have to use another mouse for guitarix. It's not a good solution but it works. Or do you have another solution.

Are you one of the developers of guitarix?

Regards
Frank
Ubuntu Studio 22.04, Focusrite Scarlett 2i2, NI Komplete Audio 6, Acoustic and E-Guitar, E-Bass, Modular Synth (Cardinal) KORG Nano Control Studio, Novation Launchkey 25
tramp
Established Member
Posts: 2335
Joined: Mon Jul 01, 2013 8:13 am
Has thanked: 9 times
Been thanked: 454 times

Re: Guitarix: No dialog for setting MIDI parameter on mouseclick

Post by tramp »

Hi
Yes I'm the maintainer of the guitarix project.

So you've tried all buttons on your Evoluent mouse and none print out "Button2"? Maybe a combination is needed?
Other than that it would be fairly easy to add support for button9 in guitarix for that case, still I never heard that a mouse don't have button2.

The printout of "new" may be a past from the clipboard (past on middle click, like in any text editor).
On the road again.
DisasterArea
Established Member
Posts: 28
Joined: Thu Mar 11, 2021 6:42 pm

Re: Guitarix: No dialog for setting MIDI parameter on mouseclick

Post by DisasterArea »

Hi,

and oh dear. It's always good to know well the tools one uses. I did a deeper look at my evoluent mouse and found another button. It's right under the mouse wheel. The wheel itself can be pushed and I thought that its like on any other mouse the middle mouse button.
But beneath the wheel there is another button, I have never used and have not known until today, that its there. This is BUTTON2!!!

Shame on me :oops: :lol:
Ubuntu Studio 22.04, Focusrite Scarlett 2i2, NI Komplete Audio 6, Acoustic and E-Guitar, E-Bass, Modular Synth (Cardinal) KORG Nano Control Studio, Novation Launchkey 25
DisasterArea
Established Member
Posts: 28
Joined: Thu Mar 11, 2021 6:42 pm

Re: Guitarix: No dialog for setting MIDI parameter on mouseclick

Post by DisasterArea »

And tramp, I did forget to say, that guitarix is a really cool software. Thanks for that and greetings from Germany.
Ubuntu Studio 22.04, Focusrite Scarlett 2i2, NI Komplete Audio 6, Acoustic and E-Guitar, E-Bass, Modular Synth (Cardinal) KORG Nano Control Studio, Novation Launchkey 25
tramp
Established Member
Posts: 2335
Joined: Mon Jul 01, 2013 8:13 am
Has thanked: 9 times
Been thanked: 454 times

Re: Guitarix: No dialog for setting MIDI parameter on mouseclick

Post by tramp »

I'm glad we could solved your issue.
And nice to hear that guitarix is of some use for you. :D
On the road again.
DisasterArea
Established Member
Posts: 28
Joined: Thu Mar 11, 2021 6:42 pm

Re: Guitarix: No dialog for setting MIDI parameter on mouseclick

Post by DisasterArea »

Just one last question: Where is the best place to post feature requests for guitarix?
Ubuntu Studio 22.04, Focusrite Scarlett 2i2, NI Komplete Audio 6, Acoustic and E-Guitar, E-Bass, Modular Synth (Cardinal) KORG Nano Control Studio, Novation Launchkey 25
tramp
Established Member
Posts: 2335
Joined: Mon Jul 01, 2013 8:13 am
Has thanked: 9 times
Been thanked: 454 times

Re: Guitarix: No dialog for setting MIDI parameter on mouseclick

Post by tramp »

best is here:
https://github.com/brummer10/guitarix/issues

here is a guitarix related reddit
https://www.reddit.com/r/Guitarix/
were I'm around often as well.
On the road again.
Post Reply