Page 1 of 1

How to assign various midichannels and cc to MultiSlider?

Posted: 14 Dec 2011 11:41
by dbk
Hello,

i´m new here and totally excited that lemur found its way to the iPad.

My plan is to build a controller for the Elektron Machinedrum, due to it´s amount of controls i have the need to adress up to four different midichannels and various CC to a multislider object.

could one please point me to a tutorial or probably help me out with showing a way on how to set up the MultiSlider Object with different midichannels or CC?

for example, slider 1 would send on channel 1 CC35, slider two on channel 3 CC 110 and so on.

i´m very new to this, please go easy on me :)

Thanks a lot,
Martin

Re: How to assign various midichannels and cc to MultiSlider

Posted: 14 Dec 2011 13:06
by dbk
what i think i figured so far.

i created a custom Midi with control change 89 and channel 3 set in the Midi tab and called it "mymidi"

The MultiSlider has 4 Sliders, if i´m correct i can directly adress one of the Sliders with (for example) MultiSLider.x[0], which should be the first Slider in my array.

How can i "attach" my custom midi to MultiSlider.x[0] ?

Please bear with me if i´m on the totally wrong track here.

thanks,
martin

Re: How to assign various midichannels and cc to MultiSlider

Posted: 14 Dec 2011 14:28
by dbk
Hello,

it took me a couple of hours but i finally figured it out :) 4 sliders are exactly sending and doing what i want, fantastic :)

not sure if it´s sort of a hack but i attached my example, probably usefull to some starters like me.

if there´s a more elegant way, please let me know.

cheers,
martin

Re: How to assign various midichannels and cc to MultiSlider

Posted: 14 Dec 2011 14:58
by Macciza
Hi
Hows it going? Getting there slowly . . .
Notice how you define ' trigger1' to mean MultiSlider.x[0] ' and then you use that variable in your custom MIDI script where it means that message . . .
So that means you could just write MultiSlider.x[n] straight in the scripts trigger . . .
Cheers
MM

Re: How to assign various midichannels and cc to MultiSlider

Posted: 14 Dec 2011 15:12
by dbk
Hello,

not much of a scripting guy, so i´m quite happy with the result for a couple of hours :)

i haven´t thought of your suggestion, very smart. just deleted all the expressions and triggerd the midiscripts it the way you suggested it.
works like a charm, that´s why i was asking for opinions.

thanks for looking at it and your reply, i learned a lot from it.

cheers,
martin

attached the template, changed according to the suggestions by Macciza.

Re: How to assign various midichannels and cc to MultiSlider

Posted: 14 Dec 2011 15:31
by dbk
oh, one thing that i don´t understand.

The custom midi, why do i have to change the value according to x?

Like here: MultiSlider.x[2]

Value (on midimapping tab) has to be x[2] too, to make things work.

please let me know,

thanks again,
Martin

Re: How to assign various midichannels and cc to MultiSlider

Posted: 14 Dec 2011 17:11
by kraftf
Macciza wrote:Hi
Hows it going? Getting there slowly . . .
Notice how you define ' trigger1' to mean MultiSlider.x[0] ' and then you use that variable in your custom MIDI script where it means that message . . .
So that means you could just write MultiSlider.x[n] straight in the scripts trigger . . .
Cheers
MM
Macciza one question for you:
How would you achieve the same setup with only one custom midi message by assigning a variable to the channel parameter?
I have arleady done that but i think its kind of tricky, Would like to see your implementation. The problem is how to reference the slider number(x[n], I mean the active 'n' slider) and associate it with the channel. I can't find an expression tht does that.

Re: How to assign various midichannels and cc to MultiSlider

Posted: 14 Dec 2011 22:55
by Macciza
Hi
The MultiSlider x value is an array or vector of values meaning it can be a list of values in this case the values of the different sliders in order . . .
So doing x[n] access the 3rd value of the array (it counts from zero) - x by itself is the whole array {0,1,2,3}
so basically you could just write x[2] in both fields of your midimapping tab because you are already inside the MultiSlider object

Kraaft - not sure what you mean - send all sliders with one custom midi? or just using chan var in each one . . .

Cheers
MM

Re: How to assign various midichannels and cc to MultiSlider

Posted: 15 Dec 2011 09:24
by kraftf
Macciza wrote:Hi
The MultiSlider x value is an array or vector of values meaning it can be a list of values in this case the values of the different sliders in order . . .
So doing x[n] access the 3rd value of the array (it counts from zero) - x by itself is the whole array {0,1,2,3}
so basically you could just write x[2] in both fields of your midimapping tab because you are already inside the MultiSlider object

Kraaft - not sure what you mean - send all sliders with one custom midi? or just using chan var in each one . . .

Cheers
MM
I mean one custom midi for all sliders and and each slider is sending in a different midi channel according to the position in the array x[n], thus the 'n' number. I am attaching a multislider with one custom midi sysex message which send a different byte according to the midi channel. Have a look at it and tell me if you would do it otherwise.

Re: How to assign various midichannels and cc to MultiSlider

Posted: 16 Dec 2011 03:46
by Macciza
Hi
You caught me out with with the .zip when the file isn't zipped so it fails decompression best to add .txt . . .

I am no expert but I think you are declaring a few too many user-variables for things you could do directly in the code . . .
Have not had a good look at it all yet but does it do what you want and can you improve it later are all that matters

I would suggest going through the projects and dissecting sections that you like to see how they work as well . . .

Cheers
MM