Strange One – Midi Velocity Value

6.29K viewsGeneral
0
0 Comments

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.

admin Changed status to publish
Attached Files:
0

A little Python tutorial might help you out.

PYTHON BASICS
In this case “select_device” is what we call a “function“. Functions are useful because you can repeatedly call upon a block of code without having to retype everything. You just have to call upon the function’s name, in this case “select_device”.

To call upon a function we need opening and closing parentheses after the function’s name, like this: “select_device()”. These parentheses always come in a pair.

Some functions need some kind of input, which are called “arguments” in Python. In our case, the argument/input is the device we want to select. This argument needs to be put in between the opening and closing parentheses, like this: “select_device(this_is_an_argument) “

THE SYNTAX ERROR
Somewhere in the argument of the code, you have a parenthesis too many. In the picture “Syntax error.png” I colored the function and its parentheses green; the argument is colored red; and the parenthesis that you should remove is in white. Then the code should work. This is the line of code:

self.song().view.select_device(self.song().tracks[0].devices[0].chains[self.get_modifier_value(“m1”)].devices[0].chains[self.get_modifier_value(“m2”)].devices[0])

(optional) MAKING THE CODE MORE READABLE
At the moment, your argument is a huge string of code, that’s not easy to read. It might be useful to divide it into chunks. We can use variables for this purpose. Variables are like little aliases or nicknames to a string of code

In the picture “Optional.png”, the argument is broken down in 3 parts: first_device, first_chain and second_chain. So the long line of code is now replaced by the following 4 smaller lines of code:

first_device = self.song().tracks[0].devices[0]
first_chain = first_device.chains[self.get_modifier_value(“m1”)].devices[0]
second_chain = first_chain.chains[self.get_modifier_value(“m2”)].devices[0]

self.song().view.select_device(second_chain)

We only need to add the variable “second_chain” as an argument when we call the function “select_device” because “second_chain” actually contains the whole argument.

admin Changed status to publish
0

I’ll get back to you properly when I sit down and look at this again, but a quick cursory script and it seems to work.

Thank you you legend.!!!

admin Changed status to publish
Attached Files:
0

Hey Glenn,
So thank you very much for outlining the above. It took me a few times to read and digest it but it makes sense to me now in an elementary way. It’s amazing (but equally unsurprising) how such a brief syntax unravels the whole show.!

Anyway I have implemented the new code now and as far as I can tell I now have 32 encoders which are almost doing exactly what I want them to do. I have shared the code incase you and others find it useful.

There is only one glitch as far as I can tell and it leaves me scratching my head.

The endless encoders also have button functionality. I have set this button up using the controller’s set up application (‘Kilowatt’) so that when I press it it quickly switches to bank 2.

In Kilowatt I have set it up so I have 4 banks – these are similar to modes in CSS but they function slightly differently. When I change a bank in Kilowatt it allows me to change the MIDI information sent from each of the controllers physical components.

On Bank 1, when I press an encoder it ‘quick shifts’ just that one encoder to bank 2. So say on Bank 1 the encoder controllers Macro 1 on Bank 2 it controls Macro 5.

This is super dope for what I’m looking to do buuuuut when I press the encoder and quick switch to back 2, I loose the feedback from Push to the Yaeltex Controller. The Yaeltex still sends to the Push but the push does not link to the Yaeltex.

Unlike last time, when I ‘select’ either the macro or the current device, this does not resync/update functionality. What I have to do is switch the bank on the Yaeltex from 1 to 4 and back and then it updates and it works. The additional steps needed here kinda negates the benefit of the cool functionality.

I thought one solution could be to add a listener to the script so that when the button was pressed the something was fired but the button has no visual MIDI information on the CSS Midi Monitor or that of Kilowatt.

It feels a little like the end of the road for that one for me, but hey you never know.

I have made a short video to try and makes things more visually clear, whether it will be allowed on the forum or not I don’t know.

https://drive.google.com/file/d/18uhOiiBt3B35YPgWNcA1N_76sag-UZgS/view?u…

admin Changed status to publish
Attached Files:
0

This seems like the kind of problem that’s hard to figure out without the controller and software in front of you. Maybe the Bank switching on the Yaeltex doesn’t behave like you expect it to? I’m guessing that because of when you get no MIDI messages on the monitor (that’s not a CSS or Ableton problem, I think). Maybe the button loses its MIDI configuration when switching back to Bank 1 via the button press?

I would need more insight in the MIDI configuration. Maybe if you could provide the following:
– Screenshots of the MIDI Config in Kilowhatt for all banks
– Some info on how the bank switching can be done for 1 button at a time.
– The controller template you are using with your CSS script.
– A video that focuses on the MIDI Monitor while you call out which buttons you press and knobs you turn, while you recreate your problem.

I want to point out a small detail: one controller doesn’t communicate with the other controllers, at least not directly. The controllers communicate with Ableton and Ableton gives them feedback. If a controller doesn’t receive feedback, then its communication with Ableton isn’t functioning properly.

It is possible to have a Control Surface script where one controller is the input and another is the output, but there’s always Ableton in between. A practical use case for this would be to control the effects of an instrument/hardware device that has no MIDI IN but does have a USB connection (e.g. a Boss Katana).

admin Changed status to publish
Attached Files:
0

Hey Glenn,

Thanks for your post. I’ve provided some more information for you below. Before I get too far into it, if it sounds interesting to you, I would be more than happy to pay for a zoom consultation or something like this. I have a few niggles that I need to iron out and I feel like your expertise could save me many future headaches.

The first screen shot gives you and overview of Kilowatt – the online program used for programming the Yaeltex Turn.
In the top left you can see the bank selection tabs
Each of the blue ‘cards’ represents a module (in this instance an encoder and a switch)
On the right you can see the switch configuration – you can see here it is set to “quick shift to bank + note”
Pressing the encoder switches the output of the current card to a different bank so it outputs a new message. Currently it switches from CH1/CC1 to Ch3/CC1. I added the “+ note function” to see if I could use that as some sort of ‘bang’ in order to sync Ableton and the Yaeltex – the note is CH 1 / Note On 33/ 0.

*- Screenshots of the MIDI Config in Kilowhatt for all banks* – a screen shot won’t help much unfortunately as the switch functionality is hidden behind each card, I have outline each bank below

Bank 1
Encoder # Midi Channel Parameter No
1 1 1
2 1 2
3 1 3
…. …. ….
32 1 32

Bank 2
Encoder # Midi Channel Parameter No
1 2 1
2 2 2
3 2 3
…. …. ….
32 2 32

The switches don’t send midi data per say, they only send midi information when the ‘note’ option is added, although this is not related to the bank switch.

“Some info on how the bank switching can be done for 1 button at a time.”
Sure thing. The general concept is that Kilowatt allows you to set up and map ‘banks’ to buttons on your controller (similar to modes in CSS I guess). If you switch between banks using the ‘primary’ bank button then the whole interface of the Yaletex Controller changes. No MIDI message appears on the MIDI monitor when doing this.
In kilowatt you can change the functionality of the switches, and one of the options is ‘quick shift to bank’ (screen shot 2). This means that the encoder, and ONLY the encoder that you press will quickly shift to the bank you choose (Bank 2). In the instance I have set up encoder 1 would go from CH1/CC1 to CH3/cc1.

The controller script is attached. The knobs and buttons on the 2nd and 3rd rows aren’t applicable to this part of the code.

Bank 1 is encoders 1 to 32 on CH1
Bank 2 is encoders 1 to 32 on CH3
Bank 3 & 4 aren’t so relevant but they are on CH4 & 5

Video 1
https://drive.google.com/file/d/1jOBV5OHF_iibIouc7x6cFz3QBhSwjp0L/view?u…

Video 2
https://drive.google.com/file/d/1Z7iYn4sYnkykAHtzcfvXjKlLkT1HMMPE/view?u…

“I want to point out a small detail: one controller doesn’t communicate with the other controllers, at least not directly.”
– I hear you – this makes sense in terms of how i understand the issue. In layman’s terms it feels like pressing the switch to bank button somehow interrupts or misaligns the code written in the .json

admin Changed status to publish
Attached Files: