Strange One – Midi Velocity Value
Hi Gang,
I have attached the .json Script incase its useful.
Weird one here, I am using Ableton, A Yaeltex Turn & Ableton Push 2.
I have a set up here, an instrument rack (1) with two other instrument racks (2a & 2b) or ‘chains’ embedded within.
I have set up my CSS script so every-time a new chain is selected the encoder on my Yaeltex is updated and will control Macro 1 on that chain.
The feedback between the Yaeltex and Ableton is fine. When I move the knob on one or the other then I get a feedback response every time.
The issue comes when I introduce Push into the mix. When I open Ableton I do get three way feedback between Ableton, Push & The Yaeltex – each device feeds back to the other. When I change to a different chain I still get feedback from Ableton and the Push but the Yaeltex stops giving me visual feedback.
When I move the endless encoder on the Yaeltex there is a Jump from the encoder to the Value on Ableton. I know Value Scale is out there but this is not a viable solution for this issue.
What I need is the value across all of the devices to be the same at all times. I’m very close but there is just one glitch which I need to iron out.
When I tried your script with my device, I got an error when the Chain Selector Value was higher than the amount of available Chains (with Device in the Chain). Maybe this error is causing your problems. Here are 3 ways of dealing with this error:
1) LOOPING THROUGH THE CHAINS
json file = testt (copy)_0_LOOP
This method you can setup without any custom code. It loops through all the Chains of the 1st Device of the 1st Track. Then it checks for every Chain if the Loop Iteration Number (which is the same as the Chain’s number) is Equal to Modifier m1. If it finds a Chain that meets this condition, it performs the Action.
2) CONDITION THAT COMPARES CHAIN LIST LENGTH TO MODIFIER m1
json file = testt (copy)_0_CONDITION
This uses some Custom Code. As a Condition, the following code is used:
len(self.song().tracks[0].devices[0].chains) > self.get_modifier_value(“m1”)
This code checks if the Length of the List of Chains (in the 1st Device of the 1st Track) is Greater Than the Value of Modifier m1. Why use Greater Than?
Say you have a List of 5 Chains, as an example. The index numbers associated to each Chain start at 0, meaning that the first Chain gets index 0, the second Chain gets index 1 … all the way to the fifth Chain that gets index 4. The index number is the number we use to refer to an item in a list. But when we ask for the length of a list, we get the actual amount of Chains that are in this List, which is 5.
Modifier m1 represents the index number of the Chain we want to call upon. So the highest valid number that Modifier m1 can be is 4 because the highest Chain index is 4. This means that, as long as the Length of the List (= 5) is higher than m1 (so 4 or less), we can move on to the Action of sending the Macro Value to the MIDI controller.
3) TRY / EXCEPT
json file = testt (copy)_0_TRY_EXCEPT
This method uses Custom Code that might not be obvious if you’re not familiar with Python.
Your original line of code (line 2 in Try_Except.png) was put inside a Try / Except Statement .
This Statement tries if your line of code works without producing any errors. No errors = no worries. When an error IS produced, then the statement produces whatever comes after “except”, in this case we “return” (meaning we end the Reaction).
This third method was the first one I used but then I thought not everyone might understand what’s happening and I went to find a few other methods.
Sign up
User registration is currently not allowed.