Mackie Controller - auto banking

Oh awesome.
Unfortunately I am really novice for setting this up in windows, as I mainly use Mac.

Step by step guide from the previous version should work mostly I’d imagine (maybe someone can chime in here with better instructions).
The actual steps required will be:

  • Download the .py files from git (I’ll provide a link once I’m done).
  • Install Python 3.10 (anything later should work as well of course)
  • Install the following modules: mido (this is the midi module i used last time), python-rtmidi (this is the midi port, also used the last time).
  • Opening the file called midiconfig.py with an editor (notepad or whatnot) and editing some clear text parameters. DAWOUTPUT ,DAWINPUT, HWOUTPUT,HWINPUT

There are additional parameters in there now as well, one being DEBUG which is 0 or 1, and with enabled will spit out a lot of messages in the console, mostly used for development. If DEBUG is enabled, you also need to config the DEBUGDEVICE. If DEBUG is 0, you can just ignore it.
Another is AUTOBANK which well, is the whole point…and I just wanted to have a parameter to switch it on or off, for whatever reason.

After that it’s just a matter of starting the program.
Syntax should just be something like “python3.10 hackiemackie.py” in the same folder that the other files are.

Anyway, I’ll try to get some progress tonight and hopefully have some actual files posted.

Ok first release in… it’s a bit messy, so a lot of cleanup is still needed, and i definitely need to update documentation, but I got first version working now.
Too tired to really explain more of this right now, as I just want to publish this and have a break :slight_smile:

Things that aren’t working as well as I’d like is that I still don’t know which direction to start searching for banks, so right now I start going up, and then it turns around and searches to the bottom. If it doesn’t find a track, it wont try again until you select a new track.
I am hoping to be able to improve this logic, but it’s really tricky to work out… it can be done, but requires a few hacky things, which I don’t shy away from, but yeah…wanted a working version first, which I consider this to be.

The main program is hackiemackie.py
Configuration can be done in the midiconfig.py

Available for download below, there’s a source code zip you can download from there.

1 Like

I now understand why the script stopped working for many who faced this problem and wrote about it above. I’m telling you. I worked with this script and ran it on many versions of Python 3.7, Python 3.8, Python 3.9 and everything worked. But as soon as I installed Python 3.10 and versions higher than Python 3.11, the “pip install python-ke midi” modules stopped being installed on the command line when installing, it gives an error - Using outdated ‘setup.py install’ for python-rtmidi, since the ‘wheel’ package not installed.
Installing the assembled packages: python-rtmidi
Running setup.py install for python-rtmidi … mistake
ERROR: The command was executed with an error with exit status 1. At first I thought it was a problem with the new Windows 11, but when I started installing versions up to 3.9 everything works. Therefore, until these modules are installed on version 3.10, I will not be able to check the new script. Any thoughts on how to fix this? So let’s say I’m not strong with programming, but I can perform the actions proposed for verification

I’d say try to install using pip3 install python-rtmidi instead?
pip might be python 2.
I do recognize this ‘wheel’ package not installed error, but can’t recall what the issue is regarding that.
Try typing pip list and you should see a list of modules installed. Quite possibly you might have to type pip3 list as well.
Personally I run the latest binary (executable files) for python, so when I installed these modules i did pip3.10 install python-rtmidi and then pip3.10 install mido.
If I run that I get the following result:
image

Just another little nugget of cool information I’m working on extracting now.
This is just an output from the debug text, but right now I’m able to retrieve the track name (29 characters max) for the currently selected track, which is quite neat.
“Track name: Motu Reverb (no monitoring)” ← this would normally be truncated down to just “MotuReve” on the normal bank name list.
Not entirely sure how I’m going to use this yet, but I think I can make use of it for making a faster algorithm when switching banks, as you can retrieve the track name of names outside of the bank with this method.
Thanks a lot to @Sub3OneDay for this way of getting longer track names with MCU.

1 Like

I managed to install all the modules. Additionally, it took the installation of Visual Studio for version 3.10 to recognize this. Now everything is as in your picture. But now I’m stuck on the fact that I can’t launch a new your file hackiemackie.py . Apparently additional actions are needed in the file midiconfig.py , but I don’t understand what to edit there yet. Before that, I used a script and I had and have midiInputVirtual = ‘loopMIDI Port IN’
midi Output Virtual = ‘loopMIDI Port OUT’ didn’t add anything else. How can I run it now for verification?

Oh great progress! (Thanks for bearing with this).
I intend to rework the setup as I realise it’s definitely nowhere near a standard way, but it was just what I ended up with for now.

Anyway, try something like this. If this screams at you, try swapping the order of your loopMIDI Port IN and OUT, as this is a bit confusing:

class MidiConfig:
HWINPUT:str = ‘X-Touch One’
HWOUTPUT:str = ‘X-Touch One’
DAWINPUT:str = ‘loopMIDI Port IN’
DAWOUTPUT:str = ‘loopMIDI Port OUT’

AUTOBANK:int = 1
DEBUGMODE:int = 0

DEBUGINPUT:str = ‘you can ignore this’
DEBUGOUTPUT:str = ‘you can ignore this’

Oh I forgot to mention…there’s a bit confusion here.
If you enable debugmode you probably need add a debug device, as well . But it should be fine running with DEBUGMODE =0.

As a complete newbie to anything script related I’m following this thread intently and just wanted to say thanks for carrying on adding bits and refining the code, it really is appreciated.

I can setup win10 environments to help test with but I’d need some hand holding hehe

1 Like

it didn’t work unfortunately

Try enabling debug, and then try again. Then provide the error message here and maybe I can see something.

I have the Behringer x-touch one and a console one with the same problems. But I have no clue of scripts and python, so I am waiting how this turns out…
I am on Windows 10

I had a chance to try to install python 3.10 on a win 10 machine today, and I ran into the same issue trying to install python-rtmidi.
If anyone has a better idea on how to solve it, feel free. I’ll try some things if I get another chance, as I saw quite a few google results of people with similar issues. One mentioning how the setup for python-rtmidi might have a bug preventing it to work with later than python 3.4.
I’ll see if I can figure something out.

Yes, I have solved this problem. You need to install “Microsoft C++Build Tools”. And then rtmidi will work on Python 3.10. Here is the link - Microsoft C++ Build Tools - Visual Studio

1 Like

Oh wow how curious.
Good job!
Can you get the script to run now?

Btw I have some updates to it coming this weekend with a bit more user friendly setup, but functionality it’s still the same.
Hopefully you can get it running.

I could not run the script. I’m just stuck at this step. At startup, it just gets welded right away, and I simply don’t know how to find out the error because of what it happens

Which error are you stuck at now? Could you provide a screenshot or just copy/paste of the errors?
I’m just trying to work out if the error is in anything I can alter or adjust.

Today I consulted with a familiar programmer on the launch and file errors. I was told that it can be done through the program “PyCharm” without it or similar programs, it will not be possible to see errors. It turned out to be a difficult action for me, because I’m far from a programmer and I can’t quite figure it out. If this action does not cause much difficulty to someone, they can check. At least the direction of how and where to act I wrote.

How are you trying to run the program?
I run it in the terminal on mac.
I would imagine running it in a command prompt would be the way to go in windows.
You’ll get a better output that way and you should get any relevant errors like that without a need for any other program.

Opened the hackiemackie file.py using the command line. Here’s what he writes: Traceback (most recent call last):
File “C:\Users\freed\Downloads\mcupython-0.91 o\hackiemackie.py”, line 14, in
from midiconfig import MidiConfig as conf
File “C:\Users\freed\Downloads\mcupython-0.91 o\midiconfig.py”, line 10
DAWINPUT:str = ‘loopMIDI Port IN’
^
SyntaxError: invalid character ‘‘’ (U+2018) .