Hello, I'm trying to give StemFX a little more flexibility by using the microphone knob to control effect wetness when a pad is held down. I'm struggling to get the encoding of the knob though, I've mapped this to a pad for testing:
mic_volume & param_cast & debug.
For some reason, this always prints 1.00 and not the actual encoding of the knob. I've also tried setting a variable on a MIC_VOL activity:
(set '$mic_vol' mic_volume) & (get_var '$mic_vol' & param_cast & debug) & (var_list)
When I turn the mic knob, the correct value gets printed, but I don't see it updating in var list, the field is just empty. Also, if I run the exact same debugging code from a pad:
get_var '$mic_vol' & param_cast & debug
I get 'No param'. Lastly, I've tried using get_level:
get_level 'mic' & param_cast & debug
But this, of course, also doesn't work, and always prints 0.00. I'm not quite sure what I'm doing wrong here haha, I would love some help, thanks.
mic_volume & param_cast & debug.
For some reason, this always prints 1.00 and not the actual encoding of the knob. I've also tried setting a variable on a MIC_VOL activity:
(set '$mic_vol' mic_volume) & (get_var '$mic_vol' & param_cast & debug) & (var_list)
When I turn the mic knob, the correct value gets printed, but I don't see it updating in var list, the field is just empty. Also, if I run the exact same debugging code from a pad:
get_var '$mic_vol' & param_cast & debug
I get 'No param'. Lastly, I've tried using get_level:
get_level 'mic' & param_cast & debug
But this, of course, also doesn't work, and always prints 0.00. I'm not quite sure what I'm doing wrong here haha, I would love some help, thanks.
Posted Thu 06 Feb 25 @ 1:49 am
set '$MyVariableName'
Simple as that. And the variable doesn't need to be named after mic, nor affect / refer to the mic.
Simple as that. And the variable doesn't need to be named after mic, nor affect / refer to the mic.
Posted Thu 06 Feb 25 @ 8:05 am
I understand how to set variables, but I'm having trouble assigning the correct mic level to the variable. None of the methods I used in my original post are working, for example, if I map this to the MIC_VOL action of my controller:
set '$micVolTest' `mic_volume & param_cast`
I can see this setting the variable in var list, but it always sets it to 1.000 regardless of the actual position of the mic level knob. But if I print mic_volume with debug, it prints the correct value, but like I said the value in var list does not reflect this for some reason:
(set '$micVolTest' `mic_volume & param_cast`) & (mic_volume & param_cast & debug)
This is what I have mapped to my MIC_VOL activity, and here is a screenshot of the correct values printed to debug, but the incorrect value in var list:
set '$micVolTest' `mic_volume & param_cast`
I can see this setting the variable in var list, but it always sets it to 1.000 regardless of the actual position of the mic level knob. But if I print mic_volume with debug, it prints the correct value, but like I said the value in var list does not reflect this for some reason:
(set '$micVolTest' `mic_volume & param_cast`) & (mic_volume & param_cast & debug)
This is what I have mapped to my MIC_VOL activity, and here is a screenshot of the correct values printed to debug, but the incorrect value in var list:

Posted Thu 06 Feb 25 @ 7:32 pm
When you map a knob on your controller you tell it what you want it to do.
From what I get, you want to use the knob to set a variable that you will use on another script.
SO, the correct way is to map the MIC_VOL key of your controller to just set '$MyVar'
There's no need to mess with anything microphone related unless you want somehow to retain the original functionality among the new one.
Your primary mistake is that you try to set a variable by assigning a vdj script action to it. That's not the correct way to do it (for what you're looking to do)
When you use set '%MyVar' `mic_volume` you are effectively copying the value of mic volume to the variable. However, you are NOT controlling the mic volume anymore with your knob.
In theory you should use mic_volume & set '$MyVar' `mic_volume` This action firstly sets the microphone volume and then copies it to '$MyVar'
Since you are setting the knob value to mic_volume before copying it to '$MyVar' the above script can be simplified to set them both at the same time based on the knob value mic_volume & set '$MyVar'
And since most likely you don't want this knob to control the mic volume anymore (since you'll use it for something else) you can simplify it down to set '$MyVar'
From what I get, you want to use the knob to set a variable that you will use on another script.
SO, the correct way is to map the MIC_VOL key of your controller to just set '$MyVar'
There's no need to mess with anything microphone related unless you want somehow to retain the original functionality among the new one.
Your primary mistake is that you try to set a variable by assigning a vdj script action to it. That's not the correct way to do it (for what you're looking to do)
When you use set '%MyVar' `mic_volume` you are effectively copying the value of mic volume to the variable. However, you are NOT controlling the mic volume anymore with your knob.
In theory you should use mic_volume & set '$MyVar' `mic_volume` This action firstly sets the microphone volume and then copies it to '$MyVar'
Since you are setting the knob value to mic_volume before copying it to '$MyVar' the above script can be simplified to set them both at the same time based on the knob value mic_volume & set '$MyVar'
And since most likely you don't want this knob to control the mic volume anymore (since you'll use it for something else) you can simplify it down to set '$MyVar'
Posted Fri 07 Feb 25 @ 9:30 am
Ohhhh I see, I didn't understand that the encoding of the knob was passed in implicitly when setting the variable, thank you! Now I'm having trouble using the value of the variable with the padfx verb. Here's what I have mapped to a pad:
(padfx "echo" `get_var '$stemFXWetness'` smart_pressed "stemfx:vocal")
I know the command works with hardcoded values, i.e.:
(padfx "echo" 1.00 smart_pressed "stemfx:vocal")
This works fine, but when I try to use the variable, it doesn't do anything. I know the variable is being set correctly from debugging, and I thought my use of backticks is correct for this situation, but I must be missing something. I also tried adding & param_cast, but no luck there either. Thanks again for your help and patience PhantomDeeJay!
(padfx "echo" `get_var '$stemFXWetness'` smart_pressed "stemfx:vocal")
I know the command works with hardcoded values, i.e.:
(padfx "echo" 1.00 smart_pressed "stemfx:vocal")
This works fine, but when I try to use the variable, it doesn't do anything. I know the variable is being set correctly from debugging, and I thought my use of backticks is correct for this situation, but I must be missing something. I also tried adding & param_cast, but no luck there either. Thanks again for your help and patience PhantomDeeJay!
Posted Sat 08 Feb 25 @ 1:11 am
padfx verb doesn't accept actions as parameters.
Try this way.
(get_var $stemFXWetness & param_cast & effect_slider echo 1 & padfx echo smart_pressed "stemfx:vocal")
Try this way.
(get_var $stemFXWetness & param_cast & effect_slider echo 1 & padfx echo smart_pressed "stemfx:vocal")
Posted Sat 08 Feb 25 @ 1:32 am
locoDog wrote :
padfx verb doesn't accept actions as parameters.
Try this way.
(get_var $stemFXWetness & param_cast & effect_slider echo 1 & padfx echo smart_pressed "stemfx:vocal")
Try this way.
(get_var $stemFXWetness & param_cast & effect_slider echo 1 & padfx echo smart_pressed "stemfx:vocal")
It didn't work, is it impossible then?
Posted Sat 08 Feb 25 @ 1:51 am