Isit possible to store and load presets of faders positions?

Discuss problems and solutions.
Post Reply
jenz
Newbie
Posts: 46
Joined: 21 Jan 2012 06:02

Isit possible to store and load presets of faders positions?

Post by jenz »

With let's say... 16 presets slots and one button to save. How do you script that?

Thanx!!!
Macciza
Regular
Posts: 1315
Joined: 07 Dec 2011 04:57
Location: Sydney, Australia.

Re: Isit possible to store and load presets of faders positi

Post by Macciza »

Hi
I have posted an old tutorial on Storing Values to the Liine Library - http://liine.net/en/community/user-library/view/365/

Also many other Projects use variations on this basic theme so it worth looking through some of them as well . . .

Cheers
MM
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]
jenz
Newbie
Posts: 46
Joined: 21 Jan 2012 06:02

Re: Isit possible to store and load presets of faders positi

Post by jenz »

Does it works with faders too? I have replaced
The "Multislider" with the name of my fader
in the script but it dosent work... What am I
doing wrong?
Softcore
Regular
Posts: 1613
Joined: 04 Nov 2012 08:34

Re: Isit possible to store and load presets of faders positi

Post by Softcore »

it wouldn't work with Faders because faders cannot be multi - like the sliders. Create an empty expression, call it Multifader, and in there type

{Fader1.x, Fader2.x, .......} and so on. be carefull to use the names of your faders in there.

Replace in the codes given wherever you see

Code: Select all

MultiSlider.x

with

Code: Select all

Multifader
and wherever you see

Code: Select all

Multislider.x[]
with

Code: Select all

Multifader[]
..... Be carefull to not change any data inside the brackets - for example if you have "Multislider.x" replace it "Multifader"

I think it should work then!
Softcore
Regular
Posts: 1613
Joined: 04 Nov 2012 08:34

Re: Isit possible to store and load presets of faders positi

Post by Softcore »

Noa ctually it still doesnt work that way, hang on a sec....lol
Softcore
Regular
Posts: 1613
Joined: 04 Nov 2012 08:34

Re: Isit possible to store and load presets of faders positi

Post by Softcore »

Ok here you go, here's an example!
tutorial_storing_faders.jzml
(50.98 KiB) Downloaded 76 times
@Macciza if you read this: if we have a vector

Multifader= {Fader1.x, Fader2.x, Fader3.x}

Is there a way to quickly retrieve the contents of the vector as strings I mean we cant script, for example

for (i=0; i<16; i++)
{
setexpression('MultiFader','x', 12+i)
}

Actually what Im asking is.....can what I achieved above by creating two vectors, one for the actual fader values and one for the Fader object names can be achieved in any other way, more elegantly?
I guess it would involve "for" loops and getobject(), nextobject() functions correct?
Softcore
Regular
Posts: 1613
Joined: 04 Nov 2012 08:34

Re: Isit possible to store and load presets of faders positi

Post by Softcore »

No wait I've got it!

here it is! declaring the first object (fader) as a variable, and getting the next one in each iteration of "i".....Hoorayyyy!
tutorial_storing_faders2.jzml
(48.76 KiB) Downloaded 82 times
@Jenz.....be carefull THIS version will only work if your faders are one after the other in the "tree" structure - in other words if you have named them wisely enough so that they appear alphabetically one next to the other. Of course yous till have to fill the "Multifaders" vector with the correct values (fadernames followed by .x)

If for some reason you cant do this....then try the previous example and of course replace in the vectors "Multifaders" and "Faders" with the actual names of your faders.
jenz
Newbie
Posts: 46
Joined: 21 Jan 2012 06:02

Re: Isit possible to store and load presets of faders positi

Post by jenz »

Wow!!!! It's working!!! Thank you so much!!!!
Post Reply