Arturia Forums

Controllers => MiniLab MKII => Topic started by: LilSmeag on July 19, 2020, 09:40:40 pm

Title: MiniLab Mk2 Ableton Mode modified functionality
Post by: LilSmeag on July 19, 2020, 09:40:40 pm
The project has now been moved to GitHub, where any updates, issues or suggestions will now be discussed
Here is the link:
https://github.com/DeepSmeag/MinilabMk2-Ableton-script (https://github.com/DeepSmeag/MinilabMk2-Ableton-script)
I will leave the old post below for cohesion reasons, but it will not be updated any longer. The same with the attached files below, they will be updated on the GitHub repo moving forward.

Related projects by other members of the community:

@Paco : https://github.com/soneu03/Ableton_Minilab_project (https://github.com/soneu03/Ableton_Minilab_project)  (Spanish)
- includes a great variety of sources for documentation and learning about these types of scripts, for anyone interested in learning more

----------------------------------------------------------------------------
Update: uploaded MCC preset as requested, should be easier to setup now.
Update 2: will come back in a few months to polish some things and fix/add some more. Comment issues/suggestions.

So I purchased the MiniLab Mk2 about 2 months ago and found the Ableton Mode functionality lacking, but I didn't know that you could program your own in the beginning. Then I found a post on this forum that added functionality for the 2 push encoders which weren't used and found out that someone could program controllers to do anything they wanted/knew how to program. As such, here I am after a lot of work and frustration sharing what I've been able to achieve. I wanted to add one more thing before releasing the script, but every method I tried failed, so maybe someone else will try to do it instead. I will detail everything as I go.
Regarding what I added and took away...

Pads:
All colors are changeable through code modifications, I'll attach some resources at the end.

Pad 9 = global play : green - playing, yellow - paused
Pad 10 = global stop : red- playing (push to stop, yellow - not playing but cursor is not at the start (push to go back to beginning), white - not playing and cursor at start
Pad 11 = global record: cyan - not recording, red - recording
Pad 12 = global overdub: blue - off, yellow - on
Pad 13 = view : cyan - arrangement, magenta/purple - session
Pad 14 = mute selected track: green - not muted, red - muted, cyan - muted by other track's solo only, blue - muted by button and other track's solo
Pad 15 = solo selected track: white - not soloed, blue - soloed
Pad 16 = arm selected track: green - not armed, red - armed

Encoders:
All LEDs will update accordingly to their function's state; they will update even if you use another controller or mouse/keyboard to change something.

When selecting the control surface script, the bank will be changed to slot 1 (Analog lab mode). This should happen with every opening of Ableton.
It is possible that the script will work after a 2nd try of loading it only( Ableton restart included).
Might have missed some of the behaviour, but exploring should reveal it all.
I have tested everything for some time but things can always break, I'll try to keep an eye and fix small problems if they arise, but I do not guarantee anything.
I don't plan on adding anything else or modifying things, but it could happen in the future.
For programmers: you are free to add anything else or modify the script, if you make something useful please share it with others so that we can all benefit from it.
Also for programmers( asking for help now): I've been trying to add an event listener for pads that doesn't interrupt the midi note being sent to Ableton and that also triggers a function that I've written. If any of you find a way to do so, I'd be grateful.

Now for setup:
Download the zip, unzip it, place the new folder in your Ableton folder under \Resources\MIDI Remote Scripts\
Using the MIDI Control Center now, here is the way I have my 8th bank set up, might not work if you have another setup:
Encoders channel : 2
Enc 1 : MIDI CC 22
Enc 2 : MIDI CC 23
Enc 3 : MIDI CC 24
Enc 4 : MIDI CC 25
Enc 5 : MIDI CC 26
Enc 6 : MIDI CC 27
Enc 7 : MIDI CC 28
Enc 8 : MIDI CC 29
Enc 9 : MIDI CC 30
Enc 10 : MIDI CC 31
Enc 11 : MIDI CC 33
Enc 12 : MIDI CC 34
Enc 13 : MIDI CC 52
Enc 14 : MIDI CC 53
Enc 15 : MIDI CC 54
Enc 16 : MIDI CC 55
Enc 1 push : channel 10, CC 113 off 0 on 127
Enc 9 push : channel 10, CC 115 off 0 on 127
Pads channel : 10
Pads 1-8 : midi notes as set by default, colors don't matter as they will be overwritten, mode is set to gate for all pads
Pads 9-16 : MIDI CC from 56 to 63 , off 0 on 127, gate, color doesn't matter

After opening , go to Ableton preferences, then MIDI and selected this control surface, which should be at the top. Input and Output has to be from MiniLab Mk2
Playing the keyboard while in Ableton mode does not have an effect on the functionality if I remember right, since the channels are different

Disclaimer:
I am an enthusiast, not professionally programming control surfaces for Ableton.
I have used some of Arturia's original code for the Minilab Mk2, but I guess it's ok since I am not commercially using it. Most of the functionality is added or modified by me, including the clip launching part which I have rewritten in order to better control its behaviour.
The code is vaguely documented, if there is demand I will try and explain how things work.
For programmers : if you look trough the code you will find unused stuff and stuff that is written but commented out, that is for other fun stuff/ the problem I couldn't solve which I mentioned in the beggining. If you want to explore, go wild.

As for people who are interested in finding out about how you can program your own functionality, I recommend looking up python and learning about it, then checking out these resources:
https://julienbayle.studio/PythonLiveAPI_documentation/Live10.1.19.xml
http://remotescripts.blogspot.com/
https://livecontrol.q3f.org/ableton-liveapi/articles/introduction-to-the-framework-classes/
https://forum.arturia.com/index.php?topic=93714.0
https://forum.ableton.com/viewtopic.php?t=200513
Some of it is outdated, things may be hard to understand. Keep at it and test out, things will work out somehow.

Let me know if anything is missing, if something is unclear, what you think of it etc. I'll try to keep an eye out for replies.
Title: Re: MiniLab Mk2 Ableton Mode modified functionality
Post by: rooser53 on November 19, 2020, 05:14:37 pm
I downloaded this and tried to get it to run... I can load into live but not into the MCC? This is the functionality I want from the minilab, because I use the arrange more almost exclusively! This is exactly what I'm trying to do but I can't seem to get the controller functions mapped correctly???
Title: Re: MiniLab Mk2 Ableton Mode modified functionality
Post by: LilSmeag on November 20, 2020, 07:35:21 am
Hey there. It's been quite some time since I posted my code, so I don't remember everything exactly. First, one thing to mention is that I found a problem with the script: If you have more than 8 tracks, lights glitch out and don't indicate what they're supposed to; pads' functionality should stay the same regardless, but I can't remember if it actually does. Now, as I understand, you aren't able to save the mappings into Midi Control Center. I've experienced this a few times, the way I solved it was to save my mappings into a preset first and then spam the load into Bank 8 button while not having Bank 8  selected on the controller itself. After a few tries it should work, but keep in mind that their application is separate from my code, so I cannot do something about it. After the mappings are saved, the script should work correctly, as long as you have 8 tracks or fewer. Let me know if I misunderstood something or have other questions. I'm not working on the code anymore, but I should be able to provide some help if needed.
Title: Re: MiniLab Mk2 Ableton Mode modified functionality
Post by: redgemalt on November 22, 2020, 03:33:34 pm
WoW, very good job. I love your setting and work very well for me. Thank for sharing your lot of work.

Thank again, very helpful for me.
Title: Re: MiniLab Mk2 Ableton Mode modified functionality
Post by: LilSmeag on November 24, 2020, 09:52:38 am
I'm happy that it's helpful to someone. Thanks for your thoughts.
Title: Re: MiniLab Mk2 Ableton Mode modified functionality
Post by: RJoseph203 on January 31, 2021, 03:48:41 am
Great Job with the code! It works for me only on new projects and with the case that I need to make sure I have 8 tracks or more. However, opening previous live sets does not work. It reverts back to the original ableton memory light preset. The pads and the knobs dont work aswell. If you have any idea why this is happening please let me know, thanks!
Title: Re: MiniLab Mk2 Ableton Mode modified functionality
Post by: LilSmeag on January 31, 2021, 10:32:28 am
Hello! I was surprised to see activity on this post after such a long time, but thank you for your comment.
Quote
and with the case that I need to make sure I have 8 tracks or more
I am not exactly sure of what you meant here, does the script work for more than 8 tracks?

As for older live sets, the first thought I have is that you might be using multiple versions of Ableton Live. If this is not the case, please tell me more about your issue.

If it is the case, here is why it's happening: From what I've seen, Ableton creates a separate folder for each of its versions. For example, "Ableton Live 9" and "Ableton Live 10" will have separate folders in which their files are placed. My script works by copying the files in a certain folder inside Ableton Live's folders. If you do use multiple versions for various live sets, then all you need to do is simply copy the script folder you initially downloaded from here to the other version(s) of Ableton Live. If it is an older one, it might not work. I have only tested with Live 10. Let me know what happens.

Make sure on all of the live sets that the script does not work on to have it selected. From the control surfaces tab in Live settings, check if the custom MK2 one shows up. If it does not, then it's either missing, or not recognized by Live. We can go from there as needed.

If you have other questions, I'll be happy to help as much as I can.
Title: Re: MiniLab Mk2 Ableton Mode modified functionality
Post by: ftrela on March 12, 2021, 05:58:40 pm
Great job with the script, it is a great improvement over the default one! One issue I have is that compared to the default script, this one doesn't play well with launching clips in gate mode, it just keeps constantly playing them
Title: Re: MiniLab Mk2 Ableton Mode modified functionality
Post by: LilSmeag on March 14, 2021, 12:49:14 pm
Hey, thanks for your input. I have to do a bit of testing to make sure I properly understand your problem. Until then, the reason would be that my script wasn't intended for gate mode, but rather as a toggle between clips' playing states. I might come back and update some things in the future, but for now that's the way it is.

EDIT: so there seem to be a lot more bugs than I previously remembered...I haven't really used the controller in a while because life, but now that I'm working on some things again my code's limitations become apparent.
As a temporary fix to the Gated clips, manually setting the midi mapping seems to work, although some strange things happen with the lighting for the transport controls. Removing the mapping makes the controller go back to normal as the script dictates.
I'm considering going back and working on some things, but the time I would need isn't quite available at the moment.
Thank you to everyone who's tested and/or using the script, I'm happy to see it's useful to someone, despite its shortcomings.
Title: Re: MiniLab Mk2 Ableton Mode modified functionality
Post by: Branco Serra on March 30, 2021, 09:28:10 pm
Hi, i found this searching for the ableton template that now the new actualization of te midi center brings for Minilab MKII. I accidentally overwrited it, and dont know how to get it back, someone has the template and could send it to me?
Title: Re: MiniLab Mk2 Ableton Mode modified functionality
Post by: V1dmr on April 19, 2021, 06:17:12 pm
LilSmeag, can you export and upload your MidiControlCenter preset?
Title: Re: MiniLab Mk2 Ableton Mode modified functionality
Post by: LilSmeag on April 19, 2021, 06:31:37 pm
Uploaded. Thanks for your suggestion, I don't really know why I didn't do that before. Should be easier now for anyone to try out the script.
Title: Re: MiniLab Mk2 Ableton Mode modified functionality
Post by: V1dmr on April 20, 2021, 01:04:37 pm
Thank you very much for job you done!
Tried it yesterday worked great, I love so much that current track highlighted it huge improves workflow

I suppose to attract more enthusiasts in order to improve project(or just to make more minilab owners happier) it needs presentation on YouTube
Title: Re: MiniLab Mk2 Ableton Mode modified functionality
Post by: LilSmeag on April 21, 2021, 07:21:31 pm
Thanks for the tip!

I would actually be grateful if anyone chose to spread the word and put up a video explaining the features, so feel free to do so if you want to. Maybe even message me a link so I can attach it to the main post.

Anyway, since people seem to like the script, I thought I would come back and improve some things, and maybe add to it. Life's a bit busy right now, but I thought I would find some time in the summer.
If anyone has some problems they'd like to report, or features they'd like to see added (like maybe compatibility with gate mode for clips), post a comment and I'll use the feedback when I get to work. I'll try to make things as easy to use as possible.

This script is after all intended for beginners, or at the very least those who have chosen the Minilab Mk2 as their starting controller. Arturia has their higher-end controllers which have more features, but it's nice to have those on the cheaper models as well.

Oh and...if, by any chance, you, the one reading this, are a tinkerer and want to use my code to create your own custom script, feel free to do so. My request would be to give some credit and maybe share so anyone can benefit.

All right, I'll be back in the mid-summer. Let me know what your suggestions are!
Title: Re: MiniLab Mk2 Ableton Mode modified functionality
Post by: codekiln on May 24, 2021, 02:04:09 pm
@LilSmeag - Thanks so much for the work you've done so far, and for the links to information about these techniques. It seems like the next step is to get the code into a GitHub repo. Do you already have the code in GitHub? If not, would you mind if I created a repo to house a project? A repository would give the MiniLabmkII community the ability to track feature requests, etc. For example, features I would consider working on would be 1.) an installer and 2.) a default distribution of well-documented features supporting a specific use case such as live looping.
Title: Re: MiniLab Mk2 Ableton Mode modified functionality
Post by: codekiln on May 26, 2021, 03:49:42 am
What version of Ableton were you using when developing this? When I try to install, I get the following error:

Code: [Select]
[tt]$ cat /Users/Myer/Library/Preferences/Ableton/Live\ 9.7.7/Log.txt | grep RemoteScriptError
2437 ms. RemoteScriptError: Traceback (most recent call last):
2437 ms. RemoteScriptError:   File "<string>", line 1, in <module>
2438 ms. RemoteScriptError:   File "/Applications/Ableton Live 9 Lite.app/Contents/App-Resources/MIDI Remote Scripts/AAminilab_mk2_custom_script/__init__.py", line 2, in <module>
2438 ms. RemoteScriptError:     
2438 ms. RemoteScriptError: from .test import test   # you import your main program during the initialisation of your script
2438 ms. RemoteScriptError:   File "/Applications/Ableton Live 9 Lite.app/Contents/App-Resources/MIDI Remote Scripts/AAminilab_mk2_custom_script/test.py", line 29, in <module>
2438 ms. RemoteScriptError:     
2439 ms. RemoteScriptError: from .HardwareSettingsComponent import HardwareSettingsComponent
2439 ms. RemoteScriptError:   File "/Applications/Ableton Live 9 Lite.app/Contents/App-Resources/MIDI Remote Scripts/AAminilab_mk2_custom_script/HardwareSettingsComponent.py", line 12, in <module>
2439 ms. RemoteScriptError:     
2439 ms. RemoteScriptError: class HardwareSettingsComponent(ControlSurfaceComponent):
2439 ms. RemoteScriptError:   File "/Users/versonator/Jenkins/live/output/mac_64_static/Release/python-bundle/MIDI Remote Scripts/_Framework/SubjectSlot.py", line 99, in __new__
2439 ms. RemoteScriptError:   File "/Users/versonator/Jenkins/live/output/mac_64_static/Release/python-bundle/MIDI Remote Scripts/_Framework/SubjectSlot.py", line 85, in setup_subject
2439 ms. RemoteScriptError:   File "/Users/versonator/Jenkins/live/output/mac_64_static/Release/python-bundle/MIDI Remote Scripts/_Framework/SubjectSlot.py", line 38, in subject_add_event
2440 ms. RemoteScriptError: AttributeError
2440 ms. RemoteScriptError: :
2440 ms. RemoteScriptError: 'unicode' object has no attribute 'signal'
2440 ms. RemoteScriptError: [/tt]
Title: Re: MiniLab Mk2 Ableton Mode modified functionality
Post by: Paco on June 29, 2021, 05:50:02 pm
Hello LilSmeag, I would like to share my script here, since although it differs a lot from yours, it is inspired and (especially at the beginning) it was very useful for learning. As my intention is to improve the uses of the MiniLab, I contribute my grain of sand so that whoever wants to improve the performances of the MIDI keyboard.
No offense, if you think this post is inappropriate send me an MD and I'll delete it.

https://github.com/soneu03/Ableton_Minilab_project (https://github.com/soneu03/Ableton_Minilab_project)

P.D. google translated! My language is Spanish, so there are many annotations in spanglish
Title: Re: MiniLab Mk2 Ableton Mode modified functionality
Post by: LilSmeag on July 10, 2021, 10:21:13 pm
Ok guys I'm back and paying attention again. Sorry for the absence, I had to focus on my own things.
@codekiln your ideas are great and I will consider them as I try to improve the project. I will create the repo and rework the main post to accommodate the changes. Should be a lot cleaner. Feel free to post any suggestions or questions once I have setup the system. I want the repo on my account since it's my project and I don't mind not being anonymous.
EDIT: almost forgot, I used Live 10 to develop the script, since that's what the controller came with. The Lite version, but later had the chance to test without the 8 track limitation. The error is probably due to some change in the API that offered some more attributes to play with in the newer version. I have literally no idea what I wrote 1 year ago so I'll check what the error is about and write back after I can explain something.
----STOP EDIT-----
@Paco I don't mind you sharing your project, in fact I'll add the link on the main post. The only problem is that people who don't speak Spanish will have a hard time understanding your work.
If we can gather scripts for all the major (and perhaps not-so-popular) DAWs it would be great for people to select things they like for their own work, regardless of the program they use.
It's a lot of work, but some do benefit from it so it's worth it.


Now, I'd like to emphasize that our scripts mostly help beginners or those with budget controllers. Since they are small or cheaper than others, they lack buttons, knobs or other features and don't get as much attention as the premium counterparts do. Most people who are serious about music probably invest in higher-end controllers and don't care about scripts like these. And that's ok. Our work is for those who want to get the most out of a small package and are unhappy with the stock experience the software brings to the table.

Ok, I'll get to work and some changes will happen in the coming days. Thanks to everyone for the interest in the project. Your input motivates me.
Title: Re: MiniLab Mk2 Ableton Mode modified functionality
Post by: LilSmeag on July 29, 2021, 09:42:23 pm
@codekiln I managed to take a look at that error and check on the _Framework folder inside the MIDI scripts root folder of Ableton. Inside the file SubjectSlot.pyc, when transformed so as to make it possible for a human to read it, there are references to a signal attribute, which your error mentions as nonexistent. I used Live 10, and I can see from your error you have Live 9.
There is a tool called uncompyle6, available as a library for Python if I recall correctly. You can check whether that attribute is referenced in your version. If it's not, that's the issue.
Title: Re: MiniLab Mk2 Ableton Mode modified functionality
Post by: tkwokwai@yahoo.com.hk on September 23, 2021, 09:14:04 pm
Hi,
Could any one tell me how to install the script? Does it work with Ableton 11 on Mac?
I tried to copy the folder and all the .py files to:

1) Ableton Live 11 Suite -> Contents -> App-Resources -> MIDI Remote Scripts -> AAminilab_mk2_custom_script
2) ~/Music/Ableton/User Library/Remote Scripts/AAminilab_mk2_custom_script
3) ~/Library/Preferences/Ableton/Live 11.0.6/User Remote Scripts/AAminilab_mk2_custom_script

However, after trying all the above to copy and the restart Ableton. I still couldn't find it in Ableton Preferences -> MIDI -> Control Surface

Could anyone give me some advice?

Thank you!
Title: Re: MiniLab Mk2 Ableton Mode modified functionality
Post by: rodrit on February 02, 2022, 10:56:25 pm
Hey guys,

First of all a BIG thanks to LilSmeag and Paco for their amazing work!!

I am using LilSmeag's script on Live 10 but it does not shows up in Live 11 . I managed to fix it and load it doing the following:

Fix to load in Ableton Live 11


1 - Open the file \ProgramData\Ableton\Live 11 Suite\Resources\MIDI Remote Scripts\AAminilab_mk2_custom_script\test.py
2 - Delete the line 15, the one that stated "from itertools import izip"
3 - Save the file and relaunch Live 11
4 - Go to Options > Preferences > Midi - Control Surface and select the script from the list

Have fun,

R.
Title: Re: MiniLab Mk2 Ableton Mode modified functionality
Post by: LilSmeag on February 03, 2022, 02:26:18 am
@rodrit
I was just checking the forum when I saw your reply. Thanks for pointing out the necessary change. I updated the repository with different versions. The Live11 might be backwards compatible but right now I'm in a long pause from making music and I don't even have Ableton installed so I can't check that. I trust your input and won't verify it, but it's already there on Github for any future visitors to the forum post to check.
I'd also like to know if it would be ok to mention your forum name in the updates section on Github, or maybe you'd like a Github account plugged in. For privacy reasons, right now it's "a forum member".

@tkwokwai@yahoo.com.hk
I guess you got your answer now for Live11, sorry I wasn't there to try and answer it but I probably couldn't have helped since I took a break from everything music-related.

Update-wise, I will be periodically checking to see for any new comments but the script will at most slowly get updated for future versions of Live. If I get some motivation, I might do a spree sometime to incorporate the suggestions I have on Github but won't guarantee anything. There isn't much more I can do, but I'm happy that people find my script useful. I know I did after I finished it. If I ever come back to implementing some new features I'll do some code cleanup so others may understand it better, but it's all future plans.

Thanks for the continued interest and support everyone, make sure to continue creating good music using the MinilabMk2!