🔥 Lifetime deal! Get Control Surface Studio for Just £67 👉 Click Here To Get It
Time left... mailtimers.com
⚠️ Lifetime licenses are ending soon, get yours before they're gone ⚠️
Your shopping cart is empty.

Set swing amount

Submitted by Sitrusfrukt on Tue, 04/26/2022 - 23:38
Sitrusfrukt
Control Surface Studio User

Hello there, Peepz!

The Apc 20 controller script of my dreams is coming along amazingly. I truly had no idea of the power CSS was capable of. I cannot recommend it enough, although the learning curve is steep.

As of now there is really nothing but one thing missing, which is a way to set swing amount for record quantize.

So, if I've tried to simply map the self.song().swing_amount to slider 9's latest velocity value on my APC 20. This does not work. I've also tried this using value from ranges, but I'm just not getting any swing when I quantize.

This is how it looks:
self.song().swing_amount = self.midi_cc_ch_0_val_14.cur_val

I've also tried mapping swing amount to a button, but still no bueno.

This should work on both record quantize and requests to quantize, both in the script and manually in live, right?

What am I doing wrong?

Any help is much appreciated!

The best
S

upload files: 
Topic Category: 

5 Responses

Comments

Sitrusfrukt
Control Surface Studio User
#1

So this is the error I'm getting in the log:

(APC20 CUSTOM) There's a problem with 'Action Block 1' in reaction 'Quantize swing' (from 'Slider 9 was moved' listener) >>

Sitrusfrukt
Control Surface Studio User
#2

I'm sorry, I didn't include the whole string (I think this community could benefit from a better forum platform, but I'm not complaining):

(APC20 CUSTOM) There's a problem with 'Action Block 1' in reaction 'Quantize swing' (from 'Slider 9 was moved' listener) >>
>> list indices must be integers or slices, not NoneType

Sitrusfrukt
Control Surface Studio User
#3

Hey, John!

I'm sorry to bother you, but do you have any input here?

Sitrusfrukt
Control Surface Studio User
#4

Is there anyone out there that could shed some light on this?

JohnC
Forum Admin
#5

Hi,

So sorry for not answering your question!
Although this code looks correct: self.song().swing_amount
Its range goes from 0.0 to 1.0
So attempting to apply the velocity value directly to it will cause an error = as this goes from 0 - 127.
You will want to use the 'get value from ranges' setting. This will transform the range of your slider into a suitable range for the swing amount.
See this tutorial for all of the details: https://youtu.be/1Bni9Yqtks0