One Fader controlling multiple CCs
One Fader controlling multiple CCs
Hello!!
First post in this fantastic forum! I would like to create a fader that will be sending out values to four differently scaled CC controllers. What would be the best approach for doing that?
For example: let's say, the fader is sending out CC data to controllers 1, 2, 3 and 4. When the fader's x-value is moving from 0-20, i want CC1 to send values from 0-20, CC2 from 0-0, CC3 from 0-127 and CC4 from 127-80. When the fader's x-value is moving from 21-40, i want CC1 to send values from 21-40, CC2 from 0-100, CC3 from 127-80 and CC4 from 81-100. And so on...
I hope, somebody understands what i mean and can point me in the right direction to do this!
Thanks!!
Kostia.
First post in this fantastic forum! I would like to create a fader that will be sending out values to four differently scaled CC controllers. What would be the best approach for doing that?
For example: let's say, the fader is sending out CC data to controllers 1, 2, 3 and 4. When the fader's x-value is moving from 0-20, i want CC1 to send values from 0-20, CC2 from 0-0, CC3 from 0-127 and CC4 from 127-80. When the fader's x-value is moving from 21-40, i want CC1 to send values from 21-40, CC2 from 0-100, CC3 from 127-80 and CC4 from 81-100. And so on...
I hope, somebody understands what i mean and can point me in the right direction to do this!
Thanks!!
Kostia.
Re: One Fader controlling multiple CCs
Well
You already have something that will pretty much do all that I think . .
Have a look at the inbuilt project iPad - AB Faderlab . . .
If you want a basic custom thing we can probably come up with a few options
AB's project is maybe a bit hardcore for you to start hacking it too much
A variation on this has been on my mind of late as well . . .
You already have something that will pretty much do all that I think . .
Have a look at the inbuilt project iPad - AB Faderlab . . .
If you want a basic custom thing we can probably come up with a few options
AB's project is maybe a bit hardcore for you to start hacking it too much
A variation on this has been on my mind of late as well . . .
iMac 2.8G i7 12G 10.6.8/10.7.2, Legacy Dexter/Lemur, Liine Lemur/iPad2, KMI SoftStep, 12Step & QuNeo , B-Controls, Mackie C4 etc
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]
Re: One Fader controlling multiple CCs
Thanks, Macciza!
Yes, the Faderlab is amazing but indeed a little too complicated for me to tweak around.
What Faderlab does that I don't need: I don't need to be able to customize the curves on my Lemur while playing. It would be enough for me to have fixed values for the curves that I would program once and for all in the editor.
What Faderlab doesnt't do (or, at least I cannot find out, how) but what I do need: one fader should output values to multiple CC controllers.
Would be great if you could help me out!
Thanks - Kostia.
Yes, the Faderlab is amazing but indeed a little too complicated for me to tweak around.
What Faderlab does that I don't need: I don't need to be able to customize the curves on my Lemur while playing. It would be enough for me to have fixed values for the curves that I would program once and for all in the editor.
What Faderlab doesnt't do (or, at least I cannot find out, how) but what I do need: one fader should output values to multiple CC controllers.
Would be great if you could help me out!
Thanks - Kostia.
Re: One Fader controlling multiple CCs
Hi Kostia, I'm having the same problem more or less. I'm going to repost this here because I put it in troubleshooting area and it probably doesn't belong there.
I'm trying to get one fader to send 2 messages to different CC's but along the way trying to link 2 faders so they move in unison. Both almost work. Neither works properly.
for my fader named Level (BTW this is working and controls RME totalmix channel ADAT out 7
expression x is as follows
Message BO- control change
controller 102
Value x[0] any
Scale 0-127
channel 10 to 10
for my fader named Level2 (BTW this is working and controls RME totalmix channel ADAT out 8)
expression x is as follows
Message BO- control change
controller 103
Value x[0] any
Scale 0-127
channel 10 to 10
This script makes both faders move in unison, but they doesn't send the cc message on x
on expression x
Level.x=x;
Level2.x=x;
This custom midi message applied to fader "Level" makes "Level2" work but it's jumpy and "Level" stops working.
weird. why is my x disappearing.
It's as close as I've gotten.
custom midi message named "l"
Message BO- control change
controller 103
Value x[0]
Scale 0-127
channel 10 to 10
Trigger Level
There's nothing in the manual that gives any detail about this kind of assignment. I've read the hell out of it.
Tried all kinds of different variations.... Am I not using parentheses correctly or something.
Little help please.
Thanks
sleeper
Newbie
Posts: 5
Joined: 26 Feb 2014 22:33
Top
I'm trying to get one fader to send 2 messages to different CC's but along the way trying to link 2 faders so they move in unison. Both almost work. Neither works properly.
for my fader named Level (BTW this is working and controls RME totalmix channel ADAT out 7
expression x is as follows
Message BO- control change
controller 102
Value x[0] any
Scale 0-127
channel 10 to 10
for my fader named Level2 (BTW this is working and controls RME totalmix channel ADAT out 8)
expression x is as follows
Message BO- control change
controller 103
Value x[0] any
Scale 0-127
channel 10 to 10
This script makes both faders move in unison, but they doesn't send the cc message on x
on expression x
Level.x=x;
Level2.x=x;
This custom midi message applied to fader "Level" makes "Level2" work but it's jumpy and "Level" stops working.
weird. why is my x disappearing.
It's as close as I've gotten.
custom midi message named "l"
Message BO- control change
controller 103
Value x[0]
Scale 0-127
channel 10 to 10
Trigger Level
There's nothing in the manual that gives any detail about this kind of assignment. I've read the hell out of it.
Tried all kinds of different variations.... Am I not using parentheses correctly or something.
Little help please.
Thanks
sleeper
Newbie
Posts: 5
Joined: 26 Feb 2014 22:33
Top
Re: One Fader controlling multiple CCs
HiK
Faderlab will do it by using the Master Fader to control the rest of it
Other roll-your-own basic alternatives? Yeah you just need to work out the maths of it . .
make an x2 variable and alter the x value ion someway and midi map that value
Thats pretty much what the breakpoint objects are doing in FL but you can just code them
I figure s you could define arrays similar to what a breakpoint does then use the breakpointat() function
Or just come up with some other formula that provides the needed function of x values . ..
Then map that to a Fader and use the 0-127 scaling . .
Will do something up later . . .
Faderlab will do it by using the Master Fader to control the rest of it
Other roll-your-own basic alternatives? Yeah you just need to work out the maths of it . .
make an x2 variable and alter the x value ion someway and midi map that value
Thats pretty much what the breakpoint objects are doing in FL but you can just code them
I figure s you could define arrays similar to what a breakpoint does then use the breakpointat() function
Or just come up with some other formula that provides the needed function of x values . ..
Then map that to a Fader and use the 0-127 scaling . .
Will do something up later . . .
iMac 2.8G i7 12G 10.6.8/10.7.2, Legacy Dexter/Lemur, Liine Lemur/iPad2, KMI SoftStep, 12Step & QuNeo , B-Controls, Mackie C4 etc
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]
Re: One Fader controlling multiple CCs
To OP: Please give more specific numbers so that we can come up with an example....It looks like you havent thought out the implications of the 0-127 range of midi messages
0-20, 20-40,......80-100, 100-120.....what happens then to the rest 7 values? Actually the x value is in a 0-1 range so I assume the values you have given in your example are based on a 0-127 (midi coompatible) range....is that though what you are after? Or perhaps you are looking for a way to have 5 sub-ranges of x? (0 - 0.20, 0.20 - 0.40 ...0.8 - 1)
0-20, 20-40,......80-100, 100-120.....what happens then to the rest 7 values? Actually the x value is in a 0-1 range so I assume the values you have given in your example are based on a 0-127 (midi coompatible) range....is that though what you are after? Or perhaps you are looking for a way to have 5 sub-ranges of x? (0 - 0.20, 0.20 - 0.40 ...0.8 - 1)
Re: One Fader controlling multiple CCs
HI Softcore, Macciza and sleeper!
Thank you all for your help and sorry for my delay. Unfortunately I have to be offline a lot at the moment.
@ Softcore: Thank you!! Of course I forgot that x-values go from 0 to 1 instead of 0-127. Now (thanks to your reply and after putting an *127 after my Fader.x-values) things finally started working.
Now, here's an example of what I want to achieve. Basically I need some help in scaling those (linear) ranges in an elegant way.
(left-hand side: range of Fader.x-values) / (right-hand side: range of CC values to output)
(Fader.x) / (CC1)
(0-0.234) / (0-0)
(0.234-0.631) / (0-110)
(0.631-1) / (110-0)
(Fader.x) / (CC2)
(0-0.553) / (54-127)
(0.553-1) / (127-127)
(Fader.x) / (CC3)
(0-0.234) / (0-0)
(0.234-0.553) / (0-127)
(0.553-1) / (127-127)
(Fader.x) / (CC4)
(0-0.234) / (0-0)
(0.234-0.390) / (0-70)
(0.390-0.631) / (70-100)
(0.631-1) / (100-0)
(sorry for the strange format - I don't know how to use TAB in this forum... hope you understand what I mean)
@ Macciza: Yes, I also thought of that Master Fader later. This is exactly what I need. But I still would like to do it in a more compact and less flexible way.
Unfortunately I don't understand what you mean by "make an x2 variable and alter the x value ion someway". Could you please explain that again?
And also: doesn't the breakpointat() function only work in breakpoint objects? How would I achieve this with a fader object?
@ sleeper: I'm afraid, I don't really understand what you want to achieve. To send out two different CCs you could try something like:
ctlout(0,102,Fader.x*127,1);
ctlout(0,103,Fader.x*127,1);
And if you want two exact same faders that always move in unison, you could just right-click and "Create Alias". But probably this is not what you're looking for, no?
Again, thank you all for your help!!
Kostia.
Thank you all for your help and sorry for my delay. Unfortunately I have to be offline a lot at the moment.
@ Softcore: Thank you!! Of course I forgot that x-values go from 0 to 1 instead of 0-127. Now (thanks to your reply and after putting an *127 after my Fader.x-values) things finally started working.
Now, here's an example of what I want to achieve. Basically I need some help in scaling those (linear) ranges in an elegant way.
(left-hand side: range of Fader.x-values) / (right-hand side: range of CC values to output)
(Fader.x) / (CC1)
(0-0.234) / (0-0)
(0.234-0.631) / (0-110)
(0.631-1) / (110-0)
(Fader.x) / (CC2)
(0-0.553) / (54-127)
(0.553-1) / (127-127)
(Fader.x) / (CC3)
(0-0.234) / (0-0)
(0.234-0.553) / (0-127)
(0.553-1) / (127-127)
(Fader.x) / (CC4)
(0-0.234) / (0-0)
(0.234-0.390) / (0-70)
(0.390-0.631) / (70-100)
(0.631-1) / (100-0)
(sorry for the strange format - I don't know how to use TAB in this forum... hope you understand what I mean)
@ Macciza: Yes, I also thought of that Master Fader later. This is exactly what I need. But I still would like to do it in a more compact and less flexible way.
Unfortunately I don't understand what you mean by "make an x2 variable and alter the x value ion someway". Could you please explain that again?
And also: doesn't the breakpointat() function only work in breakpoint objects? How would I achieve this with a fader object?
@ sleeper: I'm afraid, I don't really understand what you want to achieve. To send out two different CCs you could try something like:
ctlout(0,102,Fader.x*127,1);
ctlout(0,103,Fader.x*127,1);
And if you want two exact same faders that always move in unison, you could just right-click and "Create Alias". But probably this is not what you're looking for, no?
Again, thank you all for your help!!
Kostia.
Re: One Fader controlling multiple CCs
Hi
I think I preferred see in them as midi style numbers and doing the conversion . ..
Re: x2 var - if you make a variable (expression) it can use x to get its final value i.e. x*2
Midi mapping this would give the altered x value you are after . . .
Breakpointat() simply works on an array of values, such as what comes from the breakpoint object
And it interpolates based on the x,y points in those arrays...
Ordinary single arrays can be interpolated too - make a an array i.e. test and set it to {0,1,0}
Individual values are accessed via [] notation - test[0] is first test[2] is last. But you can also send floating point numbers
Add a Fader and a Monitor - set the Monitor value to test[Fader*2]. You are now interpolating between the values in the array
I guess we could now mock up a Breakpoint style array system - which is simply another array defining the x points of our values in the first array
So make another array- tests {0,0.5,1} representing time points - and use breakpointat(testx,test,Fader.x)[1] ...
So either work out if you can represent it in a single array or else work out what it would look like in a breakpoint style x,y points array
To get the values lout simply use the expressions you used in the Monitor values as new variables
ie output = breakpointat(testx,test,Fader.x)[1] and MIDI map this var. To see the value use Fader.output in the Monitor value field . .
hope that makes sense
I think I preferred see in them as midi style numbers and doing the conversion . ..
Re: x2 var - if you make a variable (expression) it can use x to get its final value i.e. x*2
Midi mapping this would give the altered x value you are after . . .
Breakpointat() simply works on an array of values, such as what comes from the breakpoint object
And it interpolates based on the x,y points in those arrays...
Ordinary single arrays can be interpolated too - make a an array i.e. test and set it to {0,1,0}
Individual values are accessed via [] notation - test[0] is first test[2] is last. But you can also send floating point numbers
Add a Fader and a Monitor - set the Monitor value to test[Fader*2]. You are now interpolating between the values in the array
I guess we could now mock up a Breakpoint style array system - which is simply another array defining the x points of our values in the first array
So make another array- tests {0,0.5,1} representing time points - and use breakpointat(testx,test,Fader.x)[1] ...
So either work out if you can represent it in a single array or else work out what it would look like in a breakpoint style x,y points array
To get the values lout simply use the expressions you used in the Monitor values as new variables
ie output = breakpointat(testx,test,Fader.x)[1] and MIDI map this var. To see the value use Fader.output in the Monitor value field . .
hope that makes sense
iMac 2.8G i7 12G 10.6.8/10.7.2, Legacy Dexter/Lemur, Liine Lemur/iPad2, KMI SoftStep, 12Step & QuNeo , B-Controls, Mackie C4 etc
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]
Re: One Fader controlling multiple CCs
a?b:c -> if a then b else c
a range minimum=min and maximum =max of a number x to be converted to a range of 0-1 you need to:
(x-min)/(max-min)
A 0 to 1 range of number x to be converted to a range minimum, maximum you have to:
x*(max-min)+min
Thats the whole ideas this is built upon - monitor objects included so that you can check each of the 4 outputs. Just map out1, out2, out3 and out4 to your desired CC (as if it were x variables, meaning you just use the mapping window after selecting each "out" variable)
NOTICE: in each "out" variable, you dont have to tick on the "scale" option of the mappings because the variables are calcuated in a 0 - 127 range
a range minimum=min and maximum =max of a number x to be converted to a range of 0-1 you need to:
(x-min)/(max-min)
A 0 to 1 range of number x to be converted to a range minimum, maximum you have to:
x*(max-min)+min
Thats the whole ideas this is built upon - monitor objects included so that you can check each of the 4 outputs. Just map out1, out2, out3 and out4 to your desired CC (as if it were x variables, meaning you just use the mapping window after selecting each "out" variable)
NOTICE: in each "out" variable, you dont have to tick on the "scale" option of the mappings because the variables are calcuated in a 0 - 127 range
- Attachments
-
- fadermaths.jzml
- (6.16 KiB) Downloaded 144 times
Re: One Fader controlling multiple CCs
@ Softcore:
OMG! This is genius
Thank you so much for the patch and also for explaining everything! This is EXACTLY what I was trying to do! And nothing stands between me and my one-fader-ADSR-controller any more!
@ Macciza:
Thanks for explaining arrays and breakpoints. I am sure that these will come in handy one day. And yes, this totally makes sense
OMG! This is genius
Thank you so much for the patch and also for explaining everything! This is EXACTLY what I was trying to do! And nothing stands between me and my one-fader-ADSR-controller any more!
@ Macciza:
Thanks for explaining arrays and breakpoints. I am sure that these will come in handy one day. And yes, this totally makes sense