The Mackie C4 Pro Ableton users thread
-
sissySpacecraft
- Posts: 18
- Joined: Thu Sep 24, 2015 2:41 am
Re: The MACKIE C4 PRO ABLETON USERS THREAD
hey guys, sorry I haven't responded sooner.
I don't have any instrument definition files except the ones that originally came with the C4, and the custom ones I've created. The main one I created was for my Yamaha MU100r (based off of the Yamaha XG default file, and customized based on data in the manual)
@yann_ Can you clarify that question? I'm curious when "back then" means. Generally last time I had it running, I was using the C4 to control plugins running on a Muse Receptor. The cool thing about the Receptor (in this case) is that it automatically maps ALL plugin controllable parameters to NRPM IDs, so I was able to write an "instrument definition" file with nothing but the NRPM data showing on the Receptor. Unfortunately, that technique won't work for plugins NOT running on a Receptor. (because no NRPM mappings)
Has anyone tried making a custom "User Control Script" for the C4?
I recently got some "Arsenal" control scripts from NativeKONTROL (and/or Isotonic Studios). I'm kind of looking for a way to use the C4 as a "ClyphXpro" control surface, where "ClyphXpro" substitutes for the C4 control software. But I haven't really started on that project yet.
I don't have any instrument definition files except the ones that originally came with the C4, and the custom ones I've created. The main one I created was for my Yamaha MU100r (based off of the Yamaha XG default file, and customized based on data in the manual)
@yann_ Can you clarify that question? I'm curious when "back then" means. Generally last time I had it running, I was using the C4 to control plugins running on a Muse Receptor. The cool thing about the Receptor (in this case) is that it automatically maps ALL plugin controllable parameters to NRPM IDs, so I was able to write an "instrument definition" file with nothing but the NRPM data showing on the Receptor. Unfortunately, that technique won't work for plugins NOT running on a Receptor. (because no NRPM mappings)
Has anyone tried making a custom "User Control Script" for the C4?
I recently got some "Arsenal" control scripts from NativeKONTROL (and/or Isotonic Studios). I'm kind of looking for a way to use the C4 as a "ClyphXpro" control surface, where "ClyphXpro" substitutes for the C4 control software. But I haven't really started on that project yet.
Re: The MACKIE C4 PRO ABLETON USERS THREAD
Thanks for replying!
Pity about the instrument definition files, even though that would have only enabled unidirectional communication.
Which leads directly to your question about a remote script for the C4: I managed to find AND download Leigh Hunt's C4 remote scripts, however initially Live didn't recognize them at all. I then managed to get them to a decompiled form by running all of them through an online decompiler for python files (.pyc -> .py).
Then at least something was happening in Live's log. But only an error:
2019-12-06T14:09:01.303052: info: RemoteScriptError: C:\ProgramData\Ableton\Live 10 Beta\Resources\MIDI Remote Scripts\MackieC4\EncoderController.py
2019-12-06T14:09:01.303175: info: RemoteScriptError: ", line 118
2019-12-06T14:09:01.303528: info: RemoteScriptError: self.__reassign_encoder_parameters(6=False)
2019-12-06T14:09:01.303604: info: RemoteScriptError: SyntaxError
2019-12-06T14:09:01.303772: info: RemoteScriptError: keyword can't be an expression
(abbreviated)
As my coding knowledge is quite limited, I haven't managed to figure out what to do with that, heck I don't even know what is the "expression" and what is the "keyword" in that line of code!
My next step would be to contact Leigh.
Pity about the instrument definition files, even though that would have only enabled unidirectional communication.
Which leads directly to your question about a remote script for the C4: I managed to find AND download Leigh Hunt's C4 remote scripts, however initially Live didn't recognize them at all. I then managed to get them to a decompiled form by running all of them through an online decompiler for python files (.pyc -> .py).
Then at least something was happening in Live's log. But only an error:
2019-12-06T14:09:01.303052: info: RemoteScriptError: C:\ProgramData\Ableton\Live 10 Beta\Resources\MIDI Remote Scripts\MackieC4\EncoderController.py
2019-12-06T14:09:01.303175: info: RemoteScriptError: ", line 118
2019-12-06T14:09:01.303528: info: RemoteScriptError: self.__reassign_encoder_parameters(6=False)
2019-12-06T14:09:01.303604: info: RemoteScriptError: SyntaxError
2019-12-06T14:09:01.303772: info: RemoteScriptError: keyword can't be an expression
(abbreviated)
As my coding knowledge is quite limited, I haven't managed to figure out what to do with that, heck I don't even know what is the "expression" and what is the "keyword" in that line of code!
My next step would be to contact Leigh.
-
sissySpacecraft
- Posts: 18
- Joined: Thu Sep 24, 2015 2:41 am
Re: The MACKIE C4 PRO ABLETON USERS THREAD
Can you share the link you found, and/or the decompiled files? My google-fu is not strong.
I have only found nearly 10 year old references and dead links.
peace - Jon
I have only found nearly 10 year old references and dead links.
peace - Jon
Re: The MACKIE C4 PRO ABLETON USERS THREAD
sure! Here is Leigh's original site and download http://collapsingsound.net/downloads.html
and here is what the online decompiler did with it https://drive.google.com/open?id=1YyWTZ ... lheRh4USvb
Cheers, Markus
and here is what the online decompiler did with it https://drive.google.com/open?id=1YyWTZ ... lheRh4USvb
Cheers, Markus
Re: The MACKIE C4 PRO ABLETON USERS THREAD
Hi guys,
I haven't worked on those scripts since, erm, probably Live V8, so I'm imagining there is some change in the LOM that has messed up the script.
I wish I could help more, but I don't really use Ableton at all anymore, and only own up to V9. Even so,I don't own a C4 anymore, so couldn't test as I go.
I can try and dig out the original uncompiled scripts. If I can find them I'll put then up on my (kind 0f) website, and let you know here. It won't be in the next couple of weeks though I'm afraid.
Kind regards,
Leigh Hunt
I haven't worked on those scripts since, erm, probably Live V8, so I'm imagining there is some change in the LOM that has messed up the script.
I wish I could help more, but I don't really use Ableton at all anymore, and only own up to V9. Even so,I don't own a C4 anymore, so couldn't test as I go.
I can try and dig out the original uncompiled scripts. If I can find them I'll put then up on my (kind 0f) website, and let you know here. It won't be in the next couple of weeks though I'm afraid.
Kind regards,
Leigh Hunt
Re: The MACKIE C4 PRO ABLETON USERS THREAD
Leigh, thanks very much for chiming in!
2 things:
1. the "keyword can't be an expression" error: is that what you are referring to when you say that the LOM has changed?
2. are there ways to persuade you to invest some time into this?
I'm willing to spend a little bit of money plus I'm quite good at testing
Thanks in advance and best regards
2 things:
1. the "keyword can't be an expression" error: is that what you are referring to when you say that the LOM has changed?
2. are there ways to persuade you to invest some time into this?
Thanks in advance and best regards
-
sissySpacecraft
- Posts: 18
- Joined: Thu Sep 24, 2015 2:41 am
Re: The MACKIE C4 PRO ABLETON USERS THREAD
Nice.
Randi - Thanks for the links. I will check out the code and see what I can see.
Leigh - whenever you can post the original code (if you find it) will be great.
Also, I think I found the (NOTAM) "Max/MSP" Mackie C4 project I remember downloading 5 or so years ago. I'm going to have a look at possibly updating both for Live 10/Max 8...
Randi - Thanks for the links. I will check out the code and see what I can see.
Leigh - whenever you can post the original code (if you find it) will be great.
Also, I think I found the (NOTAM) "Max/MSP" Mackie C4 project I remember downloading 5 or so years ago. I'm going to have a look at possibly updating both for Live 10/Max 8...
-
sissySpacecraft
- Posts: 18
- Joined: Thu Sep 24, 2015 2:41 am
Re: The MACKIE C4 PRO ABLETON USERS THREAD
Randi - This is a HUGE guess, but still an educated guess.
It looks like the only file that contains those errors is EncoderController.py and all the errors seem to be generated by "the same line":
The only differences between each "same line" are the numbers, most of the time the number is 6, but there are also instances of 1, 2, 3, and 5 in the file. Thanks to the decompiled default scripts on GitHub (thanks Julien Bayle), I was able to review the ChannelStripController.py file in the default Mackie Control folder and find a very similar "same line" in that file
So, my wild-ass guess is that you might be able to substitute 'for_display_only=False' in the EncoderController.py file everywhere you see '6=False' (or whatever number) and that change might allow Live to compile the file.
However, there are two big caveats. One is that if Live couldn't handle the original compiled version that was subsequently decompiled and "fixed", Live probably won't be able to handle the recompiled "fixed" version either (if the "fix" even compiles). The second caveat is those changing numbers. I suspect that "for_display_only" is associated with one of those numbers, not all of them. But I can't tell which, and I can't tell what other "field names" or "property names" might be associated with those other numbers.
To learn more I suspect we might need to wait for Leigh's source files if he can find them.
I kind of successfully set up a Python development environment. I successfully(?) followed the instructions in the README.org file (.../ProgramData/Ableton/Resources/Python/abl.webconnector) but my IDE (PyCharm) still indicates it could find "no module named 'Live' "
It looks like the only file that contains those errors is EncoderController.py and all the errors seem to be generated by "the same line":
Code: Select all
self.__reassign_encoder_parameters(6=False)Code: Select all
self.__reassign_channel_strip_parameters(for_display_only=False)However, there are two big caveats. One is that if Live couldn't handle the original compiled version that was subsequently decompiled and "fixed", Live probably won't be able to handle the recompiled "fixed" version either (if the "fix" even compiles). The second caveat is those changing numbers. I suspect that "for_display_only" is associated with one of those numbers, not all of them. But I can't tell which, and I can't tell what other "field names" or "property names" might be associated with those other numbers.
To learn more I suspect we might need to wait for Leigh's source files if he can find them.
I kind of successfully set up a Python development environment. I successfully(?) followed the instructions in the README.org file (.../ProgramData/Ableton/Resources/Python/abl.webconnector)
- * I "easy installed" all of the .egg components under site-packages (except ones named setuptools*)
* I "pip installed" all of the "dev requirements" (in dev_requirements.txt)
* and I ran "nosetests" which initially failed 4 tests out of 124. But I was able to correct the problems and get 124 passing tests. (I suspect the problems I fixed are/were related to the fact that I'm running on Windows but the tests were expecting to be running on a Mac)
Code: Select all
import LiveRe: The MACKIE C4 PRO ABLETON USERS THREAD
check this post viewtopic.php?f=1&t=200513&sid=dcc06161 ... 3#p1579236 .
should fix your "Live" problem
should fix your "Live" problem
-
sissySpacecraft
- Posts: 18
- Joined: Thu Sep 24, 2015 2:41 am
Re: The MACKIE C4 PRO ABLETON USERS THREAD
Randi,
Thanks for the link. I read all 5 pages there, but didn't really learn anything new about my situation. It seems like the most direct way to do remote script programming is to use Live as the python "virtual environment". You just create a new folder under /midiRemoteScripts that "is" your "new" remote script to Live and add a couple of boilerplate files in the folder to initialize your "project" in Live. (as described in the first post of that other thread). Thereafter, your development loop is classic "printf debugging". Make a change, make Live compile the script, test your change with Live running, check the log, rinse and repeat. This kind of development doesn't require a "proper" IDE like PyCharm, you can use any text editor (preferably one that can do python syntax highlighting) like Notepad++. I suspect a "proper" python IDE might even get in the way of this "Live virtual environment" method of script development.
However, I have a couple of problems with this approach, one is that it feels like "developing in production" to be using my actual Live installation as my "development environment". I'd rather build my own "python virtual environment" if possible where I can "play" in a space safe for mistakes, big-mistakes, and then only move "scripts" in which I have high confidence over to the actual Live environment where they will be tested "for real". Doesn't mean I wouldn't also be doing a lot of "printf debugging" once testing "for real". But it does mean I can catch a lot of errors before they ever get to Live in a really tight feedback loop compared to the printf cycle. It also means I'm much less likely to completely jack up my actual Live installation. The other problem I have is that it doesn't really teach me much about actual python development practices outside the Ableton world.
I'm sure a "proper" Python IDE "virtual environment" for developing remote scripts is possible. The programmers at Ableton are sure to be doing it that way. I'm not going to give up easily, but I will eventually. If I can't break through, at some point, I will fall back to the "easy way".
Thanks for the link. I read all 5 pages there, but didn't really learn anything new about my situation. It seems like the most direct way to do remote script programming is to use Live as the python "virtual environment". You just create a new folder under /midiRemoteScripts that "is" your "new" remote script to Live and add a couple of boilerplate files in the folder to initialize your "project" in Live. (as described in the first post of that other thread). Thereafter, your development loop is classic "printf debugging". Make a change, make Live compile the script, test your change with Live running, check the log, rinse and repeat. This kind of development doesn't require a "proper" IDE like PyCharm, you can use any text editor (preferably one that can do python syntax highlighting) like Notepad++. I suspect a "proper" python IDE might even get in the way of this "Live virtual environment" method of script development.
However, I have a couple of problems with this approach, one is that it feels like "developing in production" to be using my actual Live installation as my "development environment". I'd rather build my own "python virtual environment" if possible where I can "play" in a space safe for mistakes, big-mistakes, and then only move "scripts" in which I have high confidence over to the actual Live environment where they will be tested "for real". Doesn't mean I wouldn't also be doing a lot of "printf debugging" once testing "for real". But it does mean I can catch a lot of errors before they ever get to Live in a really tight feedback loop compared to the printf cycle. It also means I'm much less likely to completely jack up my actual Live installation. The other problem I have is that it doesn't really teach me much about actual python development practices outside the Ableton world.
I'm sure a "proper" Python IDE "virtual environment" for developing remote scripts is possible. The programmers at Ableton are sure to be doing it that way. I'm not going to give up easily, but I will eventually. If I can't break through, at some point, I will fall back to the "easy way".
-
sissySpacecraft
- Posts: 18
- Joined: Thu Sep 24, 2015 2:41 am
Re: The MACKIE C4 PRO ABLETON USERS THREAD
Randi -
I have confirmed that making the for_display_only change I guessed will allow Leigh's C4 script to load into v10.1.7. I think maybe the compiled .pyc version you decompiled wouldn't run in the latest version of Live because the code had been compiled using an earlier version of Python than Live uses now.
I didn't find any issues logged when Live started and compiled the module, and the custom C4 script was available for me to select in the control surface dropdown in Options. However, that's more or less the end of the good news. The script does not appear to be very functional for me. It works, or parts of it work. For example, I can adjust Live's selected channel's volume control using the lower rightmost encoder on the C4 and the level adjustment is displayed on the C4. I can also use the mouse to change the volume in Live and the change is reflected on the C4. You will see all the working parts for yourself after you make that "code change" and make it an active remote script in your setup... For counter example, the "record arm" and "mute" controls don't seem to work from the C4, but the C4 display will update "off" to "on" and back when you use the mouse to arm/mute or disarm/unmute the selected track in Live. Similarly I can't seem to change the selected track from the C4.
I will be making changes to update the script for my own use case, and this is a great start in that direction. Let me know if you are able to load the script, and what works for you.
Peace,
me
I have confirmed that making the for_display_only change I guessed will allow Leigh's C4 script to load into v10.1.7. I think maybe the compiled .pyc version you decompiled wouldn't run in the latest version of Live because the code had been compiled using an earlier version of Python than Live uses now.
I didn't find any issues logged when Live started and compiled the module, and the custom C4 script was available for me to select in the control surface dropdown in Options. However, that's more or less the end of the good news. The script does not appear to be very functional for me. It works, or parts of it work. For example, I can adjust Live's selected channel's volume control using the lower rightmost encoder on the C4 and the level adjustment is displayed on the C4. I can also use the mouse to change the volume in Live and the change is reflected on the C4. You will see all the working parts for yourself after you make that "code change" and make it an active remote script in your setup... For counter example, the "record arm" and "mute" controls don't seem to work from the C4, but the C4 display will update "off" to "on" and back when you use the mouse to arm/mute or disarm/unmute the selected track in Live. Similarly I can't seem to change the selected track from the C4.
I will be making changes to update the script for my own use case, and this is a great start in that direction. Let me know if you are able to load the script, and what works for you.
Peace,
me
Re: The MACKIE C4 PRO ABLETON USERS THREAD
will test and report back, thanks! 
Re: The MACKIE C4 PRO ABLETON USERS THREAD
it worked!
Though admittedly as you described
However the log file threw these errors:
2020-02-12T02:13:28.818956: info: RemoteScriptError: Traceback (most recent call last):
2020-02-12T02:13:28.819023: info: RemoteScriptError: File "C:\ProgramData\Ableton\Live 10 Beta\Resources\MIDI Remote Scripts\MackieC4\MackieC4.py", line 200, in build_midi_map
2020-02-12T02:13:28.819250: info: RemoteScriptError:
2020-02-12T02:13:28.819300: info: RemoteScriptError: Live.MidiMap.forward_midi_note(self.handle(), midi_map_handle, 0, i)
2020-02-12T02:13:28.819361: info: RemoteScriptError: NameError
2020-02-12T02:13:28.819408: info: RemoteScriptError: :
2020-02-12T02:13:28.819452: info: RemoteScriptError: global name 'Live' is not defined
2020-02-12T02:13:28.819497: info: RemoteScriptError:
2020-02-12T02:13:28.856736: info: RemoteScriptError: Traceback (most recent call last):
2020-02-12T02:13:28.856799: info: RemoteScriptError: File "C:\ProgramData\Ableton\Live 10 Beta\Resources\MIDI Remote Scripts\MackieC4\MackieC4.py", line 200, in build_midi_map
2020-02-12T02:13:28.857014: info: RemoteScriptError:
2020-02-12T02:13:28.857064: info: RemoteScriptError: Live.MidiMap.forward_midi_note(self.handle(), midi_map_handle, 0, i)
2020-02-12T02:13:28.857125: info: RemoteScriptError: NameError
2020-02-12T02:13:28.857183: info: RemoteScriptError: :
2020-02-12T02:13:28.857231: info: RemoteScriptError: global name 'Live' is not defined
2020-02-12T02:13:28.857275: info: RemoteScriptError:
That's probably the LOM changes Leigh was referring to. Will investigate further
Though admittedly as you described
However the log file threw these errors:
2020-02-12T02:13:28.818956: info: RemoteScriptError: Traceback (most recent call last):
2020-02-12T02:13:28.819023: info: RemoteScriptError: File "C:\ProgramData\Ableton\Live 10 Beta\Resources\MIDI Remote Scripts\MackieC4\MackieC4.py", line 200, in build_midi_map
2020-02-12T02:13:28.819250: info: RemoteScriptError:
2020-02-12T02:13:28.819300: info: RemoteScriptError: Live.MidiMap.forward_midi_note(self.handle(), midi_map_handle, 0, i)
2020-02-12T02:13:28.819361: info: RemoteScriptError: NameError
2020-02-12T02:13:28.819408: info: RemoteScriptError: :
2020-02-12T02:13:28.819452: info: RemoteScriptError: global name 'Live' is not defined
2020-02-12T02:13:28.819497: info: RemoteScriptError:
2020-02-12T02:13:28.856736: info: RemoteScriptError: Traceback (most recent call last):
2020-02-12T02:13:28.856799: info: RemoteScriptError: File "C:\ProgramData\Ableton\Live 10 Beta\Resources\MIDI Remote Scripts\MackieC4\MackieC4.py", line 200, in build_midi_map
2020-02-12T02:13:28.857014: info: RemoteScriptError:
2020-02-12T02:13:28.857064: info: RemoteScriptError: Live.MidiMap.forward_midi_note(self.handle(), midi_map_handle, 0, i)
2020-02-12T02:13:28.857125: info: RemoteScriptError: NameError
2020-02-12T02:13:28.857183: info: RemoteScriptError: :
2020-02-12T02:13:28.857231: info: RemoteScriptError: global name 'Live' is not defined
2020-02-12T02:13:28.857275: info: RemoteScriptError:
That's probably the LOM changes Leigh was referring to. Will investigate further
Re: The MACKIE C4 PRO ABLETON USERS THREAD
btw have you seen this? https://app.assembla.com/spaces/live-ap ... Up_Eclipse old but might still be helpful
Re: The MACKIE C4 PRO ABLETON USERS THREAD
ok comparing the main file to what I found here: https://github.com/gluon/AbletonLive10. ... Control.py ,
I changed line 38 of the mackiec4.py to
import Live, MidiRemoteScript
(basically added "Live" to also import
after that Ableton went crazy and threw those:
2020-02-12T02:48:22.897286: info: RemoteScriptError: File "C:\ProgramData\Ableton\Live 10 Beta\Resources\MIDI Remote Scripts\MackieC4\MackieC4.py", line 115, in update_display
2020-02-12T02:48:22.897452: info: RemoteScriptError:
2020-02-12T02:48:22.897498: info: RemoteScriptError: c.on_update_display_timer()
2020-02-12T02:48:22.897564: info: RemoteScriptError: File "C:\ProgramData\Ableton\Live 10 Beta\Resources\MIDI Remote Scripts\MackieC4\EncoderController.py", line 621, in on_update_display_timer
2020-02-12T02:48:22.898168: info: RemoteScriptError:
2020-02-12T02:48:22.898218: info: RemoteScriptError: upper_string1 += self.__generate_6_char_string(unicode(self.__display_parameters[t][1]))
2020-02-12T02:48:22.898277: info: RemoteScriptError: IndexError
2020-02-12T02:48:22.898320: info: RemoteScriptError: :
2020-02-12T02:48:22.898362: info: RemoteScriptError: list index out of range
over and over again, but I think we're getting somewhere (I obviously do not really a clue of what I'm doing
)
I changed line 38 of the mackiec4.py to
import Live, MidiRemoteScript
(basically added "Live" to also import
after that Ableton went crazy and threw those:
2020-02-12T02:48:22.897286: info: RemoteScriptError: File "C:\ProgramData\Ableton\Live 10 Beta\Resources\MIDI Remote Scripts\MackieC4\MackieC4.py", line 115, in update_display
2020-02-12T02:48:22.897452: info: RemoteScriptError:
2020-02-12T02:48:22.897498: info: RemoteScriptError: c.on_update_display_timer()
2020-02-12T02:48:22.897564: info: RemoteScriptError: File "C:\ProgramData\Ableton\Live 10 Beta\Resources\MIDI Remote Scripts\MackieC4\EncoderController.py", line 621, in on_update_display_timer
2020-02-12T02:48:22.898168: info: RemoteScriptError:
2020-02-12T02:48:22.898218: info: RemoteScriptError: upper_string1 += self.__generate_6_char_string(unicode(self.__display_parameters[t][1]))
2020-02-12T02:48:22.898277: info: RemoteScriptError: IndexError
2020-02-12T02:48:22.898320: info: RemoteScriptError: :
2020-02-12T02:48:22.898362: info: RemoteScriptError: list index out of range
over and over again, but I think we're getting somewhere (I obviously do not really a clue of what I'm doing