Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

show python version and os in gui #122

Closed

Conversation

thijstriemstra
Copy link
Contributor

Useful for debugging user issues imo.

afbeelding

@corrados
Copy link
Owner

I want to keep the GUI as simple as possible to show only the absolute necessary information not to confuse the Edrumulus users.

If users will have problems with the GUI, they will most probably post a message in the forums. Your additional information will not really help them solve the problem on their own. And if they post in the forum, it is easy to ask them for the necessary information.

I hope it is ok for you that I do not merge your changes to main.

@thijstriemstra
Copy link
Contributor Author

thijstriemstra commented Nov 13, 2023

I hope it is ok for you that I do not merge your changes to main.

I understand and I'm thinking of adding a --debug or something flag instead that will add this verbose info when trying to debug a problem.. good idea?

Using something like python's argparse would be a really nice addition to edrumulus_gui.py, avoiding hard-coded values, allowing to pass them using command line (and using defaults where needed). Any thoughts on that, which variables in the script should be configurable using arguments passed in terminal?

I would actually go as far as suggesting that edrumulus_gui.py should become a full-blown python package on pypi, and become a easy pip-installable piece of software? I have experience with that and would definitely be up for helping to make it possible.

Support for (Py)Qt, LGVL etc would be really awesome.

@corrados
Copy link
Owner

corrados commented Nov 13, 2023

Actually, I want to keep the file edrumulus_gui.py as short as possible.

I would prefer to create a complete new Python file which only does issue debugging. This script could then do a lot more to check:

  • Is an Edrumulus device connected?
  • What type of device (Teensy, ESP32, somethinng else)? E.g., if a Teensy is used, no loopMIDI is required since the Teensy registers as a native MIDI USB device.
  • Are the correct Python libraries installed (e.g., check for correct rtmidi package).
  • Does the communication to Edrumulus work?
  • Are there errors reported from Edrumulus (e.g., DC-offset error) and provide the user with a detailed error description and what he can do to solve the issue.
  • Show system configurations like OS, Python version, etc.
  • Help text on how to connect a DAW if everything works.
  • Things I have forgotten :-)

Usually, if everything is setup correctly, the GUI just works (I use it on a daily basis for a long period of time now) and no debugging is needed. Usually, the first setup is the problematic phase (as in your case). Now that you have setup loopMIDI and HairlessMIDI correctly, you can just use it without problems, I assume.

@corrados
Copy link
Owner

Maybe design that new script so that it setups your Window environment completely like downloading loopMIDI and installing it. It could also be used as a startup script which starts loopMIDI and HairlessMIDI in the correct order and then starts edrumulus_gui.py and maybe even your DAW.

@corrados
Copy link
Owner

The name of the script might then be run_edrumulus.py which is the equivalent for run_edrumulus.sh which is only intended for Linux. Maybe the new run_edrumulus.py could replace run_edrumulus.sh completely since it could be run under Windows and also under Linux. Not a bad idea actually :-).

@thijstriemstra
Copy link
Contributor Author

thijstriemstra commented Nov 13, 2023

Actually, I want to keep the file edrumulus_gui.py as short as possible.

Agreed, that's why I'm making these suggestions.

The way edrumulus_gui.py is structured now (not using classes but globals, one long sequential script) it's hard to read, maintain and improve. I would split it into several classes and maybe 1 to 3 python files. When using edrumulus_gui.py you don't necessarily need the C++ code and all other miscelaneous scripts in this repository if you already have a flashed Edrumulus device. You'd only have to do pip install edrumulus_gui on some random laptop and you'd be good to go. Refactoring the edrumulus_gui sounds like a fun project to work on.

It could also be used as a startup script which starts loopMIDI and HairlessMIDI in the correct order a

I really hope edrumulus will move away from loopMIDI and HairlessMIDI in the future when possible, since these pieces of software are not maintained anymore and probably closed source as well. If they work, fine, but it feels like a weak link.

@corrados
Copy link
Owner

Refactoring the edrumulus_gui sounds like a fun project to work on.

Sorry, for now I do a lot of changes to that file and I want to keep it as closely as possible as it is right now.

If, in the future, we will have a lot of Edrumulus users, then it will be a good time to refactor edrumulus_gui or write a complete new GUI. But right now I am happy how it is and do not want to change it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants